(*
	AIM EXPRESS long form for ISO/DIS 10303-240
        Len Slovensky
	2003-09-23
	ISO TC184/SC4/WG3 N1371
	Supercedes ISO TC184/SC4/WG3 N1169	
*)
SCHEMA process_planning_schema;

  CONSTANT
  dummy_gri : geometric_representation_item := representation_item('') || 
                 geometric_representation_item();
  dummy_tri : topological_representation_item := representation_item('') 
                 || topological_representation_item();
  END_CONSTANT;

  TYPE action_item  = SELECT
    (feature_dependency,
     product_definition_formation);
  END_TYPE; -- action_item

  TYPE action_method_item =  SELECT
    (externally_defined_schema);
  END_TYPE; -- action_method_item

  TYPE action_request_item  = SELECT
    (product_definition_formation,
     fixture_contract,
     tool_contract);
  END_TYPE; -- action_request_item

  TYPE ahead_or_behind  = ENUMERATION OF
    (exact,
     ahead,
     behind);
  END_TYPE; -- ahead_or_behind

  TYPE amount_of_substance_measure =  REAL;
  END_TYPE; -- amount_of_substance_measure

  TYPE angle_relator =  ENUMERATION OF
    (equal,
     small,
     large);
  END_TYPE; -- angle_relator

  TYPE approval_item =  SELECT
    (revision);
  END_TYPE; -- approval_item

  TYPE area_measure =  REAL;
  END_TYPE; -- area_measure

  TYPE attribute_type =  SELECT
    (label,
     text);
  END_TYPE; -- attribute_type

  TYPE axis2_placement =  SELECT
    (axis2_placement_2d,
     axis2_placement_3d);
  END_TYPE; -- axis2_placement

  TYPE b_spline_curve_form =  ENUMERATION OF
    (elliptic_arc,
     polyline_form,
     parabolic_arc,
     circular_arc,
     unspecified,
     hyperbolic_arc);
  END_TYPE; -- b_spline_curve_form

  TYPE b_spline_surface_form =  ENUMERATION OF
    (surf_of_linear_extrusion,
     plane_surf,
     generalised_cone,
     toroidal_surf,
     conical_surf,
     spherical_surf,
     unspecified,
     ruled_surf,
     surf_of_revolution,
     cylindrical_surf,
     quadric_surf);
  END_TYPE; -- b_spline_surface_form

  TYPE boolean_operand =  SELECT
    (solid_model);
  END_TYPE; -- boolean_operand

  TYPE celsius_temperature_measure  = REAL;
  END_TYPE; -- celsius_temperature_measure

  TYPE characterized_action_definition =  SELECT
    (action,
     action_method,
     action_method_relationship,
     action_relationship);
  END_TYPE; -- characterized_action_definition

  TYPE characterized_definition =  SELECT
    (characterized_object,
     characterized_product_definition,
     shape_definition);
  END_TYPE; -- characterized_definition

  TYPE characterized_material_property  = SELECT
    (material_property_representation);
  END_TYPE; -- characterized_material_property

  TYPE characterized_product_definition =  SELECT
    (product_definition,
     product_definition_relationship);
  END_TYPE; -- characterized_product_definition

  TYPE characterized_resource_definition =  SELECT
    (action_resource,
     action_resource_relationship,
     action_resource_requirement);
  END_TYPE; -- characterized_resource_definition

  TYPE classification_item =  SELECT
    (externally_defined_representation_with_parameters);
  END_TYPE; -- classification_item

  TYPE contract_item =  SELECT
    (process_plan_specification,
     document_reference,
     fixture_assembly,
     organization,
     product_definition_formation,
     tool_assembly);
  END_TYPE; -- contract_item

  TYPE count_measure =  NUMBER;
  END_TYPE; -- count_measure

  TYPE curve_on_surface =  SELECT
    (pcurve,
     surface_curve,
     composite_curve_on_surface);
  END_TYPE; -- curve_on_surface

  TYPE date_item =  SELECT
    (process_plan_security,
     versioned_action_request);
  END_TYPE; -- date_item

  TYPE date_time_or_event_occurrence =  SELECT
    (date_time_select);
  END_TYPE; -- date_time_or_event_occurrence

  TYPE date_time_select =  SELECT
    (date,
     local_time,
     date_and_time);
  END_TYPE; -- date_time_select

  TYPE day_in_month_number =  INTEGER;
  WHERE
    wr1: (1 <= SELF) AND (SELF <= 31);
  END_TYPE; -- day_in_month_number

  TYPE derived_property_select =  SELECT
    (property_definition,
     action_property,
     resource_property);
  END_TYPE; -- derived_property_select

  TYPE description_attribute_select =  SELECT
    (action_request_solution,
     application_context,
     approval_role,
     date_role,
     effectivity,
     external_source,
     organization_role,
     person_and_organization,
     property_definition_representation,
     representation);
  END_TYPE; -- description_attribute_select

  TYPE dimension_count =  INTEGER;
  WHERE
    wr1: SELF > 0;
  END_TYPE; -- dimension_count

  TYPE dimensional_characteristic =  SELECT
    (dimensional_location,
     dimensional_size);
  END_TYPE; -- dimensional_characteristic

  TYPE document_reference_item =  SELECT
    (action_method,
     action_resource_requirement,
     controller,
     date_and_time,
     drawing,
     externally_defined_schema,
     fixture_assembly,
     fixture_assembly_element,
     machine_usage,
     process_activity,
     process_plan_activity,
     product_definition,
     product_definition_formation,
     property_definition,
     tool_assembly,
     tool_assembly_element,
     tool_data);
  END_TYPE; -- document_reference_item

  TYPE document_usage_constraint_item =  SELECT
    (illustration);
  END_TYPE; -- document_usage_constraint_item

  TYPE effectivity_item =  SELECT
    (product_definition_formation);
  END_TYPE; -- effectivity_item

  TYPE electric_current_measure =  REAL;
  END_TYPE; -- electric_current_measure

  TYPE external_identification_item =  SELECT
    (document,
     externally_defined_class,
     externally_defined_general_property);
  END_TYPE; -- external_identification_item

  TYPE  founded_item_select = SELECT
    (founded_item,
     representation_item);
  END_TYPE; -- founded_item_select

  TYPE  geometric_set_select = SELECT
    (point,
     curve,
     surface);
  END_TYPE; -- geometric_set_select

  TYPE  group_item = SELECT
    (workstation,
     instanced_feature);
  END_TYPE; -- group_item

  TYPE  hour_in_day = INTEGER;
  WHERE
    wr1: (0 <= SELF) AND (SELF < 24);
  END_TYPE; -- hour_in_day

  TYPE  id_attribute_select = SELECT
    (action,
     address,
     product_category,
     property_definition,
     shape_aspect,
     shape_aspect_relationship,
     application_context,
     group,
     organizational_project,
     representation);
  END_TYPE; -- id_attribute_select

  TYPE  identification_assignment_item = SELECT
    (document_file);
  END_TYPE; -- identification_assignment_item

  TYPE  identifier = STRING;
  END_TYPE; -- identifier

  TYPE  knot_type = ENUMERATION OF
    (uniform_knots,
     quasi_uniform_knots,
     piecewise_bezier_knots,
     unspecified);
  END_TYPE; -- knot_type

  TYPE  label = STRING;
  END_TYPE; -- label

  TYPE  length_measure = REAL;
  END_TYPE; -- length_measure

  TYPE  limit_condition = ENUMERATION OF
    (regardless_of_feature_size,
     maximum_material_condition,
     least_material_condition);
  END_TYPE; -- limit_condition

  TYPE  list_of_reversible_topology_item = LIST [0:?] OF
              reversible_topology_item;
  END_TYPE; -- list_of_reversible_topology_item

  TYPE  luminous_intensity_measure = REAL;
  END_TYPE; -- luminous_intensity_measure

  TYPE mass_measure = REAL;
  END_TYPE; -- mass_measure

  TYPE  measure_value = SELECT
    (length_measure,
     mass_measure,
     time_measure,
     electric_current_measure,
     thermodynamic_temperature_measure,
     celsius_temperature_measure,
     amount_of_substance_measure,
     luminous_intensity_measure,
     plane_angle_measure,
     solid_angle_measure,
     area_measure,
     volume_measure,
     ratio_measure,
     parameter_value,
     positive_length_measure,
     positive_plane_angle_measure,
     count_measure);
  END_TYPE; -- measure_value

  TYPE  minute_in_hour = INTEGER;
  WHERE
    wr1: (0 <= SELF) AND (SELF <= 59);
  END_TYPE; -- minute_in_hour

  TYPE  month_in_year_number = INTEGER;
  WHERE
    wr1: (1 <= SELF) AND (SELF <= 12);
  END_TYPE; -- month_in_year_number

  TYPE  name_attribute_select = SELECT
    (action_request_solution,
     address,
     derived_unit,
     effectivity,
     person_and_organization,
     product_definition,
     property_definition_representation);
  END_TYPE; -- name_attribute_select

  TYPE  organization_item = SELECT
    (action,
     process_plan_activity,
     fixture_assembly_element,
     known_source,
     machine,
     part_contract,
     product_definition,
     tool_assembly_element);
  END_TYPE; -- organization_item

  TYPE  parameter_value = REAL;
  END_TYPE; -- parameter_value

  TYPE  pcurve_or_surface = SELECT
    (pcurve,
     surface);
  END_TYPE; -- pcurve_or_surface

  TYPE  person_organization_select = SELECT
    (person,
     organization,
     person_and_organization);
  END_TYPE; -- person_organization_select

  TYPE  plane_angle_measure = REAL;
  END_TYPE; -- plane_angle_measure

  TYPE  positive_length_measure = length_measure;
  WHERE
    wr1: SELF > 0;
  END_TYPE; -- positive_length_measure

  TYPE  positive_plane_angle_measure = plane_angle_measure;
  WHERE
    wr1: SELF > 0;
  END_TYPE; -- positive_plane_angle_measure

  TYPE  preferred_surface_curve_representation = ENUMERATION OF
    (pcurve_s2,
     pcurve_s1,
     curve_3d);
  END_TYPE; -- preferred_surface_curve_representation

  TYPE  process_or_process_relationship = SELECT
    (product_definition_process,
     property_process,
     relationship_with_condition);
  END_TYPE; -- process_or_process_relationship

  TYPE  product_or_formation_or_definition = SELECT
    (product,
     product_definition_formation,
     product_definition);
  END_TYPE; -- product_or_formation_or_definition

  TYPE  property_or_shape_select = SELECT
    (property_definition,
     shape_definition);
  END_TYPE; -- property_or_shape_select

  TYPE  ratio_measure = REAL;
  END_TYPE; -- ratio_measure

  TYPE  relationship_with_condition = SELECT
    (action_method_relationship,
     action_relationship);
  END_TYPE; -- relationship_with_condition

  TYPE  represented_definition = SELECT
    (general_property,
     property_definition,
     property_definition_relationship,
     shape_aspect,
     shape_aspect_relationship);
  END_TYPE; -- represented_definition

  TYPE  reversible_topology = SELECT
    (reversible_topology_item,
     list_of_reversible_topology_item,
     set_of_reversible_topology_item);
  END_TYPE; -- reversible_topology

  TYPE  reversible_topology_item = SELECT
    (edge,
     path,
     face,
     face_bound,
     closed_shell,
     open_shell);
  END_TYPE; -- reversible_topology_item

  TYPE  role_select = SELECT
    (action_assignment,
     action_request_assignment,
     approval_assignment,
     approval_date_time,
     contract_assignment,
     document_reference,
     effectivity_assignment,
     group_assignment,
     security_classification_assignment);
  END_TYPE; -- role_select

  TYPE  second_in_minute = REAL;
  WHERE
    wr1: (0 <= SELF) AND (SELF <= 60);
  END_TYPE; -- second_in_minute

  TYPE  security_classification_item = SELECT
    (process_plan_activity,
     process_plan_version);
  END_TYPE; -- security_classification_item

  TYPE  set_of_reversible_topology_item = SET [0:?] OF
              reversible_topology_item;
  END_TYPE; -- set_of_reversible_topology_item

  TYPE  shape_definition = SELECT
    (product_definition_shape,
     shape_aspect,
     shape_aspect_relationship);
  END_TYPE; -- shape_definition

  TYPE  shell = SELECT
    (vertex_shell,
     wire_shell,
     open_shell,
     closed_shell);
  END_TYPE; -- shell

  TYPE  si_prefix = ENUMERATION OF
    (exa,
     pico,
     mega,
     femto,
     atto,
     centi,
     nano,
     hecto,
     micro,
     tera,
     giga,
     milli,
     peta,
     deci,
     kilo,
     deca);
  END_TYPE; -- si_prefix

  TYPE  si_unit_name = ENUMERATION OF
    (hertz,
     degree_celsius,
     siemens,
     sievert,
     lux,
     watt,
     ohm,
     second,
     becquerel,
     pascal,
     henry,
     tesla,
     volt,
     joule,
     kelvin,
     ampere,
     gram,
     steradian,
     mole,
     lumen,
     gray,
     candela,
     farad,
     radian,
     newton,
     metre,
     weber,
     coulomb);
  END_TYPE; -- si_unit_name

  TYPE  solid_angle_measure = REAL;
  END_TYPE; -- solid_angle_measure

  TYPE  source_item = SELECT
    (identifier);
  END_TYPE; -- source_item

  TYPE  supported_item = SELECT
    (action_directive,
     action,
     action_method);
  END_TYPE; -- supported_item

  TYPE  surface_boundary = SELECT
    (boundary_curve,
     degenerate_pcurve);
  END_TYPE; -- surface_boundary

  TYPE  surface_model = SELECT
    (shell_based_surface_model);
  END_TYPE; -- surface_model

  TYPE  text = STRING;
  END_TYPE; -- text

  TYPE  thermodynamic_temperature_measure = REAL;
  END_TYPE; -- thermodynamic_temperature_measure

  TYPE  time_measure = REAL;
  END_TYPE; -- time_measure

  TYPE  tolerance_method_definition = SELECT
    (tolerance_value,
     limits_and_fits);
  END_TYPE; -- tolerance_method_definition

  TYPE  tolerance_select = SELECT
    (geometric_tolerance,
     plus_minus_tolerance);
  END_TYPE; -- tolerance_select

  TYPE  transformation = SELECT
    (functionally_defined_transformation);
  END_TYPE; -- transformation

  TYPE  transition_code = ENUMERATION OF
    (discontinuous,
     cont_same_gradient_same_curvature,
     cont_same_gradient,
     continuous);
  END_TYPE; -- transition_code

  TYPE  trimming_preference = ENUMERATION OF
    (parameter,
     unspecified,
     cartesian);
  END_TYPE; -- trimming_preference

  TYPE  trimming_select = SELECT
    (cartesian_point,
     parameter_value);
  END_TYPE; -- trimming_select

  TYPE  unit = SELECT
    (named_unit,
     derived_unit);
  END_TYPE; -- unit

  TYPE  value_qualifier = SELECT
    (precision_qualifier,
     type_qualifier,
     uncertainty_qualifier);
  END_TYPE; -- value_qualifier

  TYPE  vector_or_direction = SELECT
    (vector,
     direction);
  END_TYPE; -- vector_or_direction

  TYPE  volume_measure = REAL;
  END_TYPE; -- volume_measure

  TYPE  wireframe_model = SELECT
    (shell_based_wireframe_model,
     edge_based_wireframe_model);
  END_TYPE; -- wireframe_model

  TYPE  year_number = INTEGER;
  END_TYPE; -- year_number
  ENTITY  action;
      name          : label;
      description   : OPTIONAL text;
      chosen_method : action_method;
    DERIVE
      id : identifier := get_id_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
  END_ENTITY; -- action

  ENTITY  action_assignment
    ABSTRACT SUPERTYPE;
      assigned_action : action;
    DERIVE
      role : object_role := get_role(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
  END_ENTITY; -- action_assignment

  ENTITY  action_directive;
      name        : label;
      description : OPTIONAL text;
      analysis    : text;
      comment     : text;
      requests    : SET [1:?] OF versioned_action_request;
  END_ENTITY; -- action_directive

  ENTITY  action_method;
      name        : label;
      description : OPTIONAL text;
      consequence : text;
      purpose     : text;
  END_ENTITY; -- action_method

  ENTITY  action_method_assignment
    ABSTRACT SUPERTYPE;
      assigned_action_method : action_method;
      role                   : action_method_role;
  END_ENTITY; -- action_method_assignment

  ENTITY  action_method_relationship;
      name            : label;
      description     : OPTIONAL text;
      relating_method : action_method;
      related_method  : action_method;
  END_ENTITY; -- action_method_relationship

  ENTITY  action_method_role;
      name        : label;
      description : OPTIONAL text;
  END_ENTITY; -- action_method_role

  ENTITY  action_method_with_associated_documents
    SUBTYPE OF (action_method);
      documents : SET [1:?] OF document;
  END_ENTITY; -- action_method_with_associated_documents

  ENTITY  action_property;
      name        : label;
      description : text;
      definition  : characterized_action_definition;
  END_ENTITY; -- action_property

  ENTITY  action_property_representation;
      name           : label;
      description    : text;
      property       : action_property;
      representation : representation;
  END_ENTITY; -- action_property_representation

  ENTITY  action_relationship;
      name            : label;
      description     : OPTIONAL text;
      relating_action : action;
      related_action  : action;
  END_ENTITY; -- action_relationship

  ENTITY  action_request_assignment
    ABSTRACT SUPERTYPE;
      assigned_action_request : versioned_action_request;
    DERIVE
      role : object_role := get_role(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
  END_ENTITY; -- action_request_assignment

  ENTITY  action_request_solution;
      method  : action_method;
      request : versioned_action_request;
    DERIVE
      description : text := get_description_value(SELF);
      name        : label := get_name_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
      wr2: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
  END_ENTITY; -- action_request_solution

  ENTITY  action_resource;
      name        : label;
      description : OPTIONAL text;
      usage       : SET [1:?] OF supported_item;
      kind        : action_resource_type;
  END_ENTITY; -- action_resource

  ENTITY  action_resource_relationship;
      name              : label;
      description       : OPTIONAL text;
      relating_resource : action_resource;
      related_resource  : action_resource;
  END_ENTITY; -- action_resource_relationship

  ENTITY  action_resource_requirement;
      name        : label;
      description : text;
      kind        : resource_requirement_type;
      operations  : SET [1:?] OF characterized_action_definition;
  END_ENTITY; -- action_resource_requirement
  ENTITY  action_resource_type;
      name : label;
  END_ENTITY; -- action_resource_type

  ENTITY  address;
      internal_location       : OPTIONAL label;
      street_number           : OPTIONAL label;
      street                  : OPTIONAL label;
      postal_box              : OPTIONAL label;
      town                    : OPTIONAL label;
      region                  : OPTIONAL label;
      postal_code             : OPTIONAL label;
      country                 : OPTIONAL label;
      facsimile_number        : OPTIONAL label;
      telephone_number        : OPTIONAL label;
      electronic_mail_address : OPTIONAL label;
      telex_number            : OPTIONAL label;
    DERIVE
      name : label := get_name_value(SELF);
      url  : identifier := get_id_value(SELF);
    WHERE
      wr1: ((((((((((EXISTS(internal_location) OR EXISTS(street_number)) 
             OR EXISTS(street)) OR EXISTS(postal_box)) OR EXISTS(town)) 
             OR EXISTS(region)) OR EXISTS(postal_code)) OR EXISTS(country)) 
             OR EXISTS(facsimile_number)) OR EXISTS(telephone_number)) OR
             EXISTS(electronic_mail_address)) OR EXISTS(telex_number);
  END_ENTITY; -- address

  ENTITY  advanced_brep_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MANIFOLD_SOLID_BREP',
               'PROCESS_PLANNING_SCHEMA.FACETED_BREP',
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM',
               'PROCESS_PLANNING_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) 
               = 1)) )) = 0;
      wr2: SIZEOF(QUERY ( it <* SELF.items | (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MANIFOLD_SOLID_BREP',
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1) )) 
               > 0;
      wr3: SIZEOF(QUERY ( msb <* QUERY ( it <* SELF.items | (
             'PROCESS_PLANNING_SCHEMA.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) )
                | (NOT (SIZEOF(QUERY ( csh <* msb_shells(msb) | (NOT (
               SIZEOF(QUERY ( fcs <* csh\connected_face_set.cfs_faces | (
           NOT ('PROCESS_PLANNING_SCHEMA.ADVANCED_FACE' IN TYPEOF(fcs))) )) 
               = 0)) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( msb <* QUERY ( it <* items | (
             'PROCESS_PLANNING_SCHEMA.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) )
                | ('PROCESS_PLANNING_SCHEMA.ORIENTED_CLOSED_SHELL' IN 
               TYPEOF(msb\manifold_solid_brep.outer)) )) = 0;
      wr5: SIZEOF(QUERY ( brv <* QUERY ( it <* items | (
               'PROCESS_PLANNING_SCHEMA.BREP_WITH_VOIDS' IN TYPEOF(it)) )
                | (NOT (SIZEOF(QUERY ( csh <* brv\brep_with_voids.voids | 
               csh\oriented_closed_shell.orientation )) = 0)) )) = 0;
      wr6: SIZEOF(QUERY ( mi <* QUERY ( it <* items | (
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | (
         NOT ('PROCESS_PLANNING_SCHEMA.ADVANCED_BREP_SHAPE_REPRESENTATION' 
               IN TYPEOF(mi\mapped_item.mapping_source.
               mapped_representation))) )) = 0;
  END_ENTITY; -- advanced_brep_shape_representation
  ENTITY  advanced_face
    SUBTYPE OF (face_surface);
    WHERE
      wr1 : SIZEOF(['PROCESS_PLANNING_SCHEMA.ELEMENTARY_SURFACE',
                'PROCESS_PLANNING_SCHEMA.B_SPLINE_SURFACE',
                'PROCESS_PLANNING_SCHEMA.SWEPT_SURFACE'] * TYPEOF(
                face_geometry)) = 1;
      wr2 : SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | (
               'PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) )
                 | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds.bound\path.
                edge_list | (NOT ('PROCESS_PLANNING_SCHEMA.EDGE_CURVE' IN 
                TYPEOF(oe\oriented_edge.edge_element))) )) = 0)) )) = 0;
      wr3 : SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | (
               'PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) )
                 | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds.bound\path.
                edge_list | (NOT (SIZEOF(['PROCESS_PLANNING_SCHEMA.LINE',
                'PROCESS_PLANNING_SCHEMA.CONIC',
                'PROCESS_PLANNING_SCHEMA.POLYLINE',
                'PROCESS_PLANNING_SCHEMA.SURFACE_CURVE',
                'PROCESS_PLANNING_SCHEMA.B_SPLINE_CURVE'] * TYPEOF(oe.
                edge_element\edge_curve.edge_geometry)) = 1)) )) = 0)) )) =
                 0;
      wr4 : SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | (
               'PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) )
                 | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds.bound\path.
                edge_list | (NOT ((('PROCESS_PLANNING_SCHEMA.VERTEX_POINT' 
                IN TYPEOF(oe\edge.edge_start)) AND (
                'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(oe\edge
                .edge_start\vertex_point.vertex_geometry))) AND ((
                'PROCESS_PLANNING_SCHEMA.VERTEX_POINT' IN TYPEOF(oe\edge.
                edge_end)) AND ('PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' 
              IN TYPEOF(oe\edge.edge_end\vertex_point.vertex_geometry))))) )) 
                = 0)) )) = 0;
      wr5 : SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | (
               'PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) )
                 | ('PROCESS_PLANNING_SCHEMA.ORIENTED_PATH' IN TYPEOF(
                elp_fbnds.bound)) )) = 0;
      wr6 : (NOT ('PROCESS_PLANNING_SCHEMA.SWEPT_SURFACE' IN TYPEOF(
               face_geometry))) OR (SIZEOF(['PROCESS_PLANNING_SCHEMA.LINE',
                'PROCESS_PLANNING_SCHEMA.CONIC',
                'PROCESS_PLANNING_SCHEMA.POLYLINE',
                'PROCESS_PLANNING_SCHEMA.B_SPLINE_CURVE'] * TYPEOF(
                face_geometry\swept_surface.swept_curve)) = 1);
      wr7 : SIZEOF(QUERY ( vlp_fbnds <* QUERY ( bnds <* bounds | (
             'PROCESS_PLANNING_SCHEMA.VERTEX_LOOP' IN TYPEOF(bnds.bound)) )
                 | (NOT (('PROCESS_PLANNING_SCHEMA.VERTEX_POINT' IN TYPEOF(
                vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex)) AND (
                'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(
                vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex\
                vertex_point.vertex_geometry)))) )) = 0;
      wr8 : SIZEOF(QUERY ( bnd <* bounds | (NOT (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.EDGE_LOOP',
                'PROCESS_PLANNING_SCHEMA.VERTEX_LOOP'] * TYPEOF(bnd.bound)) 
                = 1)) )) = 0;
      wr9 : SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | (
               'PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) )
                 | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds.bound\path.
                edge_list | (('PROCESS_PLANNING_SCHEMA.SURFACE_CURVE' IN 
                TYPEOF(oe\oriented_edge.edge_element\edge_curve.
                edge_geometry)) AND (NOT (SIZEOF(QUERY ( sc_ag <* oe.
                edge_element\edge_curve.edge_geometry\surface_curve.
                associated_geometry | (NOT (
           'PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(sc_ag))) )) = 0))) )) 
                = 0)) )) = 0;
      wr10: ((NOT ('PROCESS_PLANNING_SCHEMA.SWEPT_SURFACE' IN TYPEOF(
                face_geometry))) OR ((NOT (
                'PROCESS_PLANNING_SCHEMA.POLYLINE' IN TYPEOF(face_geometry\
                swept_surface.swept_curve))) OR (SIZEOF(face_geometry\
                swept_surface.swept_curve\polyline.points) >= 3))) AND (
                SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | (
               'PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) )
                 | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds.bound\path.
                edge_list | (('PROCESS_PLANNING_SCHEMA.POLYLINE' IN TYPEOF(
                oe\oriented_edge.edge_element\edge_curve.edge_geometry)) 
                AND (NOT (SIZEOF(oe\oriented_edge.edge_element\edge_curve.
                edge_geometry\polyline.points) >= 3))) )) = 0)) )) = 0);
  END_ENTITY; -- advanced_face

  ENTITY  allowed_time
    SUBTYPE OF (action_property);
    WHERE
      wr1: NOT (SIZEOF(QUERY ( apr <* USEDIN(SELF,
        'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.TIME_MEASURE_WITH_UNIT'] * TYPEOF(
             it)) = 2) AND (it.name = 'allowance factor')) )) = 1) )) = 0);
      wr2: NOT (SIZEOF(QUERY ( apr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (NOT (SIZEOF(QUERY ( it <* apr.representation.items | ((
               SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.TIME_MEASURE_WITH_UNIT'] * TYPEOF(
               it)) = 2) AND (it.name = 'standard time')) )) = 1)) )) = 0);
      wr3: NOT (SIZEOF(QUERY ( apr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
              TYPEOF(it)) AND (it.name = 'allowed type')) )) <= 1) )) = 0);
      wr4: SIZEOF(QUERY ( apr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
              TYPEOF(it)) AND (it.name = 'allowed time source')) )) = 1) )) 
               = 1;
  END_ENTITY; -- allowed_time

  ENTITY  alternate_action_method_relationship
    SUBTYPE OF (action_method_relationship);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_ACTIVITY' IN TYPEOF(SELF.
               related_method);
      wr2: 'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_ACTIVITY' IN TYPEOF(SELF.
               relating_method);
  END_ENTITY; -- alternate_action_method_relationship

  ENTITY  alternate_plan_relationship
    SUBTYPE OF (action_relationship);
    WHERE
      wr1: ('PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_VERSION' IN TYPEOF(SELF.
               relating_action)) AND (
               'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_VERSION' IN TYPEOF(
               SELF.related_action));
      wr2: SIZEOF(QUERY ( edir <* USEDIN(SELF.related_action,
               'PROCESS_PLANNING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM') | (
               edir.attribute_value = 'alternate process plan') )) = 1;
  END_ENTITY; -- alternate_plan_relationship

  ENTITY  ancillary_activity
    SUBTYPE OF (manufacturing_activity);
  END_ENTITY; -- ancillary_activity

  ENTITY  ancillary_setup
    SUBTYPE OF (process_plan_activity);
  END_ENTITY; -- ancillary_setup

  ENTITY  angular_location
    SUBTYPE OF (dimensional_location);
      angle_selection : angle_relator;
  END_ENTITY; -- angular_location

  ENTITY  angular_size
    SUBTYPE OF (dimensional_size);
      angle_selection : angle_relator;
  END_ENTITY; -- angular_size

  ENTITY  angularity_tolerance
    SUBTYPE OF (geometric_tolerance_with_datum_reference);
    WHERE
      wr1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.
               datum_system) < 3;
  END_ENTITY; -- angularity_tolerance

  ENTITY  apex
    SUBTYPE OF (derived_shape_aspect);
  END_ENTITY; -- apex

  ENTITY  application_context;
      application : label;
    DERIVE
      description : text := get_description_value(SELF);
      id          : identifier := get_id_value(SELF);
    INVERSE
      context_elements : SET [1:?] OF application_context_element FOR 
                            frame_of_reference;
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
      wr2: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
  END_ENTITY; -- application_context

  ENTITY  application_context_element
    SUPERTYPE OF (ONEOF (product_context,product_definition_context));
      name               : label;
      frame_of_reference : application_context;
  END_ENTITY; -- application_context_element

  ENTITY  application_protocol_definition;
      status                                    : label;
      application_interpreted_model_schema_name : label;
      application_protocol_year                 : year_number;
      application                               : application_context;
  END_ENTITY; -- application_protocol_definition

  ENTITY  applied_action_assignment
    SUBTYPE OF (action_assignment);
      items : SET [1:?] OF action_item;
  END_ENTITY; -- applied_action_assignment

  ENTITY  applied_action_method_assignment
    SUBTYPE OF (action_method_assignment);
      items : SET [1:?] OF action_method_item;
  END_ENTITY; -- applied_action_method_assignment

  ENTITY  applied_action_request_assignment
    SUBTYPE OF (action_request_assignment);
      items : SET [1:?] OF action_request_item;
  END_ENTITY; -- applied_action_request_assignment

  ENTITY  applied_approval_assignment
    SUBTYPE OF (approval_assignment);
      items : SET [1:?] OF approval_item;
  END_ENTITY; -- applied_approval_assignment

  ENTITY  applied_area
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
               SELF.of_shape);
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT ((2 <= SIZEOF(impl_rep.
               used_representation.items)) AND (SIZEOF(impl_rep.
               used_representation.items) <= 3))) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (SIZEOF(QUERY ( pdr <* USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' 
               + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) AND (SIZEOF(QUERY ( srwp_i <* pdr.
               used_representation.items | (NOT (srwp_i.name IN [
           'orientation','effective length','maximum length'])) )) > 0)) )) 
               = 0) )) = 0;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
           TYPEOF(it)) = 2) AND (it.name = 'effective length')) )) = 1)) )) 
               = 0)) )) <= 1;
      wr6: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
            TYPEOF(it)) = 2) AND (it.name = 'maximum length')) )) <= 1)) )) 
               = 0)) )) = 0;
      wr7: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
  END_ENTITY; -- applied_area

  ENTITY  applied_classification_assignment
    SUBTYPE OF (classification_assignment);
      items : SET [1:?] OF classification_item;
  END_ENTITY; -- applied_classification_assignment

  ENTITY  applied_contract_assignment
    SUBTYPE OF (contract_assignment);
      items : SET [1:?] OF contract_item;
  END_ENTITY; -- applied_contract_assignment

  ENTITY  applied_date_assignment
    SUBTYPE OF (date_assignment);
      items : SET [1:?] OF date_item;
  END_ENTITY; -- applied_date_assignment

  ENTITY  applied_document_reference
    SUBTYPE OF (document_reference);
      items : SET [1:?] OF document_reference_item;
  END_ENTITY; -- applied_document_reference

  ENTITY  applied_document_usage_constraint_assignment
    SUBTYPE OF (document_usage_constraint_assignment);
      items : SET [1:?] OF document_usage_constraint_item;
  END_ENTITY; -- applied_document_usage_constraint_assignment

  ENTITY  applied_effectivity_assignment
    SUBTYPE OF (effectivity_assignment);
      items : SET [1:?] OF effectivity_item;
  END_ENTITY; -- applied_effectivity_assignment

  ENTITY  applied_external_identification_assignment
    SUPERTYPE OF (ONEOF (library_property_version_assignment,
        library_class_version_assignment))
    SUBTYPE OF (external_identification_assignment);
      items : SET [1:?] OF external_identification_item;
  END_ENTITY; -- applied_external_identification_assignment

  ENTITY  applied_group_assignment
    SUBTYPE OF (group_assignment);
      items : SET [1:?] OF group_item;
  END_ENTITY; -- applied_group_assignment

  ENTITY  applied_identification_assignment
    SUBTYPE OF (identification_assignment);
      items : SET [1:?] OF identification_assignment_item;
  END_ENTITY; -- applied_identification_assignment

  ENTITY  applied_library_assignment
    SUBTYPE OF (applied_classification_assignment);
    WHERE
      wr1: SELF\classification_assignment.role.name = 
               'definitional class membership';
      wr2: (SELF\classification_assignment.assigned_class.name = 
               'library identifier') AND (
               'PROCESS_PLANNING_SCHEMA.EXTERNALLY_DEFINED_CLASS' IN 
               TYPEOF(SELF\classification_assignment.assigned_class));
      wr3: SIZEOF(QUERY ( edir <* USEDIN(SELF.assigned_class,
'PROCESS_PLANNING_SCHEMA.EXTERNALLY_DEFINED_ITEM_RELATIONSHIP.RELATED_ITEM')
                | (((edir.name = 'name scope') AND
           ('PROCESS_PLANNING_SCHEMA.EXTERNALLY_DEFINED_GENERAL_PROPERTY' 
               IN TYPEOF(edir.relating_item))) AND (SIZEOF(QUERY ( gpa <* 
               USEDIN(edir.relating_item,
    'PROCESS_PLANNING_SCHEMA.GENERAL_PROPERTY_ASSOCIATION.BASE_DEFINITION')
                | ((gpa.name = 'definitional') AND (SIZEOF(QUERY ( pdr <* 
               USEDIN(gpa.derived_definition,
   'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')
                | ((pdr.used_representation.name = 'property value') AND (
               SIZEOF(QUERY ( ri <* pdr.used_representation.items | (
               'PROCESS_PLANNING_SCHEMA.VALUE_REPRESENTATION_ITEM' IN 
               TYPEOF(ri)) )) >= 1)) )) = 1)) )) = 1)) )) = 1;
  END_ENTITY; -- applied_library_assignment

  ENTITY  applied_organization_assignment
    SUBTYPE OF (organization_assignment);
      items : SET [1:?] OF organization_item;
  END_ENTITY; -- applied_organization_assignment

  ENTITY  applied_security_classification_assignment
    SUBTYPE OF (security_classification_assignment);
      items : SET [1:?] OF security_classification_item;
  END_ENTITY; -- applied_security_classification_assignment

  ENTITY  approval;
      status : approval_status;
      level  : label;
  END_ENTITY; -- approval

  ENTITY  approval_assignment
    ABSTRACT SUPERTYPE;
      assigned_approval : approval;
    DERIVE
      role : object_role := get_role(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
  END_ENTITY; -- approval_assignment

  ENTITY  approval_date_time;
      date_time      : date_time_select;
      dated_approval : approval;
    DERIVE
      role : object_role := get_role(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
  END_ENTITY; -- approval_date_time

  ENTITY  approval_person_organization;
      person_organization : person_organization_select;
      authorized_approval : approval;
      role                : approval_role;
  END_ENTITY; -- approval_person_organization

  ENTITY  approval_role;
      role : label;
    DERIVE
      description : text := get_description_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
  END_ENTITY; -- approval_role

  ENTITY  approval_status;
      name : label;
  END_ENTITY; -- approval_status

  ENTITY  assembly_component_usage
    SUPERTYPE OF (next_assembly_usage_occurrence)
    SUBTYPE OF (product_definition_usage);
      reference_designator : OPTIONAL identifier;
  END_ENTITY; -- assembly_component_usage

  ENTITY  attribute_classification_assignment
    ABSTRACT SUPERTYPE;
      assigned_class : group;
      attribute_name : label;
      role           : classification_role;
  END_ENTITY; -- attribute_classification_assignment

  ENTITY  axis1_placement
    SUBTYPE OF (placement);
      axis : OPTIONAL direction;
    DERIVE
      z : direction := NVL(normalise(axis),dummy_gri ||
direction([0,0,1]));
    WHERE
      wr1: SELF\geometric_representation_item.dim = 3;
  END_ENTITY; -- axis1_placement

  ENTITY  axis2_placement_2d
    SUBTYPE OF (placement);
      ref_direction : OPTIONAL direction;
    DERIVE
      p : LIST [2:2] OF direction := build_2axes(ref_direction);
    WHERE
      wr1: SELF\geometric_representation_item.dim = 2;
  END_ENTITY; -- axis2_placement_2d

  ENTITY  axis2_placement_3d
    SUBTYPE OF (placement);
      axis          : OPTIONAL direction;
      ref_direction : OPTIONAL direction;
    DERIVE
      p : LIST [3:3] OF direction := build_axes(axis,ref_direction);
    WHERE
      wr1: SELF\placement.location.dim = 3;
      wr2: (NOT EXISTS(axis)) OR (axis.dim = 3);
      wr3: (NOT EXISTS(ref_direction)) OR (ref_direction.dim = 3);
      wr4: ((NOT EXISTS(axis)) OR (NOT EXISTS(ref_direction))) OR (
               cross_product(axis,ref_direction).magnitude > 0);
  END_ENTITY; -- axis2_placement_3d

  ENTITY  b_spline_curve
    SUPERTYPE OF (ONEOF (uniform_curve,b_spline_curve_with_knots,
        quasi_uniform_curve,bezier_curve) ANDOR rational_b_spline_curve)
    SUBTYPE OF (bounded_curve);
      degree              : INTEGER;
      control_points_list : LIST [2:?] OF cartesian_point;
      curve_form          : b_spline_curve_form;
      closed_curve        : LOGICAL;
      self_intersect      : LOGICAL;
    DERIVE
      upper_index_on_control_points : INTEGER := SIZEOF(
                                         control_points_list) - 1;
      control_points                : ARRAY [0:
                                         upper_index_on_control_points] OF
                                          cartesian_point := list_to_array(
                                         control_points_list,0,
                                         upper_index_on_control_points);
    WHERE
      wr1: ((('PROCESS_PLANNING_SCHEMA.UNIFORM_CURVE' IN TYPEOF(SELF)) OR 
               ('PROCESS_PLANNING_SCHEMA.QUASI_UNIFORM_CURVE' IN TYPEOF(
               SELF))) OR ('PROCESS_PLANNING_SCHEMA.BEZIER_CURVE' IN 
               TYPEOF(SELF))) OR (
               'PROCESS_PLANNING_SCHEMA.B_SPLINE_CURVE_WITH_KNOTS' IN 
               TYPEOF(SELF));
  END_ENTITY; -- b_spline_curve

  ENTITY  b_spline_curve_with_knots
    SUBTYPE OF (b_spline_curve);
      knot_multiplicities : LIST [2:?] OF INTEGER;
      knots               : LIST [2:?] OF parameter_value;
      knot_spec           : knot_type;
    DERIVE
      upper_index_on_knots : INTEGER := SIZEOF(knots);
    WHERE
      wr1: constraints_param_b_spline(degree,upper_index_on_knots,
               upper_index_on_control_points,knot_multiplicities,knots);
      wr2: SIZEOF(knot_multiplicities) = upper_index_on_knots;
  END_ENTITY; -- b_spline_curve_with_knots
  ENTITY  b_spline_surface
    SUPERTYPE OF (ONEOF (b_spline_surface_with_knots,uniform_surface,
        quasi_uniform_surface,bezier_surface) ANDOR 
        rational_b_spline_surface)
    SUBTYPE OF (bounded_surface);
      u_degree            : INTEGER;
      v_degree            : INTEGER;
      control_points_list : LIST [2:?] OF LIST [2:?] OF cartesian_point;
      surface_form        : b_spline_surface_form;
      u_closed            : LOGICAL;
      v_closed            : LOGICAL;
      self_intersect      : LOGICAL;
    DERIVE
      u_upper        : INTEGER := SIZEOF(control_points_list) - 1;
      v_upper        : INTEGER := SIZEOF(control_points_list[1]) - 1;
      control_points : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF
                           cartesian_point := make_array_of_array(
                          control_points_list,0,u_upper,0,v_upper);
    WHERE
      wr1: ((('PROCESS_PLANNING_SCHEMA.UNIFORM_SURFACE' IN TYPEOF(SELF)) 
               OR ('PROCESS_PLANNING_SCHEMA.QUASI_UNIFORM_SURFACE' IN 
               TYPEOF(SELF))) OR ('PROCESS_PLANNING_SCHEMA.BEZIER_SURFACE' 
               IN TYPEOF(SELF))) OR (
               'PROCESS_PLANNING_SCHEMA.B_SPLINE_SURFACE_WITH_KNOTS' IN 
               TYPEOF(SELF));
  END_ENTITY; -- b_spline_surface

  ENTITY  b_spline_surface_with_knots
    SUBTYPE OF (b_spline_surface);
      u_multiplicities : LIST [2:?] OF INTEGER;
      v_multiplicities : LIST [2:?] OF INTEGER;
      u_knots          : LIST [2:?] OF parameter_value;
      v_knots          : LIST [2:?] OF parameter_value;
      knot_spec        : knot_type;
    DERIVE
      knot_u_upper : INTEGER := SIZEOF(u_knots);
      knot_v_upper : INTEGER := SIZEOF(v_knots);
    WHERE
      wr1: constraints_param_b_spline(SELF\b_spline_surface.u_degree,
               knot_u_upper,SELF\b_spline_surface.u_upper,u_multiplicities,
               u_knots);
      wr2: constraints_param_b_spline(SELF\b_spline_surface.v_degree,
               knot_v_upper,SELF\b_spline_surface.v_upper,v_multiplicities,
               v_knots);
      wr3: SIZEOF(u_multiplicities) = knot_u_upper;
      wr4: SIZEOF(v_multiplicities) = knot_v_upper;
  END_ENTITY; -- b_spline_surface_with_knots

  ENTITY  bezier_curve
    SUBTYPE OF (b_spline_curve);
  END_ENTITY; -- bezier_curve

  ENTITY  bezier_surface
    SUBTYPE OF (b_spline_surface);
  END_ENTITY; -- bezier_surface

  ENTITY  block_shape_representation
    SUBTYPE OF (shape_representation_with_parameters);
    WHERE
      wr1: SIZEOF(SELF.items) = 4;
      wr2: SIZEOF(QUERY ( it <* SELF.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1;
      wr3: SIZEOF(QUERY ( it <* SELF.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'length')) )) = 1;
      wr4: SIZEOF(QUERY ( it <* SELF.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'width')) )) = 1;
      wr5: SIZEOF(QUERY ( it <* SELF.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'height')) )) = 1;
  END_ENTITY; -- block_shape_representation

  ENTITY  boss
    SUBTYPE OF (feature_definition);
    WHERE
      wr1 : SELF\characterized_object.description IN ['circular','complex',
                'rectangular'];
      wr2 : SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'boss height occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'path feature component usage') AND ((
                'PROCESS_PLANNING_SCHEMA.' + 'SHAPE_DEFINING_RELATIONSHIP') 
                IN TYPEOF(sar))) ) | (((
                'PROCESS_PLANNING_SCHEMA.PATH_FEATURE_COMPONENT' IN TYPEOF(
                sdr.relating_shape_aspect)) AND (sdr.relating_shape_aspect.
                description = 'linear')) AND (sdr.name = 'boss height')) )) 
                = 1)) )) = 1)) )) = 0;
      wr3 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND ((1 <= SIZEOF(pdr.
                used_representation.items)) AND (SIZEOF(pdr.
                used_representation.items) <= 2))) )) = 1) )) = 1;
      wr4 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND (SIZEOF(QUERY ( srwp_i <* pdr.
                used_representation.items | ((srwp_i.name = 'orientation') 
                OR (srwp_i.name = 'fillet radius')) )) = SIZEOF(pdr.
                used_representation.items))) )) = 1) )) = 1;
      wr5 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'fillet radius')) )) <= 1)))) 
                = 0)) )) = 0;
      wr6 : (NOT (SELF\characterized_object.description = 'circular')) OR 
                (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'circular profile occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (
                'PROCESS_PLANNING_SCHEMA.CIRCULAR_CLOSED_PROFILE' IN 
                TYPEOF(sdr.relating_shape_aspect)) )) = 1)) )) = 1)) )) =0);
      wr7 : SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'top condition occurrence') AND (SIZEOF(
                QUERY ( fcr <* QUERY ( sar <*USEDIN(sa_occ,
  'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT')
                 | ((sar.description = 'boss top usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | ('PROCESS_PLANNING_SCHEMA.BOSS_TOP' IN 
                TYPEOF(fcr.relating_shape_aspect)) )) = 1)) )) = 1)) )) =0;
      wr8 : (NOT (SELF\characterized_object.description = 'circular')) OR 
                (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'change in diameter occurrence') AND (
                SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 'taper usage') 
                AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | (('PROCESS_PLANNING_SCHEMA.TAPER' IN 
                TYPEOF(fcr.related_shape_aspect)) AND (
                'PROCESS_PLANNING_SCHEMA.BOSS' IN TYPEOF(fcr.
                relating_shape_aspect))) )) = 1)) )) <= 1)) )) = 0);
      wr9 : (NOT (SELF\characterized_object.description = 'complex')) OR (
                SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'enclosed boundary occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.NGON_CLOSED_PROFILE',
                'PROCESS_PLANNING_SCHEMA.CLOSED_PATH_PROFILE'] * TYPEOF(sdr
                .relating_shape_aspect)) = 1) )) = 1)) )) = 1)) )) = 0);
      wr10: (NOT (SELF\characterized_object.description IN ['complex',
                'rectangular'])) OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'change in boundary occurrence') AND (
                SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATING_SHAPE_ASPECT') | ((sar.description = 
                'taper usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | ((('PROCESS_PLANNING_SCHEMA.TAPER' IN 
                TYPEOF(fcr.related_shape_aspect)) AND (
                'PROCESS_PLANNING_SCHEMA.BOSS' IN TYPEOF(fcr.
                relating_shape_aspect))) AND (fcr.related_shape_aspect.
                description IN ['angle taper','directed taper'])) )) = 1)))) 
                <= 1)) )) = 0);
      wr11: (NOT (SELF\characterized_object.description = 'rectangular')) 
                OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'rectangular profile occurrence') AND (
                SIZEOF(QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (
                'PROCESS_PLANNING_SCHEMA.RECTANGULAR_CLOSED_PROFILE' IN 
                TYPEOF(sdr.relating_shape_aspect)) )) = 1)) )) = 1)) )) = 0);
      wr12: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
                SELF) |
             (('PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' 
                IN TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'maximum feature limit')) )) <= 
                1;
  END_ENTITY; -- boss

  ENTITY  boss_top
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SELF.description IN ['planar','complex'];
      wr3: (NOT (SELF.description = 'planar')) OR (SIZEOF(QUERY ( pd <* 
               USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (
               'PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) )) = 1)) )) = 0);
      wr4: (NOT (SELF.description = 'planar')) OR (SIZEOF(QUERY ( pd <* 
               USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (
               'PROCESS_PLANNING_SCHEMA.LOCATION_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) )) = 1)) )) = 0);
      wr5: (NOT (SELF.description = 'complex')) OR (SIZEOF(QUERY ( pd <* 
               USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (
               'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) )) = 1)) )) = 0);
      wr6: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT') | (((sar.description = 
               'boss top usage') AND (sar.name IN ['boss height start',
               'boss height end'])) AND (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (((fcr.related_shape_aspect.description = 
               'top condition occurrence') AND (
               'PROCESS_PLANNING_SCHEMA.BOSS' IN TYPEOF(fcr.
               related_shape_aspect.of_shape.definition))) AND (
               'PROCESS_PLANNING_SCHEMA.BOSS_TOP' IN TYPEOF(fcr.
               relating_shape_aspect))) )) >= 1;
      wr7: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) <= 1)) )) = 0;
      wr8: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 1)) )) = 0)) )) = 0;
      wr9: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'top radius')) )) <= 1)) )) 
               = 0)) )) = 0;
  END_ENTITY; -- boss_top

  ENTITY  boundary_curve
    SUBTYPE OF (composite_curve_on_surface);
    WHERE
      wr1: SELF\composite_curve.closed_curve;
  END_ENTITY; -- boundary_curve

  ENTITY bounded_curve
    SUPERTYPE OF (ONEOF (polyline,b_spline_curve,trimmed_curve,
        bounded_pcurve,bounded_surface_curve,composite_curve))
    SUBTYPE OF (curve);
  END_ENTITY; -- bounded_curve

  ENTITY  bounded_pcurve
    SUBTYPE OF (pcurve, bounded_curve);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.BOUNDED_CURVE' IN TYPEOF(SELF\pcurve.
               reference_to_curve.items[1]);
  END_ENTITY; -- bounded_pcurve

  ENTITY  bounded_surface
    SUPERTYPE OF (ONEOF (b_spline_surface,rectangular_trimmed_surface,
        curve_bounded_surface,rectangular_composite_surface))
    SUBTYPE OF (surface);
  END_ENTITY; -- bounded_surface

  ENTITY  bounded_surface_curve
    SUBTYPE OF (surface_curve, bounded_curve);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.BOUNDED_CURVE' IN TYPEOF(SELF\
               surface_curve.curve_3d);
  END_ENTITY; -- bounded_surface_curve

  ENTITY  brep_with_voids
    SUBTYPE OF (manifold_solid_brep);
      voids : SET [1:?] OF oriented_closed_shell;
  END_ENTITY; -- brep_with_voids

  ENTITY  calendar_date
    SUBTYPE OF (date);
      day_component   : day_in_month_number;
      month_component : month_in_year_number;
    WHERE
      wr1: valid_calendar_date(SELF);
  END_ENTITY; -- calendar_date

  ENTITY  cartesian_point
    SUBTYPE OF (point);
      coordinates : LIST [1:3] OF length_measure;
  END_ENTITY; -- cartesian_point

  ENTITY  cartesian_transformation_operator
    SUPERTYPE OF (cartesian_transformation_operator_3d)
    SUBTYPE OF (geometric_representation_item, 
        functionally_defined_transformation);
      axis1        : OPTIONAL direction;
      axis2        : OPTIONAL direction;
      local_origin : cartesian_point;
      scale        : OPTIONAL REAL;
    DERIVE
      scl : REAL := NVL(scale,1);
    WHERE
      wr1: scl > 0;
  END_ENTITY; -- cartesian_transformation_operator

  ENTITY  cartesian_transformation_operator_3d
    SUBTYPE OF (cartesian_transformation_operator);
      axis3 : OPTIONAL direction;
    DERIVE
      u : LIST [3:3] OF direction := base_axis(3,SELF\
             cartesian_transformation_operator.axis1,SELF\
             cartesian_transformation_operator.axis2,axis3);
    WHERE
      wr1: SELF\geometric_representation_item.dim = 3;
  END_ENTITY; -- cartesian_transformation_operator_3d

  ENTITY  centre_of_symmetry
    SUBTYPE OF (derived_shape_aspect);
    WHERE
      wr1: SIZEOF(QUERY ( sadr <* deriving_relationships | (NOT (
               'PROCESS_PLANNING_SCHEMA.SYMMETRIC_SHAPE_ASPECT' IN TYPEOF(
               sadr.related_shape_aspect))) )) = 0;
  END_ENTITY; -- centre_of_symmetry

  ENTITY  chamfer
    SUBTYPE OF (transition_feature);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'chamfer face')) )) = 1)) )) = 0;
      wr2: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT') | (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) ) | ((('PROCESS_PLANNING_SCHEMA.CHAMFER_OFFSET' 
               IN TYPEOF(fcr.related_shape_aspect)) AND (
               'PROCESS_PLANNING_SCHEMA.CHAMFER' IN TYPEOF(fcr.
               relating_shape_aspect))) AND (fcr.related_shape_aspect.
               description = 'first offset')) )) = 1;
      wr3: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT') | (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) ) | ((('PROCESS_PLANNING_SCHEMA.CHAMFER_OFFSET' 
               IN TYPEOF(fcr.related_shape_aspect)) AND (
               'PROCESS_PLANNING_SCHEMA.CHAMFER' IN TYPEOF(fcr.
               relating_shape_aspect))) AND (fcr.related_shape_aspect.
               description = 'second offset')) )) = 1;
  END_ENTITY; -- chamfer

  ENTITY  chamfer_offset
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: SELF.description IN ['first offset','second offset'];
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 1)) )) = 0)) )) = 0;
      wr4: (NOT (SELF.description = 'first offset')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'offset amount')) )) = 1)))) 
               = 0)) )) = 0);
      wr5: (NOT (SELF.description = 'first offset')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'first face shape')) )) = 1)) )) 
               = 0);
      wr6: (NOT (SELF.description = 'second offset')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | (((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'offset amount')) OR ((
               SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'offset angle'))) )) = 1)))) 
               = 0)) )) = 0);
      wr7: (NOT (SELF.description = 'second offset')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'second face shape')) )) = 1)) )) 
               = 0);
      wr8: SIZEOF(QUERY ( sdr <* QUERY ( sar <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | (('PROCESS_PLANNING_SCHEMA.' + 
               'FEATURE_COMPONENT_RELATIONSHIP') IN TYPEOF(sar)) ) | ((
               'PROCESS_PLANNING_SCHEMA.CHAMFER' IN TYPEOF(sdr.
               relating_shape_aspect)) AND (
               'PROCESS_PLANNING_SCHEMA.CHAMFER_OFFSET' IN TYPEOF(sdr.
               related_shape_aspect))) )) = 1;
  END_ENTITY; -- chamfer_offset

  ENTITY  characterized_object;
      name        : label;
      description : OPTIONAL text;
  END_ENTITY; -- characterized_object

  ENTITY  circle
    SUBTYPE OF (conic);
      radius : positive_length_measure;
  END_ENTITY; -- circle

  ENTITY  circular_closed_profile
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 2)) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'diameter')) )) = 1)) )) =
               0)) )) = 0;
  END_ENTITY; -- circular_closed_profile

  ENTITY  circular_pattern
    SUBTYPE OF (replicate_feature);
    WHERE
      wr1: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT') | (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) ) | ('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' IN 
               TYPEOF(sdr.related_shape_aspect)) )) = 1) )) <= 3)) )) = 0;
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT ((SIZEOF(impl_rep.
               used_representation.items) >= 3) AND (SIZEOF(impl_rep.
               used_representation.items) <= 5))) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'diameter')) )) <= 1)) )) = 
               0)) )) = 0;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'base feature rotation')) )) 
               <= 1)) )) = 0)) )) = 0;
      wr6: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | (((
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN 
               TYPEOF(it\measure_with_unit.value_component))) AND (it.name 
               = 'number of features')) )) = 1)) )) = 0)) )) = 0;
      wr7: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'angular spacing')) )) = 1)))) 
               = 0)) )) = 0;
      wr8: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
  END_ENTITY; -- circular_pattern

  ENTITY  circular_runout_tolerance
    SUBTYPE OF (geometric_tolerance_with_datum_reference);
    WHERE
      wr1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.
               datum_system) <= 2;
  END_ENTITY; -- circular_runout_tolerance

  ENTITY  clamp_mating_definition
    SUBTYPE OF (resource_property_representation);
    WHERE
      wr1: SIZEOF(QUERY ( ap <* SELF.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
                TYPEOF(ap)) AND (ap.name = 'clamp mating type')) )) = 1;
      wr2: SIZEOF(QUERY ( pdp_imp <* QUERY ( pdp <* SELF.property.resource
               .operations | (
               'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_PROCESS' IN 
               TYPEOF(pdp)) ) | (SIZEOF(QUERY ( ppa <*USEDIN(pdp_imp,
            'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | (('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' IN TYPEOF(ppa.
               property_or_shape)) AND (ppa.description = 
               'clamp mating shape')) )) = 0) )) >= 1;
  END_ENTITY; -- clamp_mating_definition

  ENTITY  clamp_position
    SUBTYPE OF (resource_property);
    WHERE
      wr1: SIZEOF(QUERY ( apr <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | ('PROCESS_PLANNING_SCHEMA.CLAMP_MATING_DEFINITION' IN 
               TYPEOF(apr)) )) = 1;
      wr2: SIZEOF(QUERY ( apr <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( ap <* apr.representation.items | (((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
                TYPEOF(ap)) AND (ap.name = 'position type')) AND (ap.
               description IN ['jack','locator','clamp'])) )) = 1) )) = 1;
      wr3: ('PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE' IN 
               TYPEOF(SELF.resource)) AND (
               'PROCESS_PLANNING_SCHEMA.FIXTURE_ASSEMBLY' IN TYPEOF(SELF.
               resource.resources));
      wr4: SIZEOF(QUERY ( apr <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( ap <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(ap)) AND
                (ap.name = 'clamp location')) )) = 1) )) = 1;
  END_ENTITY; -- clamp_position

  ENTITY  class
    SUBTYPE OF (group);
  END_ENTITY; -- class

  ENTITY  classification_assignment
    ABSTRACT SUPERTYPE;
      assigned_class : group;
      role           : classification_role;
  END_ENTITY; -- classification_assignment

  ENTITY  classification_role;
      name        : label;
      description : OPTIONAL text;
  END_ENTITY; -- classification_role

  ENTITY  closed_path_profile
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.' + 
               'DEFINITION') | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 1)) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.' + 
               'DEFINITION') | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (
               'PROCESS_PLANNING_SCHEMA.PATH_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) )) = 1)) )) = 0;
  END_ENTITY; -- closed_path_profile

  ENTITY  closed_shell
    SUBTYPE OF (connected_face_set);
  END_ENTITY; -- closed_shell

  ENTITY  coaxiality_tolerance
    SUBTYPE OF (geometric_tolerance_with_datum_reference);
    WHERE
      wr1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.
               datum_system) <= 2;
  END_ENTITY; -- coaxiality_tolerance

  ENTITY  common_datum
    SUBTYPE OF (composite_shape_aspect, datum);
    WHERE
      wr1: SIZEOF(SELF.component_relationships) = 2;
      wr2: SIZEOF(QUERY ( sar <* SELF.component_relationships | (NOT ((
               'PROCESS_PLANNING_SCHEMA.DATUM' IN TYPEOF(sar.
               related_shape_aspect)) AND (NOT (
               'PROCESS_PLANNING_SCHEMA.COMMON_DATUM' IN TYPEOF(sar.
               related_shape_aspect))))) )) = 0;
  END_ENTITY; -- common_datum

  ENTITY  composite_curve
    SUBTYPE OF (bounded_curve);
      segments       : LIST [1:?] OF composite_curve_segment;
      self_intersect : LOGICAL;
    DERIVE
      n_segments   : INTEGER := SIZEOF(segments);
      closed_curve : LOGICAL := segments[n_segments].transition <> 
                        discontinuous;
    WHERE
      wr1: ((NOT closed_curve) AND (SIZEOF(QUERY ( temp <* segments | (
               temp.transition = discontinuous) )) = 1)) OR (closed_curve 
               AND (SIZEOF(QUERY ( temp <* segments | (temp.transition = 
               discontinuous) )) = 0));
  END_ENTITY; -- composite_curve

  ENTITY  composite_curve_on_surface
    SUPERTYPE OF (boundary_curve)
    SUBTYPE OF (composite_curve);
    DERIVE
      basis_surface : SET [0:2] OF surface := get_basis_surface(SELF);
    WHERE
      wr1: SIZEOF(basis_surface) > 0;
      wr2: constraints_composite_curve_on_surface(SELF);
  END_ENTITY; -- composite_curve_on_surface

  ENTITY  composite_curve_segment
    SUBTYPE OF (founded_item);
      transition   : transition_code;
      same_sense   : BOOLEAN;
      parent_curve : curve;
    INVERSE
      using_curves : BAG [1:?] OF composite_curve FOR segments;
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.BOUNDED_CURVE' IN TYPEOF(parent_curve);
  END_ENTITY; -- composite_curve_segment

  ENTITY  composite_hole
    SUBTYPE OF (compound_feature);
    WHERE
      wr1: SELF\characterized_object.description IN ['counterbore',
               'countersunk'];
      wr2: SIZEOF(QUERY ( pds <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pds)) AND (SIZEOF(QUERY ( csa <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((
               'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(
               csa)) AND (SIZEOF(QUERY ( sar <* csa.component_relationships
                | ((
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) AND ('PROCESS_PLANNING_SCHEMA.ROUND_HOLE' IN 
               TYPEOF(sar.related_shape_aspect))) )) = 2)) )) = 1)) )) = 1;
      wr3: (NOT (SELF\characterized_object.description = 'countersunk')) 
               OR (SIZEOF(QUERY ( pds <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pds)) AND (SIZEOF(QUERY ( csa <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((
               'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(
               csa)) AND (SIZEOF(QUERY ( sar <* csa.component_relationships
                | (('PROCESS_PLANNING_SCHEMA.ROUND_HOLE' IN TYPEOF(sar.
               related_shape_aspect)) AND (NOT (SIZEOF(QUERY ( pds <* 
               QUERY ( pd <* USEDIN(sar.related_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'change in diameter occurrence') AND (SIZEOF(
               QUERY ( fcr2 <* QUERY ( sar2 <* USEDIN(sa_occ,
  'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT')
                | ((sar2.description = 'taper usage') AND (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar2))) ) | ('PROCESS_PLANNING_SCHEMA.TAPER' IN 
             TYPEOF(fcr2.related_shape_aspect)) )) = 1)) )) = 0)) )) =0))) )) 
               = 1)) )) = 1)) )) = 1);
  END_ENTITY; -- composite_hole

  ENTITY  composite_shape_aspect
    SUBTYPE OF (shape_aspect);
    INVERSE
      component_relationships : SET [2:?] OF shape_aspect_relationship FOR 
                                   relating_shape_aspect;
  END_ENTITY; -- composite_shape_aspect

  ENTITY  compound_feature
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pds <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pds)) AND (SIZEOF(QUERY ( csa <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((csa.
               name = 'compound feature in solid') AND (
               'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(
               csa))) )) = 1)) )) = 1;
      wr2: SIZEOF(QUERY ( pds <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pds)) AND (SIZEOF(QUERY ( csa <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (
               'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(
               csa)) )) = 1)) )) = 1;
      wr3: SIZEOF(QUERY ( pds <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pds)) AND (SIZEOF(QUERY ( csa <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((
               'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(
               csa)) AND (SIZEOF(QUERY ( fcr <* csa.component_relationships
                | (NOT (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(fcr))) )) = 0)) )) = 1)) )) = 1;
      wr4: SIZEOF(QUERY ( pds <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pds)) AND (SIZEOF(QUERY ( csa <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (
               'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(
               csa)) )) = 1)) )) = 1;
      wr5: SIZEOF(QUERY ( pds <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pds)) AND (SIZEOF(QUERY ( csa <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((
               'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(
               csa)) AND (SIZEOF(QUERY ( sar <* csa.component_relationships
                | ('PROCESS_PLANNING_SCHEMA.THREAD' IN TYPEOF(sar.
               related_shape_aspect)) )) = 0)) )) = 1)) )) = 1;
      wr6: SIZEOF(QUERY ( pds <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pds)) AND (SIZEOF(QUERY ( csa <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((
               'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(
               csa)) AND (SIZEOF(QUERY ( sar <* csa.component_relationships
                | (('PROCESS_PLANNING_SCHEMA.COMPOUND_FEATURE' IN TYPEOF(
               sar.related_shape_aspect)) AND (sar.related_shape_aspect\
               characterized_object.name <>
SELF\characterized_object.name)) )) 
               = 0)) )) = 1)) )) = 1;
  END_ENTITY; -- compound_feature

  ENTITY  concentricity_tolerance
    SUBTYPE OF (geometric_tolerance_with_datum_reference);
    WHERE
      wr1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.
               datum_system) = 1;
  END_ENTITY; -- concentricity_tolerance

  ENTITY  conic
    SUPERTYPE OF (ONEOF (circle,ellipse,hyperbola,parabola))
    SUBTYPE OF (curve);
      position : axis2_placement;
  END_ENTITY; -- conic

  ENTITY  conical_surface
    SUBTYPE OF (elementary_surface);
      radius     : length_measure;
      semi_angle : plane_angle_measure;
    WHERE
      wr1: radius >= 0;
  END_ENTITY; -- conical_surface

  ENTITY  connected_edge_set
    SUBTYPE OF (topological_representation_item);
      ces_edges : SET [1:?] OF edge;
  END_ENTITY; -- connected_edge_set

  ENTITY  connected_face_set
    SUPERTYPE OF (ONEOF (closed_shell,open_shell))
    SUBTYPE OF (topological_representation_item);
      cfs_faces : SET [1:?] OF face;
  END_ENTITY; -- connected_face_set

  ENTITY  context_dependent_unit
    SUBTYPE OF (named_unit);
      name : label;
  END_ENTITY; -- context_dependent_unit

  ENTITY  contract;
      name    : label;
      purpose : text;
      kind    : contract_type;
  END_ENTITY; -- contract

  ENTITY  contract_assignment
    ABSTRACT SUPERTYPE;
      assigned_contract : contract;
    DERIVE
      role : object_role := get_role(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
  END_ENTITY; -- contract_assignment

  ENTITY  contract_type;
      description : label;
  END_ENTITY; -- contract_type

  ENTITY  controller
    SUBTYPE OF (action_resource);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')
                | ('PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_SPECIFICATION' IN 
               TYPEOF(adr.assigned_document)) )) = 1;
  END_ENTITY; -- controller

  ENTITY  controller_program
    SUBTYPE OF (document);
    WHERE
      wr1: SIZEOF(QUERY ( duc <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.DOCUMENT_USAGE_CONSTRAINT.SOURCE')
                | (duc.subject_element = 
               'controller program revision level') )) = 1;
      wr2: SIZEOF(QUERY ( adr <* QUERY ( dr <* USEDIN(SELF,
           'PROCESS_PLANNING_SCHEMA.DOCUMENT_REFERENCE.ASSIGNED_DOCUMENT')
                | ('PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE' IN 
               TYPEOF(dr)) ) | (SIZEOF(QUERY ( d <* adr.items | (((
               'PROCESS_PLANNING_SCHEMA.DATE_AND_TIME' IN TYPEOF(d)) AND (
               'PROCESS_PLANNING_SCHEMA.DATE' IN TYPEOF(d.date_component))) 
               AND ('PROCESS_PLANNING_SCHEMA.LOCAL_TIME' IN TYPEOF(d.
               time_component))) )) = 1) )) = 1;
      wr3: SIZEOF(QUERY ( adr <* QUERY ( dr <* USEDIN(SELF,
             'PROCESS_PLANNING_SCHEMA.DOCUMENT_REFERENCE.ASSIGNED_DOCUMENT')
                | ('PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE' IN 
               TYPEOF(dr)) ) | (SIZEOF(QUERY ( d <* adr.items | (
            'PROCESS_PLANNING_SCHEMA.MANUFACTURING_ACTIVITY' IN TYPEOF(d)) )) 
               >= 1) )) = 1;
      wr4: SIZEOF(QUERY ( adr <* USEDIN(SELF,
            'PROCESS_PLANNING_SCHEMA.DOCUMENT_REFERENCE.ASSIGNED_DOCUMENT')
                | (('PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE' IN
                TYPEOF(adr)) AND (NOT (SIZEOF(QUERY ( pdf <* adr.items | ((
               'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_FORMATION' IN 
               TYPEOF(pdf)) AND (NOT (SIZEOF(QUERY ( pd <* USEDIN(pdf,
               'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION.FORMATION') | (
               pd.frame_of_reference.name = 'part definition') )) = 1))) )) 
               = 1))) )) = 0;
      wr5: SIZEOF(QUERY ( adr <* QUERY ( dr <* USEDIN(SELF,
           'PROCESS_PLANNING_SCHEMA.DOCUMENT_REFERENCE.ASSIGNED_DOCUMENT')
                | ('PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE' IN 
               TYPEOF(dr)) ) | (SIZEOF(QUERY ( d <* adr.items | (
               'PROCESS_PLANNING_SCHEMA.TOOL_ASSEMBLY' IN TYPEOF(d)) )) >= 
               1) )) = 1;
      wr6: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
           'PROCESS_PLANNING_SCHEMA.DOCUMENT_REFERENCE.ASSIGNED_DOCUMENT')
                | (('PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE' IN
                TYPEOF(ap)) AND (NOT (SIZEOF(QUERY ( it <* ap.items | ((
               'PROCESS_PLANNING_SCHEMA.DOCUMENT' IN TYPEOF(it)) AND (it.
               description = 'controller program document')) )) >= 0))) )) 
               = 1);
      wr7: SIZEOF(QUERY ( adr <* QUERY ( dr <* USEDIN(SELF,
           'PROCESS_PLANNING_SCHEMA.DOCUMENT_REFERENCE.ASSIGNED_DOCUMENT')
                | ('PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE' IN 
               TYPEOF(dr)) ) | (SIZEOF(QUERY ( d <* adr.items | (
              'PROCESS_PLANNING_SCHEMA.SINGLE_SETUP_PROCESS' IN TYPEOF(d)))) 
               >= 1) )) = 1;
  END_ENTITY; -- controller_program

  ENTITY  conversion_based_unit
    SUBTYPE OF (named_unit);
      name              : label;
      conversion_factor : measure_with_unit;
  END_ENTITY; -- conversion_based_unit

  ENTITY  coordinated_universal_time_offset;
      hour_offset   : INTEGER;
      minute_offset : OPTIONAL INTEGER;
      sense         : ahead_or_behind;
    DERIVE
      actual_minute_offset : INTEGER := NVL(minute_offset,0);
    WHERE
      wr1: (0 <= hour_offset) AND (hour_offset < 24);
      wr2: (0 <= actual_minute_offset) AND (actual_minute_offset <= 59);
      wr3: NOT (((hour_offset <> 0) OR (actual_minute_offset <> 0)) AND (
               sense = exact));
  END_ENTITY; -- coordinated_universal_time_offset

  ENTITY  curve
    SUPERTYPE OF (ONEOF (line,conic,pcurve,surface_curve,offset_curve_3d,
        curve_replica))
    SUBTYPE OF (geometric_representation_item);
  END_ENTITY; -- curve

  ENTITY  curve_bounded_surface
    SUBTYPE OF (bounded_surface);
      basis_surface  : surface;
      boundaries     : SET [1:?] OF boundary_curve;
      implicit_outer : BOOLEAN;
    WHERE
      wr1: (NOT implicit_outer) OR (SIZEOF(QUERY ( temp <* boundaries | (
               'PROCESS_PLANNING_SCHEMA.OUTER_BOUNDARY_CURVE' IN TYPEOF(
               temp)) )) = 0);
      wr2: (NOT implicit_outer) OR (
               'PROCESS_PLANNING_SCHEMA.BOUNDED_SURFACE' IN TYPEOF(
               basis_surface));
      wr3: SIZEOF(QUERY ( temp <* boundaries | (
               'PROCESS_PLANNING_SCHEMA.OUTER_BOUNDARY_CURVE' IN TYPEOF(
               temp)) )) <= 1;
      wr4: SIZEOF(QUERY ( temp <* boundaries | (temp\
               composite_curve_on_surface.basis_surface[1] <> SELF.
               basis_surface) )) = 0;
  END_ENTITY; -- curve_bounded_surface

  ENTITY  curve_replica
    SUBTYPE OF (curve);
      parent_curve   : curve;
      transformation : cartesian_transformation_operator;
    WHERE
      wr1: transformation.dim = parent_curve.dim;
      wr2: acyclic_curve_replica(SELF,parent_curve);
  END_ENTITY; -- curve_replica

  ENTITY  cylindrical_shape_representation
    SUBTYPE OF (shape_representation_with_parameters);
    WHERE
      wr1: SIZEOF(SELF.items) = 3;
      wr2: SIZEOF(QUERY ( it <* SELF.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1;
      wr3: SIZEOF(QUERY ( it <* SELF.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'length')) )) = 1;
      wr4: SIZEOF(QUERY ( it <* SELF.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'diameter')) )) = 1;
  END_ENTITY; -- cylindrical_shape_representation

  ENTITY  cylindrical_surface
    SUBTYPE OF (elementary_surface);
      radius : positive_length_measure;
  END_ENTITY; -- cylindrical_surface

  ENTITY  cylindricity_tolerance
    SUBTYPE OF (geometric_tolerance);
    WHERE
      wr1: NOT (('PROCESS_PLANNING_SCHEMA.' + 
              'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE') IN TYPEOF(SELF));
  END_ENTITY; -- cylindricity_tolerance

  ENTITY  data_environment;
      name        : label;
      description : text;
      elements    : SET [1:?] OF property_definition_representation;
  END_ENTITY; -- data_environment

  ENTITY  date
    SUPERTYPE OF (calendar_date);
      year_component : year_number;
  END_ENTITY; -- date

  ENTITY  date_and_time;
      date_component : date;
      time_component : local_time;
  END_ENTITY; -- date_and_time

  ENTITY  date_assignment
    ABSTRACT SUPERTYPE;
      assigned_date : date;
      role          : date_role;
  END_ENTITY; -- date_assignment

  ENTITY  date_role;
      name : label;
    DERIVE
      description : text := get_description_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
  END_ENTITY; -- date_role

  ENTITY  datum
    SUBTYPE OF (shape_aspect);
      identification : identifier;
    INVERSE
      established_by_relationships : SET [1:?] OF
                                         shape_aspect_relationship FOR 
                                        related_shape_aspect;
    WHERE
      wr1: SIZEOF(QUERY ( x <* SELF.established_by_relationships | (
               SIZEOF(TYPEOF(x.relating_shape_aspect) * [
               'PROCESS_PLANNING_SCHEMA.DATUM_FEATURE',
               'PROCESS_PLANNING_SCHEMA.DATUM_TARGET']) <> 1) )) = 0;
  END_ENTITY; -- datum

  ENTITY  datum_feature
    SUBTYPE OF (shape_aspect);
    INVERSE
      feature_basis_relationship : shape_aspect_relationship FOR 
                                      relating_shape_aspect;
    WHERE
      wr1: SIZEOF(QUERY ( sar <* bag_to_set(USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT')) | (NOT (
               'PROCESS_PLANNING_SCHEMA.DATUM' IN TYPEOF(sar.
               related_shape_aspect))) )) = 0;
      wr2: SELF.product_definitional = TRUE;
  END_ENTITY; -- datum_feature

  ENTITY  datum_reference;
      precedence       : INTEGER;
      referenced_datum : datum;
    WHERE
      wr1: precedence > 0;
  END_ENTITY; -- datum_reference

  ENTITY  datum_target
    SUBTYPE OF (shape_aspect);
      target_id : identifier;
    INVERSE
      target_basis_relationship : shape_aspect_relationship FOR 
                                     relating_shape_aspect;
    WHERE
      wr1: SIZEOF(QUERY ( sar <* bag_to_set(USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT')) | (NOT (
               'PROCESS_PLANNING_SCHEMA.DATUM' IN TYPEOF(sar.
               related_shape_aspect))) )) = 0;
      wr2: SELF.product_definitional = TRUE;
  END_ENTITY; -- datum_target

  ENTITY  defining_action_method_relationship
    SUBTYPE OF (action_method_relationship);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_ACTIVITY' IN TYPEOF(SELF.
               related_method);
  END_ENTITY; -- defining_action_method_relationship

  ENTITY  definitional_representation
    SUBTYPE OF (representation);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.PARAMETRIC_REPRESENTATION_CONTEXT' IN 
               TYPEOF(SELF\representation.context_of_items);
  END_ENTITY; -- definitional_representation

  ENTITY  degenerate_pcurve
    SUBTYPE OF (point);
      basis_surface      : surface;
      reference_to_curve : definitional_representation;
    WHERE
      wr1: SIZEOF(reference_to_curve\representation.items) = 1;
      wr2: 'PROCESS_PLANNING_SCHEMA.CURVE' IN TYPEOF(reference_to_curve\
               representation.items[1]);
      wr3: reference_to_curve\representation.items[1]\
               geometric_representation_item.dim = 2;
  END_ENTITY; -- degenerate_pcurve

  ENTITY  degenerate_toroidal_surface
    SUBTYPE OF (toroidal_surface);
      select_outer : BOOLEAN;
    WHERE
      wr1: major_radius < minor_radius;
  END_ENTITY; -- degenerate_toroidal_surface

  ENTITY  derived_shape_aspect
    SUPERTYPE OF (ONEOF (apex,centre_of_symmetry,geometric_alignment,
        geometric_intersection,parallel_offset,perpendicular_to,extension,
        tangent))
    SUBTYPE OF (shape_aspect);
    INVERSE
      deriving_relationships : SET [1:?] OF
                                   shape_aspect_deriving_relationship FOR 
                                  relating_shape_aspect;
  END_ENTITY; -- derived_shape_aspect

  ENTITY  derived_unit;
      elements : SET [1:?] OF derived_unit_element;
    DERIVE
      name : label := get_name_value(SELF);
    WHERE
      wr1: (SIZEOF(elements) > 1) OR ((SIZEOF(elements) = 1) AND (elements
               [1].exponent <> 1));
      wr2: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
  END_ENTITY; -- derived_unit

  ENTITY  derived_unit_element;
      unit     : named_unit;
      exponent : REAL;
  END_ENTITY; -- derived_unit_element

  ENTITY  description_attribute;
      attribute_value : text;
      described_item  : description_attribute_select;
  END_ENTITY; -- description_attribute

  ENTITY  descriptive_representation_item
    SUBTYPE OF (representation_item);
      description : text;
  END_ENTITY; -- descriptive_representation_item

  ENTITY  dimension_related_tolerance_zone_element;
      related_dimension : dimensional_location;
      related_element   : tolerance_zone_definition;
  END_ENTITY; -- dimension_related_tolerance_zone_element

  ENTITY  dimensional_characteristic_representation;
      dimension      : dimensional_characteristic;
      representation : shape_dimension_representation;
  END_ENTITY; -- dimensional_characteristic_representation

  ENTITY  dimensional_exponents;
      length_exponent                    : REAL;
      mass_exponent                      : REAL;
      time_exponent                      : REAL;
      electric_current_exponent          : REAL;
      thermodynamic_temperature_exponent : REAL;
      amount_of_substance_exponent       : REAL;
      luminous_intensity_exponent        : REAL;
  END_ENTITY; -- dimensional_exponents

  ENTITY  dimensional_location
    SUPERTYPE OF (ONEOF (angular_location,dimensional_location_with_path))
    SUBTYPE OF (shape_aspect_relationship);
  END_ENTITY; -- dimensional_location

  ENTITY  dimensional_location_with_path
    SUBTYPE OF (dimensional_location);
      path : shape_aspect;
  END_ENTITY; -- dimensional_location_with_path

  ENTITY  dimensional_size
    SUPERTYPE OF (angular_size);
      applies_to : shape_aspect;
      name       : label;
    WHERE
      wr1: applies_to.product_definitional = TRUE;
  END_ENTITY; -- dimensional_size

  ENTITY  directed_action
    SUBTYPE OF (executed_action);
      directive : action_directive;
  END_ENTITY; -- directed_action

  ENTITY  directed_dimensional_location
    SUBTYPE OF (dimensional_location);
  END_ENTITY; -- directed_dimensional_location

  ENTITY  direction
    SUBTYPE OF (geometric_representation_item);
      direction_ratios : LIST [2:3] OF REAL;
    WHERE
      wr1: SIZEOF(QUERY ( tmp <* direction_ratios | (tmp <> 0) )) > 0;
  END_ENTITY; -- direction

  ENTITY  direction_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(SELF.items) = 1;
      wr2: SIZEOF(QUERY ( it <* SELF.items | (NOT (
               'PROCESS_PLANNING_SCHEMA.DIRECTION' IN TYPEOF(it))) )) = 0;
  END_ENTITY; -- direction_shape_representation

  ENTITY  document;
      id          : identifier;
      name        : label;
      description : OPTIONAL text;
      kind        : document_type;
    INVERSE
      representation_types : SET [0:?] OF document_representation_type FOR 
                                represented_document;
  END_ENTITY; -- document

  ENTITY  document_file
    SUBTYPE OF (document, characterized_object);
    WHERE
      wr1: SIZEOF(QUERY ( drt <* USEDIN(SELF,
  'PROCESS_PLANNING_SCHEMA.DOCUMENT_REPRESENTATION_TYPE.REPRESENTED_DOCUMENT')
                | (drt.name IN ['physical','digital']) )) = 1;
      wr2: SIZEOF(QUERY ( adr <* USEDIN(SELF,
        'PROCESS_PLANNING_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')
                | (('PROCESS_PLANNING_SCHEMA.IDENTIFICATION_ASSIGNMENT' IN 
               TYPEOF(adr)) AND (adr.role.name = 'version')) )) <= 1;
      wr3: SIZEOF(QUERY ( aeia <* USEDIN(SELF,
  'PROCESS_PLANNING_SCHEMA.APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT.ITEMS')
                |
              ('PROCESS_PLANNING_SCHEMA.EXTERNAL_IDENTIFICATION_ASSIGNMENT' 
               IN TYPEOF(aeia)) )) >= 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ((pd.name = 'document property') AND (SIZEOF(QUERY ( pdr <* 
               USEDIN(pd
   ,'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')
                | (('PROCESS_PLANNING_SCHEMA.DOCUMENT_FILE_PROPERTIES' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'document format')) )) <= 1)) )) 
               <= 1;
  END_ENTITY; -- document_file

  ENTITY  document_file_properties
    SUBTYPE OF (representation);
    WHERE
      wr1 : SIZEOF(QUERY ( r <* SELF.items | ((r.name = 'country code') 
                AND (
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(r))) )) <= 1;
      wr2 : SIZEOF(QUERY ( r <* SELF.items | ((r.name = 'detail level') 
                AND (
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(r))) )) <= 1;
      wr3 : SIZEOF(QUERY ( r <* SELF.items | ((r.name = 'geometry type') 
                AND (
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(r))) )) <= 1;
      wr4 : SIZEOF(QUERY ( r <* SELF.items | ((r.name = 'language code') 
                AND (
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(r))) )) <= 1;
      wr5 : SIZEOF(QUERY ( r <* SELF.items | ((r.name = 
                'creating interface') AND (
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(r))) )) <= 1;
      wr6 : SIZEOF(QUERY ( r <* SELF.items | ((r.name = 
                'creating operating system') AND (
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(r))) )) <= 1;
      wr7 : SIZEOF(QUERY ( r <* SELF.items | ((r.name = 'creating system') 
                AND (
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(r))) )) <= 1;
      wr8 : SIZEOF(QUERY ( r <* SELF.items | ((r.name = 'data format') AND
                 ('PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(r))) )) <= 1;
      wr9 : SIZEOF(QUERY ( r <* SELF.items | ((r.name = 
                'format character code') AND (
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(r))) )) <= 1;
      wr10: SIZEOF(QUERY ( r <* SELF.items | ((r.name = 'file size') AND (
                SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(r)) = 2)) )) <= 1;
      wr11: SIZEOF(QUERY ( r <* SELF.items | ((r.name = 'page count') AND 
                (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.RATIO_MEASURE_WITH_UNIT'] * 
                TYPEOF(r)) = 2)) )) <= 1;
  END_ENTITY; -- document_file_properties

  ENTITY  document_product_association;
      name              : label;
      description       : OPTIONAL text;
      relating_document : document;
      related_product   : product_or_formation_or_definition;
  END_ENTITY; -- document_product_association

  ENTITY  document_reference
    ABSTRACT SUPERTYPE;
      assigned_document : document;
      source            : label;
    DERIVE
      role : object_role := get_role(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
  END_ENTITY; -- document_reference

  ENTITY  document_relationship;
      name              : label;
      description       : OPTIONAL text;
      relating_document : document;
      related_document  : document;
  END_ENTITY; -- document_relationship

  ENTITY  document_representation_type;
      name                 : label;
      represented_document : document;
  END_ENTITY; -- document_representation_type

  ENTITY  document_type;
      product_data_type : label;
  END_ENTITY; -- document_type

  ENTITY  document_usage_constraint;
      source                : document;
      subject_element       : label;
      subject_element_value : text;
  END_ENTITY; -- document_usage_constraint

  ENTITY  document_usage_constraint_assignment
    ABSTRACT SUPERTYPE;
      assigned_document_usage : document_usage_constraint;
      role                    : document_usage_role;
  END_ENTITY; -- document_usage_constraint_assignment

  ENTITY  document_usage_role;
      name        : label;
      description : OPTIONAL text;
  END_ENTITY; -- document_usage_role

  ENTITY  drawing
    SUBTYPE OF (document);
    WHERE
      wr1: SIZEOF(QUERY ( duc <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.DOCUMENT_USAGE_CONSTRAINT.SOURCE')
                | (duc.subject_element = 'drawing revision level') )) = 1;
      wr2: SIZEOF(QUERY ( adr <* QUERY ( dr <* USEDIN(SELF,
           'PROCESS_PLANNING_SCHEMA.DOCUMENT_REFERENCE.ASSIGNED_DOCUMENT')
                | ('PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE' IN 
               TYPEOF(dr)) ) | (NOT (SIZEOF(QUERY ( d <* adr.items | (
             'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_ACTIVITY' IN TYPEOF(d)) )) 
               >= 1)) )) = 0;
  END_ENTITY; -- drawing

  ENTITY  edge
    SUPERTYPE OF (ONEOF (edge_curve,oriented_edge))
    SUBTYPE OF (topological_representation_item);
      edge_start : vertex;
      edge_end   : vertex;
  END_ENTITY; -- edge

  ENTITY  edge_based_wireframe_model
    SUBTYPE OF (geometric_representation_item);
      ebwm_boundary : SET [1:?] OF connected_edge_set;
  END_ENTITY; -- edge_based_wireframe_model

  ENTITY edge_based_wireframe_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL',
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM',
               'PROCESS_PLANNING_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) 
               = 1)) )) = 0;
      wr2: SIZEOF(QUERY ( it <* SELF.items | (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL',
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1) )) 
               >= 1;
      wr3: SIZEOF(QUERY ( ebwm <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL' IN 
               TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( eb <* ebwm\
               edge_based_wireframe_model.ebwm_boundary | (NOT (SIZEOF(
               QUERY ( edges <* eb.ces_edges | (NOT (
               'PROCESS_PLANNING_SCHEMA.EDGE_CURVE' IN TYPEOF(edges))) )) =
                0)) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( ebwm <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL' IN 
               TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( eb <* ebwm\
               edge_based_wireframe_model.ebwm_boundary | (NOT (SIZEOF(
               QUERY ( pline_edges <* QUERY ( edges <* eb.ces_edges | (
               'PROCESS_PLANNING_SCHEMA.POLYLINE' IN TYPEOF(edges\
               edge_curve.edge_geometry)) ) | (NOT (SIZEOF(pline_edges\
               edge_curve.edge_geometry\polyline.points) > 2)) )) = 0)) )) 
               = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( ebwm <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL' IN 
               TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( eb <* ebwm\
               edge_based_wireframe_model.ebwm_boundary | (NOT (SIZEOF(
               QUERY ( edges <* eb.ces_edges | (NOT ((
               'PROCESS_PLANNING_SCHEMA.VERTEX_POINT' IN TYPEOF(edges.
               edge_start)) AND ('PROCESS_PLANNING_SCHEMA.VERTEX_POINT' IN 
               TYPEOF(edges.edge_end)))) )) = 0)) )) = 0)) )) = 0;
      wr6: SIZEOF(QUERY ( ebwm <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL' IN 
               TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( eb <* ebwm\
               edge_based_wireframe_model.ebwm_boundary | (NOT (SIZEOF(
               QUERY ( edges <* eb.ces_edges | (NOT 
               valid_wireframe_edge_curve(edges\edge_curve.edge_geometry)))) 
               = 0)) )) = 0)) )) = 0;
      wr7: SIZEOF(QUERY ( ebwm <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL' IN 
               TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( eb <* ebwm\
               edge_based_wireframe_model.ebwm_boundary | (NOT (SIZEOF(
               QUERY ( edges <* eb.ces_edges | (NOT (
               valid_wireframe_vertex_point(edges.edge_start\vertex_point.
               vertex_geometry) AND valid_wireframe_vertex_point(edges.
               edge_end\vertex_point.vertex_geometry))) )) = 0)) )) = 0)))) 
               = 0;
      wr8: SIZEOF(QUERY ( mi <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | (
               NOT (('PROCESS_PLANNING_SCHEMA.' + 
               'EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION') IN TYPEOF(mi\
               mapped_item.mapping_source.mapped_representation))) )) = 0;
      wr9: SELF.context_of_items\geometric_representation_context.
               coordinate_space_dimension = 3;
  END_ENTITY; -- edge_based_wireframe_shape_representation

  ENTITY  edge_curve
    SUBTYPE OF (edge, geometric_representation_item);
      edge_geometry : curve;
      same_sense    : BOOLEAN;
  END_ENTITY; -- edge_curve

  ENTITY  edge_loop
    SUBTYPE OF (loop, path);
    DERIVE
      ne : INTEGER := SIZEOF(SELF\path.edge_list);
    WHERE
      wr1: SELF\path.edge_list[1].edge_start :=: SELF\path.edge_list[ne].
               edge_end;
  END_ENTITY; -- edge_loop

  ENTITY  edge_round
    SUBTYPE OF (transition_feature);
    WHERE
      wr1: (NOT (SELF\shape_aspect.description = 'constant radius')) OR (
               SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
           ('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
               IN TYPEOF(pdr.used_representation)) )) = 1)) )) = 0);
      wr2: (NOT (SELF\shape_aspect.description = 'constant radius')) OR (
               SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
           ('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
               IN TYPEOF(pdr.used_representation)) ) | ((NOT (SIZEOF(
               impl_rep.used_representation.items) >= 1)) AND (SIZEOF(
               impl_rep.used_representation.items) <= 3)) )) = 0)) )) = 0);
      wr3: (NOT (SELF.description = 'constant radius')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
           ('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
               IN TYPEOF(pdr.used_representation)) ) | (NOT (SIZEOF(
               QUERY ( it <* impl_rep.used_representation.items | ((SIZEOF(
               ['PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'radius')) )) = 1)) )) = 0)))) 
               = 0);
      wr4: (NOT (SELF.description = 'constant radius')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
            ('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
               IN TYPEOF(pdr.used_representation)) ) | (NOT (SIZEOF(
               QUERY ( it <* impl_rep.used_representation.items | ((SIZEOF(
               ['PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'first offset')) )) <= 1)))) 
               = 0)) )) = 0);
      wr5: (NOT (SELF.description = 'constant radius')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
            ('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
               IN TYPEOF(pdr.used_representation)) ) | (NOT (SIZEOF(
               QUERY ( it <* impl_rep.used_representation.items | ((SIZEOF(
               ['PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'second offset')) )) <= 1)))) 
               = 0)) )) = 0);
      wr6: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'edge round face')) )) = 1)) )) =
                0;
      wr7: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'first face shape')) )) = 1)) )) 
               = 0;
      wr8: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'second face shape')) )) = 1)) )) 
               = 0;
  END_ENTITY; -- edge_round

  ENTITY  effectivity;
      id : identifier;
    DERIVE
      name        : label := get_name_value(SELF);
      description : text := get_description_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
      wr2: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
  END_ENTITY; -- effectivity

  ENTITY  effectivity_assignment
    ABSTRACT SUPERTYPE;
      assigned_effectivity : effectivity;
    DERIVE
      role : object_role := get_role(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
  END_ENTITY; -- effectivity_assignment

  ENTITY  elementary_surface
    SUPERTYPE OF (ONEOF (plane,cylindrical_surface,conical_surface,
        spherical_surface,toroidal_surface))
    SUBTYPE OF (surface);
      position : axis2_placement_3d;
  END_ENTITY; -- elementary_surface

  ENTITY  ellipse
    SUBTYPE OF (conic);
      semi_axis_1 : positive_length_measure;
      semi_axis_2 : positive_length_measure;
  END_ENTITY; -- ellipse

  ENTITY  evaluated_degenerate_pcurve
    SUBTYPE OF (degenerate_pcurve);
      equivalent_point : cartesian_point;
  END_ENTITY; -- evaluated_degenerate_pcurve

  ENTITY  executed_action
    SUBTYPE OF (action);
  END_ENTITY; -- executed_action

  ENTITY  extension
    SUBTYPE OF (derived_shape_aspect);
    WHERE
      wr1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) = 1;
  END_ENTITY; -- extension

  ENTITY  external_identification_assignment
    ABSTRACT SUPERTYPE
    SUBTYPE OF (identification_assignment);
      source : external_source;
  END_ENTITY; -- external_identification_assignment

  ENTITY  external_source;
      source_id : source_item;
    DERIVE
      description : text := get_description_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
  END_ENTITY; -- external_source

  ENTITY  externally_defined_class
    SUBTYPE OF (externally_defined_item, class);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.KNOWN_SOURCE' IN TYPEOF(SELF.source);
      wr2: SELF.source.name = 'ISO 13584 library';
      wr3: SIZEOF(QUERY ( aoa <* USEDIN(SELF.source,
          'PROCESS_PLANNING_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')
                | (aoa.role.name = 'library supplier') )) = 1;
      wr4: SIZEOF(QUERY ( aoa <* USEDIN(SELF,
'PROCESS_PLANNING_SCHEMA.APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT.ITEMS')
                | ((
               'PROCESS_PLANNING_SCHEMA.LIBRARY_CLASS_VERSION_ASSIGNMENT' 
               IN TYPEOF(aoa)) AND (aoa.role.name = 'class version')) )) = 
               1;
  END_ENTITY; -- externally_defined_class

  ENTITY  externally_defined_feature_definition
    SUBTYPE OF (feature_definition, externally_defined_item);
    WHERE
      wr1 : ((((SELF\characterized_object.description = 'thread') AND (
                SELF\externally_defined_item.item_id = 'external thread')) 
                AND (SELF\externally_defined_item.source.source_id = 
                'external feature specification')) OR (((SELF\
                characterized_object.description = 'marking') AND (SELF\
                externally_defined_item.item_id = 'external marking')) AND 
                (SELF\externally_defined_item.source.source_id = 
                'external feature specification'))) OR (((SELF\
                characterized_object.description = 'knurl') AND (SELF\
                externally_defined_item.item_id = 'external knurl')) AND (
                SELF\externally_defined_item.source.source_id = 
                'external feature specification'));
      wr2 : (NOT (SELF\characterized_object.description = 'thread')) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND ((8 <= SIZEOF(pdr.
                used_representation.items)) AND (SIZEOF(pdr.
                used_representation.items) <= 10))) )) = 1) )) = 1);
      wr3 : (NOT (SELF\characterized_object.description = 'marking')) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND (SIZEOF(pdr.used_representation.
                items) = 2)) )) = 1) )) = 1);
      wr4 : (NOT (SELF\characterized_object.description = 'knurl')) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND (SIZEOF(pdr.used_representation.
                items) = 1)) )) = 1) )) = 1);
      wr5 : (NOT (SELF\characterized_object.description IN ['knurl',
                'thread'])) OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(
                SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'partial area occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'applied area usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | ('PROCESS_PLANNING_SCHEMA.APPLIED_AREA' 
                IN TYPEOF(sdr.relating_shape_aspect)) )) = 1)) )) <= 1)) )) 
                = 0);
      wr6 : (NOT (SELF\characterized_object.description = 'marking')) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'marking text')) )) = 1)) )) 
                = 0)) )) = 0);
      wr7 : (NOT (SELF\characterized_object.description = 'thread')) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'removal direction')) AND ((
                it.description = 'internal') OR (it.description = 
                'external'))) )) = 1)) )) = 0)) )) = 0);
      wr8 : (NOT (SELF\characterized_object.description = 'thread')) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'qualifier')) )) <= 1)) )) = 
                0)) )) = 0);
      wr9 : (NOT (SELF\characterized_object.description = 'thread')) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'hand')) )) = 1)) )) = 0)) )) 
                = 0);
      wr10: (NOT (SELF\characterized_object.description = 'thread')) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
              IN TYPEOF(it)) AND (it.name = 'fit class')) )) = 1)) )) =0)) )) 
                = 0);
      wr11: (NOT (SELF\characterized_object.description = 'thread')) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'form')) )) = 1)) )) = 0)) )) 
                = 0);
      wr12: (NOT (SELF\characterized_object.description = 'thread')) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'major diameter')) )) = 1)))) 
                = 0)) )) = 0);
      wr13: (NOT (SELF\characterized_object.description = 'thread')) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.RATIO_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'number of threads')) )) = 
                1)) )) = 0)) )) = 0);
      wr14: (NOT (SELF\characterized_object.description IN ['knurl',
                'bevel gear','spur gear','helix gear','thread'])) OR (
                SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'applied shape') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | ('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' 
                IN TYPEOF(sdr.relating_shape_aspect)) )) = 1) )) <= 1)) )) 
                = 0);
      wr15: (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helix gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND (SIZEOF(pdr.used_representation.
                items) = 9)) )) = 1) )) = 1);
      wr16: (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helix gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.RATIO_MEASURE_WITH_UNIT'] * 
              TYPEOF(it)) = 2) AND (it.name = 'number of teeth')) )) =1)) )) 
                = 0)) )) = 0);
      wr17: (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helix gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'reference presure angle')))) 
                = 1)) )) = 0)) )) = 0);
      wr18: (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helix gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'rake shift factor')) )) = 
                1)) )) = 0)) )) = 0);
      wr19: (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helix gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'nominal tool depth')) )) =
                 1)) )) = 0)) )) = 0);
      wr20: (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helix gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'face width')) )) = 1)) )) 
                = 0)) )) = 0);
      wr21: (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helix gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'tip diameter')) )) = 1)))) 
                = 0)) )) = 0);
      wr22: (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helix gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'normal attribute')) AND ((it
                .description = 'module') OR (it.description = 
                'diameter pitch'))) )) = 1)) )) = 0)) )) = 0);
      wr23: (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helix gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
              TYPEOF(it)) = 2) AND (it.name = 'normal attribute')) )) =1)) )) 
                = 0)) )) = 0);
  END_ENTITY; -- externally_defined_feature_definition

  ENTITY  externally_defined_general_property
    SUBTYPE OF (general_property, externally_defined_item);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.KNOWN_SOURCE' IN TYPEOF(SELF.source);
      wr2: SELF.source.name = 'ISO 13584 library';
      wr3: SIZEOF(QUERY ( aoa <* USEDIN(SELF,
'PROCESS_PLANNING_SCHEMA.APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT.ITEMS')
                | ((
               'PROCESS_PLANNING_SCHEMA.LIBRARY_CLASS_VERSION_ASSIGNMENT' 
               IN TYPEOF(aoa)) AND (aoa.role.name = 'property version')) )) 
               = 1;
      wr4: SIZEOF(QUERY ( ap <* USEDIN(SELF,
'PROCESS_PLANNING_SCHEMA.EXTERNALLY_DEFINED_ITEM_RELATIONSHIP.RELATING_ITEM')
                | ((ap.name = 'name scope') AND (
               'PROCESS_PLANNING_SCHEMA.EXTERNALLY_DEFINED_CLASS' IN 
               TYPEOF(ap.related_item))) )) >= 1;
  END_ENTITY; -- externally_defined_general_property

  ENTITY  externally_defined_item;
      item_id : source_item;
      source  : external_source;
  END_ENTITY; -- externally_defined_item

  ENTITY  externally_defined_item_relationship;
      name          : label;
      description   : OPTIONAL text;
      relating_item : externally_defined_item;
      related_item  : externally_defined_item;
  END_ENTITY; -- externally_defined_item_relationship

  ENTITY  externally_defined_representation_with_parameters
    SUBTYPE OF (representation);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.APPLIED_CLASSIFICATION_ASSIGNMENT.ITEMS')
                | (('PROCESS_PLANNING_SCHEMA.APPLIED_LIBRARY_ASSIGNMENT' IN
                TYPEOF(adr)) AND (adr.role.name = 
               'definitional class membership')) )) = 1;
      wr2: SIZEOF(QUERY ( adr <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(adr)) )) = 1;
      wr3: SIZEOF(QUERY ( adr <* SELF.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(adr)) AND (
               'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(adr.
               location))) )) = 1;
  END_ENTITY; -- externally_defined_representation_with_parameters

  ENTITY  externally_defined_schema
    SUBTYPE OF (externally_defined_item);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.KNOWN_SOURCE' IN TYPEOF(SELF.source);
      wr2: SELF.source.name = 'ISO 10303 part';
      wr3: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')
                | (adr.assigned_document.description = 
               'externally defined schema') )) <= 1;
      wr4: SELF.item_id IN ['externally defined schema','workingstep',
               'nc function'];
  END_ENTITY; -- externally_defined_schema

  ENTITY  face
    SUPERTYPE OF (ONEOF (face_surface,oriented_face))
    SUBTYPE OF (topological_representation_item);
      bounds : SET [1:?] OF face_bound;
    WHERE
      wr1: NOT mixed_loop_type_set(list_to_set(list_face_loops(SELF)));
      wr2: SIZEOF(QUERY ( temp <* bounds | (
               'PROCESS_PLANNING_SCHEMA.FACE_OUTER_BOUND' IN TYPEOF(temp)))) 
               <= 1;
  END_ENTITY; -- face
  ENTITY  face_bound
    SUBTYPE OF (topological_representation_item);
      bound       : loop;
      orientation : BOOLEAN;
  END_ENTITY; -- face_bound

  ENTITY  face_outer_bound
    SUBTYPE OF (face_bound);
  END_ENTITY; -- face_outer_bound

  ENTITY  face_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(SELF.items) >= 1;
      wr2: SIZEOF(QUERY ( it <* SELF.items | (NOT ((
               'PROCESS_PLANNING_SCHEMA.FACE_SURFACE' IN TYPEOF(it)) OR (
               'PROCESS_PLANNING_SCHEMA.ORIENTED_FACE' IN TYPEOF(it)))) )) 
               = 0;
  END_ENTITY; -- face_shape_representation

  ENTITY  face_surface
    SUBTYPE OF (face, geometric_representation_item);
      face_geometry : surface;
      same_sense    : BOOLEAN;
    WHERE
      wr1: NOT ('PROCESS_PLANNING_SCHEMA.ORIENTED_SURFACE' IN TYPEOF(
               face_geometry));
  END_ENTITY; -- face_surface

  ENTITY  faceted_brep
    SUBTYPE OF (manifold_solid_brep);
  END_ENTITY; -- faceted_brep

  ENTITY  faceted_brep_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(QUERY ( it <* items | (NOT (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.FACETED_BREP',
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM',
               'PROCESS_PLANNING_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) 
               = 1)) )) = 0;
      wr2: SIZEOF(QUERY ( it <* items | (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.FACETED_BREP',
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1) )) 
               > 0;
      wr3: SIZEOF(QUERY ( fbrep <* QUERY ( it <* items | (
               'PROCESS_PLANNING_SCHEMA.FACETED_BREP' IN TYPEOF(it)) ) | (
               NOT (SIZEOF(QUERY ( csh <* msb_shells(fbrep) | (NOT (SIZEOF(
               QUERY ( fcs <* csh\connected_face_set.cfs_faces | (NOT ((
               'PROCESS_PLANNING_SCHEMA.FACE_SURFACE' IN TYPEOF(fcs)) AND (
               ('PROCESS_PLANNING_SCHEMA.PLANE' IN TYPEOF(fcs\face_surface.
               face_geometry)) AND (
               'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(fcs\
               face_surface.face_geometry\elementary_surface.position.
               location))))) )) = 0)) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( fbrep <* QUERY ( it <* items | (
               'PROCESS_PLANNING_SCHEMA.FACETED_BREP' IN TYPEOF(it)) ) | (
               NOT (SIZEOF(QUERY ( csh <* msb_shells(fbrep) | (NOT (SIZEOF(
               QUERY ( fcs <* csh\connected_face_set.cfs_faces | (NOT (
               SIZEOF(QUERY ( bnds <* fcs.bounds | (
               'PROCESS_PLANNING_SCHEMA.FACE_OUTER_BOUND' IN TYPEOF(bnds)))) 
               = 1)) )) = 0)) )) = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( msb <* QUERY ( it <* items | (
               'PROCESS_PLANNING_SCHEMA.MANIFOLD_SOLID_BREP' IN TYPEOF(it)))
                | ('PROCESS_PLANNING_SCHEMA.ORIENTED_CLOSED_SHELL' IN 
               TYPEOF(msb\manifold_solid_brep.outer)) )) = 0;
      wr6: SIZEOF(QUERY ( brv <* QUERY ( it <* items | (
               'PROCESS_PLANNING_SCHEMA.BREP_WITH_VOIDS' IN TYPEOF(it)) )
                | (NOT (SIZEOF(QUERY ( csh <* brv\brep_with_voids.voids | 
               csh\oriented_closed_shell.orientation )) = 0)) )) = 0;
      wr7: SIZEOF(QUERY ( mi <* QUERY ( it <* items | (
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | (
               NOT (
               'PROCESS_PLANNING_SCHEMA.FACETED_BREP_SHAPE_REPRESENTATION' 
               IN TYPEOF(mi\mapped_item.mapping_source.
               mapped_representation))) )) = 0;
  END_ENTITY; -- faceted_brep_shape_representation

  ENTITY  feature_component_definition
    SUBTYPE OF (characterized_object);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE')) = 1)) )) =
                0;
  END_ENTITY; -- feature_component_definition

  ENTITY  feature_component_relationship
    SUPERTYPE OF (ONEOF
(pattern_omit_membership,pattern_offset_membership))
    SUBTYPE OF (shape_aspect_relationship);
    WHERE
      wr1: ((SIZEOF(['PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT',
               'PROCESS_PLANNING_SCHEMA.REPLICATE_FEATURE',
               'PROCESS_PLANNING_SCHEMA.TRANSITION_FEATURE',
               'PROCESS_PLANNING_SCHEMA.MODIFIED_PATTERN'] * TYPEOF(SELF.
               relating_shape_aspect)) = 1) OR (
               'PROCESS_PLANNING_SCHEMA.FEATURE_DEFINITION' IN TYPEOF(SELF.
               relating_shape_aspect.of_shape.definition))) OR (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.relating_shape_aspect.of_shape.definition));
  END_ENTITY; -- feature_component_relationship

  ENTITY  feature_definition
    SUBTYPE OF (characterized_object);
    WHERE
      wr1: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
               SELF) |
('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
               IN TYPEOF(pdr.used_representation)) )) <= 1;
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr3: SIZEOF(['PROCESS_PLANNING_SCHEMA.BOSS',
               'PROCESS_PLANNING_SCHEMA.TURNED_KNURL',
               'PROCESS_PLANNING_SCHEMA.THREAD',
               'PROCESS_PLANNING_SCHEMA.GEAR',
               'PROCESS_PLANNING_SCHEMA.MARKING',
               'PROCESS_PLANNING_SCHEMA.RIB_TOP',
               'PROCESS_PLANNING_SCHEMA.ROUND_HOLE',
               'PROCESS_PLANNING_SCHEMA.OUTSIDE_PROFILE',
               'PROCESS_PLANNING_SCHEMA.POCKET',
               'PROCESS_PLANNING_SCHEMA.REMOVAL_VOLUME',
               'PROCESS_PLANNING_SCHEMA.REVOLVED_PROFILE',
               'PROCESS_PLANNING_SCHEMA.OUTER_ROUND',
               'PROCESS_PLANNING_SCHEMA.FLAT_FACE',
               'PROCESS_PLANNING_SCHEMA.PROTRUSION',
               'PROCESS_PLANNING_SCHEMA.ROUNDED_END',
               'PROCESS_PLANNING_SCHEMA.SLOT',
               'PROCESS_PLANNING_SCHEMA.SPHERICAL_CAP',
               'PROCESS_PLANNING_SCHEMA.STEP',
               'PROCESS_PLANNING_SCHEMA.COMPOUND_FEATURE',
               'PROCESS_PLANNING_SCHEMA.REPLICATE_FEATURE',
           'PROCESS_PLANNING_SCHEMA.EXTERNALLY_DEFINED_FEATURE_DEFINITION'] 
               * TYPEOF(SELF)) = 1;
      wr4: (NOT (SIZEOF(['PROCESS_PLANNING_SCHEMA.ROUND_HOLE',
               'PROCESS_PLANNING_SCHEMA.BOSS',
               'PROCESS_PLANNING_SCHEMA.OUTSIDE_PROFILE',
               'PROCESS_PLANNING_SCHEMA.REMOVAL_VOLUME',
               'PROCESS_PLANNING_SCHEMA.FLAT_FACE',
               'PROCESS_PLANNING_SCHEMA.POCKET',
               'PROCESS_PLANNING_SCHEMA.PROTRUSION',
               'PROCESS_PLANNING_SCHEMA.RIB_TOP',
               'PROCESS_PLANNING_SCHEMA.ROUNDED_END',
               'PROCESS_PLANNING_SCHEMA.SLOT',
               'PROCESS_PLANNING_SCHEMA.STEP'] * TYPEOF(SELF)) = 1)) 
               OR (SIZEOF(QUERY ( pdr <* 
               get_property_definition_representations(SELF) |
            (('PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' 
               IN TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'maximum feature limit')) )) <=1);
  END_ENTITY; -- feature_definition

  ENTITY  feature_dependency
    SUBTYPE OF (group_relationship);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_IDENTIFICATION_ITEM' IN 
               TYPEOF(SELF.related_group);
      wr2: 'PROCESS_PLANNING_SCHEMA.FEATURE_IDENTIFICATION_ITEM' IN 
               TYPEOF(SELF.relating_group);
  END_ENTITY; -- feature_dependency

  ENTITY  feature_identification_item
    SUBTYPE OF (class);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* QUERY ( ga <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.GROUP_ASSIGNMENT.ASSIGNED_GROUP')
                | ('PROCESS_PLANNING_SCHEMA.APPLIED_GROUP_ASSIGNMENT' IN 
               TYPEOF(ga)) ) | (NOT (SIZEOF(QUERY ( ins <* adr.items | (
               'PROCESS_PLANNING_SCHEMA.INSTANCED_FEATURE' IN TYPEOF(ins)))) 
               = 1)) )) = 0;
      wr2: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.GROUP_RELATIONSHIP.RELATING_GROUP')
                | ('PROCESS_PLANNING_SCHEMA.FEATURE_INTERACTION' IN TYPEOF(
               adr)) )) >= 0;
  END_ENTITY; -- feature_identification_item

  ENTITY  feature_interaction
    SUBTYPE OF (group_relationship);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_IDENTIFICATION_ITEM' IN 
               TYPEOF(SELF.related_group);
      wr2: 'PROCESS_PLANNING_SCHEMA.FEATURE_IDENTIFICATION_ITEM' IN 
               TYPEOF(SELF.relating_group);
  END_ENTITY; -- feature_interaction

  ENTITY  feature_pattern
    SUBTYPE OF (replicate_feature);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (SIZEOF(QUERY ( pdr <* USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' 
               + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) AND (SIZEOF(QUERY ( srwp_i <* pdr.
               used_representation.items | (NOT (
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(srwp_i))) )) >
                0)) )) > 0) )) = 0;
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'base feature placement')) )) > 1)) )) = 0)) )) = 0;
  END_ENTITY; -- feature_pattern

  ENTITY  fillet
    SUBTYPE OF (transition_feature);
    WHERE
      wr1: (NOT (SELF\shape_aspect.description = 'constant radius')) OR (
               SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0);
      wr2: (NOT (SELF\shape_aspect.description = 'constant radius')) OR (
               SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | ((NOT (SIZEOF(impl_rep.
               used_representation.items) >= 1)) AND (SIZEOF(impl_rep.
               used_representation.items) <= 3)) )) = 0)) )) = 0);
      wr3: (NOT (SELF.description = 'constant radius')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'radius')) )) = 1)) )) = 0)))) 
               = 0);
      wr4: (NOT (SELF.description = 'constant radius')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'first offset')) )) <= 1)))) 
               = 0)) )) = 0);
      wr5: (NOT (SELF.description = 'constant radius')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'second offset')) )) <= 1)))) 
               = 0)) )) = 0);
      wr6: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.' + 
               'DEFINITION') | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'fillet face')) )) = 1)) )) = 0;
      wr7: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.' + 
               'DEFINITION') | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'first face shape')) )) = 1)) )) 
               = 0;
      wr8: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.' + 
               'DEFINITION') | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'second face shape')) )) = 1)) )) 
               = 0;
  END_ENTITY; -- fillet

  ENTITY  fixture_assembly
    SUBTYPE OF (action_resource);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* SELF.usage | ((
               'PROCESS_PLANNING_SCHEMA.ACTION_METHOD' IN TYPEOF(adr)) AND 
               (adr.name = 'assembly instruction')) )) = 1;
      wr2: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (adr
               .description = 'configuration') )) = 1;
      wr3: SIZEOF(QUERY ( ap <* USEDIN(SELF,
  'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_RELATIONSHIP.RELATING_RESOURCE')
                | (('PROCESS_PLANNING_SCHEMA.FIXTURE_ASSEMBLY_RELATIONSHIP' 
               IN TYPEOF(ap)) AND (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.FIXTURE_ASSEMBLY',
               'PROCESS_PLANNING_SCHEMA.FIXTURE_ASSEMBLY_ELEMENT'] * 
               TYPEOF(ap.related_resource)) = 1)) )) >= 1;
      wr4: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_CONTRACT_ASSIGNMENT.ITEMS')
                | ('PROCESS_PLANNING_SCHEMA.FIXTURE_CONTRACT' IN TYPEOF(adr
               .assigned_contract)) )) >= 1;
      wr5: SIZEOF(QUERY ( am <* QUERY ( arr <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES')
                | ('PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT' IN
                TYPEOF(arr)) ) | (SIZEOF(QUERY ( it <* am.operations | (
               SIZEOF(['PROCESS_PLANNING_SCHEMA.PART_FIXTURE_MOUNTING',
               'PROCESS_PLANNING_SCHEMA.FIXTURE_PALLET_MOUNTING'] * TYPEOF(
               it)) = 1) )) >= 1) )) = 0;
      wr6: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')
                | ('PROCESS_PLANNING_SCHEMA.DRAWING' IN TYPEOF(adr.
               assigned_document)) )) <= 1;
      wr7: SIZEOF(QUERY ( arr <* QUERY ( ar <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES')
                | ('PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT' IN
                TYPEOF(ar)) ) | (NOT (SIZEOF(QUERY ( pdp_imp <* 
               QUERY ( pdp <* arr.operations | (
               'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_PROCESS' IN 
               TYPEOF(pdp)) ) | (SIZEOF(QUERY ( ppa <* USEDIN(pdp_imp,
            'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | (('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' IN TYPEOF(ppa.
               property_or_shape)) AND (ppa.description = 
               'fixture assembly shape')) )) = 0) )) = 0)) )) >= 0;
  END_ENTITY; -- fixture_assembly

  ENTITY  fixture_assembly_element
    SUBTYPE OF (action_resource);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')
                | (('PROCESS_PLANNING_SCHEMA.DOCUMENT' IN TYPEOF(adr.
               assigned_document)) AND (adr.assigned_document.description =
                'fixture catalogue number')) )) <= 1;
      wr2: SIZEOF(QUERY ( adr <* USEDIN(SELF,
           'PROCESS_PLANNING_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')
                | (adr.assigned_organization.description = 
               'fixture company name') )) = 1;
      wr3: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (adr
               .description = 'fixture element identification') )) = 1;
      wr4: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
      'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | (NOT (SIZEOF(QUERY ( rpr <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.MASS_MEASURE_WITH_UNIT' IN TYPEOF(
               rpr)) AND (rpr.name = 'fixture element weight')) )) <= 1)))) 
               = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( arr <* QUERY ( ar <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES')
                | ('PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT' IN
                TYPEOF(ar)) ) | (NOT (SIZEOF(QUERY ( pdp_imp <* 
               QUERY ( pdp <* arr.operations | (
               'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_PROCESS' IN 
               TYPEOF(pdp)) ) | (SIZEOF(QUERY ( ppa <* USEDIN(pdp_imp,
           'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | ((('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' IN TYPEOF(ppa.
               property_or_shape)) AND (ppa.description = 
               'fixture assembly element shape')) AND (SIZEOF(USEDIN(ppa.
               property_or_shape,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE')) = 0)) )) =
                0) )) = 0)) )) >= 0;
  END_ENTITY; -- fixture_assembly_element

  ENTITY  fixture_assembly_relationship
    SUBTYPE OF (action_resource_relationship);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FIXTURE_ASSEMBLY' IN TYPEOF(SELF.
               relating_resource);
      wr2: 'PROCESS_PLANNING_SCHEMA.FIXTURE_ASSEMBLY_ELEMENT' IN TYPEOF(
               SELF.related_resource);
  END_ENTITY; -- fixture_assembly_relationship

  ENTITY  fixture_contract
    SUBTYPE OF (contract);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* USEDIN(SELF
       ,'PROCESS_PLANNING_SCHEMA.APPLIED_ACTION_REQUEST_ASSIGNMENT.ITEMS')
            | (adr.assigned_action_request.description = 'design order'))) 
               = 1;
      wr2: SIZEOF(QUERY ( adr <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.APPLIED_ACTION_REQUEST_ASSIGNMENT.ITEMS')
                | (adr.assigned_action_request.description = 
               'fabrication order') )) = 1;
  END_ENTITY; -- fixture_contract

  ENTITY  fixture_pallet_mounting
    SUBTYPE OF (manufacturing_activity);
    WHERE
      wr1: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(it)) AND
                (it.name = 'pallet location origin')) )) = 1) )) = 0)) )) =
                0);
      wr2: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'pallet orientation')) )) = 1) )) = 0)) )) = 0);
      wr3: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
          'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLANE' IN TYPEOF(it)) AND (it.name 
               = 'pallet reference plane')) )) = 1) )) = 0)) )) = 0);
  END_ENTITY; -- fixture_pallet_mounting

  ENTITY  fixture_pallet_unmounting
    SUBTYPE OF (manufacturing_activity);
  END_ENTITY; -- fixture_pallet_unmounting

  ENTITY  fixture_setup
    SUBTYPE OF (process_plan_activity);
    WHERE
      wr1: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( rpr <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(rpr)) 
               AND (rpr.name = 'fixture to machine location')) )) = 1) )) =
                0)) )) = 0);
      wr2: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'fixture to machine orientation')) )) = 1) )) = 1) )) 
               = 1;
      wr3: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (NOT (SIZEOF(QUERY ( rpr <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLANE' IN TYPEOF(rpr)) AND (rpr.
               name = 'fixture to machine reference plane')) )) = 1)) )) = 
               1)) )) = 1;
      wr4: SIZEOF(QUERY ( am <* QUERY ( arr <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT.OPERATIONS')
                | (
               'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE' IN
                TYPEOF(arr)) ) | (NOT (SIZEOF(QUERY ( it <* am.resources | 
               ('PROCESS_PLANNING_SCHEMA.MACHINE' IN TYPEOF(it)) )) = 1))))
               = 0;
      wr6: SIZEOF(QUERY ( am <* QUERY ( arr <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT.OPERATIONS')
                | (
               'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE' IN
                TYPEOF(arr)) ) | (NOT (SIZEOF(QUERY ( it <* am.resources | 
               ('PROCESS_PLANNING_SCHEMA.PALLET' IN TYPEOF(it)) )) >= 0)))) 
               = 0;
  END_ENTITY; -- fixture_setup

  ENTITY  flat_face
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'removal direction')) )) = 1)) )) 
               = 0;
      wr2: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'course of travel occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'path feature component usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (((
               'PROCESS_PLANNING_SCHEMA.PATH_FEATURE_COMPONENT' IN TYPEOF(
               sdr.relating_shape_aspect)) AND (sdr.relating_shape_aspect.
               description = 'linear')) AND (sdr.name = 'course of travel')))) 
               = 1)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'removal boundary occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (('PROCESS_PLANNING_SCHEMA.LINEAR_PROFILE' 
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.name = 
               'removal boundary')) )) = 1)) )) = 1)) )) = 0;
      wr4: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'enclosed boundary occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.CIRCULAR_CLOSED_PROFILE',
               'PROCESS_PLANNING_SCHEMA.NGON_CLOSED_PROFILE',
               'PROCESS_PLANNING_SCHEMA.RECTANGULAR_CLOSED_PROFILE',
               'PROCESS_PLANNING_SCHEMA.CLOSED_PATH_PROFILE'] * TYPEOF(sdr.
               relating_shape_aspect)) = 1) AND (sdr.relating_shape_aspect.
               description = 'boundary')) )) = 1)) )) <= 1)) )) = 0;
      wr5: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
               SELF) |
            (('PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' 
               IN TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'maximum feature limit')) )) <=1;
      wr6: SIZEOF(QUERY ( pds <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pds)) AND (SIZEOF(QUERY ( csa <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (((
               'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(
               csa)) AND (csa.name = 'uncut area')) AND (SIZEOF(
               QUERY ( sar <* csa.component_relationships | ((
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) AND (SIZEOF(['PROCESS_PLANNING_SCHEMA.BOSS',
               'PROCESS_PLANNING_SCHEMA.PROTRUSION'] * TYPEOF(sar.
               related_shape_aspect)) = 1)) )) = 1)) )) <= 1)) )) = 1;
  END_ENTITY; -- flat_face

  ENTITY  flatness_tolerance
    SUBTYPE OF (geometric_tolerance);
    WHERE
      wr1: NOT (('PROCESS_PLANNING_SCHEMA.' + 
               'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE') IN
TYPEOF(SELF));
  END_ENTITY; -- flatness_tolerance

  ENTITY  founded_item;
  END_ENTITY; -- founded_item

  ENTITY  functionally_defined_transformation;
      name        : label;
      description : OPTIONAL text;
  END_ENTITY; -- functionally_defined_transformation

  ENTITY  gear
    SUBTYPE OF (feature_definition);
    WHERE
      wr1 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND (8 <= SIZEOF(pdr.
                used_representation.items))) AND (SIZEOF(pdr.
                used_representation.items) >= 9)) )) = 1) )) = 1;
      wr2 : (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helical gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.RATIO_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'number of teeth')) )) =1)) )) 
                = 0)) )) = 0);
      wr3 : (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helical gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'reference pressureangle')) )) 
                = 1)) )) = 0)) )) = 0);
      wr4 : (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helical gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'rake shift factor')) )) = 
                1)) )) = 0)) )) = 0);
      wr5 : (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helical gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'nominal tooth depth')) )) 
                = 1)) )) = 0)) )) = 0);
      wr6 : (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helical gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'face width')) )) = 1)) )) 
                = 0)) )) = 0);
      wr7 : (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helical gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'tip diameter')) )) = 1)))) 
                = 0)) )) = 0);
      wr8 : (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helical gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'normal attribute')) AND ((it
                .description = 'module') OR (it.description = 
                'diametral pitch'))) )) = 1)) )) = 0)) )) = 0);
      wr9 : (NOT (SELF\characterized_object.description IN ['bevel gear',
                'spur gear','helical gear'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'normal attribute')) )) = 1)))) 
                = 0)) )) = 0);
      wr10: (NOT (SELF\characterized_object.description IN ['helix gear'])) 
                OR (SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'reference helix angle')))) 
                = 1)) )) = 0)) )) = 0);
      wr11: (NOT (SELF\characterized_object.description = 'helex gear')) 
                OR (SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'gear tooth')) AND ((it.
                description = 'left hand tooth') OR (it.description = 
                'right hand tooth'))) )) = 1)) )) = 0)) )) = 0);
      wr12: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'applied shape') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | ('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' 
                IN TYPEOF(sdr.relating_shape_aspect)) )) = 1) )) = 1)) )) =
                 0;
  END_ENTITY; -- gear

  ENTITY  general_property;
      id          : identifier;
      name        : label;
      description : OPTIONAL text;
  END_ENTITY; -- general_property

  ENTITY  general_property_association;
      name               : label;
      description        : OPTIONAL text;
      base_definition    : general_property;
      derived_definition : derived_property_select;
    WHERE
      wr1: SIZEOF(USEDIN(derived_definition,('PROCESS_PLANNING_SCHEMA.' + 
               'GENERAL_PROPERTY_ASSOCIATION.') + 'DERIVED_DEFINITION')) = 
               1;
      wr2: derived_definition.name = base_definition.name;
  END_ENTITY; -- general_property_association

  ENTITY  generic_manufacturing_resource
    SUPERTYPE OF (ONEOF (resource_with_representation,
        resource_with_material))
    SUBTYPE OF (action_resource);
    WHERE
      wr1: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
        'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( rpr <* apr.representation.items | ((
               SIZEOF(['PROCESS_PLANNING_SCHEMA.RATIO_MEASURE_WITH_UNIT',
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM'] * 
               TYPEOF(rpr)) = 2) AND (rpr.name = 'resource quantity')) )) =
                1) )) = 0)) )) = 0);
      wr2: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
      'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( rpr <* apr.representation.items | (((
               SIZEOF(['PROCESS_PLANNING_SCHEMA.RATIO_MEASURE_WITH_UNIT',
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM'] * 
               TYPEOF(rpr)) = 2) AND (rpr.name = 'resource quantity')) AND 
              (rpr\measure_with_unit.unit_component.name = 'each')) )) =1) )) 
               = 0)) )) = 0);
  END_ENTITY; -- generic_manufacturing_resource

  ENTITY  geometric_alignment
    SUBTYPE OF (derived_shape_aspect);
    WHERE
      wr1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) > 1;
  END_ENTITY; -- geometric_alignment

  ENTITY  geometric_curve_set
    SUBTYPE OF (geometric_set);
    WHERE
      wr1: SIZEOF(QUERY ( temp <* SELF\geometric_set.elements | (
               'PROCESS_PLANNING_SCHEMA.SURFACE' IN TYPEOF(temp)) )) = 0;
  END_ENTITY; -- geometric_curve_set

  ENTITY  geometric_intersection
    SUBTYPE OF (derived_shape_aspect);
    WHERE
      wr1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) > 1;
  END_ENTITY; -- geometric_intersection

  ENTITY  geometric_representation_context
    SUBTYPE OF (representation_context);
      coordinate_space_dimension : dimension_count;
  END_ENTITY; -- geometric_representation_context

  ENTITY  geometric_representation_item
    SUPERTYPE OF (ONEOF (point,direction,vector,placement,
        cartesian_transformation_operator,curve,surface,edge_curve,
        face_surface,poly_loop,vertex_point,solid_model,
        shell_based_surface_model,shell_based_wireframe_model,
        edge_based_wireframe_model,geometric_set))
    SUBTYPE OF (representation_item);
    DERIVE
      dim : dimension_count := dimension_of(SELF);
    WHERE
      wr1: SIZEOF(QUERY ( using_rep <* using_representations(SELF) | (NOT 
               ('PROCESS_PLANNING_SCHEMA.GEOMETRIC_REPRESENTATION_CONTEXT' 
               IN TYPEOF(using_rep.context_of_items))) )) = 0;
  END_ENTITY; -- geometric_representation_item

  ENTITY  geometric_set
    SUPERTYPE OF (geometric_curve_set)
    SUBTYPE OF (geometric_representation_item);
      elements : SET [1:?] OF geometric_set_select;
  END_ENTITY; -- geometric_set

  ENTITY  geometric_tolerance;
      name                    : label;
      description             : text;
      magnitude               : measure_with_unit;
      toleranced_shape_aspect : shape_aspect;
    WHERE
      wr1: magnitude.value_component >= 0;
  END_ENTITY; -- geometric_tolerance

  ENTITY  geometric_tolerance_relationship;
      name                         : label;
      description                  : text;
      relating_geometric_tolerance : geometric_tolerance;
      related_geometric_tolerance  : geometric_tolerance;
  END_ENTITY; -- geometric_tolerance_relationship

  ENTITY  geometric_tolerance_with_datum_reference
    SUBTYPE OF (geometric_tolerance);
      datum_system : SET [1:?] OF datum_reference;
  END_ENTITY; -- geometric_tolerance_with_datum_reference

  ENTITY  geometric_tolerance_with_defined_unit
    SUBTYPE OF (geometric_tolerance);
      unit_size : measure_with_unit;
    WHERE
      wr1: unit_size.value_component > 0;
  END_ENTITY; -- geometric_tolerance_with_defined_unit

  ENTITY  geometrically_bounded_surface_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_SET',
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM',
               'PROCESS_PLANNING_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) 
               = 1)) )) = 0;
      wr2: SIZEOF(QUERY ( it <* SELF.items | (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_SET',
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1) )) 
               > 0;
      wr3: SIZEOF(QUERY ( mi <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | (
               NOT ((('PROCESS_PLANNING_SCHEMA.' + 
               'GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION') IN 
               TYPEOF(mi\mapped_item.mapping_source.mapped_representation)) 
               AND (SIZEOF(QUERY ( mr_it <* mi\mapped_item.mapping_source.
               mapped_representation.items | (
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_SET' IN TYPEOF(mr_it)) )) 
               > 0))) )) = 0;
      wr4: SIZEOF(QUERY ( gs <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)) ) | (
               NOT (SIZEOF(QUERY ( pnt <* QUERY ( gsel <* gs\geometric_set.
               elements | ('PROCESS_PLANNING_SCHEMA.POINT' IN TYPEOF(gsel)))
                | (NOT gbsf_check_point(pnt)) )) = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( gs <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)) ) | (
               NOT (SIZEOF(QUERY ( cv <* QUERY ( gsel <* gs\geometric_set.
               elements | ('PROCESS_PLANNING_SCHEMA.CURVE' IN TYPEOF(gsel)))
                | (NOT gbsf_check_curve(cv)) )) = 0)) )) = 0;
      wr6: SIZEOF(QUERY ( gs <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)) ) | (
               NOT (SIZEOF(QUERY ( sf <* QUERY ( gsel <* gs\geometric_set.
               elements | ('PROCESS_PLANNING_SCHEMA.SURFACE' IN
TYPEOF(gsel)) )
                | (NOT gbsf_check_surface(sf)) )) = 0)) )) = 0;
      wr7: SIZEOF(QUERY ( gs <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)) ) | (
               SIZEOF(QUERY ( gsel <* gs\geometric_set.elements | (
               'PROCESS_PLANNING_SCHEMA.SURFACE' IN TYPEOF(gsel)) )) > 0))) 
               > 0;
  END_ENTITY; -- geometrically_bounded_surface_shape_representation

  ENTITY  geometrically_bounded_wireframe_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF(TYPEOF(it) * [
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_CURVE_SET',
               'PROCESS_PLANNING_SCHEMA.AXIS2_PLACEMENT_3D',
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM']) = 1)) )) = 0;
      wr2: SIZEOF(QUERY ( it <* SELF.items | (SIZEOF(TYPEOF(it) * [
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_CURVE_SET',
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM']) = 1) )) >= 1;
      wr3: SIZEOF(QUERY ( gcs <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_CURVE_SET' IN TYPEOF(it)))
                | (NOT (SIZEOF(QUERY ( crv <* QUERY ( elem <* gcs\
               geometric_set.elements | ('PROCESS_PLANNING_SCHEMA.CURVE' IN
                TYPEOF(elem)) ) | (NOT 
               valid_geometrically_bounded_wf_curve(crv)) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( gcs <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_CURVE_SET' IN TYPEOF(it)))
                | (NOT (SIZEOF(QUERY ( pnts <* QUERY ( elem <* gcs\
               geometric_set.elements | ('PROCESS_PLANNING_SCHEMA.POINT' IN
                TYPEOF(elem)) ) | (NOT 
               valid_geometrically_bounded_wf_point(pnts)) )) = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( gcs <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_CURVE_SET' IN TYPEOF(it)))
                | (NOT (SIZEOF(QUERY ( cnc <* QUERY ( elem <* gcs\
               geometric_set.elements | ('PROCESS_PLANNING_SCHEMA.CONIC' IN
                TYPEOF(elem)) ) | (NOT (
               'PROCESS_PLANNING_SCHEMA.AXIS2_PLACEMENT_3D' IN TYPEOF(cnc\
               conic.position))) )) = 0)) )) = 0;
      wr6: SIZEOF(QUERY ( gcs <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.GEOMETRIC_CURVE_SET' IN TYPEOF(it)))
                | (NOT (SIZEOF(QUERY ( pline <* QUERY ( elem <* gcs\
               geometric_set.elements | ('PROCESS_PLANNING_SCHEMA.POLYLINE' 
             IN TYPEOF(elem)) ) | (NOT (SIZEOF(pline\polyline.points) >2)) )) 
               = 0)) )) = 0;
      wr7: SIZEOF(QUERY ( mi <* QUERY ( it <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | (
               NOT (('PROCESS_PLANNING_SCHEMA.' + 
               'GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION') IN 
           TYPEOF(mi\mapped_item.mapping_source.mapped_representation))) )) 
               = 0;
  END_ENTITY; -- geometrically_bounded_wireframe_shape_representation

  ENTITY  global_uncertainty_assigned_context
    SUBTYPE OF (representation_context);
      uncertainty : SET [1:?] OF uncertainty_measure_with_unit;
  END_ENTITY; -- global_uncertainty_assigned_context

  ENTITY  global_unit_assigned_context
    SUBTYPE OF (representation_context);
      units : SET [1:?] OF unit;
  END_ENTITY; -- global_unit_assigned_context

  ENTITY  group;
      name        : label;
      description : OPTIONAL text;
    DERIVE
      id : identifier := get_id_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
  END_ENTITY; -- group

  ENTITY  group_assignment
    ABSTRACT SUPERTYPE;
      assigned_group : group;
    DERIVE
      role : object_role := get_role(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
  END_ENTITY; -- group_assignment

  ENTITY  group_relationship;
      name           : label;
      description    : OPTIONAL text;
      relating_group : group;
      related_group  : group;
  END_ENTITY; -- group_relationship

  ENTITY  hole_bottom
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1 : 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
                TYPEOF(SELF.of_shape.definition);
      wr2 : SELF.description IN ['through','flat','flat with radius',
                'flat with taper','spherical','conical'];
      wr3 : (NOT (SELF.description = 'through')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) = 0)) )) 
                = 0);
      wr4 : (NOT (SELF.description IN ['flat with radius',
                'flat with taper','spherical','conical'])) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) )) = 1)) )) = 0);
      wr5 : (NOT (SELF.description = 'flat')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(impl_rep.
                used_representation.items) = 0)) )) = 0)) )) = 0);
      wr6 : (NOT (SELF.description IN ['flat with radius','spherical'])) 
                OR (SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(impl_rep.
                used_representation.items) = 1)) )) = 0)) )) = 0);
      wr7 : (NOT (SELF.description = 'flat with taper')) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(impl_rep.
                used_representation.items) = 2)) )) = 0)) )) = 0);
      wr8 : (NOT (SELF.description = 'conical')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | ((NOT (SIZEOF(impl_rep.
                used_representation.items) >= 1)) AND (SIZEOF(impl_rep.
                used_representation.items) <= 2)) )) = 0)) )) = 0);
      wr9 : (SELF.description = 'through') OR (SIZEOF(QUERY ( fcr <* 
                QUERY ( sar <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATING_SHAPE_ASPECT') | ((sar.description = 
                'hole bottom usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | (fcr.name IN ['hole depth start',
                'hole depth end']) )) >= 1);
      wr10: (NOT (SELF.description = 'flat with radius')) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'corner radius')) )) = 1)))) 
                = 0)) )) = 0);
      wr11: (NOT (SELF.description = 'spherical')) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'radius')) )) = 1)) )) =0)) )) 
                = 0);
      wr12: (NOT (SELF.description = 'conical')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'tip radius')) )) <= 1)) )) 
                = 0)) )) = 0);
      wr13: (NOT (SELF.description = 'conical')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'tip angle')) )) = 1)) )) =
                 0)) )) = 0);
      wr14: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATING_SHAPE_ASPECT') | ((sar.description = 
                'hole bottom usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | (((fcr.related_shape_aspect.description 
                = 'bottom condition occurrence') AND (
                'PROCESS_PLANNING_SCHEMA.ROUND_HOLE' IN TYPEOF(fcr.
                related_shape_aspect.of_shape.definition))) AND (
                'PROCESS_PLANNING_SCHEMA.HOLE_BOTTOM' IN TYPEOF(fcr.
                relating_shape_aspect))) )) >= 1;
      wr15: (NOT (SELF.description = 'flat with taper')) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'final diameter')) )) = 1)))) 
                = 0)) )) = 0);
      wr16: (NOT (SELF.description = 'flat with taper')) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'taper diameter')) )) = 1)))) 
                = 0)) )) = 0);
  END_ENTITY; -- hole_bottom

  ENTITY  hyperbola
    SUBTYPE OF (conic);
      semi_axis      : positive_length_measure;
      semi_imag_axis : positive_length_measure;
  END_ENTITY; -- hyperbola

  ENTITY  id_attribute;
      attribute_value : identifier;
      identified_item : id_attribute_select;
  END_ENTITY; -- id_attribute

  ENTITY  identification_assignment
    ABSTRACT SUPERTYPE;
      assigned_id : identifier;
      role        : identification_role;
  END_ENTITY; -- identification_assignment

  ENTITY  identification_role;
      name        : label;
      description : OPTIONAL text;
  END_ENTITY; -- identification_role

  ENTITY  illustration
    SUBTYPE OF (document);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* QUERY ( dr <* USEDIN(SELF,
           'PROCESS_PLANNING_SCHEMA.DOCUMENT_REFERENCE.ASSIGNED_DOCUMENT')
                | ('PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE' IN 
               TYPEOF(dr)) ) | (NOT (SIZEOF(QUERY ( d <* adr.items | (
               'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_ACTIVITY' IN TYPEOF(d)))) 
               >= 1)) )) = 0;
      wr2: SIZEOF(QUERY ( aduc <* USEDIN(SELF,
'PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_USAGE_CONSTRAINT_ASSIGNMENT.ITEMS')
                | ('PROCESS_PLANNING_SCHEMA.VIEW_REFERENCE' IN TYPEOF(aduc\
             document_usage_constraint_assignment.assigned_document_usage)))) 
               >= 0;
  END_ENTITY; -- illustration

  ENTITY  in_facility_location
    SUBTYPE OF (resource_property);
    WHERE
      wr1: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* ap.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
                TYPEOF(it)) AND (it.name = 'building or area')) )) = 1) )) 
               = 0);
      wr2: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* ap.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
                TYPEOF(it)) AND (it.name = 'location code')) )) = 1) )) =0);
      wr3: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* ap.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
                TYPEOF(it)) AND (it.name = 'sublocation')) )) = 1) )) = 0);
      wr4: 'PROCESS_PLANNING_SCHEMA.WORK_CELL' IN TYPEOF(SELF.resource);
  END_ENTITY; -- in_facility_location

  ENTITY  instanced_feature
    SUBTYPE OF (feature_definition, shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION' IN TYPEOF(SELF.
               of_shape.definition);
      wr2: SELF.product_definitional;
  END_ENTITY; -- instanced_feature

  ENTITY  intersection_curve
    SUBTYPE OF (surface_curve);
    WHERE
      wr1: SIZEOF(SELF\surface_curve.associated_geometry) = 2;
      wr2: associated_surface(SELF\surface_curve.associated_geometry[1]) 
               <> associated_surface(SELF\surface_curve.associated_geometry
               [2]);
  END_ENTITY; -- intersection_curve

  ENTITY  known_source
    SUBTYPE OF (external_source, pre_defined_item);
  END_ENTITY; -- known_source

  ENTITY  length_measure_with_unit
    SUBTYPE OF (measure_with_unit);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.LENGTH_UNIT' IN TYPEOF(SELF\
               measure_with_unit.unit_component);
  END_ENTITY; -- length_measure_with_unit

  ENTITY  length_unit
    SUBTYPE OF (named_unit);
    WHERE
      wr1: ((((((SELF\named_unit.dimensions.length_exponent = 1) AND (SELF
               \named_unit.dimensions.mass_exponent = 0)) AND (SELF\
               named_unit.dimensions.time_exponent = 0)) AND (SELF\
               named_unit.dimensions.electric_current_exponent = 0)) AND (
               SELF\named_unit.dimensions.
               thermodynamic_temperature_exponent = 0)) AND (SELF\
               named_unit.dimensions.amount_of_substance_exponent = 0)) AND
                (SELF\named_unit.dimensions.luminous_intensity_exponent =0);
  END_ENTITY; -- length_unit

  ENTITY  library_class_version_assignment
    SUBTYPE OF (applied_external_identification_assignment);
  END_ENTITY; -- library_class_version_assignment

  ENTITY  library_property_version_assignment
    SUBTYPE OF (applied_external_identification_assignment);
  END_ENTITY; -- library_property_version_assignment

  ENTITY  limits_and_fits;
      form_variance : label;
      zone_variance : label;
      grade         : label;
      source        : text;
  END_ENTITY; -- limits_and_fits

  ENTITY  line
    SUBTYPE OF (curve);
      pnt : cartesian_point;
      dir : vector;
    WHERE
      wr1: dir.dim = pnt.dim;
  END_ENTITY; -- line

  ENTITY  line_profile_tolerance
    SUBTYPE OF (geometric_tolerance);
    WHERE
      wr1: (NOT (('PROCESS_PLANNING_SCHEMA.' + 
               'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE') IN TYPEOF(SELF))) 
               OR (SIZEOF(SELF\geometric_tolerance_with_datum_reference.
               datum_system) <= 3);
      wr2: SIZEOF(QUERY ( sar <* USEDIN(SELF\geometric_tolerance.
               toleranced_shape_aspect,'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT') | (sar.
               name IN ['affected plane association',
               'resulting intersection curve association']) )) = 1;
  END_ENTITY; -- line_profile_tolerance

  ENTITY  linear_profile
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 2)) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'profile length')) )) = 1)))) 
               = 0)) )) = 0;
  END_ENTITY; -- linear_profile

  ENTITY  local_time;
      hour_component   : hour_in_day;
      minute_component : OPTIONAL minute_in_hour;
      second_component : OPTIONAL second_in_minute;
      zone             : coordinated_universal_time_offset;
    WHERE
      wr1: valid_time(SELF);
  END_ENTITY; -- local_time

  ENTITY  location_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(SELF.items) = 1;
      wr2: SIZEOF(QUERY ( it <* SELF.items | (NOT (
               'PROCESS_PLANNING_SCHEMA.POINT' IN TYPEOF(it))) )) = 0;
  END_ENTITY; -- location_shape_representation

  ENTITY  loop
    SUPERTYPE OF (ONEOF (vertex_loop,edge_loop,poly_loop))
    SUBTYPE OF (topological_representation_item);
  END_ENTITY; -- loop

  ENTITY  machine
    SUBTYPE OF (action_resource);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')
                | (('PROCESS_PLANNING_SCHEMA.ORGANIZATION' IN TYPEOF(adr.
               assigned_organization)) AND (adr.assigned_organization.
               description = 'machine company name')) )) = 1;
      wr2: SIZEOF(QUERY ( ar2 <* QUERY ( arr <* USEDIN(SELF,
   'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_RELATIONSHIP.RELATED_RESOURCE')
                | ('PROCESS_PLANNING_SCHEMA.MACHINE_ELEMENT_RELATIONSHIP' 
               IN TYPEOF(arr)) ) | ('PROCESS_PLANNING_SCHEMA.CONTROLLER' IN
                TYPEOF(ar2.relating_resource)) )) <= 1;
      wr3: SIZEOF(QUERY ( ar2 <* QUERY ( arr <* USEDIN(SELF,
   'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_RELATIONSHIP.RELATED_RESOURCE')
                | ('PROCESS_PLANNING_SCHEMA.MACHINE_ELEMENT_RELATIONSHIP' 
               IN TYPEOF(arr)) ) | ('PROCESS_PLANNING_SCHEMA.WORKSTATION' 
               IN TYPEOF(ar2.relating_resource)) )) = 1;
      wr4: SIZEOF(QUERY ( ar2 <* QUERY ( arr <* USEDIN(SELF,
   'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_RELATIONSHIP.RELATED_RESOURCE')
                | ('PROCESS_PLANNING_SCHEMA.MACHINE_ELEMENT_RELATIONSHIP' 
               IN TYPEOF(arr)) ) | ((ar2.name = 'machine contains pallet') 
               AND ('PROCESS_PLANNING_SCHEMA.PALLET' IN TYPEOF(ar2.
               relating_resource))) )) = 1;
  END_ENTITY; -- machine

  ENTITY  machine_element_relationship
    SUBTYPE OF (action_resource_relationship);
  END_ENTITY; -- machine_element_relationship

  ENTITY  machine_setup
    SUBTYPE OF (process_plan_activity);
    WHERE
      wr1: SIZEOF(QUERY ( am <* QUERY ( arr <*
USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT.OPERATIONS')
                | (
               'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE' IN
                TYPEOF(arr)) ) | (NOT (SIZEOF(QUERY ( it <* am.resources | 
               ('PROCESS_PLANNING_SCHEMA.MACHINE' IN TYPEOF(it)) )) >= 1)))) 
               = 0;
  END_ENTITY; -- machine_setup

  ENTITY  machine_usage
    SUBTYPE OF (requirement_for_action_resource);
    WHERE
      wr1 : SIZEOF(QUERY ( w <* SELF.resources | (
                'PROCESS_PLANNING_SCHEMA.WORKSTATION' IN TYPEOF(w)) )) = 1;
      wr2 : SIZEOF(QUERY ( w <* SELF.resources | (
                'PROCESS_PLANNING_SCHEMA.MACHINE' IN TYPEOF(w)) )) = 1;
      wr3 : SIZEOF(QUERY ( adr <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')
                 | ('PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_SPECIFICATION' IN
                 TYPEOF(adr.assigned_document)) )) = 1;
  wr4: (NOT(SIZEOF(QUERY ( rp <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | 
       (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(rp,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')| 
       ('PROCESS_PLANNING_SCHEMA.REPRESENTATION' 
       IN TYPEOF(pdr.representation)) ) | 
       ((impl_rep.representation.name = 'machine usage parameter')AND 
       (SIZEOF(QUERY ( it <* impl_rep.representation.items | 
      ((SIZEOF([
      'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
      'PROCESS_PLANNING_SCHEMA.RATIO_MEASURE_WITH_UNIT'] *
      TYPEOF(it)) = 2) AND  (it.name='maximum spindle speed')
       )  ))>=1))   ))=0))))=0));
      wr5 : NOT (SIZEOF(QUERY ( rp <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
                NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(rp,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                 | ('PROCESS_PLANNING_SCHEMA.REPRESENTATION' IN TYPEOF(pdr.
                representation)) ) | ((impl_rep.representation.name = 
                'machine usage parameter') AND (SIZEOF(QUERY ( it <* 
                impl_rep.representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'maximum feedrate')) )) >= 
                1)) )) = 0)) )) = 0);
  wr6: (NOT(SIZEOF(QUERY ( rp <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | 
       (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(rp,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')| 
       ('PROCESS_PLANNING_SCHEMA.REPRESENTATION' 
       IN TYPEOF(pdr.representation)) ) | 
       ((impl_rep.representation.name = 'machine usage parameter')AND 
       (SIZEOF(QUERY ( it <* impl_rep.representation.items | 
      ('PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
      TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN 
      TYPEOF(it\measure_with_unit.value_component)) AND (it.name 
      = 'number of control axis')
       ))>=1))   ))=0))))=0));
      wr7 : NOT (SIZEOF(QUERY ( rp <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
                NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(rp,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                 | ('PROCESS_PLANNING_SCHEMA.REPRESENTATION' IN TYPEOF(pdr.
                representation)) ) | ((impl_rep.representation.name = 
                'machine usage parameter') AND (SIZEOF(QUERY ( it <* 
                impl_rep.representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'table size')) )) >= 1)) )) 
                = 0)) )) = 0);
      wr8 : NOT (SIZEOF(QUERY ( rp <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
                NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(rp,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                 | ('PROCESS_PLANNING_SCHEMA.REPRESENTATION' IN TYPEOF(pdr.
                representation)) ) | ((impl_rep.representation.name = 
                'machine usage parameter') AND (SIZEOF(QUERY ( it <* 
                impl_rep.representation.items | (((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.description IN ['true','false',
                'unknown'])) AND (it.name = 'table indexing function')) )) 
                >= 1)) )) = 0)) )) = 0);
      wr9 : NOT (SIZEOF(QUERY ( rp <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
                NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(rp,
      'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                 | ('PROCESS_PLANNING_SCHEMA.REPRESENTATION' IN TYPEOF(pdr.
                representation)) ) | ((impl_rep.representation.name = 
                'machine usage parameter') AND (SIZEOF(QUERY ( it <* 
                impl_rep.representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'positioning accuracy')) )) >=
                 1)) )) = 0)) )) = 0);
      wr10: NOT (SIZEOF(QUERY ( rp <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
                NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(rp,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                 | ('PROCESS_PLANNING_SCHEMA.REPRESENTATION' IN TYPEOF(pdr.
                representation)) ) | ((impl_rep.representation.name = 
                'machine usage parameter') AND (SIZEOF(QUERY ( it <* 
                impl_rep.representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'axis range of motion ')) )) 
                >= 1)) )) = 0)) )) = 0);
  wr11: (NOT(SIZEOF(QUERY ( rp <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | 
       (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(rp,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')| 
       ('PROCESS_PLANNING_SCHEMA.REPRESENTATION' 
       IN TYPEOF(pdr.representation)) ) | 
       ((impl_rep.representation.name = 'machine usage parameter')AND 
       (SIZEOF(QUERY ( it <* impl_rep.representation.items | 
      ('PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
      TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN 
      TYPEOF(it\measure_with_unit.value_component)) AND (it.name 
      = 'number of simultaneous axis')
       ))>=1))   ))=0))))=0));
      wr12: NOT (SIZEOF(QUERY ( rp <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
                NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(rp,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                 | ('PROCESS_PLANNING_SCHEMA.REPRESENTATION' IN TYPEOF(pdr.
                representation)) ) | ((impl_rep.representation.name = 
                'machine usage parameter') AND (SIZEOF(QUERY ( it <* 
                impl_rep.representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.RATIO_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'spindle power')) )) >= 1)))) 
                = 0)) )) = 0);
  END_ENTITY; -- machine_usage

  ENTITY  machining_operation
    SUBTYPE OF (sequential_method);
    WHERE
      wr1: SIZEOF(QUERY ( cm <* USEDIN(SELF.relating_method,
               'PROCESS_PLANNING_SCHEMA.ACTION.CHOSEN_METHOD') | ((
               'PROCESS_PLANNING_SCHEMA.PROPERTY_PROCESS' IN TYPEOF(cm)) 
               AND (SIZEOF(QUERY ( ppa <* USEDIN(cm,
           'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | ((ppa.description = 'machining operation feature') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' IN TYPEOF(ppa.
               property_or_shape))) )) = 1)) )) <= 0;
      wr2: 'PROCESS_PLANNING_SCHEMA.SINGLE_SETUP_PROCESS' IN TYPEOF(SELF.
               relating_method);
      wr3: 'PROCESS_PLANNING_SCHEMA.MANUFACTURING_ACTIVITY' IN TYPEOF(SELF
               .related_method);
      wr4: SELF.description IN ['legacy nc','non nc','integrated nc'];
  END_ENTITY; -- machining_operation

  ENTITY  machining_process
    SUBTYPE OF (action_method);
    WHERE
      wr1: SIZEOF(QUERY ( sar <* USEDIN(SELF,
      'PROCESS_PLANNING_SCHEMA.ACTION_METHOD_RELATIONSHIP.RELATING_METHOD')
                | ((
               'PROCESS_PLANNING_SCHEMA.SINGLE_SETUP_PROCESS_RELATIONSHIP' 
               IN TYPEOF(sar)) AND (
               'PROCESS_PLANNING_SCHEMA.SINGLE_SETUP_PROCESS' IN TYPEOF(sar
               .related_method))) )) >= 1;
      wr2: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE.USAGE') | (
               'PROCESS_PLANNING_SCHEMA.MACHINE' IN TYPEOF(ap)) )) >= 0;
  END_ENTITY; -- machining_process

  ENTITY  machining_tolerance
    SUBTYPE OF (action_property);
    WHERE
      wr1: NOT (SIZEOF(QUERY ( apr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'inside tolerance')) )) = 1))) 
               = 0);
      wr2: NOT (SIZEOF(QUERY ( apr <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
              TYPEOF(it)) = 2) AND (it.name = 'outside tolerance')) )) =1) )) 
               = 0);
      wr3: NOT (SIZEOF(QUERY ( apr <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'total tolerance')) )) <= 1))) 
               = 0);
  END_ENTITY; -- machining_tolerance

  ENTITY  make_from_usage_option
    SUBTYPE OF (product_definition_usage);
      ranking           : INTEGER;
      ranking_rationale : text;
      quantity          : measure_with_unit;
    WHERE
      wr1: (NOT ('NUMBER' IN TYPEOF(quantity.value_component))) OR (
               quantity.value_component > 0);
  END_ENTITY; -- make_from_usage_option

  ENTITY  manifold_solid_brep
    SUBTYPE OF (solid_model);
      outer : closed_shell;
  END_ENTITY; -- manifold_solid_brep

  ENTITY  manifold_surface_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1 : SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL',
                'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM',
                'PROCESS_PLANNING_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) 
                = 1)) )) = 0;
      wr2 : SIZEOF(QUERY ( it <* SELF.items | (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL',
                'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1))) 
                > 0;
      wr3 : SIZEOF(QUERY ( mi <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | (
                NOT
         (('PROCESS_PLANNING_SCHEMA.MANIFOLD_SURFACE_SHAPE_REPRESENTATION' 
                IN TYPEOF(mi\mapped_item.mapping_source.
                mapped_representation)) AND (SIZEOF(QUERY ( mr_it <* mi\
                mapped_item.mapping_source.mapped_representation.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(mr_it)) )) > 0))) )) = 0;
      wr4 : SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( sh <* sbsm\
                shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.OPEN_SHELL',
                'PROCESS_PLANNING_SCHEMA.ORIENTED_CLOSED_SHELL',
                'PROCESS_PLANNING_SCHEMA.CLOSED_SHELL'] * TYPEOF(sh)) = 1)))) 
                = 0)) )) = 0;
      wr5 : SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\
                shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF(
                QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT (
                'PROCESS_PLANNING_SCHEMA.FACE_SURFACE' IN TYPEOF(fa))) )) =
                 0)) )) = 0)) )) = 0;
      wr6 : SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\
                shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF(
                QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT ((
                'PROCESS_PLANNING_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR 
                msf_surface_check(fa\face_surface.face_geometry))) )) = 0)))) 
                = 0)) )) = 0;
      wr7 : SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\
                shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF(
                QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT ((
                'PROCESS_PLANNING_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
                SIZEOF(QUERY ( bnds <* fa.bounds | (NOT (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.EDGE_LOOP',
                'PROCESS_PLANNING_SCHEMA.VERTEX_LOOP'] *TYPEOF(bnds.bound)) 
                = 1)) )) = 0))) )) = 0)) )) = 0)) )) = 0;
      wr8 : SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\
                shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF(
                QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT ((
                'PROCESS_PLANNING_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
                SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* fa.bounds | (
                'PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))
                 | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path.edge_list | (
                NOT ('PROCESS_PLANNING_SCHEMA.EDGE_CURVE' IN TYPEOF(oe.
                edge_element))) )) = 0)) )) = 0))) )) = 0)) )) = 0)) )) =0;
      wr9 : SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\
                shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF(
                QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT ((
                'PROCESS_PLANNING_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
                SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* fa.bounds | (
                'PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))
                 | (NOT (SIZEOF(QUERY ( oe_cv <* QUERY ( oe <* elp_fbnds\
                path.edge_list | ('PROCESS_PLANNING_SCHEMA.EDGE_CURVE' IN 
                TYPEOF(oe.edge_element)) ) | (NOT (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.B_SPLINE_CURVE',
                'PROCESS_PLANNING_SCHEMA.CONIC',
                'PROCESS_PLANNING_SCHEMA.CURVE_REPLICA',
                'PROCESS_PLANNING_SCHEMA.LINE',
                'PROCESS_PLANNING_SCHEMA.OFFSET_CURVE_3D',
                'PROCESS_PLANNING_SCHEMA.PCURVE',
                'PROCESS_PLANNING_SCHEMA.POLYLINE',
                'PROCESS_PLANNING_SCHEMA.SURFACE_CURVE'] * TYPEOF(oe_cv.
                edge_element\edge_curve.edge_geometry)) = 1)) )) = 0)) )) =
                 0))) )) = 0)) )) = 0)) )) = 0;
      wr10: SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\
                shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF(
                QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT ((
                'PROCESS_PLANNING_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
                SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* fa.bounds | (
                'PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))
                 | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path.edge_list | (
                NOT msf_curve_check(oe.edge_element\edge_curve.
                edge_geometry)) )) = 0)) )) = 0))) )) = 0)) )) = 0)) )) =0;
      wr11: SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\
                shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF(
                QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT ((
                'PROCESS_PLANNING_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
                SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* fa.bounds | (
                'PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))
                 | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path.edge_list | (
                NOT (('PROCESS_PLANNING_SCHEMA.VERTEX_POINT' IN TYPEOF(oe.
                edge_element.edge_start)) AND (
                'PROCESS_PLANNING_SCHEMA.VERTEX_POINT' IN TYPEOF(oe.
                edge_element.edge_end)))) )) = 0)) )) = 0))) )) = 0)) )) = 
                0)) )) = 0;
      wr12: SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\
                shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF(
                QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT ((
                'PROCESS_PLANNING_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
                SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* fa.bounds | (
                'PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))
                 | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path.edge_list | (
                NOT ((SIZEOF(['PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT',
                'PROCESS_PLANNING_SCHEMA.DEGENERATE_PCURVE',
                'PROCESS_PLANNING_SCHEMA.POINT_ON_CURVE',
                'PROCESS_PLANNING_SCHEMA.POINT_ON_SURFACE'] * TYPEOF(oe.
                edge_element.edge_start\vertex_point.vertex_geometry)) = 1) 
                AND (SIZEOF(['PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT',
                'PROCESS_PLANNING_SCHEMA.DEGENERATE_PCURVE',
                'PROCESS_PLANNING_SCHEMA.POINT_ON_CURVE',
                'PROCESS_PLANNING_SCHEMA.POINT_ON_SURFACE'] * TYPEOF(oe.
                edge_element.edge_end\vertex_point.vertex_geometry)) = 1))))) 
                = 0)) )) = 0))) )) = 0)) )) = 0)) )) = 0;
      wr13: SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\
                shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF(
                QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT ((
                'PROCESS_PLANNING_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
                SIZEOF(QUERY ( vlp_fbnds <* QUERY ( bnds <* fa.bounds | (
                'PROCESS_PLANNING_SCHEMA.VERTEX_LOOP' IN TYPEOF(bnds.bound)))
                 | (NOT ('PROCESS_PLANNING_SCHEMA.VERTEX_POINT' IN TYPEOF(
                vlp_fbnds\vertex_loop.loop_vertex))) )) = 0))) )) = 0)) )) 
                = 0)) )) = 0;
      wr14: SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\
                shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF(
                QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT ((
                'PROCESS_PLANNING_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
                SIZEOF(QUERY ( vlp_fbnds <* QUERY ( bnds <* fa.bounds | (
                'PROCESS_PLANNING_SCHEMA.VERTEX_LOOP' IN TYPEOF(bnds.bound)) )
                 | (NOT (SIZEOF(['PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT',
                'PROCESS_PLANNING_SCHEMA.DEGENERATE_PCURVE',
                'PROCESS_PLANNING_SCHEMA.POINT_ON_CURVE',
                'PROCESS_PLANNING_SCHEMA.POINT_ON_SURFACE'] * TYPEOF(
                vlp_fbnds\vertex_loop.loop_vertex\vertex_point.
                vertex_geometry)) = 1)) )) = 0))) )) = 0)) )) = 0)) )) = 0;
  END_ENTITY; -- manifold_surface_shape_representation

  ENTITY  manufacturing_activity
    SUPERTYPE OF (ONEOF (ancillary_activity,part_handling,
        part_fixture_unmounting,part_mounting,fixture_pallet_mounting,
        part_machine_unmounting,process_activity,validation,
        fixture_pallet_unmounting))
    SUBTYPE OF (process_plan_activity);
    WHERE
      wr1: (NOT
         ('PROCESS_PLANNING_SCHEMA.ACTION_METHOD_WITH_ASSOCIATED_DOCUMENTS' 
               IN TYPEOF(SELF))) OR (SIZEOF(QUERY ( adr <* SELF\
               action_method_with_associated_documents.documents | (
               'PROCESS_PLANNING_SCHEMA.CONTROLLER_PROGRAM' IN TYPEOF(adr)))) 
               <= 1);
      wr2: SIZEOF(QUERY ( sar <* USEDIN(SELF,
 'PROCESS_PLANNING_SCHEMA.ACTION_METHOD_ASSIGNMENT.ASSIGNED_ACTION_METHOD')
                | ((
               'PROCESS_PLANNING_SCHEMA.APPLIED_ACTION_METHOD_ASSIGNMENT' 
               IN TYPEOF(sar)) AND (SIZEOF(QUERY ( edi <* sar.items | (
               'PROCESS_PLANNING_SCHEMA.EXTERNALLY_DEFINED_SCHEMA' IN 
               TYPEOF(edi)) )) = 1)) )) >= 1;
  END_ENTITY; -- manufacturing_activity

  ENTITY  manufacturing_process
    SUBTYPE OF (action_method);
    WHERE
      wr1: SIZEOF(QUERY ( cm <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION.CHOSEN_METHOD') | (NOT (
               SIZEOF(QUERY ( ppa <* USEDIN(cm,
            'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | (('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' IN TYPEOF(ppa.
               property_or_shape)) AND (ppa.description = 
               'manufacturing process feature definition')) )) >= 0)) )) = 
               0;
      wr2: SIZEOF(QUERY ( ap <* USEDIN(SELF,
      'PROCESS_PLANNING_SCHEMA.ACTION_METHOD_RELATIONSHIP.RELATING_METHOD')
                |('PROCESS_PLANNING_SCHEMA.MANUFACTURING_PROCESS_RELATIONSHIP' 
               IN TYPEOF(ap)) )) >= 1;
      wr3: SIZEOF(QUERY ( cm <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION.CHOSEN_METHOD') | (NOT (
               SIZEOF(QUERY ( ppa <* USEDIN(cm,
            'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | (('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP' IN 
               TYPEOF(ppa.property_or_shape)) AND (ppa.description = 
               'intermediate shape')) )) >= 0)) )) = 0;
  END_ENTITY; -- manufacturing_process

  ENTITY  manufacturing_process_relationship
    SUBTYPE OF (sequential_method);
    WHERE
      wr1: SIZEOF(['PROCESS_PLANNING_SCHEMA.MACHINING_PROCESS',
               'PROCESS_PLANNING_SCHEMA.NON_MACHINING_PROCESS'] * TYPEOF(
               SELF.related_method)) = 1;
      wr2: 'PROCESS_PLANNING_SCHEMA.MANUFACTURING_PROCESS' IN TYPEOF(SELF.
               relating_method);
  END_ENTITY; -- manufacturing_process_relationship

  ENTITY  mapped_item
    SUBTYPE OF (representation_item);
      mapping_source : representation_map;
      mapping_target : representation_item;
    WHERE
      wr1:acyclic_mapped_representation(using_representations(SELF),[SELF]);
  END_ENTITY; -- mapped_item

  ENTITY  marking
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (SIZEOF(QUERY ( pdr <* USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' 
               + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) AND ((2 <= SIZEOF(pdr.
               used_representation.items)) AND (SIZEOF(pdr.
               used_representation.items) <= 6))) )) = 1) )) = 1;
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
              TYPEOF(it)) AND (it.name = 'marking text')) )) = 1)) )) =0)) )) 
               = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
               IN TYPEOF(it)) AND (it.name = 'special instructions')) )) <=1)) )) 
               = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
               TYPEOF(it)) AND (it.name = 'font name')) )) <= 1)) )) = 0)))) 
               = 0;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
             TYPEOF(it)) = 2) AND (it.name = 'character height')) )) <=1)) )) 
               = 0)) )) = 0;
      wr6: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'character spacing')) )) <= 
               1)) )) = 0)) )) = 0;
      wr7: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'applied shape') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | ('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' IN
                TYPEOF(sdr.relating_shape_aspect)) )) = 1) )) = 1)) )) = 0;
  END_ENTITY; -- marking

  ENTITY  mass_measure_with_unit
    SUBTYPE OF (measure_with_unit);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.MASS_UNIT' IN TYPEOF(SELF\
               measure_with_unit.unit_component);
  END_ENTITY; -- mass_measure_with_unit

  ENTITY  mass_unit
    SUBTYPE OF (named_unit);
    WHERE
      wr1: ((((((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF
               \named_unit.dimensions.mass_exponent = 1)) AND (SELF\
               named_unit.dimensions.time_exponent = 0)) AND (SELF\
               named_unit.dimensions.electric_current_exponent = 0)) AND (
               SELF\named_unit.dimensions.
               thermodynamic_temperature_exponent = 0)) AND (SELF\
               named_unit.dimensions.amount_of_substance_exponent = 0)) AND
                (SELF\named_unit.dimensions.luminous_intensity_exponent =0);
  END_ENTITY; -- mass_unit

  ENTITY  material_designation;
      name        : label;
      definitions : SET [1:?] OF characterized_definition;
  END_ENTITY; -- material_designation

  ENTITY  material_property
    SUBTYPE OF (property_definition);
    UNIQUE
      ur1 : name, definition;
    WHERE
      wr1: ('PROCESS_PLANNING_SCHEMA.CHARACTERIZED_OBJECT' IN TYPEOF(SELF\
               property_definition.definition)) OR (SIZEOF(bag_to_set(
               USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) - 
               QUERY ( temp <* bag_to_set(USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'MATERIAL_PROPERTY_REPRESENTATION') IN TYPEOF(temp)) )) =0);
  END_ENTITY; -- material_property

  ENTITY  material_property_representation
    SUBTYPE OF (property_definition_representation);
      dependent_environment : data_environment;
  END_ENTITY; -- material_property_representation

  ENTITY  measure_qualification;
      name              : label;
      description       : text;
      qualified_measure : measure_with_unit;
      qualifiers        : SET [1:?] OF value_qualifier;
    WHERE
      wr1: SIZEOF(QUERY ( temp <* qualifiers | (
               'PROCESS_PLANNING_SCHEMA.PRECISION_QUALIFIER' IN TYPEOF(temp)) )) 
               < 2;
  END_ENTITY; -- measure_qualification

  ENTITY  measure_representation_item
    SUBTYPE OF (representation_item, measure_with_unit);
  END_ENTITY; -- measure_representation_item

  ENTITY  measure_with_unit
    SUPERTYPE OF (ONEOF (length_measure_with_unit,mass_measure_with_unit,
        time_measure_with_unit,plane_angle_measure_with_unit,
        ratio_measure_with_unit));
      value_component : measure_value;
      unit_component  : unit;
    WHERE
      wr1: valid_units(SELF);
  END_ENTITY; -- measure_with_unit

  ENTITY  modified_geometric_tolerance
    SUBTYPE OF (geometric_tolerance);
      modifier : limit_condition;
  END_ENTITY; -- modified_geometric_tolerance

  ENTITY  modified_pattern
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT') | (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) ) | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.REPLICATE_FEATURE',
               'PROCESS_PLANNING_SCHEMA.INSTANCED_FEATURE'] * TYPEOF(fcr.
               related_shape_aspect.of_shape.definition)) >= 1) AND (fcr.
               description = 'base shape')) )) = 1;
      wr2: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT') | (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) ) | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.CIRCULAR_PATTERN',
               'PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN'] * TYPEOF(fcr.
               related_shape_aspect.of_shape.definition)) = 1) AND (fcr.
               description = 'base pattern')) )) = 1;
      wr3: SIZEOF(QUERY ( sar <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT') | (SIZEOF(QUERY ( msar <* USEDIN(
               sar.related_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | (((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.PATTERN_OFFSET_MEMBERSHIP',
               'PROCESS_PLANNING_SCHEMA.PATTERN_OMIT_MEMBERSHIP'] * TYPEOF(
               sar)) = 1) AND (sar.description = 'modified pattern')) AND (
               sar :<>: msar)) )) >= 1) )) = 0;
  END_ENTITY; -- modified_pattern

  ENTITY  name_attribute;
      attribute_value : label;
      named_item      : name_attribute_select;
  END_ENTITY; -- name_attribute

  ENTITY  named_unit
    SUPERTYPE OF (ONEOF (si_unit,conversion_based_unit,
        context_dependent_unit) ANDOR ONEOF (length_unit,mass_unit,
        time_unit,plane_angle_unit,solid_angle_unit,ratio_unit));
      dimensions : dimensional_exponents;
  END_ENTITY; -- named_unit

  ENTITY  next_assembly_usage_occurrence
    SUBTYPE OF (assembly_component_usage);
  END_ENTITY; -- next_assembly_usage_occurrence

  ENTITY  ngon_closed_profile
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT ((SIZEOF(impl_rep.
               used_representation.items) >= 3) AND (SIZEOF(impl_rep.
               used_representation.items) <= 4))) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (SIZEOF(QUERY ( pdr <* USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' 
               + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) AND (SIZEOF(QUERY ( srwp_i <* pdr.
               used_representation.items | (((((srwp_i.name ='orientation') 
               OR (srwp_i.name = 'number of sides')) OR (srwp_i.name = 
               'circumscribed diameter')) OR (srwp_i.name = 'cornerradius')) 
               OR (srwp_i.name = 'diameter across flats')) )) = SIZEOF(pdr.
               used_representation.items))) )) = 1) )) = 1;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr6: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | (((
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN 
               TYPEOF(it\measure_with_unit.value_component))) AND (it.name 
               = 'number of sides')) )) = 1)) )) = 0)) )) = 0;
      wr7: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name IN ['circumscribed diameter',
               'diameter across flats'])) )) = 1)) )) = 0)) )) = 0;
      wr8: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'corner radius')) )) <= 1)))) 
               = 0)) )) = 0;
  END_ENTITY; -- ngon_closed_profile

  ENTITY  ngon_shape_representation
    SUBTYPE OF (shape_representation_with_parameters);
    WHERE
      wr1: SIZEOF(SELF.items) = 5;
      wr2: SIZEOF(QUERY ( it <* SELF.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1;
      wr3: SIZEOF(QUERY ( it <* SELF.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'length')) )) = 1;
      wr4: SIZEOF(QUERY ( it <* SELF.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'corner radius')) )) = 1;
      wr5: SIZEOF(QUERY ( it <* SELF.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name IN ['circumscribed diameter',
               'diameter across flats'])) )) = 1;
      wr6: SIZEOF(QUERY ( it <* SELF.items | (((
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN 
               TYPEOF(it\measure_with_unit.value_component))) AND (it.name 
               = 'number of sides')) )) = 1;
  END_ENTITY; -- ngon_shape_representation

  ENTITY  non_machining_process
    SUBTYPE OF (action_method);
    WHERE
      wr1: SIZEOF(QUERY ( sar <* USEDIN(SELF,
    'PROCESS_PLANNING_SCHEMA.ACTION_METHOD_RELATIONSHIP.RELATING_METHOD') |
             (('PROCESS_PLANNING_SCHEMA.NON_MACHINING_PROCESS_RELATIONSHIP' 
               IN TYPEOF(sar)) AND (
               'PROCESS_PLANNING_SCHEMA.ANCILLARY_SETUP' IN TYPEOF(sar.
               related_method))) )) >= 1;
      wr2: SIZEOF(QUERY ( sar <* USEDIN(SELF,
    'PROCESS_PLANNING_SCHEMA.ACTION_METHOD_RELATIONSHIP.RELATING_METHOD') |
             (('PROCESS_PLANNING_SCHEMA.NON_MACHINING_PROCESS_RELATIONSHIP' 
               IN TYPEOF(sar)) AND (
               'PROCESS_PLANNING_SCHEMA.MANUFACTURING_ACTIVITY' IN TYPEOF(
               sar.related_method))) )) >= 1;
  END_ENTITY; -- non_machining_process

  ENTITY  non_machining_process_relationship
    SUBTYPE OF (sequential_method);
    WHERE
      wr1: SIZEOF(['PROCESS_PLANNING_SCHEMA.MANUFACTURING_ACTIVITY',
               'PROCESS_PLANNING_SCHEMA.ANCILLARY_SETUP'] * TYPEOF(SELF.
               related_method)) = 1;
      wr2: 'PROCESS_PLANNING_SCHEMA.NON_MACHINING_PROCESS' IN TYPEOF(SELF.
               relating_method);
  END_ENTITY; -- non_machining_process_relationship

  ENTITY  object_role;
      name        : label;
      description : OPTIONAL text;
  END_ENTITY; -- object_role

  ENTITY  offset_curve_3d
    SUBTYPE OF (curve);
      basis_curve    : curve;
      distance       : length_measure;
      self_intersect : LOGICAL;
      ref_direction  : direction;
    WHERE
      wr1: (basis_curve.dim = 3) AND (ref_direction.dim = 3);
  END_ENTITY; -- offset_curve_3d

  ENTITY  offset_surface
    SUBTYPE OF (surface);
      basis_surface  : surface;
      distance       : length_measure;
      self_intersect : LOGICAL;
  END_ENTITY; -- offset_surface

  ENTITY  open_path_profile
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 1)) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (
               'PROCESS_PLANNING_SCHEMA.PATH_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) )) = 1)) )) = 0;
      wr6: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'profile limit')) )) <= 1)) )) = 
               0;
  END_ENTITY; -- open_path_profile

  ENTITY  open_shell
    SUBTYPE OF (connected_face_set);
  END_ENTITY; -- open_shell

  ENTITY  organization;
      id          : OPTIONAL identifier;
      name        : label;
      description : OPTIONAL text;
  END_ENTITY; -- organization

  ENTITY  organization_assignment
    ABSTRACT SUPERTYPE;
      assigned_organization : organization;
      role                  : organization_role;
  END_ENTITY; -- organization_assignment

  ENTITY  organization_role;
      name : label;
    DERIVE
      description : text := get_description_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
  END_ENTITY; -- organization_role

  ENTITY  organizational_address
    SUBTYPE OF (address);
      organizations : SET [1:?] OF organization;
      description   : OPTIONAL text;
  END_ENTITY; -- organizational_address

  ENTITY  organizational_project;
      name                      : label;
      description               : OPTIONAL text;
      responsible_organizations : SET [1:?] OF organization;
    DERIVE
      id : identifier := get_id_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
  END_ENTITY; -- organizational_project

  ENTITY  oriented_closed_shell
    SUBTYPE OF (closed_shell);
      closed_shell_element : closed_shell;
      orientation          : BOOLEAN;
    DERIVE
      SELF\connected_face_set.cfs_faces : SET [1:?] OF face := 
                                             conditional_reverse(SELF.
                                             orientation,SELF.
                                            closed_shell_element.cfs_faces);
    WHERE
      wr1: NOT ('PROCESS_PLANNING_SCHEMA.ORIENTED_CLOSED_SHELL' IN TYPEOF(
               SELF.closed_shell_element));
  END_ENTITY; -- oriented_closed_shell

  ENTITY  oriented_edge
    SUBTYPE OF (edge);
      edge_element : edge;
      orientation  : BOOLEAN;
    DERIVE
      SELF\edge.edge_start : vertex := boolean_choose(SELF.orientation,
                                SELF.edge_element.edge_start,SELF.
                                edge_element.edge_end);
      SELF\edge.edge_end   : vertex := boolean_choose(SELF.orientation,
                                SELF.edge_element.edge_end,SELF.
                                edge_element.edge_start);
    WHERE
      wr1: NOT ('PROCESS_PLANNING_SCHEMA.ORIENTED_EDGE' IN TYPEOF(SELF.
               edge_element));
  END_ENTITY; -- oriented_edge

  ENTITY  oriented_face
    SUBTYPE OF (face);
      face_element : face;
      orientation  : BOOLEAN;
    DERIVE
      SELF\face.bounds : SET [1:?] OF face_bound := conditional_reverse(
                            SELF.orientation,SELF.face_element.bounds);
    WHERE
      wr1: NOT ('PROCESS_PLANNING_SCHEMA.ORIENTED_FACE' IN TYPEOF(SELF.
               face_element));
  END_ENTITY; -- oriented_face

  ENTITY  oriented_open_shell
    SUBTYPE OF (open_shell);
      open_shell_element : open_shell;
      orientation        : BOOLEAN;
    DERIVE
      SELF\connected_face_set.cfs_faces : SET [1:?] OF face := 
                                             conditional_reverse(SELF.
                                             orientation,SELF.
                                             open_shell_element.cfs_faces);
    WHERE
      wr1: NOT ('PROCESS_PLANNING_SCHEMA.ORIENTED_OPEN_SHELL' IN TYPEOF(
               SELF.open_shell_element));
  END_ENTITY; -- oriented_open_shell

  ENTITY  oriented_path
    SUBTYPE OF (path);
      path_element : path;
      orientation  : BOOLEAN;
    DERIVE
      SELF\path.edge_list : LIST [1:?] OF UNIQUE oriented_edge := 
                               conditional_reverse(SELF.orientation,SELF.
                               path_element.edge_list);
    WHERE
      wr1: NOT ('PROCESS_PLANNING_SCHEMA.ORIENTED_PATH' IN TYPEOF(SELF.
               path_element));
  END_ENTITY; -- oriented_path

  ENTITY  oriented_surface
    SUBTYPE OF (surface);
      orientation : BOOLEAN;
  END_ENTITY; -- oriented_surface

  ENTITY  outer_boundary_curve
    SUBTYPE OF (boundary_curve);
  END_ENTITY; -- outer_boundary_curve

  ENTITY  outer_round
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: (NOT (SELF\characterized_object.description = 'outer diameter')) 
               OR (SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (SIZEOF(QUERY ( pdr <* USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' 
               + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
           (('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(pdr.
               used_representation.items) = 3)) )) = 1) )) = 1);
      wr2: (NOT (SELF\characterized_object.description = 
               'outer diameter to shoulder')) OR (SIZEOF(QUERY ( pd <* 
               USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (SIZEOF(QUERY ( pdr <* USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' 
               + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
           (('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
               IN TYPEOF(pdr.used_representation)) AND ((2 <= SIZEOF(pdr.
               used_representation.items)) AND (SIZEOF(pdr.
               used_representation.items) <= 3))) )) = 1) )) = 1);
      wr3: SELF\characterized_object.description IN ['outer diameter',
               'outer diameter to shoulder'];
      wr4: (NOT (SELF\characterized_object.description = 'outer diameter')) 
               OR (SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'length')) )) = 1)) )) = 0)))) 
               = 0);
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
             TYPEOF(it)) = 2) AND (it.name = 'diameter')) )) = 1)) )) =0)) )) 
               = 0;
      wr6: (NOT (SELF\characterized_object.description = 
               'outer diameter to shoulder')) OR (SIZEOF(QUERY ( pds <* 
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'v-shape boundary occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (('PROCESS_PLANNING_SCHEMA.VEE_PROFILE' IN
                TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
               relating_shape_aspect.description = 'v-shape')) )) = 1)) )) 
               = 1)) )) = 0);
      wr7: (NOT (SELF\characterized_object.description = 'outer diameter')) 
               OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'reduced size occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 'taper usage') 
               AND (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | ((('PROCESS_PLANNING_SCHEMA.TAPER' IN 
               TYPEOF(sdr.relating_shape_aspect)) AND (
               'PROCESS_PLANNING_SCHEMA.OUTER_ROUND' IN TYPEOF(sdr.
               related_shape_aspect.of_shape.definition))) AND (sdr.name = 
               'reduced size')) )) = 1)) )) <= 1)) )) = 0);
      wr8: (NOT (SELF\characterized_object.description = 
               'outer diameter to shoulder')) OR (SIZEOF(QUERY ( pd <* 
               USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
              TYPEOF(it)) = 2) AND (it.name = 'length')) )) <= 1)) )) =0)) )) 
               = 0);
      wr9: (NOT (SELF\characterized_object.description = 
               'outer diameter to shoulder')) OR (SIZEOF(QUERY ( pd <* 
               USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'feature length')) )) <= 1)))) 
               = 0)) )) = 0);
  END_ENTITY; -- outer_round

  ENTITY  outside_profile
    SUBTYPE OF (feature_definition);
    WHERE
      wr1 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
           (('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
                IN TYPEOF(pdr.used_representation)) AND (SIZEOF(pdr.
                used_representation.items) = 1)) )) = 1) )) = 1;
      wr2 : SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (sa_occ.
                description IN ['boundary occurrence',
                'non-planar boundary occurrence',
                'partial circular boundary occurrence',
                'closed circular boundary occurrence',
                'open rectangular boundary occurrence',
                'closed rectangular boundary occurrence']) )) = 1)) )) = 0;
      wr3 : (NOT (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (sa_occ.
                description = 'boundary occurrence') )) = 1)) )) = 0)) OR (
                SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (('PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_DEFINING_RELATIONSHIP') IN TYPEOF(sar))) ) | ((
                SIZEOF(['PROCESS_PLANNING_SCHEMA.CIRCULAR_CLOSED_PROFILE',
                'PROCESS_PLANNING_SCHEMA.NGON_CLOSED_PROFILE',
                'PROCESS_PLANNING_SCHEMA.RECTANGULAR_CLOSED_PROFILE',
                'PROCESS_PLANNING_SCHEMA.CLOSED_PATH_PROFILE',
                'PROCESS_PLANNING_SCHEMA.SQUARE_U_PROFILE',
                'PROCESS_PLANNING_SCHEMA.PARTIAL_CIRCULAR_PROFILE',
                'PROCESS_PLANNING_SCHEMA.ROUNDED_U_PROFILE',
                'PROCESS_PLANNING_SCHEMA.LINEAR_PROFILE',
                'PROCESS_PLANNING_SCHEMA.VEE_PROFILE',
                'PROCESS_PLANNING_SCHEMA.TEE_PROFILE',
                'PROCESS_PLANNING_SCHEMA.OPEN_PATH_PROFILE'] * TYPEOF(sdr.
                relating_shape_aspect)) = 1) AND (sdr.relating_shape_aspect
                .description = 'outside boundary')) )) = 1) )) = 1)) )) =0);
      wr4 : (NOT (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (sa_occ.
                description IN ['complex boundary occurrence',
                'partial circular boundary occurrence',
                'closed circular boundary occurrence',
                'open rectangular boundary occurrence',
                'closed rectangular boundary occurrence']) )) = 1)) )) =0)) 
                OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (NOT (
                SIZEOF(QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile floor usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | ((
                'PROCESS_PLANNING_SCHEMA.PROFILE_FLOOR' IN TYPEOF(sdr.
                relating_shape_aspect)) AND (
                'PROCESS_PLANNING_SCHEMA.OUTSIDE_PROFILE' IN TYPEOF(sdr.
              related_shape_aspect.of_shape.definition))) )) = 1)) )) =0)) )) 
                = 0);
      wr5 : (NOT (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (sa_occ.
                description IN ['outside boundary',
                'complex boundary occurrence',
                'partial circular boundary occurrence',
                'closed circular boundary occurrence',
                'open rectangular boundary occurrence',
                'closed rectangular boundary occurrence']) )) = 1)) )) =0)) 
                OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'path feature component usage') AND ((
                'PROCESS_PLANNING_SCHEMA.' + 'SHAPE_DEFINING_RELATIONSHIP') 
                IN TYPEOF(sar))) ) | (((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.PATH_FEATURE_COMPONENT'] * TYPEOF(
                sdr.relating_shape_aspect)) = 1) AND (sdr.name = 
                'profile swept shape')) AND (sdr.relating_shape_aspect.
                description = 'linear')) )) = 1) )) = 1)) )) = 0);
      wr6 : (NOT (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (sa_occ.
                description = 'complex boundary occurrence') )) = 1)) )) = 
                0)) OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.CIRCULAR_CLOSED_PROFILE',
                'PROCESS_PLANNING_SCHEMA.NGON_CLOSED_PROFILE',
                'PROCESS_PLANNING_SCHEMA.RECTANGULAR_CLOSED_PROFILE',
                'PROCESS_PLANNING_SCHEMA.CLOSED_PATH_PROFILE',
                'PROCESS_PLANNING_SCHEMA.SQUARE_U_PROFILE',
                'PROCESS_PLANNING_SCHEMA.PARTIAL_CIRCULAR_PROFILE',
                'PROCESS_PLANNING_SCHEMA.ROUNDED_U_PROFILE',
                'PROCESS_PLANNING_SCHEMA.VEE_PROFILE',
                'PROCESS_PLANNING_SCHEMA.TEE_PROFILE',
                'PROCESS_PLANNING_SCHEMA.LINEAR_PROFILE',
                'PROCESS_PLANNING_SCHEMA.OPEN_PATH_PROFILE'] * TYPEOF(sdr.
                relating_shape_aspect)) = 1) )) = 1) )) = 1)) )) = 0);
      wr7 : (NOT (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (sa_occ.
                description = 'partial circular boundary occurrence') )) = 
                1)) )) = 0)) OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (
                'PROCESS_PLANNING_SCHEMA.PARTIAL_CIRCULAR_PROFILE' IN 
                TYPEOF(sdr.relating_shape_aspect)) )) = 1) )) = 1)) )) =0);
      wr8 : (NOT (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (sa_occ.
              description = 'closed circular boundary occurrence') )) =1)) )) 
                = 0)) OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (
                'PROCESS_PLANNING_SCHEMA.CIRCULAR_CLOSED_PROFILE' IN 
                TYPEOF(sdr.relating_shape_aspect)) )) = 1) )) = 1)) )) =0);
      wr9 : (NOT (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (sa_occ.
                description = 'open rectangular boundary occurrence') )) = 
                1)) )) = 0)) OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (
                'PROCESS_PLANNING_SCHEMA.SQUARE_U_PROFILE' IN TYPEOF(sdr.
                relating_shape_aspect)) )) = 1) )) = 1)) )) = 0);
      wr10: (NOT (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (sa_occ.
                description = 'closed rectangular boundary occurrence') )) 
                = 1)) )) = 0)) OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (
                'PROCESS_PLANNING_SCHEMA.RECTANGULAR_CLOSED_PROFILE' IN 
                TYPEOF(sdr.relating_shape_aspect)) )) = 1) )) = 1)) )) =0);
      wr11: (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (sa_occ.
                description IN ['boundary occurrence',
                'complex boundary occurrence',
                'partial circular boundary occurrence',
                'closed circular boundary occurrence',
                'open rectangular boundary occurrence',
                'closed rectangular boundary occurrence']) )) = 1)) )) = 0) 
                OR (SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN
                 TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'removal direction')) )) = 1)))) 
                = 0);
      wr12: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
                SELF) |
             (('PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' 
                IN TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'maximum feature limit')) )) <= 
                1;
  END_ENTITY; -- outside_profile

  ENTITY  pallet
    SUBTYPE OF (action_resource);
  END_ENTITY; -- pallet

  ENTITY  parabola
    SUBTYPE OF (conic);
      focal_dist : length_measure;
    WHERE
      wr1: focal_dist <> 0;
  END_ENTITY; -- parabola

  ENTITY  parallel_offset
    SUBTYPE OF (derived_shape_aspect);
      offset : measure_with_unit;
    WHERE
      wr1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) = 1;
  END_ENTITY; -- parallel_offset

  ENTITY  parallelism_tolerance
    SUBTYPE OF (geometric_tolerance_with_datum_reference);
    WHERE
      wr1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.
               datum_system) < 3;
  END_ENTITY; -- parallelism_tolerance

  ENTITY  parametric_representation_context
    SUBTYPE OF (representation_context);
  END_ENTITY; -- parametric_representation_context

  ENTITY  part_contract
    SUBTYPE OF (contract);
    WHERE
     wr1: SIZEOF(QUERY ( adr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')| 
         (('PROCESS_PLANNING_SCHEMA.ORGANIZATION' 
         IN TYPEOF(adr.assigned_organization)) AND 
         (adr.assigned_organization.description='binding aggrement'))))=1; 
      wr2: SIZEOF(QUERY ( ca <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.CONTRACT_ASSIGNMENT.ASSIGNED_CONTRACT')
                | (('PROCESS_PLANNING_SCHEMA.APPLIED_CONTRACT_ASSIGNMENT' 
               IN TYPEOF(ca)) AND (NOT (SIZEOF(QUERY ( pdf <* ca.items | ((
               'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_FORMATION' IN 
               TYPEOF(pdf)) AND (NOT (SIZEOF(QUERY ( pd <* USEDIN(pdf,
               'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION.FORMATION') | (
               pd.frame_of_reference.name = 'part definition') )) = 1))) )) 
               = 1))) )) = 0;
 wr3: SIZEOF(QUERY ( ap <* USEDIN(SELF,
      'PROCESS_PLANNING_SCHEMA.CONTRACT_ASSIGNMENT.ASSIGNED_CONTRACT')| 
      (('PROCESS_PLANNING_SCHEMA.APPLIED_CONTRACT_ASSIGNMENT' 
      IN TYPEOF(ap)) AND (NOT (SIZEOF(QUERY ( it <* ap.items | 
      (('PROCESS_PLANNING_SCHEMA.DOCUMENT_FILE' IN TYPEOF(it)) 
      AND (it.description = 'contract document')) )) <= 1
      )) )) ) = 0;
      wr4: SIZEOF(QUERY ( adr <* USEDIN(SELF,
           'PROCESS_PLANNING_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')
                | (('PROCESS_PLANNING_SCHEMA.ORGANIZATION' IN TYPEOF(adr.
               assigned_organization)) AND (SIZEOF(QUERY ( op <* USEDIN(adr
              .assigned_organization,
 'PROCESS_PLANNING_SCHEMA.ORGANIZATIONAL_PROJECT.RESPONSIBLE_ORGANIZATIONS')
                | (op.description = 'project number') )) = 1)) )) = 1;
  END_ENTITY; -- part_contract

  ENTITY  part_fixture_mounting
    SUBTYPE OF (part_mounting);
    WHERE
      wr1: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(it)) AND
                (it.name = 'fixture location origin')) )) = 1) )) = 0)) )) 
               = 0);
      wr2: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'fixture orientation')) )) = 1) )) = 0)) )) = 0);
      wr3: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLANE' IN TYPEOF(it)) AND (it.name 
               = 'fixture reference plane')) )) = 1) )) = 0)) )) = 0);
      wr4: NOT (SIZEOF(QUERY ( cm <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION.CHOSEN_METHOD') | (NOT (
               SIZEOF(QUERY ( ppa <* USEDIN(cm,
            'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(ppa.property_or_shape)) AND (ppa.description = 
               'part fixture mounting part shape')) )) <= 1)) )) = 0);
  END_ENTITY; -- part_fixture_mounting

  ENTITY  part_fixture_unmounting
    SUBTYPE OF (manufacturing_activity);
  END_ENTITY; -- part_fixture_unmounting

  ENTITY  part_handling
    SUBTYPE OF (manufacturing_activity);
  END_ENTITY; -- part_handling

  ENTITY  part_machine_mounting
    SUBTYPE OF (part_mounting);
    WHERE
      wr1: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               SIZEOF(QUERY ( apr <* USEDIN(ap,
        'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(it)) AND
                (it.name = 'machine location origin')) )) = 1) )) = 1) )) =
                1;
      wr2: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               SIZEOF(QUERY ( apr <* USEDIN(ap,
          'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'machine orientation')) )) = 1) )) = 1) )) = 1;
      wr3: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLANE' IN TYPEOF(it)) AND (it.name 
               = 'machine reference plane')) )) = 1) )) = 1) )) = 1;
      wr4: SIZEOF(QUERY ( cm <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION.CHOSEN_METHOD') | (NOT (
               SIZEOF(QUERY ( ppa <* USEDIN(cm,
          'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(ppa.property_or_shape)) AND (ppa.description = 
               'part machine mounting part shape')) )) = 1)) )) = 1;
      wr5: SIZEOF(QUERY ( am <* QUERY ( arr <* USEDIN(SELF,
      'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT.OPERATIONS') | (
               'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE' IN
                TYPEOF(arr)) ) | (SIZEOF(QUERY ( it <* am.resources | (
               'PROCESS_PLANNING_SCHEMA.MACHINE' IN TYPEOF(it)) )) = 1) )) 
               = 1;
  END_ENTITY; -- part_machine_mounting

  ENTITY  part_machine_unmounting
    SUBTYPE OF (manufacturing_activity);
  END_ENTITY; -- part_machine_unmounting

  ENTITY  part_mounting
    SUPERTYPE OF (ONEOF (part_fixture_mounting,part_machine_mounting))
    SUBTYPE OF (manufacturing_activity);
    WHERE
      wr1: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               SIZEOF(QUERY ( apr <* USEDIN(ap,
       'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(it)) AND
                (it.name = 'part location origin')) )) = 1) )) = 1) )) = 1;
  END_ENTITY; -- part_mounting

  ENTITY  partial_circular_profile
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) >= 3)) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'radius')) )) = 1)) )) = 0)))) 
               = 0;
      wr6: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'sweep angle')) )) = 1)) )) 
               = 0)) )) = 0;
      wr7: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'profile limit')) )) <= 1)) )) = 
               0;
  END_ENTITY; -- partial_circular_profile

  ENTITY  path
    SUPERTYPE OF (ONEOF (edge_loop,oriented_path))
    SUBTYPE OF (topological_representation_item);
      edge_list : LIST [1:?] OF UNIQUE oriented_edge;
    WHERE
      wr1: path_head_to_tail(SELF);
  END_ENTITY; -- path

  ENTITY  path_feature_component
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1 : 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
                TYPEOF(SELF.of_shape.definition);
      wr2 : SELF.description IN ['partial circular','complete circular',
                'linear','complex'];
      wr3 : (NOT (SELF.description = 'complex')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) )) = 1)) )) = 0);
      wr4 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
                name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr5 : (NOT (SELF.description = 'partial circular')) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(impl_rep.
                used_representation.items) = 3)) )) = 0)) )) = 0);
      wr6 : (NOT (SELF.description = 'partial circular')) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'radius')) )) = 1)) )) =0)) )) 
                = 0);
      wr7 : (NOT (SELF.description = 'partial circular')) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'sweep angle')) )) = 1)) )) 
                = 0)) )) = 0);
      wr8 : (NOT (SELF.description = 'complete circular')) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(impl_rep.
                used_representation.items) = 2)) )) = 0)) )) = 0);
      wr9 : (NOT (SELF.description = 'complete circular')) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'radius')) )) = 1)) )) =0)) )) 
                = 0);
      wr10: (NOT (SELF.description = 'linear')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(impl_rep.
                used_representation.items) = 2)) )) = 0)) )) = 0);
      wr11: (NOT (SELF.description = 'linear')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'distance')) )) = 1)) )) = 
                0)) )) = 0);
      wr12: (NOT (SELF.description = 'linear')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (
                'PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN
                 TYPEOF(pdr.used_representation)) )) = 1)) )) = 0);
      wr13: (NOT (SELF.description = 'complex')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.PATH_SHAPE_REPRESENTATION' IN 
                TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'sweep path')) AND (SIZEOF(
                QUERY ( srwp_i <* pdr.used_representation.items | (srwp_i.
                name = 'profile shape') )) = 1)) )) = 1)) )) = 0);
  END_ENTITY; -- path_feature_component

  ENTITY  path_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(SELF.items) >= 1;
      wr2: SIZEOF(QUERY ( i <* SELF.items | (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.BOUNDED_CURVE',
               'PROCESS_PLANNING_SCHEMA.EDGE_CURVE',
               'PROCESS_PLANNING_SCHEMA.PATH'] * TYPEOF(i)) = 1) )) >= 1;
  END_ENTITY; -- path_shape_representation

  ENTITY  pattern_offset_membership
    SUBTYPE OF (feature_component_relationship);
    WHERE
      wr1 : SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF.
                relating_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATING_SHAPE_ASPECT') | ((
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar)) AND (sar :<>: SELF)) ) | (SIZEOF(
                QUERY ( pdr <* QUERY ( pd <* USEDIN(fcr.
                related_shape_aspect.of_shape,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.CIRCULAR_PATTERN',
                'PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN'] * TYPEOF(pdr
                .definition)) = 1) )) = 0) )) = 0;
      wr2 : SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF.
                related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar)) AND (sar :<>: SELF)) ) | ((fcr.description = 
                'modified pattern') AND (
                'PROCESS_PLANNING_SCHEMA.MODIFIED_PATTERN' IN TYPEOF(fcr.
                relating_shape_aspect))) )) >= 1;
      wr3 : SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF.
                related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar)) AND (sar :<>: SELF)) ) | ((
                'PROCESS_PLANNING_SCHEMA.MODIFIED_PATTERN' IN TYPEOF(fcr.
                relating_shape_aspect)) AND (NOT (SIZEOF(QUERY ( modfcr <* 
                QUERY ( modsar <* USEDIN(fcr.relating_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT') | ((
                SIZEOF(['PROCESS_PLANNING_SCHEMA.CIRCULAR_PATTERN',
                'PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN'] * TYPEOF(
                modsar.related_shape_aspect.of_shape.definition)) = 1) AND 
                (modsar :<>: fcr)) ) | (NOT (modfcr.related_shape_aspect.
                of_shape.definition :=: SELF.relating_shape_aspect.of_shape
                .definition)) )) = 0))) )) = 0;
      wr4 : (NOT ('PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(
                SELF.relating_shape_aspect.of_shape.definition))) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) = 2)) )) 
                = 0);
      wr5 : (NOT ('PROCESS_PLANNING_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(
                SELF.relating_shape_aspect.of_shape.definition))) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) = 1)) )) 
                = 0);
      wr6 : (NOT ('PROCESS_PLANNING_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(
                SELF.relating_shape_aspect.of_shape.definition))) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (NOT (
                SIZEOF(pdr.used_representation.items) = 2)) )) = 0)) )) =0);
      wr7 : (NOT ('PROCESS_PLANNING_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(
                SELF.relating_shape_aspect.of_shape.definition))) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
                TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN
                 TYPEOF(it\measure_with_unit.value_component))) AND (it.
                name = 'index number')) )) = 1)) )) = 0)) )) = 0);
      wr8 : (NOT ('PROCESS_PLANNING_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(
                SELF.relating_shape_aspect.of_shape.definition))) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' IN 
                TYPEOF(it)) AND (it.name = 'offset')) )) = 1)) )) = 0)) )) 
                = 0);
      wr9 : (NOT ('PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(
                SELF.relating_shape_aspect.of_shape.definition))) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(impl_rep.
                used_representation.items) = 3)) )) = 0)) )) = 0);
      wr10: (NOT ('PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(
                SELF.relating_shape_aspect.of_shape.definition))) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
                TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN
                 TYPEOF(it\measure_with_unit.value_component))) AND (it.
                name = 'row index')) )) = 1)) )) = 0)) )) = 0);
      wr11: (NOT ('PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(
                SELF.relating_shape_aspect.of_shape.definition))) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
                TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN
                 TYPEOF(it\measure_with_unit.value_component))) AND (it.
                name = 'column index')) )) = 1)) )) = 0)) )) = 0);
      wr12: (NOT ('PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(
                SELF.relating_shape_aspect.of_shape.definition))) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT' IN 
                TYPEOF(it)) AND (it.name = 'offset distance')) )) = 1)) )) 
                = 0)) )) = 0);
      wr13: (NOT ('PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(
                SELF.relating_shape_aspect.of_shape.definition))) OR (
                SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN
                 TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'offset direction')) )) = 1)) )) 
                = 0);
  END_ENTITY; -- pattern_offset_membership

  ENTITY  pattern_omit_membership
    SUBTYPE OF (feature_component_relationship);
    WHERE
      wr1: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF.
               relating_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT') | ((
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) AND (sar :<>: SELF)) ) | (SIZEOF(
               QUERY ( pdr <* QUERY ( pd <* USEDIN(fcr.related_shape_aspect
               .of_shape,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.CIRCULAR_PATTERN',
               'PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN'] * TYPEOF(pdr.
               definition)) = 1) )) = 0) )) = 0;
      wr2: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF.
               related_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) AND (sar :<>: SELF)) ) | ((fcr.description = 
               'modified pattern') AND (
               'PROCESS_PLANNING_SCHEMA.MODIFIED_PATTERN' IN TYPEOF(fcr.
               relating_shape_aspect))) )) >= 1;
      wr3: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF.
               related_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) AND (sar :<>: SELF)) ) | ((
               'PROCESS_PLANNING_SCHEMA.MODIFIED_PATTERN' IN TYPEOF(fcr.
               relating_shape_aspect)) AND (NOT (SIZEOF(QUERY ( modfcr <* 
               QUERY ( modsar <* USEDIN(fcr.relating_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT') | ((
               SIZEOF(['PROCESS_PLANNING_SCHEMA.CIRCULAR_PATTERN',
               'PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN'] * TYPEOF(
               modsar.related_shape_aspect.of_shape.definition)) = 1) AND (
               modsar :<>: fcr)) ) | (NOT (modfcr.related_shape_aspect.
               of_shape.definition :=: SELF.relating_shape_aspect.of_shape.
               definition)) )) = 0))) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) = 1)) )) =
                0;
      wr5: (NOT ('PROCESS_PLANNING_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(SELF
               .relating_shape_aspect.of_shape.definition))) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (NOT (
               SIZEOF(pdr.used_representation.items) = 1)) )) = 0)) )) =0);
      wr6: (NOT ('PROCESS_PLANNING_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(SELF
               .relating_shape_aspect.of_shape.definition))) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | (((
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN 
               TYPEOF(it\measure_with_unit.value_component))) AND (it.name 
               = 'index number')) )) = 1)) )) = 0)) )) = 0);
      wr7: (NOT ('PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(
               SELF.relating_shape_aspect.of_shape.definition))) OR (
               SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (NOT (
               SIZEOF(pdr.used_representation.items) = 2)) )) = 0)) )) =0);
      wr8: (NOT ('PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(
               SELF.relating_shape_aspect.of_shape.definition))) OR (
               SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | (((
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN 
               TYPEOF(it\measure_with_unit.value_component))) AND (it.name 
               = 'row index')) )) = 1)) )) = 0)) )) = 0);
      wr9: (NOT ('PROCESS_PLANNING_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(
               SELF.relating_shape_aspect.of_shape.definition))) OR (
               SIZEOF(QUERY ( pd <* USEDIN(SELF.related_shape_aspect,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | (((
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN 
               TYPEOF(it\measure_with_unit.value_component))) AND (it.name 
               = 'column index')) )) = 1)) )) = 0)) )) = 0);
  END_ENTITY; -- pattern_omit_membership

  ENTITY  pcurve
    SUBTYPE OF (curve);
      basis_surface      : surface;
      reference_to_curve : definitional_representation;
    WHERE
      wr1: SIZEOF(reference_to_curve\representation.items) = 1;
      wr2: 'PROCESS_PLANNING_SCHEMA.CURVE' IN TYPEOF(reference_to_curve\
               representation.items[1]);
      wr3: reference_to_curve\representation.items[1]\
               geometric_representation_item.dim = 2;
  END_ENTITY; -- pcurve
  ENTITY  perpendicular_to
    SUBTYPE OF (derived_shape_aspect);
    WHERE
      wr1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) = 1;
  END_ENTITY; -- perpendicular_to

  ENTITY  perpendicularity_tolerance
    SUBTYPE OF (geometric_tolerance_with_datum_reference);
    WHERE
      wr1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.
               datum_system) <= 3;
  END_ENTITY; -- perpendicularity_tolerance

  ENTITY  person;
      id            : identifier;
      last_name     : OPTIONAL label;
      first_name    : OPTIONAL label;
      middle_names  : OPTIONAL LIST [1:?] OF label;
      prefix_titles : OPTIONAL LIST [1:?] OF label;
      suffix_titles : OPTIONAL LIST [1:?] OF label;
    WHERE
      wr1: EXISTS(last_name) OR EXISTS(first_name);
  END_ENTITY; -- person

  ENTITY  person_and_organization;
      the_person       : person;
      the_organization : organization;
    DERIVE
      name        : label := get_name_value(SELF);
      description : text := get_description_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
      wr2: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
  END_ENTITY; -- person_and_organization

  ENTITY  personal_address
    SUBTYPE OF (address);
      people      : SET [1:?] OF person;
      description : OPTIONAL text;
  END_ENTITY; -- personal_address

  ENTITY  placement
    SUPERTYPE OF (ONEOF (axis1_placement,axis2_placement_2d,
        axis2_placement_3d))
    SUBTYPE OF (geometric_representation_item);
      location : cartesian_point;
  END_ENTITY; -- placement

  ENTITY  planar_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(SELF.items) = 1;
      wr2: SIZEOF(QUERY ( it <* SELF.items | (NOT (
               'PROCESS_PLANNING_SCHEMA.PLANE' IN TYPEOF(it))) )) = 1;
  END_ENTITY; -- planar_shape_representation

  ENTITY  plane
    SUBTYPE OF (elementary_surface);
  END_ENTITY; -- plane
  ENTITY  plane_angle_measure_with_unit
    SUBTYPE OF (measure_with_unit);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_UNIT' IN TYPEOF(SELF\
               measure_with_unit.unit_component);
  END_ENTITY; -- plane_angle_measure_with_unit

  ENTITY  plane_angle_unit
    SUBTYPE OF (named_unit);
    WHERE
      wr1: ((((((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF
               \named_unit.dimensions.mass_exponent = 0)) AND (SELF\
               named_unit.dimensions.time_exponent = 0)) AND (SELF\
               named_unit.dimensions.electric_current_exponent = 0)) AND (
               SELF\named_unit.dimensions.
               thermodynamic_temperature_exponent = 0)) AND (SELF\
               named_unit.dimensions.amount_of_substance_exponent = 0)) AND
                (SELF\named_unit.dimensions.luminous_intensity_exponent =0);
  END_ENTITY; -- plane_angle_unit

  ENTITY  plus_minus_tolerance;
      range                : tolerance_method_definition;
      toleranced_dimension : dimensional_characteristic;
    UNIQUE
      ur1 : toleranced_dimension;
  END_ENTITY; -- plus_minus_tolerance

  ENTITY  pocket
    SUBTYPE OF (feature_definition);
    WHERE
      wr1 : SELF\characterized_object.description IN ['closed rectangular',
                'open rectangular','complex','circular cutout',
                'complex cutout','recess'];
      wr2 : SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'pocket depth occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | (((sar.description = 
                'path feature component usage') AND (sar.name = 
                'pocket depth')) AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | ((
                'PROCESS_PLANNING_SCHEMA.PATH_FEATURE_COMPONENT' IN TYPEOF(
                sdr.relating_shape_aspect)) AND (sdr.relating_shape_aspect.
                description = 'linear')) )) = 1)) )) = 1)) )) = 0;
      wr3 : SIZEOF(QUERY ( pdr <* get_property_definition_representations(
                SELF) |
            ('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
                IN TYPEOF(pdr.used_representation)) )) = 1;
      wr4 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND ((1 <= SIZEOF(pdr.
                used_representation.items)) AND (SIZEOF(pdr.
                used_representation.items) <= 2))) )) = 1) )) = 1;
      wr5 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND (SIZEOF(QUERY ( srwp_i <* pdr.
                used_representation.items | ((srwp_i.name = 'orientation') 
                OR (srwp_i.name = 'fillet radius')) )) = SIZEOF(pdr.
                used_representation.items))) )) = 1) )) = 1;
      wr6 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'fillet radius')) )) <= 1)))) 
                = 0)) )) = 0;
      wr7 : (NOT (SELF\characterized_object.description IN ['complex',
                'non-circular cutout','recess'])) OR (SIZEOF(
                QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'boundary occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.CIRCULAR_CLOSED_PROFILE',
                'PROCESS_PLANNING_SCHEMA.NGON_CLOSED_PROFILE',
                'PROCESS_PLANNING_SCHEMA.RECTANGULAR_CLOSED_PROFILE',
                'PROCESS_PLANNING_SCHEMA.CLOSED_PATH_PROFILE',
                'PROCESS_PLANNING_SCHEMA.SQUARE_U_PROFILE',
                'PROCESS_PLANNING_SCHEMA.PARTIAL_CIRCULAR_PROFILE',
                'PROCESS_PLANNING_SCHEMA.ROUNDED_U_PROFILE',
                'PROCESS_PLANNING_SCHEMA.VEE_PROFILE',
                'PROCESS_PLANNING_SCHEMA.TEE_PROFILE',
                'PROCESS_PLANNING_SCHEMA.OPEN_PATH_PROFILE'] * TYPEOF(sdr.
                relating_shape_aspect)) = 1) )) = 1)) )) = 1)) )) = 0);
      wr8 : (NOT (SELF\characterized_object.description = 
                'closed rectangular')) OR (SIZEOF(QUERY ( pds <* 
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'closed boundary occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (
                'PROCESS_PLANNING_SCHEMA.RECTANGULAR_CLOSED_PROFILE' IN 
                TYPEOF(sdr.relating_shape_aspect)) )) = 1)) )) = 1)) )) =0);
      wr9 : (NOT (SELF\characterized_object.description = 
                'open rectangular')) OR (SIZEOF(QUERY ( pds <* 
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'open boundary occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (
                'PROCESS_PLANNING_SCHEMA.SQUARE_U_PROFILE' IN TYPEOF(sdr.
                relating_shape_aspect)) )) = 1)) )) = 1)) )) = 0);
      wr10: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'bottom condition occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'pocket bottom usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | ((
                'PROCESS_PLANNING_SCHEMA.POCKET_BOTTOM' IN TYPEOF(sdr.
                relating_shape_aspect)) AND (
                'PROCESS_PLANNING_SCHEMA.POCKET' IN TYPEOF(sdr.
              related_shape_aspect.of_shape.definition))) )) = 1)) )) =1)) )) 
                = 0;
      wr11: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'change in boundary occurrence') AND (
                SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATING_SHAPE_ASPECT') | ((sar.description = 
                'taper usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | ((('PROCESS_PLANNING_SCHEMA.TAPER' IN 
                TYPEOF(fcr.relating_shape_aspect)) AND (
                'PROCESS_PLANNING_SCHEMA.POCKET' IN TYPEOF(fcr.
                related_shape_aspect.of_shape.definition))) AND (fcr.
                related_shape_aspect.description IN ['angle taper',
                'directed taper'])) )) = 1)) )) <= 1)) )) = 0;
      wr12: (NOT (SELF\characterized_object.description = 
                'circular cutout')) OR (SIZEOF(QUERY ( pds <* 
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'enclosed boundary occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'profile usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | (
                'PROCESS_PLANNING_SCHEMA.CIRCULAR_CLOSED_PROFILE' IN 
                TYPEOF(sdr.relating_shape_aspect)) )) = 1)) )) = 1)) )) =0);
      wr13: (NOT (SELF\characterized_object.description IN [
                'circular cutout','complex cutout'])) OR (SIZEOF(
                QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'bottom condition occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'pocket bottom usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | (((
                'PROCESS_PLANNING_SCHEMA.POCKET_BOTTOM' IN TYPEOF(sdr.
                relating_shape_aspect)) AND (
                'PROCESS_PLANNING_SCHEMA.POCKET' IN TYPEOF(sdr.
                related_shape_aspect.of_shape.definition))) AND (sdr.
                relating_shape_aspect.description = 'through')) )) = 1)) )) 
                = 1)) )) = 0);
      wr14: (NOT (SELF\characterized_object.description = 'recess')) OR (
                SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'bottom condition occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'pocket bottom usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | (((
                'PROCESS_PLANNING_SCHEMA.POCKET_BOTTOM' IN TYPEOF(sdr.
                relating_shape_aspect)) AND (
                'PROCESS_PLANNING_SCHEMA.POCKET' IN TYPEOF(sdr.
                related_shape_aspect.of_shape.definition))) AND (sdr.
                relating_shape_aspect.description IN ['planar','complex'])))) 
                = 1)) )) = 1)) )) = 0);
      wr15: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
                SELF) |
                (('PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' 
                IN TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'maximum feature limit')) )) <= 
                1;
      wr16: (NOT (SELF\characterized_object.description IN [
                'closed rectangular','openrectangular','complex','recess'])) 
                OR (SIZEOF(QUERY ( pds <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pds)) AND (SIZEOF(QUERY ( csa <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (((
                'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(
                csa)) AND (csa.name = 'uncut area')) AND (SIZEOF(
                QUERY ( sar <* csa.component_relationships | ((
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar)) AND (SIZEOF(['PROCESS_PLANNING_SCHEMA.BOSS',
                'PROCESS_PLANNING_SCHEMA.PROTRUSION'] * TYPEOF(sar.
                related_shape_aspect)) = 1)) )) = 1)) )) <= 1)) )) = 1);
  END_ENTITY; -- pocket

  ENTITY  pocket_bottom
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1 : 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
                TYPEOF(SELF.of_shape.definition);
      wr2 : SELF.description IN ['planar','complex','through'];
      wr3 : (NOT (SELF.description = 'planar')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN
                 TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'floor normal')) )) = 1)) )) =0);
      wr4 : (NOT (SELF.description = 'planar')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.LOCATION_SHAPE_REPRESENTATION' IN 
                TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'floor location')) )) = 1)) )) =
                 0);
      wr5 : (NOT (SELF.description = 'complex')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
                TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'floor face')) )) = 1)) )) = 0);
      wr6 : (NOT (SELF.description IN ['planar','complex'])) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) )) = 1)) )) = 0);
      wr7 : (NOT (SELF.description IN ['planar','complex'])) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(impl_rep.
                used_representation.items) <= 1)) )) = 0)) )) = 0);
      wr8 : (NOT (SELF.description = 'through')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) )) = 0)) )) = 0);
      wr9 : (NOT (SELF.description IN ['planar','complex'])) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
              TYPEOF(it)) = 2) AND (it.name = 'radius')) )) <= 1)) )) =0)) )) 
                = 0);
      wr10: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATING_SHAPE_ASPECT') | ((sar.description = 
                'pocket bottom usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | (((fcr.related_shape_aspect.description 
                = 'bottom condition occurrence') AND (
                'PROCESS_PLANNING_SCHEMA.POCKET' IN TYPEOF(fcr.
                related_shape_aspect.of_shape.definition))) AND (
                'PROCESS_PLANNING_SCHEMA.POCKET_BOTTOM' IN TYPEOF(fcr.
                relating_shape_aspect))) )) >= 1;
      wr11: (NOT (SELF.description IN ['planar','complex'])) OR (SIZEOF(
                QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATING_SHAPE_ASPECT') | ((sar.description = 
                'pocket bottom usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | ((fcr.related_shape_aspect.description =
                 'bottom condition occurrence') AND (fcr.
                related_shape_aspect.name IN ['pocket depth start',
                'pocket depth end'])) )) = 0);
  END_ENTITY; -- pocket_bottom

  ENTITY  point
    SUPERTYPE OF (ONEOF (cartesian_point,point_on_curve,point_on_surface,
        point_replica,degenerate_pcurve))
    SUBTYPE OF (geometric_representation_item);
  END_ENTITY; -- point

  ENTITY  point_on_curve
    SUBTYPE OF (point);
      basis_curve     : curve;
      point_parameter : parameter_value;
  END_ENTITY; -- point_on_curve

  ENTITY  point_on_surface
    SUBTYPE OF (point);
      basis_surface     : surface;
      point_parameter_u : parameter_value;
      point_parameter_v : parameter_value;
  END_ENTITY; -- point_on_surface

  ENTITY  point_replica
    SUBTYPE OF (point);
      parent_pt      : point;
      transformation : cartesian_transformation_operator;
    WHERE
      wr1: transformation.dim = parent_pt.dim;
      wr2: acyclic_point_replica(SELF,parent_pt);
  END_ENTITY; -- point_replica

  ENTITY  poly_loop
    SUBTYPE OF (loop, geometric_representation_item);
      polygon : LIST [3:?] OF UNIQUE cartesian_point;
  END_ENTITY; -- poly_loop

  ENTITY  polyline
    SUBTYPE OF (bounded_curve);
      points : LIST [2:?] OF cartesian_point;
  END_ENTITY; -- polyline

  ENTITY  position_tolerance
    SUBTYPE OF (geometric_tolerance_with_datum_reference);
    WHERE
      wr1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.
               datum_system) <= 3;
  END_ENTITY; -- position_tolerance

  ENTITY  pre_defined_item;
      name : label;
  END_ENTITY; -- pre_defined_item

  ENTITY  precision_qualifier;
      precision_value : INTEGER;
  END_ENTITY; -- precision_qualifier

  ENTITY  process_activity
    SUBTYPE OF (manufacturing_activity);
    WHERE
      wr1: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (NOT (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
                TYPEOF(it)) AND (it.name = 'process parameter')) )) >= 0)))) 
               = 0)) )) = 0;
      wr2: SIZEOF(QUERY ( cm <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION.CHOSEN_METHOD') | ((
               'PROCESS_PLANNING_SCHEMA.PROPERTY_PROCESS' IN TYPEOF(cm)) 
               AND (NOT (SIZEOF(QUERY ( ppa <* USEDIN(cm,
            'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | ((ppa.description = 'process activity part shape') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' IN TYPEOF(ppa.
               property_or_shape))) )) <= 1))) )) = 0;
      wr3: SIZEOF(QUERY ( sar <* USEDIN(SELF,
     'PROCESS_PLANNING_SCHEMA.ACTION_METHOD_RELATIONSHIP.RELATING_METHOD') |
            (('PROCESS_PLANNING_SCHEMA.DEFINING_ACTION_METHOD_RELATIONSHIP' 
               IN TYPEOF(sar)) AND ('PROCESS_PLANNING_SCHEMA.MACHINE_SETUP' 
               IN TYPEOF(sar.related_method))) )) <= 1;
      wr4: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE.USAGE') | (
               'PROCESS_PLANNING_SCHEMA.FIXTURE_ASSEMBLY' IN TYPEOF(ap)) )) 
               <= 1;
      wr5: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE.USAGE') | (
               'PROCESS_PLANNING_SCHEMA.TOOL_ASSEMBLY' IN TYPEOF(ap)) )) >=
                1;
      wr6: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               'PROCESS_PLANNING_SCHEMA.MACHINING_TOLERANCE' IN TYPEOF(ap)))) 
               <= 1;
  END_ENTITY; -- process_activity

  ENTITY  process_plan_activity
    SUPERTYPE OF (ONEOF (ancillary_setup,fixture_setup,machine_setup,
        manufacturing_activity,tool_setup))
    SUBTYPE OF (action_method);
    WHERE
      wr1 : SIZEOF(QUERY ( ap <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE.USAGE') | (ap.name 
                = 'frequency') )) <= 1;
 wr2: SIZEOF(QUERY ( adr <* USEDIN(SELF,
      'PROCESS_PLANNING_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS') | 
      (('PROCESS_PLANNING_SCHEMA.ORGANIZATION' 
      IN TYPEOF(adr.assigned_organization)) AND 
      (adr.role.name = 'activity organization id')) 
      )) = 1;
      wr3 : SIZEOF(QUERY ( ap <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
                NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                 | (NOT (SIZEOF(QUERY ( it <* apr.representation.items | ((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'special instruction')) )) >=
                 0)) )) = 0)) )) = 0;
      wr4 : (NOT
         ('PROCESS_PLANNING_SCHEMA.ACTION_METHOD_WITH_ASSOCIATED_DOCUMENTS' 
                IN TYPEOF(SELF))) OR (SIZEOF(QUERY ( adr <* SELF\
                action_method_with_associated_documents.documents | ((
                'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_SPECIFICATION' IN 
                TYPEOF(adr)) AND (adr.kind.product_data_type = 
                'supplemental documents')) )) >= 0);
      wr5 : (NOT
         ('PROCESS_PLANNING_SCHEMA.ACTION_METHOD_WITH_ASSOCIATED_DOCUMENTS' 
                IN TYPEOF(SELF))) OR (SIZEOF(QUERY ( adr <* SELF\
                action_method_with_associated_documents.documents | (
                'PROCESS_PLANNING_SCHEMA.ILLUSTRATION' IN TYPEOF(adr)) )) 
                >= 1);
      wr6 : (NOT
         ('PROCESS_PLANNING_SCHEMA.ACTION_METHOD_WITH_ASSOCIATED_DOCUMENTS' 
                IN TYPEOF(SELF))) OR (SIZEOF(QUERY ( adr <* SELF\
                action_method_with_associated_documents.documents | (
                'PROCESS_PLANNING_SCHEMA.DRAWING' IN TYPEOF(adr)) )) >= 1);
      wr7 : (NOT
         ('PROCESS_PLANNING_SCHEMA.ACTION_METHOD_WITH_ASSOCIATED_DOCUMENTS' 
                IN TYPEOF(SELF))) OR (SIZEOF(QUERY ( edi <* SELF\
                action_method_with_associated_documents.documents | (
                'PROCESS_PLANNING_SCHEMA.VIEW_REFERENCE' IN TYPEOF(edi)) )) 
                >= 1);
      wr8 : SIZEOF(QUERY ( ap <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
                SIZEOF(['PROCESS_PLANNING_SCHEMA.PRODUCTION_RATE',
                'PROCESS_PLANNING_SCHEMA.ALLOWED_TIME'] * TYPEOF(ap)) = 1))) 
                >= 1;
      wr9 : SIZEOF(QUERY ( ap <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE.USAGE') | (
                'PROCESS_PLANNING_SCHEMA.GENERIC_MANUFACTURING_RESOURCE' IN
                 TYPEOF(ap)) )) >= 0;
      wr10: SIZEOF(QUERY ( cm <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.ACTION.CHOSEN_METHOD') | ((
                'PROCESS_PLANNING_SCHEMA.PROPERTY_PROCESS' IN TYPEOF(cm)) 
                AND (NOT (SIZEOF(QUERY ( ppa <* USEDIN(cm,
            'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                 | ((ppa.description = 'process plan activity material') 
                AND ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION' IN 
                TYPEOF(ppa.property_or_shape.definition))) )) <= 1))) )) = 
                0;
      wr11: (NOT (('PROCESS_PLANNING_SCHEMA.' + 
                'ACTION_METHOD_WITH_ASSOCIATED_DOCUMENTS') IN TYPEOF(SELF))) 
                OR (SIZEOF(SELF\action_method_with_associated_documents.
                documents) >= 0);
      wr12: SIZEOF(QUERY ( ap <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
                NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
          'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                 | (NOT (SIZEOF(QUERY ( it <* apr.representation.items | ((
                ('PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
                TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN
                 TYPEOF(it\measure_with_unit.value_component))) AND (it.
                name = 'activity number')) )) >= 0)) )) = 0)) )) = 0;
  END_ENTITY; -- process_plan_activity

  ENTITY  process_plan_security
    SUBTYPE OF (security_classification);
    WHERE
      wr1: SIZEOF(QUERY ( da <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_DATE_ASSIGNMENT.ITEMS') | (
               (('PROCESS_PLANNING_SCHEMA.DATE_ASSIGNMENT' IN TYPEOF(da)) 
               AND ('PROCESS_PLANNING_SCHEMA.CALENDAR_DATE' IN TYPEOF(da.
               assigned_date))) AND (da.role.name = 'classification data')))) 
               = 1;
      wr2: SIZEOF(QUERY ( da <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_DATE_ASSIGNMENT.ITEMS') | (
               (('PROCESS_PLANNING_SCHEMA.DATE_ASSIGNMENT' IN TYPEOF(da)) 
               AND ('PROCESS_PLANNING_SCHEMA.CALENDAR_DATE' IN TYPEOF(da.
             assigned_date))) AND (da.role.name = 'declassificationdata')) )) 
               = 1;
      wr3: SIZEOF(QUERY ( ap <* USEDIN(SELF,
           'PROCESS_PLANNING_SCHEMA.SECURITY_CLASSIFICATION_ASSIGNMENT.' 
           + 'ASSIGNED_SECURITY_CLASSIFICATION') | 
     (('PROCESS_PLANNING_SCHEMA.APPLIED_SECURITY_CLASSIFICATION_ASSIGNMENT' 
           IN TYPEOF(ap)) AND (NOT (SIZEOF(QUERY ( it <* ap.items | (
           'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_ACTIVITY' IN TYPEOF(it)) )) 
           = 1))) )) = 0;
      wr4: SIZEOF(QUERY ( ap <* USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' +
   'SECURITY_CLASSIFICATION_ASSIGNMENT.ASSIGNED_SECURITY_CLASSIFICATION') |
     (('PROCESS_PLANNING_SCHEMA.APPLIED_SECURITY_CLASSIFICATION_ASSIGNMENT' 
               IN TYPEOF(ap)) AND (NOT (SIZEOF(QUERY ( it <* ap.items | (
             'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_VERSION' IN TYPEOF(it)) )) 
               <= 1))) )) = 0;
  END_ENTITY; -- process_plan_security

  ENTITY  process_plan_specification
    SUBTYPE OF (document);
    WHERE
      wr1: SIZEOF(QUERY ( duc <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.DOCUMENT_USAGE_CONSTRAINT.SOURCE')
                | (duc.subject_element = 'revision') )) = 1;
      wr2: SIZEOF(QUERY ( duc <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.DOCUMENT_USAGE_CONSTRAINT.SOURCE')
                | (duc.subject_element = 'subclass') )) = 1;
  END_ENTITY; -- process_plan_specification

  ENTITY  process_plan_version
    SUBTYPE OF (product_definition_process);
    WHERE
      wr1: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (ap.
               description = 'manufacturing gt code') )) <= 1;
      wr2: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (NOT (SIZEOF(QUERY ( it <* apr.representation.items | (((
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN 
               TYPEOF(it\measure_with_unit.value_component))) AND (it.name 
               = 'quantity of parts')) )) >= 0)) )) = 0)) )) = 0;
      wr3: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (NOT (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
               TYPEOF(it)) AND (it.name = 'special instruction')) )) >=0)) )) 
               = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               NOT (SIZEOF(QUERY ( apr <* USEDIN(ap,
        'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (NOT (SIZEOF(QUERY ( it <* apr.representation.items | (it
               .name = 'auxilary header') )) >= 0)) )) = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY.DEFINITION') | (
               'PROCESS_PLANNING_SCHEMA.RANGE_OF_PARTS' IN TYPEOF(ap)) )) 
               <= 1;
      wr6: SIZEOF(QUERY ( ppp <* USEDIN(SELF,
              'PROCESS_PLANNING_SCHEMA.PROCESS_PRODUCT_ASSOCIATION.PROCESS')
                | (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION' IN TYPEOF(
               ppp.defined_product)) AND (ppp.defined_product.name = 
               'material')) )) <= 1;
      wr7: 'PROCESS_PLANNING_SCHEMA.MANUFACTURING_PROCESS' IN TYPEOF(SELF.
               chosen_method);
      wr8: SIZEOF(QUERY ( amr <* USEDIN(SELF.chosen_method,
     'PROCESS_PLANNING_SCHEMA.ACTION_METHOD_RELATIONSHIP.RELATING_METHOD') |
              (('PROCESS_PLANNING_SCHEMA.MANUFACTURING_PROCESS_RELATIONSHIP' 
               IN TYPEOF(amr)) AND (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MACHINING_OPERATION',
               'PROCESS_PLANNING_SCHEMA.NON_MACHINING_PROCESS'] * TYPEOF(
               amr.related_method)) = 1)) )) = 1;
      wr9: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_ASSIGNMENT.ASSIGNED_ACTION')
                | (('PROCESS_PLANNING_SCHEMA.APPLIED_ACTION_ASSIGNMENT' IN 
               TYPEOF(ap)) AND (NOT (SIZEOF(QUERY ( it <* ap.items | (
               'PROCESS_PLANNING_SCHEMA.FEATURE_DEPENDENCY' IN TYPEOF(it)))) 
               <= 1))) )) = 0;
  END_ENTITY; -- process_plan_version

  ENTITY  process_product_association;
      name            : label;
      description     : text;
      defined_product : characterized_product_definition;
      process         : product_definition_process;
  END_ENTITY; -- process_product_association

  ENTITY  process_property_association;
      name              : label;
      description       : text;
      process           : property_process;
      property_or_shape : property_or_shape_select;
  END_ENTITY; -- process_property_association

  ENTITY  product;
      id                 : identifier;
      name               : label;
      description        : OPTIONAL text;
      frame_of_reference : SET [1:?] OF product_context;
  END_ENTITY; -- product

  ENTITY  product_category;
      name        : label;
      description : OPTIONAL text;
    DERIVE
      id : identifier := get_id_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
  END_ENTITY; -- product_category

  ENTITY  product_context
    SUBTYPE OF (application_context_element);
      discipline_type : label;
  END_ENTITY; -- product_context

  ENTITY  product_definition;
      id                 : identifier;
      description        : OPTIONAL text;
      formation          : product_definition_formation;
      frame_of_reference : product_definition_context;
    DERIVE
      name : label := get_name_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
  END_ENTITY; -- product_definition

  ENTITY  product_definition_context
    SUBTYPE OF (application_context_element);
      life_cycle_stage : label;
  END_ENTITY; -- product_definition_context

  ENTITY  product_definition_effectivity
    SUBTYPE OF (effectivity);
      usage : product_definition_relationship;
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'EFFECTIVITY_ASSIGNMENT.ASSIGNED_EFFECTIVITY')) = 0;
  END_ENTITY; -- product_definition_effectivity

  ENTITY  product_definition_formation;
      id          : identifier;
      description : OPTIONAL text;
      of_product  : product;
    UNIQUE
      ur1 : id, of_product;
  END_ENTITY; -- product_definition_formation

  ENTITY  product_definition_process
    SUBTYPE OF (action);
      identification : identifier;
    INVERSE
      product_definitions : SET [1:?] OF process_product_association FOR 
                               process;
  END_ENTITY; -- product_definition_process

  ENTITY  product_definition_relationship;
      id                          : identifier;
      name                        : label;
      description                 : OPTIONAL text;
      relating_product_definition : product_definition;
      related_product_definition  : product_definition;
  END_ENTITY; -- product_definition_relationship

  ENTITY  product_definition_shape
    SUBTYPE OF (property_definition);
    UNIQUE
      ur1 : definition;
    WHERE
      wr1: SIZEOF([
               'PROCESS_PLANNING_SCHEMA.CHARACTERIZED_PRODUCT_DEFINITION',
               'PROCESS_PLANNING_SCHEMA.CHARACTERIZED_OBJECT'] * TYPEOF(
               SELF\property_definition.definition)) > 0;
  END_ENTITY; -- product_definition_shape

  ENTITY  product_definition_usage
    SUPERTYPE OF (ONEOF (make_from_usage_option,assembly_component_usage))
    SUBTYPE OF (product_definition_relationship);
    UNIQUE
      ur1 : id, relating_product_definition, related_product_definition;
    WHERE
      wr1: acyclic_product_definition_relationship(SELF,[SELF\
               product_definition_relationship.related_product_definition],
               'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_USAGE');
  END_ENTITY; -- product_definition_usage

  ENTITY  product_definition_with_associated_documents
    SUBTYPE OF (product_definition);
      documentation_ids : SET [1:?] OF document;
  END_ENTITY; -- product_definition_with_associated_documents

  ENTITY  product_related_product_category
    SUBTYPE OF (product_category);
      products : SET [1:?] OF product;
  END_ENTITY; -- product_related_product_category

  ENTITY  production_rate
    SUBTYPE OF (action_property);
    WHERE
      wr1: SIZEOF(QUERY ( apr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.TIME_MEASURE_WITH_UNIT'] * TYPEOF(
               it)) = 2) AND (it.name = 'time per unit')) )) = 1) )) = 1;
      wr2: SIZEOF(QUERY ( apr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(it)) AND (it.name = 'unit quantity')) )) = 1) )) = 1;
      wr3: SIZEOF(QUERY ( apr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( it <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
                TYPEOF(it)) AND (it.name = 'production rate source')) )) = 
               1) )) = 1;
  END_ENTITY; -- production_rate

  ENTITY  profile_floor
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1 : 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
                TYPEOF(SELF.of_shape.definition);
      wr2 : SELF.description IN ['planar','complex','through'];
      wr3 : (NOT (SELF.description IN ['planar','complex'])) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) )) = 1)) )) = 0);
      wr4 : (NOT (SELF.description IN ['planar','complex'])) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | ((NOT (SIZEOF(impl_rep.
                used_representation.items) >= 1)) AND (SIZEOF(impl_rep.
                used_representation.items) <= 2)) )) = 0)) )) = 0);
      wr5 : (NOT (SELF.description = 'through')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) )) = 0)) )) = 0);
      wr6 : (NOT (SELF.description IN ['planar','complex'])) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'radius')) )) = 1)) )) =0)) )) 
                = 0);
      wr7 : SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATING_SHAPE_ASPECT') | ((sar.description = 
                'profile floor usage') AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | ((
                'PROCESS_PLANNING_SCHEMA.OUTSIDE_PROFILE' IN TYPEOF(fcr.
                related_shape_aspect.of_shape.definition)) AND (
                'PROCESS_PLANNING_SCHEMA.PROFILE_FLOOR' IN TYPEOF(fcr.
                relating_shape_aspect))) )) >= 1;
      wr8 : (NOT (SELF.description IN ['planar','complex'])) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 
                'shape profile floor orientation')) AND (it.description IN 
                ['shape profile start','shape profile end'])) )) = 1)) )) =
                 0)) )) = 0);
      wr9 : (NOT (SELF.description = 'complex')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
                TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'floor')) )) = 1)) )) = 1);
      wr10: (NOT (SELF.description = 'planar')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
                TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'floor')) )) = 1)) )) = 1);
  END_ENTITY; -- profile_floor

  ENTITY  projected_zone_definition
    SUBTYPE OF (tolerance_zone_definition);
      projection_end   : shape_aspect;
      projected_length : measure_with_unit;
    WHERE
      wr1: projected_length.value_component > 0;
  END_ENTITY; -- projected_zone_definition

  ENTITY  property_definition;
      name        : label;
      description : OPTIONAL text;
      definition  : characterized_definition;
    DERIVE
      id : identifier := get_id_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
  END_ENTITY; -- property_definition

  ENTITY  property_definition_relationship;
      name                         : label;
      description                  : text;
      relating_property_definition : property_definition;
      related_property_definition  : property_definition;
  END_ENTITY; -- property_definition_relationship

  ENTITY  property_definition_representation;
      definition          : represented_definition;
      used_representation : representation;
    DERIVE
      description : text := get_description_value(SELF);
      name        : label := get_name_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
      wr2: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
  END_ENTITY; -- property_definition_representation

  ENTITY  property_process
    SUBTYPE OF (action);
      identification : identifier;
    INVERSE
      properties : SET [1:?] OF process_property_association FOR process;
  END_ENTITY; -- property_process

  ENTITY  protrusion
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 1)) )) = 0)) )) = 0;
      wr2: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'shape volume occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'volume shape usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (sdr.relating_shape_aspect.description = 
               'volume shape') )) = 1)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
               SELF) |
               (('PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' 
               IN TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'maximum feature limit')) )) <=1;
  END_ENTITY; -- protrusion

  ENTITY  qualified_representation_item
    SUBTYPE OF (representation_item);
      qualifiers : SET [1:?] OF value_qualifier;
    WHERE
      wr1: SIZEOF(QUERY ( temp <* qualifiers | (
            'PROCESS_PLANNING_SCHEMA.PRECISION_QUALIFIER' IN TYPEOF(temp)) )) 
               < 2;
  END_ENTITY; -- qualified_representation_item

  ENTITY  quasi_uniform_curve
    SUBTYPE OF (b_spline_curve);
  END_ENTITY; -- quasi_uniform_curve

  ENTITY  quasi_uniform_surface
    SUBTYPE OF (b_spline_surface);
  END_ENTITY; -- quasi_uniform_surface

  ENTITY  range_of_parts
    SUBTYPE OF (action_property);
    WHERE
      wr1: SIZEOF(QUERY ( apr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( rep <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(rep)) AND (rep.name = 'low value')) )) = 1) )) = 1;
      wr2: SIZEOF(QUERY ( apr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY')
                | (SIZEOF(QUERY ( rep <* apr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(rep)) AND (rep.name = 'high value')) )) = 1) )) = 1;
  END_ENTITY; -- range_of_parts

  ENTITY  ratio_measure_with_unit
    SUBTYPE OF (measure_with_unit);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.RATIO_UNIT' IN TYPEOF(SELF\
               measure_with_unit.unit_component);
  END_ENTITY; -- ratio_measure_with_unit

  ENTITY  ratio_unit
    SUBTYPE OF (named_unit);
    WHERE
      wr1: ((((((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF
               \named_unit.dimensions.mass_exponent = 0)) AND (SELF\
               named_unit.dimensions.time_exponent = 0)) AND (SELF\
               named_unit.dimensions.electric_current_exponent = 0)) AND (
               SELF\named_unit.dimensions.
               thermodynamic_temperature_exponent = 0)) AND (SELF\
               named_unit.dimensions.amount_of_substance_exponent = 0)) AND
                (SELF\named_unit.dimensions.luminous_intensity_exponent =0);
  END_ENTITY; -- ratio_unit

  ENTITY  rational_b_spline_curve
    SUBTYPE OF (b_spline_curve);
      weights_data : LIST [2:?] OF REAL;
    DERIVE
      weights : ARRAY [0:upper_index_on_control_points] OF REAL := 
                   list_to_array(weights_data,0,
                   upper_index_on_control_points);
    WHERE
      wr1: SIZEOF(weights_data) = SIZEOF(SELF\b_spline_curve.
               control_points_list);
      wr2: curve_weights_positive(SELF);
  END_ENTITY; -- rational_b_spline_curve

  ENTITY  rational_b_spline_surface
    SUBTYPE OF (b_spline_surface);
      weights_data : LIST [2:?] OF LIST [2:?] OF REAL;
    DERIVE
      weights : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF REAL := 
                   make_array_of_array(weights_data,0,u_upper,0,v_upper);
    WHERE
      wr1: (SIZEOF(weights_data) = SIZEOF(SELF\b_spline_surface.
               control_points_list)) AND (SIZEOF(weights_data[1]) = SIZEOF(
               SELF\b_spline_surface.control_points_list[1]));
      wr2: surface_weights_positive(SELF);
  END_ENTITY; -- rational_b_spline_surface

  ENTITY  rectangular_closed_profile
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT ((SIZEOF(impl_rep.
               used_representation.items) >= 3) AND (SIZEOF(impl_rep.
               used_representation.items) <= 4))) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION.DEFINITION') | (SIZEOF(QUERY ( pdr <* 
               USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
           (('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(
               QUERY ( srwp_i <* pdr.used_representation.items | ((((srwp_i
               .name = 'orientation') OR (srwp_i.name = 'length')) OR (
               srwp_i.name = 'width')) OR (srwp_i.name = 'corner radius')))) 
               = SIZEOF(pdr.used_representation.items))) )) = 1) )) = 1;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr6: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'width')) )) = 1)) )) = 0)))) 
               = 0;
      wr7: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'length')) )) = 1)) )) = 0)))) 
               = 0;
      wr8: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'corner radius')) )) <= 1)))) 
               = 0)) )) = 0;
  END_ENTITY; -- rectangular_closed_profile

  ENTITY  rectangular_composite_surface
    SUBTYPE OF (bounded_surface);
      segments : LIST [1:?] OF LIST [1:?] OF surface_patch;
    DERIVE
      n_u : INTEGER := SIZEOF(segments);
      n_v : INTEGER := SIZEOF(segments[1]);
    WHERE
      wr1: SIZEOF(QUERY ( s <* segments | (n_v <> SIZEOF(s)) )) = 0;
      wr2: constraints_rectangular_composite_surface(SELF);
  END_ENTITY; -- rectangular_composite_surface

  ENTITY  rectangular_pattern
    SUBTYPE OF (replicate_feature);
    WHERE
      wr1 : SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATING_SHAPE_ASPECT') | (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar)) ) | ('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' 
                IN TYPEOF(sdr.related_shape_aspect)) )) = 1) )) <= 5)) )) =
                 0;
      wr2 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN
                 TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'row layout direction')) )) =1)) )) 
                = 0;
      wr3 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN
                 TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'column layout direction')) )) =
                 1)) )) = 0;
      wr4 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.' + 
                'DEFINITION') | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) )) = 1)) )) = 0;
      wr5 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(impl_rep.
                used_representation.items) = 5)) )) = 0)) )) = 0;
      wr6 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
                TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN
                 TYPEOF(it\measure_with_unit.value_component))) AND (it.
                name = 'number of rows')) )) = 1)) )) = 0)) )) = 0;
      wr7 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
                TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN
                 TYPEOF(it\measure_with_unit.value_component))) AND (it.
                name = 'number of columns')) )) = 1)) )) = 0)) )) = 0;
      wr8 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'row spacing')) )) = 1)) )) 
                = 0)) )) = 0;
      wr9 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'column spacing')) )) = 1)))) 
                = 0)) )) = 0;
      wr10: SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
                name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
  END_ENTITY; -- rectangular_pattern
  ENTITY  rectangular_trimmed_surface
    SUBTYPE OF (bounded_surface);
      basis_surface : surface;
      u1            : parameter_value;
      u2            : parameter_value;
      v1            : parameter_value;
      v2            : parameter_value;
      usense        : BOOLEAN;
      vsense        : BOOLEAN;
    WHERE
      wr1: u1 <> u2;
      wr2: v1 <> v2;
      wr3: ((('PROCESS_PLANNING_SCHEMA.ELEMENTARY_SURFACE' IN TYPEOF(
               basis_surface)) AND (NOT ('PROCESS_PLANNING_SCHEMA.PLANE' IN
                TYPEOF(basis_surface)))) OR (
               'PROCESS_PLANNING_SCHEMA.SURFACE_OF_REVOLUTION' IN TYPEOF(
               basis_surface))) OR (usense = (u2 > u1));
      wr4: (('PROCESS_PLANNING_SCHEMA.SPHERICAL_SURFACE' IN TYPEOF(
               basis_surface)) OR (
               'PROCESS_PLANNING_SCHEMA.TOROIDAL_SURFACE' IN TYPEOF(
               basis_surface))) OR (vsense = (v2 > v1));
  END_ENTITY; -- rectangular_trimmed_surface

  ENTITY  referenced_modified_datum
    SUBTYPE OF (datum_reference);
      modifier : limit_condition;
  END_ENTITY; -- referenced_modified_datum

  ENTITY  relationship_condition;
      name                     : label;
      applicable_relationships : SET [1:?] OF relationship_with_condition;
      condition_description    : text;
  END_ENTITY; -- relationship_condition

  ENTITY  removal_volume
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 1)) )) = 0)) )) = 0;
      wr2: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'shape volume occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'volume shape usage') AND (('PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_DEFINING_RELATIONSHIP') IN TYPEOF(sar))) ) | (sdr.
               relating_shape_aspect.description = 'volume shape') )) = 1)))) 
               = 1)) )) = 0;
  END_ENTITY; -- removal_volume

  ENTITY  reparametrised_composite_curve_segment
    SUBTYPE OF (composite_curve_segment);
      param_length : parameter_value;
    WHERE
      wr1: param_length > 0;
  END_ENTITY; -- reparametrised_composite_curve_segment

  ENTITY  replicate_feature
    SUPERTYPE OF (ONEOF (circular_pattern,rectangular_pattern,
        feature_pattern))
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr2: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT') | (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) ) | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.REPLICATE_FEATURE',
               'PROCESS_PLANNING_SCHEMA.INSTANCED_FEATURE'] * TYPEOF(fcr.
             related_shape_aspect)) >= 1) AND (fcr.name = 'patternbasis')) )) 
               = 1;
      wr3: (SIZEOF(QUERY ( sar <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT') | (NOT (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar))) )) + SIZEOF(QUERY ( sar <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | (NOT (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar))) ))) = 0;
  END_ENTITY; -- replicate_feature

  ENTITY  representation;
      name             : label;
      items            : SET [1:?] OF representation_item;
      context_of_items : representation_context;
    DERIVE
      id          : identifier := get_id_value(SELF);
      description : text := get_description_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
      wr2: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
  END_ENTITY; -- representation

  ENTITY  representation_context;
      context_identifier : identifier;
      context_type       : text;
    INVERSE
      representations_in_context : SET [1:?] OF representation FOR 
                                      context_of_items;
  END_ENTITY; -- representation_context
  ENTITY  representation_item;
      name : label;
    WHERE
      wr1: SIZEOF(using_representations(SELF)) > 0;
  END_ENTITY; -- representation_item

  ENTITY  representation_map;
      mapping_origin        : representation_item;
      mapped_representation : representation;
    INVERSE
      map_usage : SET [1:?] OF mapped_item FOR mapping_source;
    WHERE
      wr1: item_in_context(SELF.mapping_origin,SELF.mapped_representation.
               context_of_items);
  END_ENTITY; -- representation_map

  ENTITY  requirement_for_action_resource
    SUBTYPE OF (action_resource_requirement);
      resources : SET [1:?] OF action_resource;
  END_ENTITY; -- requirement_for_action_resource

  ENTITY  resource_property;
      name        : label;
      description : text;
      resource    : characterized_resource_definition;
  END_ENTITY; -- resource_property

  ENTITY  resource_property_representation;
      name           : label;
      description    : text;
      property       : resource_property;
      representation : representation;
  END_ENTITY; -- resource_property_representation

  ENTITY  resource_requirement_type;
      name        : label;
      description : text;
  END_ENTITY; -- resource_requirement_type

  ENTITY  resource_with_material
    SUBTYPE OF (generic_manufacturing_resource);
    WHERE
      wr1: NOT (SIZEOF(QUERY ( arr <* QUERY ( ar <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES')
                | ('PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT' IN
                TYPEOF(ar)) ) | (NOT (SIZEOF(QUERY ( pdp_imp <* 
               QUERY ( pdp <* arr.operations | (
               'PROCESS_PLANNING_SCHEMA.PROPERTY_PROCESS' IN TYPEOF(pdp)) )
                | (SIZEOF(QUERY ( ppa <* USEDIN(pdp_imp,
            'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | ((('PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION' IN 
               TYPEOF(ppa.property_or_shape)) AND (ppa.description = 
               'resource material')) AND (
               'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION' IN TYPEOF(ppa.
               property_or_shape.definition))) )) = 1) )) = 0)) )) = 0);
  END_ENTITY; -- resource_with_material

  ENTITY  resource_with_representation
    SUBTYPE OF (generic_manufacturing_resource);
    WHERE
      wr1: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
               SIZEOF(QUERY ( rpr <* USEDIN(ap,
      'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY') |
('PROCESS_PLANNING_SCHEMA.EXTERNALLY_DEFINED_REPRESENTATION_WITH_PARAMETERS' 
               IN TYPEOF(rpr.representation)) )) = 1) )) = 0);
  END_ENTITY; -- resource_with_representation

  ENTITY  revision
    SUBTYPE OF (action_relationship);
    WHERE
      wr1: SIZEOF(QUERY ( rc <* USEDIN(SELF,
  'PROCESS_PLANNING_SCHEMA.RELATIONSHIP_CONDITION.APPLICABLE_RELATIONSHIPS')
                | (rc.name = 'reason for revision') )) = 1;
      wr2: SIZEOF(QUERY ( ars <* USEDIN(SELF.related_action.chosen_method,
               'PROCESS_PLANNING_SCHEMA.ACTION_REQUEST_SOLUTION.METHOD') | 
               (('PROCESS_PLANNING_SCHEMA.VERSIONED_ACTION_REQUEST' IN 
               TYPEOF(ars.request)) AND (ars.request.description = 
               'revision level')) )) = 1;
      wr3: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_APPROVAL_ASSIGNMENT.ITEMS')
                | ('PROCESS_PLANNING_SCHEMA.APPROVAL' IN TYPEOF(adr.
               assigned_approval)) )) >= 1;
      wr4: ('PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_VERSION' IN TYPEOF(SELF.
               related_action)) AND (
               'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_VERSION' IN TYPEOF(
               SELF.relating_action));
  END_ENTITY; -- revision

  ENTITY  revolved_profile
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SELF\characterized_object.description IN ['groove','flat',
               'round','open profile'];
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 2)) )) = 0)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'radius')) )) = 1)) )) = 0)))) 
               = 0;
      wr4: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
               SELF) |
               (('PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' 
               IN TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'removal direction')) )) = 1;
      wr5: (NOT (SELF\characterized_object.description = 'open profile')) 
               OR (SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'outer edge shape occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | ((
               'PROCESS_PLANNING_SCHEMA.OPEN_PATH_PROFILE' IN TYPEOF(sdr.
               relating_shape_aspect)) AND (sdr.relating_shape_aspect.
               description = 'outer edge shape')) )) = 1)) )) = 1)) )) =0);
      wr6: (NOT (SELF\characterized_object.description = 'flat')) OR (
               SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'flat edge shape occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (('PROCESS_PLANNING_SCHEMA.LINEAR_PROFILE' 
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
               relating_shape_aspect.description = 'flat edge shape')) )) =
                1)) )) = 1)) )) = 0);
      wr7: (NOT (SELF\characterized_object.description = 'round')) OR (
               SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'rounded edge shape occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | ((
               'PROCESS_PLANNING_SCHEMA.PARTIAL_CIRCULAR_PROFILE' IN 
               TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
               relating_shape_aspect.description = 'rounded edge shape')))) 
               = 1)) )) = 1)) )) = 0);
      wr8: (NOT (SELF\characterized_object.description = 'groove')) OR (
               SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'sweep occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.SQUARE_U_PROFILE',
               'PROCESS_PLANNING_SCHEMA.PARTIAL_CIRCULAR_PROFILE',
               'PROCESS_PLANNING_SCHEMA.ROUNDED_U_PROFILE',
               'PROCESS_PLANNING_SCHEMA.VEE_PROFILE',
               'PROCESS_PLANNING_SCHEMA.TEE_PROFILE',
               'PROCESS_PLANNING_SCHEMA.OPEN_PATH_PROFILE'] * TYPEOF(sdr.
               relating_shape_aspect)) = 1) AND (sdr.relating_shape_aspect.
               description = 'sweep')) )) = 1)) )) = 1)) )) = 0);
      wr9: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
               SELF) |
               (('PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' 
               IN TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'maximum feature limit')) )) <=1;
  END_ENTITY; -- revolved_profile

  ENTITY  rib_top
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'rib top condition occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'rib top usage') AND (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (('PROCESS_PLANNING_SCHEMA.RIB_TOP_FLOOR' 
               IN TYPEOF(sdr.relating_shape_aspect)) AND (
               'PROCESS_PLANNING_SCHEMA.RIB_TOP' IN TYPEOF(sdr.
              related_shape_aspect.of_shape.definition))) )) = 1)) )) =1)) )) 
               = 0;
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'removal direction')) )) = 1)) )) 
               = 1;
      wr3: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
               SELF) |
                (('PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' 
               IN TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'maximum feature limit')) )) <=1;
  END_ENTITY; -- rib_top

  ENTITY  rib_top_floor
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SELF.description IN ['planar','complex'];
      wr3: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATING_SHAPE_ASPECT') | ((sar.description = 
               'rib top usage') AND (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (((fcr.related_shape_aspect.description = 
               'rib top condition occurrence') AND (
               'PROCESS_PLANNING_SCHEMA.RIB_TOP' IN TYPEOF(fcr.
               related_shape_aspect.of_shape.definition))) AND (
               'PROCESS_PLANNING_SCHEMA.RIB_TOP_FLOOR' IN TYPEOF(fcr.
               relating_shape_aspect))) )) >= 1;
      wr4: (NOT (SELF.description = 'complex')) OR (SIZEOF(QUERY ( pd <* 
               USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'rib top face')) )) = 1)) )) =0);
      wr5: (NOT (SELF.description = 'planar')) OR (SIZEOF(QUERY ( pd <* 
               USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'rib top face')) )) = 1)) )) =0);
      wr6: (NOT (SELF.description = 'planar')) OR (SIZEOF(QUERY ( pds <* 
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'boundary occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.CIRCULAR_CLOSED_PROFILE',
               'PROCESS_PLANNING_SCHEMA.NGON_CLOSED_PROFILE',
               'PROCESS_PLANNING_SCHEMA.RECTANGULAR_CLOSED_PROFILE',
               'PROCESS_PLANNING_SCHEMA.CLOSED_PATH_PROFILE'] * TYPEOF(sdr.
               relating_shape_aspect)) = 1) AND (sdr.relating_shape_aspect.
               description = 'rib top floor boundary')) )) = 1)) )) = 1)))) 
               = 0);
  END_ENTITY; -- rib_top_floor

  ENTITY  role_association;
      role           : object_role;
      item_with_role : role_select;
  END_ENTITY; -- role_association

  ENTITY  round_hole
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'diameter occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | ((
               'PROCESS_PLANNING_SCHEMA.CIRCULAR_CLOSED_PROFILE' IN TYPEOF(
               sdr.relating_shape_aspect)) AND (sdr.name = 'diameter')) )) 
               = 1)) )) = 1)) )) = 0;
      wr2: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'hole depth occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'path feature component usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (((
               'PROCESS_PLANNING_SCHEMA.PATH_FEATURE_COMPONENT' IN TYPEOF(
               sdr.relating_shape_aspect)) AND (sdr.name = 'hole depth')) 
               AND (sdr.relating_shape_aspect.description = 'linear')) )) =
                1)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'bottom condition occurrence') AND (SIZEOF(
               QUERY ( fcr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'hole bottom usage') AND (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (('PROCESS_PLANNING_SCHEMA.HOLE_BOTTOM' IN
                TYPEOF(fcr.relating_shape_aspect)) AND (
               'PROCESS_PLANNING_SCHEMA.ROUND_HOLE' IN TYPEOF(fcr.
              related_shape_aspect.of_shape.definition))) )) = 1)) )) =1)) )) 
               = 0;
      wr4: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'change in diameter occurrence') AND (SIZEOF(
               QUERY ( fcr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 'taper usage') 
               AND (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (('PROCESS_PLANNING_SCHEMA.TAPER' IN 
               TYPEOF(fcr.relating_shape_aspect)) AND (
               'PROCESS_PLANNING_SCHEMA.ROUND_HOLE' IN TYPEOF(fcr.
             related_shape_aspect.of_shape.definition))) )) = 1)) )) <=1)) )) 
               = 0;
      wr5: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
               SELF) |
            ('PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
               IN TYPEOF(pdr.used_representation)) )) = 1;
  END_ENTITY; -- round_hole
  ENTITY  rounded_end
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 1)) )) = 0)) )) = 0;
      wr2: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'partial circular boundary occurrence') AND (
               SIZEOF(QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (
               'PROCESS_PLANNING_SCHEMA.PARTIAL_CIRCULAR_PROFILE' IN 
               TYPEOF(sdr.relating_shape_aspect)) )) = 1)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'course of travel occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'path feature component usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | ((
               'PROCESS_PLANNING_SCHEMA.PATH_FEATURE_COMPONENT' IN TYPEOF(
               sdr.relating_shape_aspect)) AND (sdr.relating_shape_aspect.
               description = 'linear')) )) = 1)) )) = 1)) )) = 0;
      wr4: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
               SELF) |
               (('PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' 
               IN TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'maximum feature limit')) )) <=1;
  END_ENTITY; -- rounded_end

  ENTITY  rounded_u_profile
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 2)) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'width')) )) = 1)) )) = 0)))) 
               = 0;
      wr6: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'profile limit')) )) <= 1)) )) = 0;
  END_ENTITY; -- rounded_u_profile

  ENTITY  roundness_tolerance
    SUBTYPE OF (geometric_tolerance);
    WHERE
      wr1: NOT (('PROCESS_PLANNING_SCHEMA.' + 
               'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE') IN
TYPEOF(SELF));
  END_ENTITY; -- roundness_tolerance

  ENTITY  runout_zone_definition
    SUBTYPE OF (tolerance_zone_definition);
      orientation : runout_zone_orientation;
  END_ENTITY; -- runout_zone_definition

  ENTITY  runout_zone_orientation;
      angle : measure_with_unit;
  END_ENTITY; -- runout_zone_orientation

  ENTITY  runout_zone_orientation_reference_direction
    SUBTYPE OF (runout_zone_orientation);
      orientation_defining_relationship : shape_aspect_relationship;
  END_ENTITY; -- runout_zone_orientation_reference_direction

  ENTITY  seam_curve
    SUBTYPE OF (surface_curve);
    WHERE
      wr1: SIZEOF(SELF\surface_curve.associated_geometry) = 2;
      wr2: associated_surface(SELF\surface_curve.associated_geometry[1]) =
               associated_surface(SELF\surface_curve.associated_geometry[2]);
      wr3: 'PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(SELF\surface_curve.
               associated_geometry[1]);
      wr4: 'PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(SELF\surface_curve.
               associated_geometry[2]);
  END_ENTITY; -- seam_curve

  ENTITY  security_classification;
      name           : label;
      purpose        : text;
      security_level : security_classification_level;
  END_ENTITY; -- security_classification

  ENTITY  security_classification_assignment
    ABSTRACT SUPERTYPE;
      assigned_security_classification : security_classification;
    DERIVE
      role : object_role := get_role(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
  END_ENTITY; -- security_classification_assignment

  ENTITY  security_classification_level;
      name : label;
  END_ENTITY; -- security_classification_level

  ENTITY  sequential_method
    SUBTYPE OF (serial_action_method);
      sequence_position : count_measure;
  END_ENTITY; -- sequential_method

  ENTITY  serial_action_method
    SUBTYPE OF (action_method_relationship);
  END_ENTITY; -- serial_action_method

  ENTITY  shape_aspect;
      name                 : label;
      description          : OPTIONAL text;
      of_shape             : product_definition_shape;
      product_definitional : LOGICAL;
    DERIVE
      id : identifier := get_id_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
  END_ENTITY; -- shape_aspect

  ENTITY  shape_aspect_deriving_relationship
    SUBTYPE OF (shape_aspect_relationship);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.DERIVED_SHAPE_ASPECT' IN TYPEOF(SELF\
               shape_aspect_relationship.relating_shape_aspect);
  END_ENTITY; -- shape_aspect_deriving_relationship

  ENTITY  shape_aspect_relationship;
      name                  : label;
      description           : OPTIONAL text;
      relating_shape_aspect : shape_aspect;
      related_shape_aspect  : shape_aspect;
    DERIVE
      id : identifier := get_id_value(SELF);
    WHERE
      wr1: SIZEOF(USEDIN(SELF,'PROCESS_PLANNING_SCHEMA.' + 
               'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
  END_ENTITY; -- shape_aspect_relationship

  ENTITY  shape_defining_relationship
    SUBTYPE OF (shape_aspect_relationship);
  END_ENTITY; -- shape_defining_relationship

  ENTITY shape_definition_representation
    SUBTYPE OF (property_definition_representation);
    WHERE
      wr1: ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
               SELF.definition)) OR (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINITION' IN TYPEOF(SELF.
               definition.definition));
      wr2: 'PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION' IN TYPEOF(SELF.
               used_representation);
  END_ENTITY; -- shape_definition_representation

  ENTITY  shape_dimension_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(QUERY ( temp <* SELF.items | (NOT (
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(temp))) )) = 0;
      wr2: SIZEOF(SELF.items) <= 2;
      wr3: SIZEOF(QUERY ( pos_mri <* QUERY ( real_mri <* SELF.items | (
               'REAL' IN TYPEOF(real_mri\measure_with_unit.value_component)) )
                | (NOT (pos_mri\measure_with_unit.value_component > 0)) )) 
               = 0;
  END_ENTITY; -- shape_dimension_representation

  ENTITY  shape_representation
    SUBTYPE OF (representation);
  END_ENTITY; -- shape_representation

  ENTITY  shape_representation_with_parameters
    SUBTYPE OF (shape_representation);
    WHERE
      wr1: SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.PLACEMENT',
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'] *
                TYPEOF(it)) = 1)) )) = 0;
  END_ENTITY; -- shape_representation_with_parameters

  ENTITY  shell_based_surface_model
    SUBTYPE OF (geometric_representation_item);
      sbsm_boundary : SET [1:?] OF shell;
    WHERE
      wr1: constraints_geometry_shell_based_surface_model(SELF);
  END_ENTITY; -- shell_based_surface_model

  ENTITY  shell_based_wireframe_model
    SUBTYPE OF (geometric_representation_item);
      sbwm_boundary : SET [1:?] OF shell;
    WHERE
      wr1: constraints_geometry_shell_based_wireframe_model(SELF);
  END_ENTITY; -- shell_based_wireframe_model

  ENTITY  shell_based_wireframe_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      wr1 : SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL',
                'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM',
                'PROCESS_PLANNING_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) 
                = 1)) )) = 0;
      wr2 : SIZEOF(QUERY ( it <* SELF.items | (SIZEOF([
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL',
                'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1))) 
                >= 1;
      wr3 : SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* 
                sbwm\shell_based_wireframe_model.sbwm_boundary | (
                'PROCESS_PLANNING_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (
                NOT (SIZEOF(QUERY ( eloop <* QUERY ( wsb <* ws\wire_shell.
                wire_shell_extent | ('PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN
                 TYPEOF(wsb)) ) | (NOT (SIZEOF(QUERY ( el <* eloop\path.
                edge_list | (NOT ('PROCESS_PLANNING_SCHEMA.EDGE_CURVE' IN 
                TYPEOF(el.edge_element))) )) = 0)) )) = 0)) )) = 0)) )) =0;
      wr4 : SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* 
                sbwm\shell_based_wireframe_model.sbwm_boundary | (
                'PROCESS_PLANNING_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (
                NOT (SIZEOF(QUERY ( eloop <* QUERY ( wsb <* ws\wire_shell.
                wire_shell_extent | ('PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN
                 TYPEOF(wsb)) ) | (NOT (SIZEOF(QUERY ( pline_el <* 
                QUERY ( el <* eloop\path.edge_list | (
                'PROCESS_PLANNING_SCHEMA.POLYLINE' IN TYPEOF(el.
                edge_element\edge_curve.edge_geometry)) ) | (NOT (SIZEOF(
                pline_el.edge_element\edge_curve.edge_geometry\polyline.
                points) > 2)) )) = 0)) )) = 0)) )) = 0)) )) = 0;
      wr5 : SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* 
                sbwm\shell_based_wireframe_model.sbwm_boundary | (
                'PROCESS_PLANNING_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (
                NOT (SIZEOF(QUERY ( eloop <* QUERY ( wsb <* ws\wire_shell.
                wire_shell_extent | ('PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN
                 TYPEOF(wsb)) ) | (NOT (SIZEOF(QUERY ( el <* eloop\path.
                edge_list | (NOT valid_wireframe_edge_curve(el.edge_element
                \edge_curve.edge_geometry)) )) = 0)) )) = 0)) )) = 0)) )) =
                 0;
      wr6 : SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* 
                sbwm\shell_based_wireframe_model.sbwm_boundary | (
                'PROCESS_PLANNING_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (
                NOT (SIZEOF(QUERY ( eloop <* QUERY ( wsb <* ws\wire_shell.
                wire_shell_extent | ('PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN
                 TYPEOF(wsb)) ) | (NOT (SIZEOF(QUERY ( el <* eloop\path.
                edge_list | (NOT (('PROCESS_PLANNING_SCHEMA.VERTEX_POINT' 
                IN TYPEOF(el.edge_element.edge_start)) AND (
                'PROCESS_PLANNING_SCHEMA.VERTEX_POINT' IN TYPEOF(el.
                edge_element.edge_end)))) )) = 0)) )) = 0)) )) = 0)) )) =0;
      wr7 : SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* 
                sbwm\shell_based_wireframe_model.sbwm_boundary | (
                'PROCESS_PLANNING_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (
                NOT (SIZEOF(QUERY ( eloop <* QUERY ( wsb <* ws\wire_shell.
                wire_shell_extent | ('PROCESS_PLANNING_SCHEMA.EDGE_LOOP' IN
                 TYPEOF(wsb)) ) | (NOT (SIZEOF(QUERY ( el <* eloop\path.
                edge_list | (NOT (valid_wireframe_vertex_point(el.
                edge_element.edge_start\vertex_point.vertex_geometry) AND 
                valid_wireframe_vertex_point(el.edge_element.edge_end\
                vertex_point.vertex_geometry))) )) = 0)) )) = 0)) )) = 0)))) 
                = 0;
      wr8 : SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* 
                sbwm\shell_based_wireframe_model.sbwm_boundary | (
                'PROCESS_PLANNING_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (
                NOT (SIZEOF(QUERY ( vloop <* QUERY ( wsb <* ws\wire_shell.
                wire_shell_extent | ('PROCESS_PLANNING_SCHEMA.VERTEX_LOOP' 
                IN TYPEOF(wsb)) ) | (NOT (
                'PROCESS_PLANNING_SCHEMA.VERTEX_POINT' IN TYPEOF(vloop\
                vertex_loop.loop_vertex))) )) = 0)) )) = 0)) )) = 0;
      wr9 : SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* 
                sbwm\shell_based_wireframe_model.sbwm_boundary | (
                'PROCESS_PLANNING_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (
                NOT (SIZEOF(QUERY ( vloop <* QUERY ( wsb <* ws\wire_shell.
                wire_shell_extent | ('PROCESS_PLANNING_SCHEMA.VERTEX_LOOP' 
                IN TYPEOF(wsb)) ) | (NOT valid_wireframe_vertex_point(vloop
                \vertex_loop.loop_vertex\vertex_point.vertex_geometry)) )) 
                = 0)) )) = 0)) )) = 0;
      wr10: SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( vs <* QUERY ( sb <* 
                sbwm\shell_based_wireframe_model.sbwm_boundary | (
                'PROCESS_PLANNING_SCHEMA.VERTEX_SHELL' IN TYPEOF(sb)) ) | (
                NOT ('PROCESS_PLANNING_SCHEMA.VERTEX_POINT' IN TYPEOF(vs\
                vertex_shell.vertex_shell_extent.loop_vertex))) )) = 0)) )) 
                = 0;
      wr11: SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN 
                TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( vs <* QUERY ( sb <* 
                sbwm\shell_based_wireframe_model.sbwm_boundary | (
                'PROCESS_PLANNING_SCHEMA.VERTEX_SHELL' IN TYPEOF(sb)) ) | (
                NOT valid_wireframe_vertex_point(vs\vertex_shell.
                vertex_shell_extent.loop_vertex\vertex_point.
                vertex_geometry)) )) = 0)) )) = 0;
      wr12: SIZEOF(QUERY ( mi <* QUERY ( it <* SELF.items | (
                'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | (
                NOT (('PROCESS_PLANNING_SCHEMA.' + 
                'SHELL_BASED_WIREFRAME_SHAPE_REPRESENTATION') IN TYPEOF(mi\
                mapped_item.mapping_source.mapped_representation))) )) = 0;
      wr13: SELF.context_of_items\geometric_representation_context.
                coordinate_space_dimension = 3;
  END_ENTITY; -- shell_based_wireframe_shape_representation

  ENTITY  si_unit
    SUBTYPE OF (named_unit);
      prefix : OPTIONAL si_prefix;
      name   : si_unit_name;
    DERIVE
      SELF\named_unit.dimensions : dimensional_exponents := 
                                      dimensions_for_si_unit(name);
  END_ENTITY; -- si_unit

  ENTITY  single_activity_relationship
    SUBTYPE OF (sequential_method);
    WHERE
      wr2: 'PROCESS_PLANNING_SCHEMA.SINGLE_SETUP_PROCESS' IN TYPEOF(SELF.
               relating_method);
      wr3: SIZEOF(['PROCESS_PLANNING_SCHEMA.MACHINE_SETUP',
               'PROCESS_PLANNING_SCHEMA.TOOL_SETUP',
               'PROCESS_PLANNING_SCHEMA.FIXTURE_SETUP',
               'PROCESS_PLANNING_SCHEMA.ANCILLARY_SETUP'] * TYPEOF(SELF.
               related_method)) = 1;
  END_ENTITY; -- single_activity_relationship

  ENTITY  single_setup_process
    SUBTYPE OF (action_method);
    WHERE
      wr1: SIZEOF(QUERY ( amr <* USEDIN(SELF,
      'PROCESS_PLANNING_SCHEMA.ACTION_METHOD_RELATIONSHIP.RELATING_METHOD')
                | (('PROCESS_PLANNING_SCHEMA.SINGLE_ACTIVITY_RELATIONSHIP' 
               IN TYPEOF(amr)) AND (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MACHINE_SETUP',
               'PROCESS_PLANNING_SCHEMA.TOOL_SETUP',
               'PROCESS_PLANNING_SCHEMA.FIXTURE_SETUP',
               'PROCESS_PLANNING_SCHEMA.ANCILLARY_SETUP'] * TYPEOF(amr.
               relating_method)) = 1)) )) >= 1;
      wr2: SIZEOF(QUERY ( amr <* USEDIN(SELF,
      'PROCESS_PLANNING_SCHEMA.ACTION_METHOD_RELATIONSHIP.RELATING_METHOD')
                | ('PROCESS_PLANNING_SCHEMA.MACHINING_OPERATION' IN TYPEOF(
               amr)) )) >= 1;
      wr3: SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE.USAGE') | (
               'PROCESS_PLANNING_SCHEMA.CLAMP_POSITION' IN TYPEOF(ap)) )) 
               >= 0;
  END_ENTITY; -- single_setup_process

  ENTITY  single_setup_process_relationship
    SUBTYPE OF (sequential_method);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.SINGLE_SETUP_PROCESS' IN TYPEOF(SELF.
               related_method);
      wr2: 'PROCESS_PLANNING_SCHEMA.MACHINING_PROCESS' IN TYPEOF(SELF.
               relating_method);
  END_ENTITY; -- single_setup_process_relationship

  ENTITY  slot
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 1)) )) = 0)) )) = 0;
      wr2: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'swept shape occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.SQUARE_U_PROFILE',
               'PROCESS_PLANNING_SCHEMA.PARTIAL_CIRCULAR_PROFILE',
               'PROCESS_PLANNING_SCHEMA.ROUNDED_U_PROFILE',
               'PROCESS_PLANNING_SCHEMA.VEE_PROFILE',
               'PROCESS_PLANNING_SCHEMA.TEE_PROFILE',
               'PROCESS_PLANNING_SCHEMA.OPEN_PATH_PROFILE'] * TYPEOF(sdr.
               relating_shape_aspect)) = 1) )) = 1)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'course of travel occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'path feature component usage') AND ((sar.name = 
               'course of travel') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar)))) ) | (
               'PROCESS_PLANNING_SCHEMA.PATH_FEATURE_COMPONENT' IN TYPEOF(
               sdr.relating_shape_aspect)) )) = 1)) )) = 1)) )) = 0;
      wr4: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'end condition occurrence') AND (SIZEOF(
               QUERY ( fcr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | (((sar.description = 
               'slot end usage') AND (sar.name IN ['course of travelstart',
               'course of travel end'])) AND (
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | (('PROCESS_PLANNING_SCHEMA.SLOT_END' IN 
               TYPEOF(fcr.relating_shape_aspect)) AND (
               'PROCESS_PLANNING_SCHEMA.SLOT' IN TYPEOF(fcr.
              related_shape_aspect.of_shape.definition))) )) = 1)) )) =2)) )) 
               = 0;
      wr5: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
               SELF) |
              (('PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' 
               IN TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'maximum feature limit')) )) <=1;
  END_ENTITY; -- slot

  ENTITY  slot_end
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1 : 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
                TYPEOF(SELF.of_shape.definition);
      wr2 : SELF.description IN ['open','radiused','flat','woodruff'];
      wr3 : (NOT (SELF.description IN ['open','radiused'])) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) )) = 0)) )) = 0);
      wr4 : (NOT (SELF.description IN ['flat','woodruff'])) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) )) = 1)) )) = 0);
      wr5 : (NOT (SELF.description IN ['flat'])) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(impl_rep.
                used_representation.items) = 2)) )) = 0)) )) = 0);
      wr6 : (NOT (SELF.description = 'flat')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'first radius')) )) = 1)))) 
                = 0)) )) = 0);
      wr7 : (NOT (SELF.description = 'flat')) OR (SIZEOF(QUERY ( pd <* 
                USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'second radius')) )) = 1)))) 
                = 0)) )) = 0);
      wr8 : (NOT (SELF.description = 'woodruff')) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT' IN 
                TYPEOF(it)) AND (it.name = 'radius')) )) = 1)) )) = 0)) )) 
                = 0);
      wr9 : (NOT (SELF.description IN ['woodruff'])) OR (SIZEOF(
                QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(impl_rep.
                used_representation.items) = 1)) )) = 0)) )) = 0);
      wr10: SIZEOF(QUERY ( fcr <* QUERY ( sar <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATING_SHAPE_ASPECT') | (((sar.description = 
                'slot end usage') AND (sar.name IN [
                'course of travel start','course of travel end'])) AND (
                'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN
                 TYPEOF(sar))) ) | (((fcr.related_shape_aspect.description 
                = 'end condition occurrence') AND (
                'PROCESS_PLANNING_SCHEMA.SLOT' IN TYPEOF(fcr.
                related_shape_aspect.of_shape.definition))) AND (
                'PROCESS_PLANNING_SCHEMA.SLOT_END' IN TYPEOF(fcr.
                relating_shape_aspect))) )) >= 1;
  END_ENTITY; -- slot_end

  ENTITY  solid_angle_unit
    SUBTYPE OF (named_unit);
    WHERE
      wr1: ((((((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF
               \named_unit.dimensions.mass_exponent = 0)) AND (SELF\
               named_unit.dimensions.time_exponent = 0)) AND (SELF\
               named_unit.dimensions.electric_current_exponent = 0)) AND (
               SELF\named_unit.dimensions.
               thermodynamic_temperature_exponent = 0)) AND (SELF\
               named_unit.dimensions.amount_of_substance_exponent = 0)) AND
                (SELF\named_unit.dimensions.luminous_intensity_exponent =0);
  END_ENTITY; -- solid_angle_unit

  ENTITY  solid_model
    SUPERTYPE OF (manifold_solid_brep)
    SUBTYPE OF (geometric_representation_item);
  END_ENTITY; -- solid_model

  ENTITY  spherical_cap
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 3)) )) = 0)) )) = 0;
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'radius')) )) = 1)) )) = 0)))) 
               = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'internal angle')) )) = 1)))) 
               = 0)) )) = 0;
  END_ENTITY; -- spherical_cap

  ENTITY  spherical_surface
    SUBTYPE OF (elementary_surface);
      radius : positive_length_measure;
  END_ENTITY; -- spherical_surface

  ENTITY  square_u_profile
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1 : 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
                TYPEOF(SELF.of_shape.definition);
      wr2 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) )) = 1)) )) = 0;
      wr3 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | ((NOT (SIZEOF(impl_rep.
                used_representation.items) >= 4)) AND (SIZEOF(impl_rep.
                used_representation.items) <= 6)) )) = 0)) )) = 0;
      wr4 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND (SIZEOF(QUERY ( srwp_i <* pdr.
                used_representation.items | (((((((srwp_i.name = 
                'orientation') OR (srwp_i.name = 'width')) OR (srwp_i.name 
                = 'first angle')) OR (srwp_i.name = 'second angle')) OR (
                srwp_i.name = 'first radius')) OR (srwp_i.name = 
                'second radius')) OR (srwp_i.name = 'profile limit')) )) = 
                SIZEOF(pdr.used_representation.items))) )) = 1) )) = 1;
      wr5 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
                name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr6 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'width')) )) = 1)) )) = 0)))) 
                = 0;
      wr7 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'first radius')) )) <= 1)))) 
                = 0)) )) = 0;
      wr8 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'second radius')) )) <= 1)))) 
                = 0)) )) = 0;
      wr9 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'first angle')) )) = 1)) )) 
                = 0)) )) = 0;
      wr10: SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'second angle')) )) = 1)))) 
                = 0)) )) = 0;
      wr11: SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.' + 
                'DEFINITION') | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
                TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'profile limit')) )) <= 1)) )) =
                 0;
  END_ENTITY; -- square_u_profile

  ENTITY  standard_uncertainty
    SUBTYPE OF (uncertainty_qualifier);
      uncertainty_value : REAL;
  END_ENTITY; -- standard_uncertainty

  ENTITY step 
    SUBTYPE OF (feature_definition);
    WHERE
      wr1: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 1)) )) = 0)) )) = 0;
      wr2: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'course of travel occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'path feature component usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | ((
               'PROCESS_PLANNING_SCHEMA.PATH_FEATURE_COMPONENT' IN TYPEOF(
               sdr.relating_shape_aspect)) AND (sdr.relating_shape_aspect.
               description = 'linear')) )) = 1)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ.
               description = 'removal boundary occurrence') AND (SIZEOF(
               QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
               'RELATED_SHAPE_ASPECT') | ((sar.description = 
               'profile usage') AND (
               'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
               TYPEOF(sar))) ) | ('PROCESS_PLANNING_SCHEMA.VEE_PROFILE' IN 
               TYPEOF(sdr.relating_shape_aspect)) )) = 1)) )) = 1)) )) = 0;
      wr4: SIZEOF(QUERY ( pdr <* get_property_definition_representations(
               SELF) |
               (('PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' 
               IN TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'maximum feature limit')) )) <=1;
      wr5: SIZEOF(QUERY ( pds <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(pds)) AND (SIZEOF(QUERY ( csa <* USEDIN(pds,
               'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (((
               'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(
               csa)) AND (csa.name = 'uncut area')) AND (SIZEOF(
               QUERY ( sar <* csa.component_relationships | ((
               'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
               TYPEOF(sar)) AND (SIZEOF(['PROCESS_PLANNING_SCHEMA.BOSS',
               'PROCESS_PLANNING_SCHEMA.PROTRUSION'] * TYPEOF(sar.
               related_shape_aspect)) = 1)) )) = 1)) )) <= 1)) )) = 1;
  END_ENTITY; -- step

  ENTITY  straightness_tolerance
    SUBTYPE OF (geometric_tolerance);
    WHERE
      wr1: NOT (('PROCESS_PLANNING_SCHEMA.' + 
               'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE') IN
TYPEOF(SELF));
  END_ENTITY; -- straightness_tolerance

  ENTITY  surface
    SUPERTYPE OF (ONEOF (elementary_surface,swept_surface,bounded_surface,
        offset_surface,surface_replica))
    SUBTYPE OF (geometric_representation_item);
  END_ENTITY; -- surface

  ENTITY  surface_curve
    SUPERTYPE OF (ONEOF (intersection_curve,seam_curve) ANDOR 
        bounded_surface_curve)
    SUBTYPE OF (curve);
      curve_3d              : curve;
      associated_geometry   : LIST [1:2] OF pcurve_or_surface;
      master_representation : preferred_surface_curve_representation;
    DERIVE
      basis_surface : SET [1:2] OF surface := get_basis_surface(SELF);
    WHERE
      wr1: curve_3d.dim = 3;
      wr2: ('PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(associated_geometry
               [1])) OR (master_representation <> pcurve_s1);
      wr3: ('PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(associated_geometry
               [2])) OR (master_representation <> pcurve_s2);
      wr4: NOT ('PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(curve_3d));
  END_ENTITY; -- surface_curve

  ENTITY  surface_of_linear_extrusion
    SUBTYPE OF (swept_surface);
      extrusion_axis : vector;
  END_ENTITY; -- surface_of_linear_extrusion

  ENTITY  surface_of_revolution
    SUBTYPE OF (swept_surface);
      axis_position : axis1_placement;
    DERIVE
      axis_line : line := (dummy_gri || curve()) || line(axis_position.
                     location,dummy_gri || vector(axis_position.z,1));
  END_ENTITY; -- surface_of_revolution

  ENTITY  surface_patch
    SUBTYPE OF (founded_item);
      parent_surface : bounded_surface;
      u_transition   : transition_code;
      v_transition   : transition_code;
      u_sense        : BOOLEAN;
      v_sense        : BOOLEAN;
    INVERSE
      using_surfaces : BAG [1:?] OF rectangular_composite_surface FOR 
                          segments;
    WHERE
      wr1: NOT ('PROCESS_PLANNING_SCHEMA.CURVE_BOUNDED_SURFACE' IN TYPEOF(
               parent_surface));
  END_ENTITY; -- surface_patch

  ENTITY  surface_profile_tolerance
    SUBTYPE OF (geometric_tolerance);
    WHERE
      wr1: (NOT (('PROCESS_PLANNING_SCHEMA.' + 
               'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE') IN TYPEOF(SELF))) 
               OR (SIZEOF(SELF\geometric_tolerance_with_datum_reference.
               datum_system) <= 3);
  END_ENTITY; -- surface_profile_tolerance

  ENTITY  surface_replica
    SUBTYPE OF (surface);
      parent_surface : surface;
      transformation : cartesian_transformation_operator_3d;
    WHERE
      wr1: acyclic_surface_replica(SELF,parent_surface);
  END_ENTITY; -- surface_replica

  ENTITY  swept_surface
    SUPERTYPE OF (ONEOF(surface_of_linear_extrusion,surface_of_revolution))
    SUBTYPE OF (surface);
      swept_curve : curve;
  END_ENTITY; -- swept_surface

  ENTITY  symmetric_shape_aspect
    SUBTYPE OF (shape_aspect);
    INVERSE
      basis_relationships : SET [1:?] OF shape_aspect_relationship FOR 
                               relating_shape_aspect;
    WHERE
      wr1: SIZEOF(QUERY ( x <* SELF.basis_relationships | (
               'PROCESS_PLANNING_SCHEMA.CENTRE_OF_SYMMETRY' IN TYPEOF(x.
               related_shape_aspect)) )) >= 1;
  END_ENTITY; -- symmetric_shape_aspect

  ENTITY  symmetry_tolerance
    SUBTYPE OF (geometric_tolerance_with_datum_reference);
    WHERE
      wr1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.
               datum_system) <= 3;
  END_ENTITY; -- symmetry_tolerance

  ENTITY  tangent
    SUBTYPE OF (derived_shape_aspect);
    WHERE
      wr1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) = 1;
  END_ENTITY; -- tangent

  ENTITY  taper
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SELF.description IN ['angle taper','diameter taper',
               'directed taper'];
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(impl_rep.
               used_representation.items) = 1)) )) = 0)) )) = 0;
      wr5: (NOT (SELF.description = 'angle taper')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'taper angle')) )) = 1)) )) 
               = 0)) )) = 0);
      wr6: (NOT (SELF.description = 'diameter taper')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'final diameter')) )) = 1)))) 
               = 0)) )) = 0);
      wr7: (NOT (SELF.description = 'directed taper')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'angle')) )) = 1)) )) = 0)))) 
               = 0);
      wr8: (NOT (SELF.description = 'directed taper')) OR (SIZEOF(
               QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'direction')) )) = 1)) )) = 0);
  END_ENTITY; -- taper

  ENTITY  tee_profile
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1 : 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
                TYPEOF(SELF.of_shape.definition);
      wr2 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) )) = 1)) )) = 0;
      wr3 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | ((NOT (SIZEOF(impl_rep.
                used_representation.items) >= 9)) AND (SIZEOF(impl_rep.
                used_representation.items) <= 10)) )) = 0)) )) = 0;
      wr4 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND (SIZEOF(QUERY ( srwp_i <* pdr.
                used_representation.items | ((((((((((srwp_i.name = 
                'orientation') OR (srwp_i.name = 'width')) OR (srwp_i.name 
                = 'depth')) OR (srwp_i.name = 'cross bar width')) OR (
                srwp_i.name = 'cross bar depth')) OR (srwp_i.name = 
                'first offset')) OR (srwp_i.name = 'second offset')) OR (
                srwp_i.name = 'first angle')) OR (srwp_i.name = 
                'second angle')) OR (srwp_i.name = 'radius')) )) = SIZEOF(
                pdr.used_representation.items))) )) = 1) )) = 1;
      wr5 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
                name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr6 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'width')) )) = 1)) )) = 0)))) 
                = 0;
      wr7 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'depth')) )) = 1)) )) = 0)))) 
                = 0;
      wr8 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
              TYPEOF(it)) = 2) AND (it.name = 'cross bar width')) )) =1)) )) 
                = 0)) )) = 0;
      wr9 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'cross bar depth')) )) =1)) )) 
                = 0)) )) = 0;
      wr10: SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'first offset')) )) = 1)))) 
                = 0)) )) = 0;
      wr11: SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'second offset')) )) = 1)))) 
                = 0)) )) = 0;
      wr12: SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'first angle')) )) = 1)) )) 
                = 0)) )) = 0;
      wr13: SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'second angle')) )) = 1)))) 
                = 0)) )) = 0;
      wr14: SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
              TYPEOF(it)) = 2) AND (it.name = 'radius')) )) <= 1)) )) =0)) )) 
                = 0;
      wr15: SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.' + 
                'DEFINITION') | (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
                TYPEOF(pdr.used_representation)) AND (pdr.
                used_representation.name = 'profile limit')) )) <= 1)) )) =
                 0;
  END_ENTITY; -- tee_profile

  ENTITY  thread
    SUBTYPE OF (feature_definition);
    WHERE
      wr1 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND (8 <= SIZEOF(pdr.
                used_representation.items))) AND (SIZEOF(pdr.
                used_representation.items) <= 11)) )) = 1) )) = 1;
      wr2 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'major diameter')) )) = 1)))) 
                = 0)) )) = 0;
      wr3 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
              TYPEOF(it)) = 2) AND (it.name = 'minor diameter')) )) <=1)) )) 
                = 0)) )) = 0;
      wr4 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'pitch diameter')) )) = 1)))) 
                = 0)) )) = 0;
      wr5 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.RATIO_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'number of threads')) )) = 
                1)) )) = 0)) )) = 0;
      wr6 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
              IN TYPEOF(it)) AND (it.name = 'fit class')) )) = 1)) )) =0)) )) 
                = 0;
      wr7 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'form')) )) = 1)) )) = 0)) )) 
                = 0;
      wr8 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'hand')) AND (it.description 
                IN ['left','right'])) )) = 1)) )) = 0)) )) = 0;
      wr9 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'qualifier')) )) <= 1)) )) = 
                0)) )) = 0;
      wr10: SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'thread side')) AND ((it.
               description = 'internal') OR (it.description ='external'))) )) 
                = 1)) )) = 0)) )) = 0;
      wr11: SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'crest')) )) <= 1)) )) =0)) )) 
                = 0;
      wr12: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'partial area occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'applied area usage') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | ('PROCESS_PLANNING_SCHEMA.APPLIED_AREA' 
                IN TYPEOF(sdr.relating_shape_aspect)) )) = 1)) )) = 1)) )) 
                = 0;
      wr13: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'applied shape') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | ('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' 
                IN TYPEOF(sdr.relating_shape_aspect)) )) = 1) )) = 1)) )) =
                 0;
  END_ENTITY; -- thread

  ENTITY  time_measure_with_unit
    SUBTYPE OF (measure_with_unit);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.TIME_UNIT' IN TYPEOF(SELF\
               measure_with_unit.unit_component);
  END_ENTITY; -- time_measure_with_unit

  ENTITY time_unit
    SUBTYPE OF (named_unit);
    WHERE
      wr1: ((((((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF
               \named_unit.dimensions.mass_exponent = 0)) AND (SELF\
               named_unit.dimensions.time_exponent = 1)) AND (SELF\
               named_unit.dimensions.electric_current_exponent = 0)) AND (
               SELF\named_unit.dimensions.
               thermodynamic_temperature_exponent = 0)) AND (SELF\
               named_unit.dimensions.amount_of_substance_exponent = 0)) AND
                (SELF\named_unit.dimensions.luminous_intensity_exponent =0);
  END_ENTITY; -- time_unit

  ENTITY  tolerance_value;
      lower_bound : measure_with_unit;
      upper_bound : measure_with_unit;
    WHERE
      wr1: upper_bound.value_component > lower_bound.value_component;
      wr2: upper_bound.unit_component = lower_bound.unit_component;
  END_ENTITY; -- tolerance_value

  ENTITY  tolerance_zone
    SUBTYPE OF (shape_aspect);
      defining_tolerance : SET [1:?] OF geometric_tolerance;
      form               : tolerance_zone_form;
  END_ENTITY; -- tolerance_zone

  ENTITY  tolerance_zone_definition
    SUPERTYPE OF (ONEOF
(projected_zone_definition,runout_zone_definition));
      zone       : tolerance_zone;
      boundaries : SET [1:?] OF shape_aspect;
  END_ENTITY; -- tolerance_zone_definition

  ENTITY  tolerance_zone_form;
      name : label;
  END_ENTITY; -- tolerance_zone_form

  ENTITY  tool_assembly
    SUBTYPE OF (action_resource);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_CONTRACT_ASSIGNMENT.ITEMS')
                | ('PROCESS_PLANNING_SCHEMA.TOOL_CONTRACT' IN TYPEOF(adr.
               assigned_contract)) )) <= 1;
      wr2: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
               'PROCESS_PLANNING_SCHEMA.TOOL_DATA' IN TYPEOF(adr)) )) <= 1;
      wr3: SIZEOF(QUERY ( rp <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
               SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(rp,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | ('PROCESS_PLANNING_SCHEMA.REPRESENTATION' IN TYPEOF(pdr.
               representation)) ) | (SIZEOF(QUERY ( it <* impl_rep.
               representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'] *
                TYPEOF(it)) >= 0) AND (it.name = 
               'tool assembly tool parameters')) )) = 0) )) = 0) )) = 0;
      wr4: SIZEOF(QUERY ( ar2 <* QUERY ( arr <* USEDIN(SELF,
     'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_RELATIONSHIP.RELATED_RESOURCE')
                | ('PROCESS_PLANNING_SCHEMA.TOOL_ASSEMBLY_RELATIONSHIP' IN 
               TYPEOF(arr)) ) | (
               'PROCESS_PLANNING_SCHEMA.TOOL_ASSEMBLY_ELEMENT' IN TYPEOF(
               ar2.relating_resource)) )) >= 1;
      wr5: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')
                | ('PROCESS_PLANNING_SCHEMA.DRAWING' IN TYPEOF(adr.
               assigned_document)) )) <= 1;
      wr6: SIZEOF(QUERY ( arr <* QUERY ( ar <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES')
                | ('PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT' IN
                TYPEOF(ar)) ) | (NOT (SIZEOF(QUERY ( pdp_imp <* 
               QUERY ( pdp <* arr.operations | (
               'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_PROCESS' IN 
               TYPEOF(pdp)) ) | (SIZEOF(QUERY ( ppa <* USEDIN(pdp_imp,
            'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | (('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' IN TYPEOF(ppa.
               property_or_shape)) AND (ppa.description = 
               'tool assembly shape')) )) = 0) )) = 0)) )) >= 0;
  END_ENTITY; -- tool_assembly

  ENTITY  tool_assembly_element
    SUBTYPE OF (action_resource);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')
                | (adr.assigned_document.description = 
               'tool catalogue number') )) <= 1;
      wr2: SIZEOF(QUERY ( adr <* USEDIN(SELF,
           'PROCESS_PLANNING_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')
                | (adr.assigned_organization.description = 
               'tool company name') )) = 1;
      wr3: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (adr
               .description = 'tool element identification') )) = 1;
      wr4: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')
                | ('PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_SPECIFICATION' IN 
               TYPEOF(adr.assigned_document)) )) = 1;
      wr5: NOT (SIZEOF(QUERY ( ap <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
               SIZEOF(QUERY ( apr <* USEDIN(ap,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | (('PROCESS_PLANNING_SCHEMA.' + 
               'EXTERNALLY_DEFINED_REPRESENTATION_WITH_PARAMETERS') IN 
               TYPEOF(apr)) )) <= 1) )) = 0);
      wr6: SIZEOF(QUERY ( arr <* QUERY ( ar <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES')
                | ('PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT' IN
                TYPEOF(ar)) ) | (NOT (SIZEOF(QUERY ( pdp_imp <* 
               QUERY ( pdp <* arr.operations | (
               'PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_PROCESS' IN 
               TYPEOF(pdp)) ) | (SIZEOF(QUERY ( ppa <* USEDIN(pdp_imp,
            'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | (('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' IN TYPEOF(ppa.
               property_or_shape)) AND (ppa.description = 
               'tool assembly element shape')) )) = 0) )) = 0)) )) >= 0;
  END_ENTITY; -- tool_assembly_element

  ENTITY  tool_assembly_relationship
    SUBTYPE OF (action_resource_relationship);
  END_ENTITY; -- tool_assembly_relationship

  ENTITY tool_body
    SUBTYPE OF (tool_assembly);
    WHERE
      wr1: SIZEOF(QUERY ( rp <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (
               SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(rp,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | ('PROCESS_PLANNING_SCHEMA.REPRESENTATION' IN TYPEOF(pdr.
               representation)) ) | (SIZEOF(QUERY ( it <* impl_rep.
               representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'] *
                TYPEOF(it)) >= 0) AND (it.name = 'tool body parameters')))) 
               = 0) )) = 0) )) = 0;
  END_ENTITY; -- tool_body

  ENTITY  tool_contract
    SUBTYPE OF (contract);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.APPLIED_ACTION_REQUEST_ASSIGNMENT.ITEMS')
                | (('PROCESS_PLANNING_SCHEMA.VERSIONED_ACTION_REQUEST' IN 
               TYPEOF(adr.assigned_action_request)) AND (adr.
               assigned_action_request.description = 'design order')) )) = 
               1;
      wr2: SIZEOF(QUERY ( adr <* USEDIN(SELF,
         'PROCESS_PLANNING_SCHEMA.APPLIED_ACTION_REQUEST_ASSIGNMENT.ITEMS')
                | (('PROCESS_PLANNING_SCHEMA.VERSIONED_ACTION_REQUEST' IN 
               TYPEOF(adr.assigned_action_request)) AND (adr.
               assigned_action_request.description = 'fabrication order')))) 
               = 1;
      wr3: SIZEOF(QUERY ( ap <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.CONTRACT_ASSIGNMENT.ASSIGNED_CONTRACT')
                | (('PROCESS_PLANNING_SCHEMA.APPLIED_CONTRACT_ASSIGNMENT' 
               IN TYPEOF(ap)) AND (NOT (SIZEOF(QUERY ( it <* ap.items | ((
               'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_SPECIFICATION' IN 
               TYPEOF(it)) AND (it\document.description = 
               'tool contract document')) )) <= 1))) )) = 0;
  END_ENTITY; -- tool_contract

  ENTITY tool_data 
    SUBTYPE OF (resource_property);
    WHERE
      wr1: SIZEOF(QUERY ( rpr <* USEDIN(SELF,
       'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY')
                | ((rpr.name = 'tool position') AND (SIZEOF(QUERY ( it <* 
               rpr.representation.items | ((
               'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN
                TYPEOF(it)) AND (it.name = 'tool position')) )) = 1)) )) = 
               0;
      wr2: SIZEOF(QUERY ( arr <* USEDIN(SELF.resource,
   'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_RELATIONSHIP.RELATED_RESOURCE')
                | ('PROCESS_PLANNING_SCHEMA.TOOL_MAGAZINE_TURRET_CAROUSEL' 
               IN TYPEOF(arr.relating_resource)) )) <= 1;
      wr3: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')
                | ('PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_SPECIFICATION' IN 
               TYPEOF(adr.assigned_document)) )) = 1;
  END_ENTITY; -- tool_data

  ENTITY  tool_data_representation
    SUBTYPE OF (resource_property_representation);
    WHERE
      wr1: SELF.name IN ['x_axis','y_axis','z_axis'];
      wr2: SIZEOF(QUERY ( it <* SELF.representation.items | (SIZEOF([
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT',
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM'] * 
               TYPEOF(it)) = 2) )) = 1;
      wr3: 'PROCESS_PLANNING_SCHEMA.TOOL_DATA' IN TYPEOF(SELF.property);
  END_ENTITY; -- tool_data_representation

  ENTITY  tool_magazine_turret_carousel
    SUBTYPE OF (action_resource);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.RESOURCE_PROPERTY.RESOURCE') | (adr
               .description = 'tool capacity') )) = 1;
      wr2: SIZEOF(QUERY ( ar2 <* QUERY ( arr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_RELATIONSHIP.' + 
               'RELATING_RESOURCE') | (
               'PROCESS_PLANNING_SCHEMA.TOOL_ASSEMBLY_RELATIONSHIP' IN 
               TYPEOF(arr)) ) | ('PROCESS_PLANNING_SCHEMA.WORKSTATION' IN 
               TYPEOF(ar2.related_resource)) )) = 1;
  END_ENTITY; -- tool_magazine_turret_carousel

  ENTITY  tool_setup
    SUBTYPE OF (process_plan_activity);
    WHERE
      wr1: SIZEOF(QUERY ( am <* QUERY ( arr <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT.OPERATIONS')
                | (
               'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE' IN
                TYPEOF(arr)) ) | (SIZEOF(QUERY ( it <* am.resources | (
               'PROCESS_PLANNING_SCHEMA.MACHINE' IN TYPEOF(it)) )) = 1) )) 
               = 1;
      wr2: SIZEOF(QUERY ( am <* QUERY ( arr <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT.OPERATIONS')
                | (
               'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE' IN
                TYPEOF(arr)) ) | (NOT (SIZEOF(QUERY ( it <* am.resources | 
               ('PROCESS_PLANNING_SCHEMA.TOOL_ASSEMBLY' IN TYPEOF(it)) )) =
                1)) )) = 0;
      wr3: SIZEOF(QUERY ( am <* QUERY ( arr <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT.OPERATIONS')
                | (
               'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE' IN
                TYPEOF(arr)) ) | (NOT (SIZEOF(QUERY ( it <* am.resources | 
               ('PROCESS_PLANNING_SCHEMA.TOOL_MAGAZINE_TURRET_CAROUSEL' IN 
               TYPEOF(it)) )) = 1)) )) = 0;
  END_ENTITY; -- tool_setup

  ENTITY  topological_representation_item
    SUPERTYPE OF (ONEOF (vertex,edge,face_bound,face,vertex_shell,
        wire_shell,connected_edge_set,connected_face_set,loop ANDOR path))
    SUBTYPE OF (representation_item);
  END_ENTITY; -- topological_representation_item

  ENTITY  toroidal_surface
    SUBTYPE OF (elementary_surface);
      major_radius : positive_length_measure;
      minor_radius : positive_length_measure;
  END_ENTITY; -- toroidal_surface

  ENTITY  total_runout_tolerance
    SUBTYPE OF (geometric_tolerance_with_datum_reference);
    WHERE
      wr1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.
               datum_system) <= 2;
  END_ENTITY; -- total_runout_tolerance

  ENTITY  transition_feature
    SUPERTYPE OF (ONEOF (chamfer,edge_round,fillet))
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: SIZEOF(['PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION',
               'PROCESS_PLANNING_SCHEMA.COMPOUND_FEATURE'] * TYPEOF(SELF.
               of_shape.definition)) = 1;
      wr2: SIZEOF(['PROCESS_PLANNING_SCHEMA.CHAMFER',
               'PROCESS_PLANNING_SCHEMA.EDGE_ROUND',
               'PROCESS_PLANNING_SCHEMA.FILLET'] * TYPEOF(SELF)) = 1;
  END_ENTITY; -- transition_feature

  ENTITY  trimmed_curve
    SUBTYPE OF (bounded_curve);
      basis_curve           : curve;
      trim_1                : SET [1:2] OF trimming_select;
      trim_2                : SET [1:2] OF trimming_select;
      sense_agreement       : BOOLEAN;
      master_representation : trimming_preference;
    WHERE
      wr1: (HIINDEX(trim_1) = 1) OR (TYPEOF(trim_1[1]) <>
TYPEOF(trim_1[2]));
      wr2: (HIINDEX(trim_2) = 1) OR (TYPEOF(trim_2[1]) <>
TYPEOF(trim_2[2]));
  END_ENTITY; -- trimmed_curve

  ENTITY  turned_knurl
    SUBTYPE OF (feature_definition);
    WHERE
      wr1 : SELF\characterized_object.description IN ['diamond','diagonal',
                'straight'];
      wr2 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (SIZEOF(QUERY ( pdr <* USEDIN(pd,
                'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) AND ((6 <= SIZEOF(pdr.
                used_representation.items)) AND (SIZEOF(pdr.
                used_representation.items) <= 9))) )) = 1) )) = 1;
      wr3 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | (((
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
                TYPEOF(it)) AND ('PROCESS_PLANNING_SCHEMA.COUNT_MEASURE' IN
                 TYPEOF(it\measure_with_unit.value_component))) AND (it.
                name = 'number of teeth')) )) <= 1)) )) = 0)) )) = 0;
      wr4 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'major diameter')) )) = 1)))) 
                = 0)) )) = 0;
      wr5 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
              TYPEOF(it)) = 2) AND (it.name = 'nominal diameter')) )) =1)) )) 
                = 0)) )) = 0;
      wr6 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.' + 
                'DEFINITION') | (NOT (SIZEOF(QUERY ( impl_rep <* 
                QUERY ( pdr <* USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'tooth depth')) )) <= 1)))) 
                = 0)) )) = 0;
      wr7 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'root fillet')) )) <= 1)))) 
                = 0)) )) = 0;
      wr8 : SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'diametral pitch')) )) =1)) )) 
                = 0)) )) = 0;
      wr9 : (NOT (SELF\characterized_object.description IN ['diamond',
                'diagonal'])) OR (SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((SIZEOF([
                'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
                TYPEOF(it)) = 2) AND (it.name = 'helix angle')) )) = 1)) )) 
                = 0)) )) = 0);
      wr10: (NOT (SELF\characterized_object.description = 'diagonal')) OR 
                (SIZEOF(QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(
                pd,'PROCESS_PLANNING_SCHEMA.' + 
                'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
                'PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
                used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
                impl_rep.used_representation.items | ((
                'PROCESS_PLANNING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' 
                IN TYPEOF(it)) AND (it.name = 'helix hand')) )) = 1)) )) = 
                0)) )) = 0);
      wr11: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | ((sa_occ
                .description = 'partial area occurrence') AND (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'applied area usage') AND (('PROCESS_PLANNING_SCHEMA.' + 
                'SHAPE_DEFINING_RELATIONSHIP') IN TYPEOF(sar))) ) | (
                'PROCESS_PLANNING_SCHEMA.APPLIED_AREA' IN TYPEOF(sdr.
                relating_shape_aspect)) )) = 1)) )) = 1)) )) = 0;
      wr12: SIZEOF(QUERY ( pds <* QUERY ( pd <* USEDIN(SELF,
                'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
                 | ('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
                TYPEOF(pd)) ) | (NOT (SIZEOF(QUERY ( sa_occ <* USEDIN(pds,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT.OF_SHAPE') | (SIZEOF(
                QUERY ( sdr <* QUERY ( sar <* USEDIN(sa_occ,
                'PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
                'RELATED_SHAPE_ASPECT') | ((sar.description = 
                'applied shape') AND (
                'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
                TYPEOF(sar))) ) | ('PROCESS_PLANNING_SCHEMA.SHAPE_ASPECT' 
                IN TYPEOF(sdr.relating_shape_aspect)) )) = 1) )) = 1)) )) =
                 0;
  END_ENTITY; -- turned_knurl

  ENTITY  type_qualifier;
      name : label;
  END_ENTITY; -- type_qualifier

  ENTITY  uncertainty_measure_with_unit
    SUBTYPE OF (measure_with_unit);
      name        : label;
      description : OPTIONAL text;
    WHERE
      wr1: valid_measure_value(SELF\measure_with_unit.value_component);
  END_ENTITY; -- uncertainty_measure_with_unit

  ENTITY  uncertainty_qualifier
    SUPERTYPE OF (standard_uncertainty);
      measure_name : label;
      description  : text;
  END_ENTITY; -- uncertainty_qualifier

  ENTITY  uniform_curve
    SUBTYPE OF (b_spline_curve);
  END_ENTITY; -- uniform_curve

  ENTITY  uniform_surface
    SUBTYPE OF (b_spline_surface);
  END_ENTITY; -- uniform_surface

  ENTITY  validation
    SUBTYPE OF (manufacturing_activity);
    WHERE
      wr1: SIZEOF(QUERY ( am <* QUERY ( arr <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT.OPERATIONS')
                | (
               'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE' IN
                TYPEOF(arr)) ) | (SIZEOF(QUERY ( it <* am.resources | (
               'PROCESS_PLANNING_SCHEMA.FIXTURE_ASSEMBLY' IN TYPEOF(it)) )) 
               <= 1) )) = 1;
      wr2: SIZEOF(QUERY ( am <* QUERY ( arr <* USEDIN(SELF,
          'PROCESS_PLANNING_SCHEMA.ACTION_RESOURCE_REQUIREMENT.OPERATIONS')
                | (
               'PROCESS_PLANNING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE' IN
                TYPEOF(arr)) ) | (SIZEOF(QUERY ( it <* am.resources | (
               'PROCESS_PLANNING_SCHEMA.TOOL_ASSEMBLY' IN TYPEOF(it)) )) = 
               1) )) = 1;
      wr3: SIZEOF(QUERY ( cm <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.ACTION.CHOSEN_METHOD') | (NOT (
               SIZEOF(QUERY ( ppa <* USEDIN(cm,
            'PROCESS_PLANNING_SCHEMA.PROCESS_PROPERTY_ASSOCIATION.PROCESS')
                | (('PROCESS_PLANNING_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
               TYPEOF(ppa.property_or_shape)) AND (ppa.description = 
               'part fixture mounting part shape')) )) = 1)) )) = 1;
      wr4: SIZEOF(QUERY ( adr <* SELF\
               action_method_with_associated_documents.documents | (
               'PROCESS_PLANNING_SCHEMA.CONTROLLER_PROGRAM' IN TYPEOF(adr)))) 
               <= 1;
  END_ENTITY; -- validation

  ENTITY  value_representation_item
    SUBTYPE OF (representation_item);
      value_component : measure_value;
    WHERE
      wr1: SIZEOF(QUERY ( rep <* using_representations(SELF) | (NOT (
               'PROCESS_PLANNING_SCHEMA.GLOBAL_UNIT_ASSIGNED_CONTEXT' IN 
               TYPEOF(rep.context_of_items))) )) = 0;
  END_ENTITY; -- value_representation_item

  ENTITY  vector
    SUBTYPE OF (geometric_representation_item);
      orientation : direction;
      magnitude   : length_measure;
    WHERE
      wr1: magnitude >= 0;
  END_ENTITY; -- vector

  ENTITY  vee_profile
    SUBTYPE OF (shape_aspect);
    WHERE
      wr1: 'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
               TYPEOF(SELF.of_shape.definition);
      wr2: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) )) = 1)) )) = 0;
      wr3: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | ((NOT (SIZEOF(impl_rep.
               used_representation.items) >= 3)) AND (SIZEOF(impl_rep.
               used_representation.items) <= 4)) )) = 0)) )) = 0;
      wr4: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (SIZEOF(QUERY ( pdr <* USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' 
               + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | (((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) AND (SIZEOF(QUERY ( srwp_i <* pdr.
               used_representation.items | ((((srwp_i.name = 'orientation') 
               OR (srwp_i.name = 'profile angle')) OR (srwp_i.name = 
               'tilt angle')) OR (srwp_i.name = 'profile radius')) )) = 
               SIZEOF(pdr.used_representation.items))) )) = 1) )) = 1;
      wr5: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((
               'PROCESS_PLANNING_SCHEMA.PLACEMENT' IN TYPEOF(it)) AND (it.
               name = 'orientation')) )) = 1)) )) = 0)) )) = 0;
      wr6: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | (((
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN 
               TYPEOF(it)) AND (
               'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE_WITH_UNIT' IN 
               TYPEOF(it\measure_with_unit.value_component))) AND (it.name 
               = 'profile radius')) )) <= 1)) )) = 0)) )) = 0;
      wr7: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'profile angle')) )) = 1)))) 
               = 0)) )) = 0;
      wr8: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( impl_rep <* QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.' + 
               'SHAPE_REPRESENTATION_WITH_PARAMETERS') IN TYPEOF(pdr.
               used_representation)) ) | (NOT (SIZEOF(QUERY ( it <* 
               impl_rep.used_representation.items | ((SIZEOF([
               'PROCESS_PLANNING_SCHEMA.MEASURE_REPRESENTATION_ITEM',
               'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] * 
               TYPEOF(it)) = 2) AND (it.name = 'tilt angle')) )) = 1)) )) =
                0)) )) = 0;
      wr9: SIZEOF(QUERY ( pd <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | 
               (NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
               'PROCESS_PLANNING_SCHEMA.' + 
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((
               'PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
               TYPEOF(pdr.used_representation)) AND (pdr.
               used_representation.name = 'profile limit')) )) <= 1)) )) = 
               0;
  END_ENTITY; -- vee_profile

  ENTITY  versioned_action_request;
      id          : identifier;
      version     : label;
      purpose     : text;
      description : OPTIONAL text;
  END_ENTITY; -- versioned_action_request

  ENTITY  vertex
    SUBTYPE OF (topological_representation_item);
  END_ENTITY; -- vertex

  ENTITY  vertex_loop
    SUBTYPE OF (loop);
      loop_vertex : vertex;
  END_ENTITY; -- vertex_loop

  ENTITY  vertex_point
    SUBTYPE OF (vertex, geometric_representation_item);
      vertex_geometry : point;
  END_ENTITY; -- vertex_point

  ENTITY  vertex_shell
    SUBTYPE OF (topological_representation_item);
      vertex_shell_extent : vertex_loop;
  END_ENTITY; -- vertex_shell

  ENTITY  view_reference
    SUBTYPE OF (document_usage_constraint);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* QUERY ( dr <* USEDIN(SELF.source,
            'PROCESS_PLANNING_SCHEMA.DOCUMENT_REFERENCE.ASSIGNED_DOCUMENT')
                | ('PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE' IN 
               TYPEOF(dr)) ) | (SIZEOF(QUERY ( d <* adr.items | (
             'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_ACTIVITY' IN TYPEOF(d)) )) 
               >= 0) )) = 0;
      wr2: 'PROCESS_PLANNING_SCHEMA.DRAWING' IN TYPEOF(SELF.source);
      wr3: SELF.subject_element IN ['sheet','view','zone'];
  END_ENTITY; -- view_reference

  ENTITY  wire_shell
    SUBTYPE OF (topological_representation_item);
      wire_shell_extent : SET [1:?] OF loop;
    WHERE
      wr1: NOT mixed_loop_type_set(wire_shell_extent);
  END_ENTITY; -- wire_shell

  ENTITY  work_cell
    SUBTYPE OF (applied_group_assignment, action_resource);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* SELF.items | (
               'PROCESS_PLANNING_SCHEMA.WORKSTATION' IN TYPEOF(adr)) )) >= 
               1;
      wr2: SIZEOF(QUERY ( adr <* SELF.usage | (
               'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_ACTIVITY' IN TYPEOF(
               adr)) )) >= 1;
  END_ENTITY; -- work_cell

  ENTITY  workstation
    SUBTYPE OF (action_resource);
    WHERE
      wr1: SIZEOF(QUERY ( adr <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')
                | (adr.assigned_document.kind.product_data_type = 
               'special capability') )) >= 0;
      wr2: SIZEOF(QUERY ( wc <* USEDIN(SELF,
               'PROCESS_PLANNING_SCHEMA.APPLIED_GROUP_ASSIGNMENT.ITEMS') | 
               ('PROCESS_PLANNING_SCHEMA.WORK_CELL' IN TYPEOF(wc)) )) = 1;
  END_ENTITY; -- workstation

  RULE  application_context_requires_ap_definition FOR (application_context, 
               application_protocol_definition);

  WHERE
    wr1: SIZEOF(QUERY ( ac <* application_context | (NOT (SIZEOF(
             QUERY ( apd <* application_protocol_definition | ((ac :=: apd.
             application) AND (apd.
             application_interpreted_model_schema_name = 
             'process_planning_schema')) )) = 1)) )) = 0;

  END_RULE; -- application_context_requires_ap_definition

  RULE  approval_requires_approval_date_time FOR (approval, 
             approval_date_time);

  WHERE
    wr1: SIZEOF(QUERY ( app <* approval | (NOT (SIZEOF(QUERY ( adt <* 
             approval_date_time | (app :=: adt.dated_approval) )) = 1)) )) 
             = 0;

  END_RULE; -- approval_requires_approval_date_time

  RULE  approval_requires_approval_person_organization FOR (approval, 
             approval_person_organization);

  WHERE
    wr1: SIZEOF(QUERY ( app <* approval | (NOT (SIZEOF(QUERY ( apo <* 
             approval_person_organization | (app :=: apo.
             authorized_approval) )) >= 1)) )) = 0;
  END_RULE; -- approval_requires_approval_person_organization

  RULE  compatible_dimension FOR (cartesian_point, direction, 
             representation_context, geometric_representation_context);

  WHERE
    wr1: SIZEOF(QUERY ( x <* cartesian_point | (SIZEOF(QUERY ( y <* 
             geometric_representation_context | (item_in_context(x,y) AND (
             HIINDEX(x.coordinates) <> y.coordinate_space_dimension)) )) > 
             0) )) = 0;
    wr2: SIZEOF(QUERY ( x <* direction | (SIZEOF(QUERY ( y <* 
             geometric_representation_context | (item_in_context(x,y) AND (
             HIINDEX(x.direction_ratios) <> y.coordinate_space_dimension)))) 
             > 0) )) = 0;

  END_RULE; -- compatible_dimension

  RULE  dependent_instantiable_approval_status FOR (approval_status);

  WHERE
    wr1: SIZEOF(QUERY ( ast <* approval_status | (NOT (SIZEOF(USEDIN(ast,
             '')) >= 1)) )) = 0;

  END_RULE; -- dependent_instantiable_approval_status

  RULE  dependent_instantiable_date FOR (date);

  WHERE
    wr1: SIZEOF(QUERY ( dt <* date | (NOT (SIZEOF(USEDIN(dt,'')) >= 1)) )) 
             = 0;

  END_RULE; -- dependent_instantiable_date

  RULE  dependent_instantiable_named_unit FOR (named_unit);

  WHERE
    wr1: SIZEOF(QUERY ( nu <* named_unit | (NOT (SIZEOF(USEDIN(nu,'')) >= 
             1)) )) = 0;

  END_RULE; -- dependent_instantiable_named_unit

  RULE  dependent_instantiable_precision_qualifier FOR
(precision_qualifier);

  WHERE
    wr1: SIZEOF(QUERY ( pq <* precision_qualifier | (NOT (SIZEOF(USEDIN(pq,
             '')) >= 1)) )) = 0;

  END_RULE; -- dependent_instantiable_precision_qualifier

  RULE  dependent_instantiable_security_classification_level FOR (
             security_classification_level);

  WHERE
    wr1: SIZEOF(QUERY ( scl <* security_classification_level | (NOT (
             SIZEOF(USEDIN(scl,'')) >= 1)) )) = 0;

  END_RULE; -- dependent_instantiable_security_classification_level

  RULE  dependent_instantiable_shape_representation FOR (
             shape_representation);
  WHERE
    wr1: SIZEOF(QUERY ( sr <* shape_representation | (NOT (SIZEOF(USEDIN(
             sr,'')) >= 1)) )) = 0;

  END_RULE; -- dependent_instantiable_shape_representation

  RULE  dependent_instantiable_type_qualifier FOR (type_qualifier);

  WHERE
    wr1: SIZEOF(QUERY ( tq <* type_qualifier | (NOT (SIZEOF(USEDIN(tq,'')) 
             >= 1)) )) = 0;

  END_RULE; -- dependent_instantiable_type_qualifier

  RULE  dependent_instantiable_uncertainty_qualifier FOR (
             uncertainty_qualifier);

  WHERE
    wr1: SIZEOF(QUERY ( uq <* uncertainty_qualifier | (NOT (SIZEOF(USEDIN(
             uq,'')) >= 1)) )) = 0;

  END_RULE; -- dependent_instantiable_uncertainty_qualifier

  RULE  externally_defined_class_with_known_source_requirement FOR (
             externally_defined_class);

  WHERE
    wr1: SIZEOF(QUERY ( edc <* externally_defined_class | ((
             'PROCESS_PLANNING_SCHEMA.KNOWN_SOURCE' IN TYPEOF(edc.source)) 
             AND (NOT (SIZEOF(QUERY ( aoa <* USEDIN(edc.source,
           'PROCESS_PLANNING_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')
              | (aoa.role.name = 'library supplier') )) = 1))) )) <= 1;

  END_RULE; -- externally_defined_class_with_known_source_requirement

  RULE  geometric_tolerance_subtype_exclusiveness FOR (geometric_tolerance);

  WHERE
    wr1: SIZEOF(QUERY ( gt <* geometric_tolerance | (NOT (SIZEOF(TYPEOF(gt) 
             * ['PROCESS_PLANNING_SCHEMA.ANGULARITY_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.CIRCULAR_RUNOUT_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.CONCENTRICITY_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.CYLINDRICITY_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.FLATNESS_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.LINE_PROFILE_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.PARALLELISM_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.PERPENDICULARITY_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.POSITION_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.ROUNDNESS_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.STRAIGHTNESS_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.SURFACE_PROFILE_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.SYMMETRY_TOLERANCE',
             'PROCESS_PLANNING_SCHEMA.TOTAL_RUNOUT_TOLERANCE']) <= 2)) )) =
              0;

  END_RULE; -- geometric_tolerance_subtype_exclusiveness

  RULE  machining_feature_life_cycle FOR (instanced_feature);

  WHERE
    wr1: SIZEOF(QUERY ( mf <* instanced_feature | (NOT (mf.of_shape.
             definition.frame_of_reference.life_cycle_stage = 
             'manufacturing planning')) )) = 0;

  END_RULE; -- machining_feature_life_cycle

  RULE  material_is_specified_for_part FOR (product_definition, 
             make_from_usage_option);

  WHERE
    wr1: SIZEOF(QUERY ( nmpd <* QUERY ( pd <* product_definition | (
             SIZEOF(USEDIN(pd,'PROCESS_PLANNING_SCHEMA.' + 
             'MATERIAL_DESIGNATION.DEFINITIONS')) = 0) ) | (NOT (SIZEOF(
             QUERY ( mfuo <* make_from_usage_option | (NOT (nmpd :=: mfuo.
             relating_product_definition)) )) >= 1)) )) = 0;

  END_RULE; -- material_is_specified_for_part

  RULE  mating_definition_relationship_orientation FOR (
             product_definition_relationship);

  WHERE
    wr1: SIZEOF(QUERY ( prd_def_rel <* product_definition_relationship | (
             NOT (SIZEOF(QUERY ( pd <* USEDIN(prd_def_rel,
             'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION') | (
             NOT (SIZEOF(QUERY ( pdr <* USEDIN(pd,
   'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')
              | (((
             'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINITION_REPRESENTATION' IN 
             TYPEOF(pdr)) AND (
             'PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION' IN TYPEOF(pdr.
             used_representation))) AND (NOT (SIZEOF(QUERY ( rm <* USEDIN(
            pdr.used_representation,
         'PROCESS_PLANNING_SCHEMA.REPRESENTATION_MAP.MAPPED_REPRESENTATION')
              | (SIZEOF(QUERY ( mi <* USEDIN(rm,
             'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM.MAPPING_SOURCE') | (
             'PROCESS_PLANNING_SCHEMA.REPRESENTATION_ITEM' IN TYPEOF(mi.
             mapping_target)) )) <= 1) )) = 0))) )) = 0)) )) = 0)) )) = 0;

  END_RULE; -- mating_definition_relationship_orientation

  RULE  restrict_name_for_known_source FOR (known_source);

  WHERE
    wr1: SIZEOF(QUERY ( ks <* known_source | (ks.name <> 
             'ISO 13584 library') )) = 0;

  END_RULE; -- restrict_name_for_known_source

  RULE  shape_aspect_relationship_subtype_exclusiveness FOR (
             shape_aspect_relationship);

  WHERE
    wr1: SIZEOF(QUERY ( sr <* shape_aspect_relationship | (NOT (SIZEOF(
             TYPEOF(sr) * ['PROCESS_PLANNING_SCHEMA.DIMENSIONAL_LOCATION',
             'PROCESS_PLANNING_SCHEMA.GEOMETRIC_TOLERANCE_RELATIONSHIP',
             'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP',
             'PROCESS_PLANNING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP']) <= 2)))) 
             = 0;

  END_RULE; -- shape_aspect_relationship_subtype_exclusiveness

  RULE  subtype_exclusiveness_action_resource FOR (action_resource);

  WHERE
    wr1: SIZEOF(QUERY ( a <* action_resource | (NOT type_check_function(a,
             ['PROCESS_PLANNING_SCHEMA.CONTROLLER',
             'PROCESS_PLANNING_SCHEMA.GENERIC_MANUFACTURING_RESOURCE',
             'PROCESS_PLANNING_SCHEMA.FIXTURE_ASSEMBLY',
             'PROCESS_PLANNING_SCHEMA.FIXTURE_ASSEMBLY_ELEMENT',
             'PROCESS_PLANNING_SCHEMA.WORK_CELL',
             'PROCESS_PLANNING_SCHEMA.MACHINE',
             'PROCESS_PLANNING_SCHEMA.WORKSTATION',
             'PROCESS_PLANNING_SCHEMA.TOOL_MAGAZINE_TURRET_CAROUSEL',
             'PROCESS_PLANNING_SCHEMA.TOOL_ASSEMBLY',
             'PROCESS_PLANNING_SCHEMA.TOOL_ASSEMBLY_ELEMENT'],3)) )) = 0;

  END_RULE; -- subtype_exclusiveness_action_resource

  RULE  subtype_exclusiveness_action_resource_relationship FOR (
             action_resource_relationship);

  WHERE
    wr1: SIZEOF(QUERY ( a <* action_resource_relationship | (NOT 
             type_check_function(a,[
             'PROCESS_PLANNING_SCHEMA.MACHINE_ELEMENT_RELATIONSHIP',
             'PROCESS_PLANNING_SCHEMA.FIXTURE_ASSEMBLY_RELATIONSHIP',
             'PROCESS_PLANNING_SCHEMA.TOOL_ASSEMBLY_RELATIONSHIP'],3)) )) =
              0;

  END_RULE; -- subtype_exclusiveness_action_resource_relationship

  RULE  subtype_exclusiveness_characterized_object FOR (
             characterized_object);

  WHERE
    wr1: SIZEOF(QUERY ( a <* characterized_object | (NOT 
            type_check_function(a,
            ['PROCESS_PLANNING_SCHEMA.DOCUMENT_FILE',
             'PROCESS_PLANNING_SCHEMA.FEATURE_DEFINITION',
             'PROCESS_PLANNING_SCHEMA.FEATURE_COMPONENT_DEFINITION'],3)) )) 
             = 0;

  END_RULE; -- subtype_exclusiveness_characterized_object

  RULE  subtype_exclusiveness_contract FOR (contract);

  WHERE
    wr1: SIZEOF(QUERY ( a <* contract | (NOT type_check_function(a,[
             'PROCESS_PLANNING_SCHEMA.FIXTURE_CONTRACT',
             'PROCESS_PLANNING_SCHEMA.PART_CONTRACT',
             'PROCESS_PLANNING_SCHEMA.TOOL_CONTRACT'],3)) )) = 0;

  END_RULE; -- subtype_exclusiveness_contract

  RULE  subtype_exclusiveness_document FOR (document);

  WHERE
    wr1: SIZEOF(QUERY ( a <* document | (NOT type_check_function(a,[
             'PROCESS_PLANNING_SCHEMA.PROCESS_PLAN_SPECIFICATION',
             'PROCESS_PLANNING_SCHEMA.DOCUMENT_FILE',
             'PROCESS_PLANNING_SCHEMA.DRAWING',
             'PROCESS_PLANNING_SCHEMA.CONTROLLER_PROGRAM',
             'PROCESS_PLANNING_SCHEMA.ILLUSTRATION'],4)) )) = 0;

  END_RULE; -- subtype_exclusiveness_document

  RULE  subtype_exclusiveness_group FOR (group);

  WHERE
    wr1: SIZEOF(QUERY ( a <* group | (NOT type_check_function(a,[
             'PROCESS_PLANNING_SCHEMA.FEATURE_TREE',
             'PROCESS_PLANNING_SCHEMA.CLASS'],1)) )) = 0;

  END_RULE; -- subtype_exclusiveness_group

  RULE  subtype_exclusiveness_resource_property FOR (resource_property);

  WHERE
    wr1: SIZEOF(QUERY ( a <* resource_property | (NOT type_check_function(
             a,['PROCESS_PLANNING_SCHEMA.CLAMP_POSITION',
             'PROCESS_PLANNING_SCHEMA.TOOL_DATA',
             'PROCESS_PLANNING_SCHEMA.IN_FACILITY_LOCATION'],3)) )) = 0;

  END_RULE; -- subtype_exclusiveness_resource_property

  RULE  subtype_exclusiveness_shape_aspect FOR (shape_aspect);

  WHERE
    wr1: SIZEOF(QUERY ( a <* shape_aspect | (NOT type_check_function(a,[
             'PROCESS_PLANNING_SCHEMA.APPLIED_AREA',
             'PROCESS_PLANNING_SCHEMA.BOSS_TOP',
             'PROCESS_PLANNING_SCHEMA.CHAMFER_OFFSET',
             'PROCESS_PLANNING_SCHEMA.CIRCULAR_CLOSED_PROFILE',
             'PROCESS_PLANNING_SCHEMA.CLOSED_PATH_PROFILE',
             'PROCESS_PLANNING_SCHEMA.COMPOSITE_SHAPE_ASPECT',
             'PROCESS_PLANNING_SCHEMA.DATUM',
             'PROCESS_PLANNING_SCHEMA.DATUM_FEATURE',
             'PROCESS_PLANNING_SCHEMA.DATUM_TARGET',
             'PROCESS_PLANNING_SCHEMA.DERIVED_SHAPE_ASPECT',
             'PROCESS_PLANNING_SCHEMA.HOLE_BOTTOM',
             'PROCESS_PLANNING_SCHEMA.LINEAR_PROFILE',
             'PROCESS_PLANNING_SCHEMA.MODIFIED_PATTERN',
             'PROCESS_PLANNING_SCHEMA.NGON_CLOSED_PROFILE',
             'PROCESS_PLANNING_SCHEMA.OPEN_PATH_PROFILE',
             'PROCESS_PLANNING_SCHEMA.PARTIAL_CIRCULAR_PROFILE',
             'PROCESS_PLANNING_SCHEMA.PATH_FEATURE_COMPONENT',
             'PROCESS_PLANNING_SCHEMA.POCKET_BOTTOM',
             'PROCESS_PLANNING_SCHEMA.PROFILE_FLOOR',
             'PROCESS_PLANNING_SCHEMA.RECTANGULAR_CLOSED_PROFILE',
             'PROCESS_PLANNING_SCHEMA.RIB_TOP_FLOOR',
             'PROCESS_PLANNING_SCHEMA.ROUNDED_U_PROFILE',
             'PROCESS_PLANNING_SCHEMA.SLOT_END',
             'PROCESS_PLANNING_SCHEMA.SQUARE_U_PROFILE',
             'PROCESS_PLANNING_SCHEMA.SYMMETRIC_SHAPE_ASPECT',
             'PROCESS_PLANNING_SCHEMA.TAPER',
             'PROCESS_PLANNING_SCHEMA.TEE_PROFILE',
             'PROCESS_PLANNING_SCHEMA.TOLERANCE_ZONE',
             'PROCESS_PLANNING_SCHEMA.TRANSITION_FEATURE',
             'PROCESS_PLANNING_SCHEMA.VEE_PROFILE'],3)) )) = 0;

  END_RULE; -- subtype_exclusiveness_shape_aspect

  RULE  subtype_exclusiveness_shape_representation FOR (
             shape_representation);

  WHERE
    wr1: SIZEOF(QUERY ( a <* shape_representation | (NOT 
             type_check_function(a,[
             'PROCESS_PLANNING_SCHEMA.ADVANCED_BREP_SHAPE_REPRESENTATION',
             'PROCESS_PLANNING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION',
       'PROCESS_PLANNING_SCHEMA.EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION',
             'PROCESS_PLANNING_SCHEMA.FACE_SHAPE_REPRESENTATION',
             'PROCESS_PLANNING_SCHEMA.FACETED_BREP_SHAPE_REPRESENTATION',
'PROCESS_PLANNING_SCHEMA.GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION',
'PROCESS_PLANNING_SCHEMA.GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION',
            'PROCESS_PLANNING_SCHEMA.LOCATION_SHAPE_REPRESENTATION',
           'PROCESS_PLANNING_SCHEMA.MANIFOLD_SURFACE_SHAPE_REPRESENTATION',
             'PROCESS_PLANNING_SCHEMA.PATH_SHAPE_REPRESENTATION',
             'PROCESS_PLANNING_SCHEMA.PLANAR_SHAPE_REPRESENTATION',
             'PROCESS_PLANNING_SCHEMA.SHAPE_DIMENSION_REPRESENTATION',
            'PROCESS_PLANNING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS',
    'PROCESS_PLANNING_SCHEMA.SHELL_BASED_WIREFRAME_SHAPE_REPRESENTATION'],
             3)) )) = 0;

  END_RULE; -- subtype_exclusiveness_shape_representation

  FUNCTION  acyclic_curve_replica(
               rep: curve_replica;
               parent: curve
      ): BOOLEAN;
    IF NOT ('PROCESS_PLANNING_SCHEMA.CURVE_REPLICA' IN TYPEOF(parent))
         THEN
      RETURN(TRUE);
    END_IF;
    IF parent :=: rep THEN
      RETURN(FALSE);
    ELSE
      RETURN(acyclic_curve_replica(rep,parent\curve_replica.parent_curve));
    END_IF;

  END_FUNCTION; -- acyclic_curve_replica

  FUNCTION  acyclic_mapped_representation(
               parent_set: SET OF representation;
               children_set: SET OF representation_item
      ): BOOLEAN;

    LOCAL
      x : SET OF representation_item;
      y : SET OF representation_item;
    END_LOCAL;
    x := QUERY ( z <* children_set | (
        'PROCESS_PLANNING_SCHEMA.MAPPED_ITEM' IN TYPEOF(z)) );
    IF SIZEOF(x) > 0 THEN
      REPEAT i := 1 TO HIINDEX(x) BY 1;
        IF x[i]\mapped_item.mapping_source.mapped_representation IN 
            parent_set THEN
          RETURN(FALSE);
        END_IF;
        IF NOT acyclic_mapped_representation(parent_set + x[i]\mapped_item
            .mapping_source.mapped_representation,x[i]\mapped_item.
            mapping_source.mapped_representation.items) THEN
          RETURN(FALSE);
        END_IF;
      END_REPEAT;
    END_IF;
    x := children_set - x;
    IF SIZEOF(x) > 0 THEN
      REPEAT i := 1 TO HIINDEX(x) BY 1;
        y := QUERY ( z <* bag_to_set(USEDIN(x[i],'')) | (
            'PROCESS_PLANNING_SCHEMA.REPRESENTATION_ITEM' IN TYPEOF(z)) );
        IF NOT acyclic_mapped_representation(parent_set,y) THEN
          RETURN(FALSE);
        END_IF;
      END_REPEAT;
    END_IF;
    RETURN(TRUE);

  END_FUNCTION; -- acyclic_mapped_representation

  FUNCTION  acyclic_point_replica(
               rep: point_replica;
               parent: point
      ): BOOLEAN;
    IF NOT ('PROCESS_PLANNING_SCHEMA.POINT_REPLICA' IN TYPEOF(parent))
         THEN
      RETURN(TRUE);
    END_IF;
    IF parent :=: rep THEN
      RETURN(FALSE);
    ELSE
      RETURN(acyclic_point_replica(rep,parent\point_replica.parent_pt));
    END_IF;

  END_FUNCTION; -- acyclic_point_replica

  FUNCTION  acyclic_product_definition_relationship(
               relation: product_definition_relationship;
               relatives: SET [1:?] OF product_definition;
               specific_relation: STRING
      ): BOOLEAN;

    LOCAL
      x : SET OF product_definition_relationship;
    END_LOCAL;
    IF relation.relating_product_definition IN relatives THEN
      RETURN(FALSE);
    END_IF;
    x := QUERY ( pd <* bag_to_set(USEDIN(relation.
        relating_product_definition,('PROCESS_PLANNING_SCHEMA.' + 
        'PRODUCT_DEFINITION_RELATIONSHIP.') +
         'RELATED_PRODUCT_DEFINITION'))
         | (specific_relation IN TYPEOF(pd)) );
    REPEAT i := 1 TO HIINDEX(x) BY 1;
      IF NOT acyclic_product_definition_relationship(x[i],relatives + 
          relation.relating_product_definition,specific_relation) THEN
        RETURN(FALSE);
      END_IF;
    END_REPEAT;
    RETURN(TRUE);

  END_FUNCTION; -- acyclic_product_definition_relationship

  FUNCTION  acyclic_surface_replica(
               rep: surface_replica;
               parent: surface
      ): BOOLEAN;
    IF NOT ('PROCESS_PLANNING_SCHEMA.SURFACE_REPLICA' IN TYPEOF(parent))
         THEN
      RETURN(TRUE);
    END_IF;
    IF parent :=: rep THEN
      RETURN(FALSE);
    ELSE
      RETURN(acyclic_surface_replica(rep,parent\surface_replica.
          parent_surface));
    END_IF;

  END_FUNCTION; -- acyclic_surface_replica

  FUNCTION  associated_surface(
               arg: pcurve_or_surface
      ): surface;

    LOCAL
      surf : surface;
    END_LOCAL;
    IF 'PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(arg) THEN
      surf := arg.basis_surface;
    ELSE
      surf := arg;
    END_IF;
    RETURN(surf);

  END_FUNCTION; -- associated_surface

  FUNCTION  bag_to_set(
               the_bag: BAG OF GENERIC:intype
      ): SET OF GENERIC:intype;

    LOCAL
      the_set : SET OF GENERIC:intype := [];
    END_LOCAL;
    IF SIZEOF(the_bag) > 0 THEN
      REPEAT i := 1 TO HIINDEX(the_bag) BY 1;
        the_set := the_set + the_bag[i];
      END_REPEAT;
    END_IF;
    RETURN(the_set);

  END_FUNCTION; -- bag_to_set

  FUNCTION  base_axis(
               dim: INTEGER;
               axis1, axis2, axis3: direction
      ): LIST [2:3] OF direction;

    LOCAL
      u      : LIST [2:3] OF direction;
      d1     : direction;
      d2     : direction;
      factor : REAL;
    END_LOCAL;
    IF dim = 3 THEN
      d1 := NVL(normalise(axis3),dummy_gri || direction([0,0,1]));
      d2 := first_proj_axis(d1,axis1);
      u := [d2,second_proj_axis(d1,d2,axis2),d1];
    ELSE
      IF EXISTS(axis1) THEN
        d1 := normalise(axis1);
        u := [d1,orthogonal_complement(d1)];
        IF EXISTS(axis2) THEN
          factor := dot_product(axis2,u[2]);
          IF factor < 0 THEN
            u[2].direction_ratios[1] := -u[2].direction_ratios[1];
            u[2].direction_ratios[2] := -u[2].direction_ratios[2];
          END_IF;
        END_IF;
      ELSE
        IF EXISTS(axis2) THEN
          d1 := normalise(axis2);
          u := [orthogonal_complement(d1),d1];
          u[1].direction_ratios[1] := -u[1].direction_ratios[1];
          u[1].direction_ratios[2] := -u[1].direction_ratios[2];
        ELSE
          u := [dummy_gri || direction([1,0]),dummy_gri ||direction([0,1])];
        END_IF;
      END_IF;
    END_IF;
    RETURN(u);

  END_FUNCTION; -- base_axis

  FUNCTION  boolean_choose(
               b: BOOLEAN;
               choice1, choice2: GENERIC:item
      ): GENERIC:item;
    IF b THEN
      RETURN(choice1);
    ELSE
      RETURN(choice2);
    END_IF;

  END_FUNCTION; -- boolean_choose

  FUNCTION  build_2axes(
               ref_direction: direction
      ): LIST [2:2] OF direction;

    LOCAL
      d : direction := NVL(normalise(ref_direction),dummy_gri || 
           direction([1,0]));
    END_LOCAL;
    RETURN([d,orthogonal_complement(d)]);

  END_FUNCTION; -- build_2axes

  FUNCTION  build_axes(
               axis, ref_direction: direction
      ): LIST [3:3] OF direction;

    LOCAL
      d1 : direction;
      d2 : direction;
    END_LOCAL;
    d1 := NVL(normalise(axis),dummy_gri || direction([0,0,1]));
    d2 := first_proj_axis(d1,ref_direction);
    RETURN([d2,normalise(cross_product(d1,d2)).orientation,d1]);

  END_FUNCTION; -- build_axes

  FUNCTION  closed_shell_reversed(
               a_shell: closed_shell
      ): oriented_closed_shell;

    LOCAL
      the_reverse : oriented_closed_shell;
    END_LOCAL;
    IF 'PROCESS_PLANNING_SCHEMA.ORIENTED_CLOSED_SHELL' IN TYPEOF(a_shell)
         THEN
      the_reverse := ((dummy_tri || connected_face_set(a_shell\
          connected_face_set.cfs_faces)) || closed_shell()) || 
          oriented_closed_shell(a_shell\oriented_closed_shell.
          closed_shell_element,NOT a_shell\oriented_closed_shell.
          orientation);
    ELSE
      the_reverse := ((dummy_tri || connected_face_set(a_shell\
          connected_face_set.cfs_faces)) || closed_shell()) || 
          oriented_closed_shell(a_shell,FALSE);
    END_IF;
    RETURN(the_reverse);

  END_FUNCTION; -- closed_shell_reversed

  FUNCTION  conditional_reverse(
               p: BOOLEAN;
               an_item: reversible_topology
      ): reversible_topology;
    IF p THEN
      RETURN(an_item);
    ELSE
      RETURN(topology_reversed(an_item));
    END_IF;

  END_FUNCTION; -- conditional_reverse

  FUNCTION  constraints_composite_curve_on_surface(
               c: composite_curve_on_surface
      ): BOOLEAN;

    LOCAL
      n_segments : INTEGER := SIZEOF(c.segments);
    END_LOCAL;
    REPEAT k := 1 TO n_segments BY 1;
      IF ((NOT ('PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(c\
          composite_curve.segments[k].parent_curve))) AND (NOT (
          'PROCESS_PLANNING_SCHEMA.SURFACE_CURVE' IN TYPEOF(c\
          composite_curve.segments[k].parent_curve)))) AND (NOT (
          'PROCESS_PLANNING_SCHEMA.COMPOSITE_CURVE_ON_SURFACE' IN TYPEOF(c\
          composite_curve.segments[k].parent_curve))) THEN
        RETURN(FALSE);
      END_IF;
    END_REPEAT;
    RETURN(TRUE);

  END_FUNCTION; -- constraints_composite_curve_on_surface

  FUNCTION  constraints_geometry_shell_based_surface_model(
               m: shell_based_surface_model
      ): BOOLEAN;

    LOCAL
      result : BOOLEAN := TRUE;
    END_LOCAL;
    REPEAT j := 1 TO SIZEOF(m.sbsm_boundary) BY 1;
      IF (NOT ('PROCESS_PLANNING_SCHEMA.OPEN_SHELL' IN TYPEOF(m.
          sbsm_boundary[j]))) AND (NOT (
          'PROCESS_PLANNING_SCHEMA.CLOSED_SHELL' IN TYPEOF(m.sbsm_boundary[
          j]))) THEN
        result := FALSE;
        RETURN(result);
      END_IF;
    END_REPEAT;
    RETURN(result);

  END_FUNCTION; -- constraints_geometry_shell_based_surface_model

  FUNCTION  constraints_geometry_shell_based_wireframe_model(
               m: shell_based_wireframe_model
      ): BOOLEAN;

    LOCAL
      result : BOOLEAN := TRUE;
    END_LOCAL;
    REPEAT j := 1 TO SIZEOF(m.sbwm_boundary) BY 1;
      IF (NOT ('PROCESS_PLANNING_SCHEMA.WIRE_SHELL' IN TYPEOF(m.
          sbwm_boundary[j]))) AND (NOT (
          'PROCESS_PLANNING_SCHEMA.VERTEX_SHELL' IN TYPEOF(m.sbwm_boundary[
          j]))) THEN
        result := FALSE;
        RETURN(result);
      END_IF;
    END_REPEAT;
    RETURN(result);

  END_FUNCTION; -- constraints_geometry_shell_based_wireframe_model

  FUNCTION  constraints_param_b_spline(
               degree, up_knots, up_cp: INTEGER;
               knot_mult: LIST OF INTEGER;
               knots: LIST OF parameter_value
      ): BOOLEAN;

    LOCAL
      k      : INTEGER;
      sum    : INTEGER;
      result : BOOLEAN := TRUE;
    END_LOCAL;
    sum := knot_mult[1];
    REPEAT i := 2 TO up_knots BY 1;
      sum := sum + knot_mult[i];
    END_REPEAT;
    IF (((degree < 1) OR (up_knots < 2)) OR (up_cp < degree)) OR (sum <> (
        (degree + up_cp) + 2)) THEN
      result := FALSE;
      RETURN(result);
    END_IF;
    k := knot_mult[1];
    IF (k < 1) OR (k > (degree + 1)) THEN
      result := FALSE;
      RETURN(result);
    END_IF;
    REPEAT i := 2 TO up_knots BY 1;
      IF (knot_mult[i] < 1) OR (knots[i] <= knots[i - 1]) THEN
        result := FALSE;
        RETURN(result);
      END_IF;
      k := knot_mult[i];
      IF (i < up_knots) AND (k > degree) THEN
        result := FALSE;
        RETURN(result);
      END_IF;
      IF (i = up_knots) AND (k > (degree + 1)) THEN
        result := FALSE;
        RETURN(result);
      END_IF;
    END_REPEAT;
    RETURN(result);

  END_FUNCTION; -- constraints_param_b_spline

  FUNCTION  constraints_rectangular_composite_surface(
               s: rectangular_composite_surface
      ): BOOLEAN;
    REPEAT i := 1 TO s.n_u BY 1;
      REPEAT j := 1 TO s.n_v BY 1;
        IF NOT (('PROCESS_PLANNING_SCHEMA.B_SPLINE_SURFACE' IN TYPEOF(s.
            segments[i][j].parent_surface)) OR (
            'PROCESS_PLANNING_SCHEMA.RECTANGULAR_TRIMMED_SURFACE' IN 
            TYPEOF(s.segments[i][j].parent_surface))) THEN
          RETURN(FALSE);
        END_IF;
      END_REPEAT;
    END_REPEAT;
    REPEAT i := 1 TO s.n_u - 1 BY 1;
      REPEAT j := 1 TO s.n_v BY 1;
        IF s.segments[i][j].u_transition = discontinuous THEN
          RETURN(FALSE);
        END_IF;
      END_REPEAT;
    END_REPEAT;
    REPEAT i := 1 TO s.n_u BY 1;
      REPEAT j := 1 TO s.n_v - 1 BY 1;
        IF s.segments[i][j].v_transition = discontinuous THEN
          RETURN(FALSE);
        END_IF;
      END_REPEAT;
    END_REPEAT;
    RETURN(TRUE);

  END_FUNCTION; -- constraints_rectangular_composite_surface

  FUNCTION  cross_product(
               arg1, arg2: direction
      ): vector;

    LOCAL
      v2     : LIST [3:3] OF REAL;
      v1     : LIST [3:3] OF REAL;
      mag    : REAL;
      res    : direction;
      result : vector;
    END_LOCAL;
    IF ((NOT EXISTS(arg1)) OR (arg1.dim = 2)) OR ((NOT EXISTS(arg2)) OR (
        arg2.dim = 2)) THEN
      RETURN(?);
    ELSE
      BEGIN
        v1 := normalise(arg1).direction_ratios;
        v2 := normalise(arg2).direction_ratios;
        res := dummy_gri || direction([(v1[2] * v2[3]) - (v1[3] * v2[2]),(
            v1[3] * v2[1]) - (v1[1] * v2[3]),(v1[1] * v2[2]) - (v1[2] * v2[
            1])]);
        mag := 0;
        REPEAT i := 1 TO 3 BY 1;
          mag := mag + (res.direction_ratios[i] * res.direction_ratios[i]);
        END_REPEAT;
        IF mag > 0 THEN
          result := dummy_gri || vector(res,SQRT(mag));
        ELSE
          result := dummy_gri || vector(arg1,0);
        END_IF;
        RETURN(result);
      END;
    END_IF;

  END_FUNCTION; -- cross_product

  FUNCTION  curve_weights_positive(
               b: rational_b_spline_curve
      ): BOOLEAN;

    LOCAL
      result : BOOLEAN := TRUE;
    END_LOCAL;
    REPEAT i := 0 TO b.upper_index_on_control_points BY 1;
      IF b.weights[i] <= 0 THEN
        result := FALSE;
        RETURN(result);
      END_IF;
    END_REPEAT;
    RETURN(result);

  END_FUNCTION; -- curve_weights_positive

  FUNCTION  derive_dimensional_exponents(
               x: unit
      ): dimensional_exponents;

    LOCAL
      result : dimensional_exponents := dimensional_exponents(0,0,0,0,0,0,
                0);
    END_LOCAL;
    IF 'PROCESS_PLANNING_SCHEMA.DERIVED_UNIT' IN TYPEOF(x) THEN
      REPEAT i := LOINDEX(x.elements) TO HIINDEX(x.elements) BY 1;
        result.length_exponent := result.length_exponent + (x.elements[i].
            exponent * x.elements[i].unit.dimensions.length_exponent);
        result.mass_exponent := result.mass_exponent + (x.elements[i].
            exponent * x.elements[i].unit.dimensions.mass_exponent);
        result.time_exponent := result.time_exponent + (x.elements[i].
            exponent * x.elements[i].unit.dimensions.time_exponent);
        result.electric_current_exponent := result.
            electric_current_exponent + (x.elements[i].exponent * x.
            elements[i].unit.dimensions.electric_current_exponent);
        result.thermodynamic_temperature_exponent := result.
            thermodynamic_temperature_exponent + (x.elements[i].exponent * 
            x.elements[i].unit.dimensions.
            thermodynamic_temperature_exponent);
        result.amount_of_substance_exponent := result.
            amount_of_substance_exponent + (x.elements[i].exponent * x.
            elements[i].unit.dimensions.amount_of_substance_exponent);
        result.luminous_intensity_exponent := result.
            luminous_intensity_exponent + (x.elements[i].exponent * x.
            elements[i].unit.dimensions.luminous_intensity_exponent);
      END_REPEAT;
    ELSE
      result := x.dimensions;
    END_IF;
    RETURN(result);

  END_FUNCTION; -- derive_dimensional_exponents

  FUNCTION  dimension_of(
               item: geometric_representation_item
      ): dimension_count;

    LOCAL
      x   : SET OF representation;
      y   : representation_context;
      dim : dimension_count;
    END_LOCAL;
    IF 'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(item) THEN
      dim := SIZEOF(item\cartesian_point.coordinates);
      RETURN(dim);
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.DIRECTION' IN TYPEOF(item) THEN
      dim := SIZEOF(item\direction.direction_ratios);
      RETURN(dim);
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.VECTOR' IN TYPEOF(item) THEN
      dim := SIZEOF(item\vector.orientation\direction.direction_ratios);
      RETURN(dim);
    END_IF;
    x := using_representations(item);
    y := x[1].context_of_items;
    dim := y\geometric_representation_context.coordinate_space_dimension;
    RETURN(dim);

  END_FUNCTION; -- dimension_of

  FUNCTION  dimensions_for_si_unit(
               n: si_unit_name
      ): dimensional_exponents;
    CASE n OF
      metre         :         RETURN(dimensional_exponents(1,0,0,0,0,0,0));
      gram          :         RETURN(dimensional_exponents(0,1,0,0,0,0,0));
      second        :         RETURN(dimensional_exponents(0,0,1,0,0,0,0));
      ampere        :         RETURN(dimensional_exponents(0,0,0,1,0,0,0));
      kelvin        :         RETURN(dimensional_exponents(0,0,0,0,1,0,0));
      mole          :         RETURN(dimensional_exponents(0,0,0,0,0,1,0));
      candela       :         RETURN(dimensional_exponents(0,0,0,0,0,0,1));
      radian        :         RETURN(dimensional_exponents(0,0,0,0,0,0,0));
      steradian     :         RETURN(dimensional_exponents(0,0,0,0,0,0,0));
      hertz         :        RETURN(dimensional_exponents(0,0,-1,0,0,0,0));
      newton        :        RETURN(dimensional_exponents(1,1,-2,0,0,0,0));
      pascal        :        RETURN(dimensional_exponents(-1,1,-2,0,0,0,0));
      joule         :        RETURN(dimensional_exponents(2,1,-2,0,0,0,0));
      watt          :        RETURN(dimensional_exponents(2,1,-3,0,0,0,0));
      coulomb       :         RETURN(dimensional_exponents(0,0,1,1,0,0,0));
      volt          :        RETURN(dimensional_exponents(2,1,-3,-1,0,0,0));
      farad         :        RETURN(dimensional_exponents(-2,-1,4,1,0,0,0));
      ohm           :         RETURN(dimensional_exponents(2,1,-3,-2,0,0,0));
      siemens       :        RETURN(dimensional_exponents(-2,-1,3,2,0,0,0));
      weber         :        RETURN(dimensional_exponents(2,1,-2,-1,0,0,0));
      tesla         :        RETURN(dimensional_exponents(0,1,-2,-1,0,0,0));
      henry         :        RETURN(dimensional_exponents(2,1,-2,-2,0,0,0));
      degree_celsius  :        RETURN(dimensional_exponents(0,0,0,0,1,0,0));
      lumen         :         RETURN(dimensional_exponents(0,0,0,0,0,0,1));
      lux           :         RETURN(dimensional_exponents(-2,0,0,0,0,0,1));
      becquerel     :        RETURN(dimensional_exponents(0,0,-1,0,0,0,0));
      gray          :        RETURN(dimensional_exponents(2,0,-2,0,0,0,0));
      sievert       :        RETURN(dimensional_exponents(2,0,-2,0,0,0,0));
      END_CASE;

  END_FUNCTION; -- dimensions_for_si_unit

  FUNCTION  dot_product(
               arg1, arg2: direction
      ): REAL;

    LOCAL
      ndim   : INTEGER;
      scalar : REAL;
      vec1   : direction;
      vec2   : direction;
    END_LOCAL;
    IF (NOT EXISTS(arg1)) OR (NOT EXISTS(arg2)) THEN
      scalar := ?;
    ELSE
      IF arg1.dim <> arg2.dim THEN
        scalar := ?;
      ELSE
        BEGIN
          vec1 := normalise(arg1);
          vec2 := normalise(arg2);
          ndim := arg1.dim;
          scalar := 0;
          REPEAT i := 1 TO ndim BY 1;
            scalar := scalar + (vec1.direction_ratios[i] * vec2.
                direction_ratios[i]);
          END_REPEAT;
        END;
      END_IF;
    END_IF;
    RETURN(scalar);

  END_FUNCTION; -- dot_product

  FUNCTION  edge_reversed(
               an_edge: edge
      ): oriented_edge;

    LOCAL
      the_reverse : oriented_edge;
    END_LOCAL;
    IF 'PROCESS_PLANNING_SCHEMA.ORIENTED_EDGE' IN TYPEOF(an_edge) THEN
      the_reverse := (dummy_tri || edge(an_edge.edge_end,an_edge.
          edge_start)) || oriented_edge(an_edge\oriented_edge.edge_element,
          NOT an_edge\oriented_edge.orientation);
    ELSE
      the_reverse := (dummy_tri || edge(an_edge.edge_end,an_edge.
          edge_start)) || oriented_edge(an_edge,FALSE);
    END_IF;
    RETURN(the_reverse);

  END_FUNCTION; -- edge_reversed

  FUNCTION  face_bound_reversed(
               a_face_bound: face_bound
      ): face_bound;

    LOCAL
      the_reverse : face_bound;
    END_LOCAL;
    IF 'PROCESS_PLANNING_SCHEMA.FACE_OUTER_BOUND' IN TYPEOF(a_face_bound)
         THEN
      the_reverse := (dummy_tri || face_bound(a_face_bound\face_bound.
          bound,NOT a_face_bound\face_bound.orientation)) || 
          face_outer_bound();
    ELSE
      the_reverse := dummy_tri || face_bound(a_face_bound.bound,NOT 
          a_face_bound.orientation);
    END_IF;
    RETURN(the_reverse);

  END_FUNCTION; -- face_bound_reversed

  FUNCTION  face_reversed(
               a_face: face
      ): oriented_face;

    LOCAL
      the_reverse : oriented_face;
    END_LOCAL;
    IF 'PROCESS_PLANNING_SCHEMA.ORIENTED_FACE' IN TYPEOF(a_face) THEN
      the_reverse := (dummy_tri || face(set_of_topology_reversed(a_face.
          bounds))) || oriented_face(a_face\oriented_face.face_element,NOT 
          a_face\oriented_face.orientation);
    ELSE
      the_reverse := (dummy_tri || face(set_of_topology_reversed(a_face.
          bounds))) || oriented_face(a_face,FALSE);
    END_IF;
    RETURN(the_reverse);

  END_FUNCTION; -- face_reversed

  FUNCTION  first_proj_axis(
               z_axis, arg: direction
      ): direction;

    LOCAL
      x_vec  : vector;
      v      : direction;
      z      : direction;
      x_axis : direction;
    END_LOCAL;
    IF NOT EXISTS(z_axis) THEN
      RETURN(?);
    ELSE
      z := normalise(z_axis);
      IF NOT EXISTS(arg) THEN
        IF z.direction_ratios <> [1,0,0] THEN
          v := dummy_gri || direction([1,0,0]);
        ELSE
          v := dummy_gri || direction([0,1,0]);
        END_IF;
      ELSE
        IF arg.dim <> 3 THEN
          RETURN(?);
        END_IF;
        IF cross_product(arg,z).magnitude = 0 THEN
          RETURN(?);
        ELSE
          v := normalise(arg);
        END_IF;
      END_IF;
      x_vec := scalar_times_vector(dot_product(v,z),z);
      x_axis := vector_difference(v,x_vec).orientation;
      x_axis := normalise(x_axis);
    END_IF;
    RETURN(x_axis);

  END_FUNCTION; -- first_proj_axis

  FUNCTION  gbsf_check_curve(
               cv: representation_item
      ): BOOLEAN;
    IF SIZEOF(['PROCESS_PLANNING_SCHEMA.BOUNDED_CURVE',
        'PROCESS_PLANNING_SCHEMA.CONIC',
        'PROCESS_PLANNING_SCHEMA.CURVE_REPLICA',
        'PROCESS_PLANNING_SCHEMA.LINE',
        'PROCESS_PLANNING_SCHEMA.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1 THEN
      RETURN(FALSE);
    END_IF;
    IF SIZEOF(['PROCESS_PLANNING_SCHEMA.CIRCLE',
        'PROCESS_PLANNING_SCHEMA.ELLIPSE',
        'PROCESS_PLANNING_SCHEMA.TRIMMED_CURVE'] * TYPEOF(cv)) = 1 THEN
      RETURN(TRUE);
    ELSE
      IF (('PROCESS_PLANNING_SCHEMA.B_SPLINE_CURVE' IN TYPEOF(cv)) AND (cv
          \b_spline_curve.self_intersect = FALSE)) OR (cv\b_spline_curve.
          self_intersect = UNKNOWN) THEN
        RETURN(TRUE);
      ELSE
        IF (('PROCESS_PLANNING_SCHEMA.COMPOSITE_CURVE' IN TYPEOF(cv)) AND 
            (cv\composite_curve.self_intersect = FALSE)) OR (cv\
            composite_curve.self_intersect = UNKNOWN) THEN
          RETURN(SIZEOF(QUERY ( seg <* cv\composite_curve.segments | (NOT 
              gbsf_check_curve(seg.parent_curve)) )) = 0);
        ELSE
          IF 'PROCESS_PLANNING_SCHEMA.CURVE_REPLICA' IN TYPEOF(cv) THEN
            RETURN(gbsf_check_curve(cv\curve_replica.parent_curve));
          ELSE
            IF (('PROCESS_PLANNING_SCHEMA.OFFSET_CURVE_3D' IN TYPEOF(cv)) 
                AND ((cv\offset_curve_3d.self_intersect = FALSE) OR (cv\
                offset_curve_3d.self_intersect = UNKNOWN))) AND (NOT (
                'PROCESS_PLANNING_SCHEMA.POLYLINE' IN TYPEOF(cv\
                offset_curve_3d.basis_curve))) THEN
              RETURN(gbsf_check_curve(cv\offset_curve_3d.basis_curve));
            ELSE
              IF 'PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(cv) THEN
                RETURN(gbsf_check_curve(cv\pcurve.reference_to_curve\
                    representation.items[1]) AND gbsf_check_surface(cv\
                    pcurve.basis_surface));
              ELSE
                IF 'PROCESS_PLANNING_SCHEMA.POLYLINE' IN TYPEOF(cv) THEN
                  IF SIZEOF(cv\polyline.points) >= 3 THEN
                    RETURN(TRUE);
                  END_IF;
                ELSE
                  IF 'PROCESS_PLANNING_SCHEMA.SURFACE_CURVE' IN TYPEOF(cv)
                       THEN
                    IF gbsf_check_curve(cv\surface_curve.curve_3d) THEN
                      REPEAT i := 1 TO SIZEOF(cv\surface_curve.
                          associated_geometry) BY 1;
                        IF 'PROCESS_PLANNING_SCHEMA.SURFACE' IN TYPEOF(cv\
                            surface_curve.associated_geometry[i]) THEN
                          IF NOT gbsf_check_surface(cv\surface_curve.
                              associated_geometry[i]) THEN
                            RETURN(FALSE);
                          END_IF;
                        ELSE
                          IF 'PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(cv
                              \surface_curve.associated_geometry[i]) THEN
                            IF NOT gbsf_check_curve(cv\surface_curve.
                                associated_geometry[i]) THEN
                              RETURN(FALSE);
                            END_IF;
                          END_IF;
                        END_IF;
                      END_REPEAT;
                      RETURN(TRUE);
                    END_IF;
                  END_IF;
                END_IF;
              END_IF;
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN(FALSE);

  END_FUNCTION; -- gbsf_check_curve

  FUNCTION  gbsf_check_point(
               pnt: point
      ): BOOLEAN;
    IF 'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(pnt) THEN
      RETURN(TRUE);
    ELSE
      IF 'PROCESS_PLANNING_SCHEMA.POINT_ON_CURVE' IN TYPEOF(pnt) THEN
        RETURN(gbsf_check_curve(pnt\point_on_curve.basis_curve));
      ELSE
        IF 'PROCESS_PLANNING_SCHEMA.POINT_ON_SURFACE' IN TYPEOF(pnt) THEN
          RETURN(gbsf_check_surface(pnt\point_on_surface.basis_surface));
        ELSE
          IF 'PROCESS_PLANNING_SCHEMA.DEGENERATE_PCURVE' IN TYPEOF(pnt)
               THEN
            RETURN(gbsf_check_curve(pnt\degenerate_pcurve.
                reference_to_curve\representation.items[1]) AND 
                gbsf_check_surface(pnt\degenerate_pcurve.basis_surface));
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN(FALSE);

  END_FUNCTION; -- gbsf_check_point

  FUNCTION  gbsf_check_surface(
               sf: surface
      ): BOOLEAN;
    IF (('PROCESS_PLANNING_SCHEMA.B_SPLINE_SURFACE' IN TYPEOF(sf)) AND (sf
        \b_spline_surface.self_intersect = FALSE)) OR (sf\b_spline_surface.
        self_intersect = UNKNOWN) THEN
      RETURN(TRUE);
    ELSE
      IF SIZEOF(['PROCESS_PLANNING_SCHEMA.SPHERICAL_SURFACE',
          'PROCESS_PLANNING_SCHEMA.TOROIDAL_SURFACE',
          'PROCESS_PLANNING_SCHEMA.CURVE_BOUNDED_SURFACE',
          'PROCESS_PLANNING_SCHEMA.RECTANGULAR_TRIMMED_SURFACE'] * TYPEOF(
          sf)) = 1 THEN
        RETURN(TRUE);
      ELSE
        IF (('PROCESS_PLANNING_SCHEMA.OFFSET_SURFACE' IN TYPEOF(sf)) AND (
            sf\offset_surface.self_intersect = FALSE)) OR (sf\
            offset_surface.self_intersect = UNKNOWN) THEN
          RETURN(gbsf_check_surface(sf\offset_surface.basis_surface));
        ELSE
          IF 'PROCESS_PLANNING_SCHEMA.RECTANGULAR_COMPOSITE_SURFACE' IN 
              TYPEOF(sf) THEN
            REPEAT i := 1 TO SIZEOF(sf\rectangular_composite_surface.
                segments) BY 1;
              REPEAT j := 1 TO SIZEOF(sf\rectangular_composite_surface.
                  segments[i]) BY 1;
                IF NOT gbsf_check_surface(sf\rectangular_composite_surface
                    .segments[i][j].parent_surface) THEN
                  RETURN(FALSE);
                END_IF;
              END_REPEAT;
            END_REPEAT;
            RETURN(TRUE);
          ELSE
            IF 'PROCESS_PLANNING_SCHEMA.SURFACE_REPLICA' IN TYPEOF(sf)
                 THEN
             
RETURN(gbsf_check_surface(sf\surface_replica.parent_surface));
            ELSE
              IF 'PROCESS_PLANNING_SCHEMA.SURFACE_OF_REVOLUTION' IN 
                  TYPEOF(sf) THEN
                RETURN(gbsf_check_curve(sf\swept_surface.swept_curve));
              END_IF;
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN(FALSE);

  END_FUNCTION; -- gbsf_check_surface

  FUNCTION  get_basis_surface(
               c: curve_on_surface
      ): SET [0:2] OF surface;

    LOCAL
      surfs : SET [0:2] OF surface;
      n     : INTEGER;
    END_LOCAL;
    surfs := [];
    IF 'PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(c) THEN
      surfs := [c\pcurve.basis_surface];
    ELSE
      IF 'PROCESS_PLANNING_SCHEMA.SURFACE_CURVE' IN TYPEOF(c) THEN
        n := SIZEOF(c\surface_curve.associated_geometry);
        REPEAT i := 1 TO n BY 1;
          surfs := surfs + associated_surface(c\surface_curve.
              associated_geometry[i]);
        END_REPEAT;
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.COMPOSITE_CURVE_ON_SURFACE' IN TYPEOF(c)
         THEN
      n := SIZEOF(c\composite_curve.segments);
      surfs := get_basis_surface(c\composite_curve.segments[1].
          parent_curve);
      IF n > 1 THEN
        REPEAT i := 2 TO n BY 1;
          surfs := surfs * get_basis_surface(c\composite_curve.segments[i]
              .parent_curve);
        END_REPEAT;
      END_IF;
    END_IF;
    RETURN(surfs);

  END_FUNCTION; -- get_basis_surface

  FUNCTION  get_description_value(
               obj: description_attribute_select
      ): text;

    LOCAL
      description_bag : BAG OF description_attribute := USEDIN(obj,(
                         'PROCESS_PLANNING_SCHEMA.' + 
                         'DESCRIPTION_ATTRIBUTE.') + 'DESCRIBED_ITEM');
    END_LOCAL;
    IF SIZEOF(description_bag) = 1 THEN
      RETURN(description_bag[1].attribute_value);
    ELSE
      RETURN(?);
    END_IF;

  END_FUNCTION; -- get_description_value

  FUNCTION  get_id_value(
               obj: id_attribute_select
      ): identifier;

    LOCAL
      id_bag : BAG OF id_attribute := USEDIN(obj,(
                'PROCESS_PLANNING_SCHEMA.' + 'ID_ATTRIBUTE.') + 
                'IDENTIFIED_ITEM');
    END_LOCAL;
    IF SIZEOF(id_bag) = 1 THEN
      RETURN(id_bag[1].attribute_value);
    ELSE
      RETURN(?);
    END_IF;

  END_FUNCTION; -- get_id_value

  FUNCTION  get_name_value(
               obj: name_attribute_select
      ): label;

    LOCAL
      name_bag : BAG OF name_attribute := USEDIN(obj,(
                  'PROCESS_PLANNING_SCHEMA.' + 'NAME_ATTRIBUTE.') + 
                  'NAMED_ITEM');
    END_LOCAL;
    IF SIZEOF(name_bag) = 1 THEN
      RETURN(name_bag[1].attribute_value);
    ELSE
      RETURN(?);
    END_IF;

  END_FUNCTION; -- get_name_value

  FUNCTION  get_property_definition_representations(
               c_def_instance: characterized_definition
      ): SET OF property_definition_representation;

    LOCAL
      pdr_set : SET OF property_definition_representation := [];
      pd_set  : SET OF property_definition := [];
    END_LOCAL;
    pd_set := bag_to_set(USEDIN(c_def_instance,
        'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'));
    IF SIZEOF(pd_set) < 1 THEN
      RETURN(pdr_set);
    END_IF;
    REPEAT i := 1 TO HIINDEX(pd_set) BY 1;
      pdr_set := pdr_set +bag_to_set(USEDIN(pd_set[i],
  'PROCESS_PLANNING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'));
    END_REPEAT;
    RETURN(pdr_set);

  END_FUNCTION; -- get_property_definition_representations

  FUNCTION  get_role(
               obj: role_select
      ): object_role;

    LOCAL
      role_bag : BAG OF role_association := USEDIN(obj,(
                  'PROCESS_PLANNING_SCHEMA.' + 'ROLE_ASSOCIATION.') + 
                  'ITEM_WITH_ROLE');
    END_LOCAL;
    IF SIZEOF(role_bag) = 1 THEN
      RETURN(role_bag[1].role);
    ELSE
      RETURN(?);
    END_IF;

  END_FUNCTION; -- get_role

  FUNCTION  item_in_context(
               item: representation_item;
               cntxt: representation_context
      ): BOOLEAN;

    LOCAL
      y : BAG OF representation_item;
    END_LOCAL;
    IF SIZEOF(USEDIN(item,'PROCESS_PLANNING_SCHEMA.REPRESENTATION.ITEMS') 
        * cntxt.representations_in_context) > 0 THEN
      RETURN(TRUE);
    ELSE
      y := QUERY ( z <* USEDIN(item,'') | (
          'PROCESS_PLANNING_SCHEMA.REPRESENTATION_ITEM' IN TYPEOF(z)) );
      IF SIZEOF(y) > 0 THEN
        REPEAT i := 1 TO HIINDEX(y) BY 1;
          IF item_in_context(y[i],cntxt) THEN
            RETURN(TRUE);
          END_IF;
        END_REPEAT;
      END_IF;
    END_IF;
    RETURN(FALSE);

  END_FUNCTION; -- item_in_context

  FUNCTION  leap_year(
               year: year_number
      ): BOOLEAN;
    IF (((year MOD 4) = 0) AND ((year MOD 100) <> 0)) OR ((year MOD 400) =
         0) THEN
      RETURN(TRUE);
    ELSE
      RETURN(FALSE);
    END_IF;

  END_FUNCTION; -- leap_year

  FUNCTION  list_face_loops(
               f: face
      ): LIST [0:?] OF loop;

    LOCAL
      loops : LIST [0:?] OF loop := [];
    END_LOCAL;
    REPEAT i := 1 TO SIZEOF(f.bounds) BY 1;
      loops := loops + f.bounds[i].bound;
    END_REPEAT;
    RETURN(loops);

  END_FUNCTION; -- list_face_loops

  FUNCTION  list_of_topology_reversed(
               a_list: list_of_reversible_topology_item
      ): list_of_reversible_topology_item;

    LOCAL
      the_reverse : list_of_reversible_topology_item;
    END_LOCAL;
    the_reverse := [];
    REPEAT i := 1 TO SIZEOF(a_list) BY 1;
      the_reverse := topology_reversed(a_list[i]) + the_reverse;
    END_REPEAT;
    RETURN(the_reverse);

  END_FUNCTION; -- list_of_topology_reversed

  FUNCTION  list_to_array(
               lis: LIST [0:?] OF GENERIC:t;
               low, u: INTEGER
      ): ARRAY OF GENERIC:t;

    LOCAL
      n   : INTEGER;
      res : ARRAY [low:u] OF GENERIC:t;
    END_LOCAL;
    n := SIZEOF(lis);
    IF n <> ((u - low) + 1) THEN
      RETURN(?);
    ELSE
      res := [lis[1],n];
      REPEAT i := 2 TO n BY 1;
        res[(low + i) - 1] := lis[i];
      END_REPEAT;
      RETURN(res);
    END_IF;

  END_FUNCTION; -- list_to_array

  FUNCTION  list_to_set(
               l: LIST [0:?] OF GENERIC:t
      ): SET OF GENERIC:t;

    LOCAL
      s : SET OF GENERIC:t := [];
    END_LOCAL;
    REPEAT i := 1 TO SIZEOF(l) BY 1;
      s := s + l[i];
    END_REPEAT;
    RETURN(s);

  END_FUNCTION; -- list_to_set

  FUNCTION  make_array_of_array(
               lis: LIST [1:?] OF LIST [1:?] OF GENERIC:t;
               low1, u1, low2, u2: INTEGER
      ): ARRAY OF ARRAY OF GENERIC:t;

    LOCAL
      res : ARRAY [low1:u1] OF ARRAY [low2:u2] OF GENERIC:t;
    END_LOCAL;
    IF ((u1 - low1) + 1) <> SIZEOF(lis) THEN
      RETURN(?);
    END_IF;
    IF ((u2 - low2) + 1) <> SIZEOF(lis[1]) THEN
      RETURN(?);
    END_IF;
    res := [list_to_array(lis[1],low2,u2),(u1 - low1) + 1];
    REPEAT i := 2 TO HIINDEX(lis) BY 1;
      IF ((u2 - low2) + 1) <> SIZEOF(lis[i]) THEN
        RETURN(?);
      END_IF;
      res[(low1 + i) - 1] := list_to_array(lis[i],low2,u2);
    END_REPEAT;
    RETURN(res);

  END_FUNCTION; -- make_array_of_array

  FUNCTION  mixed_loop_type_set(
               l: SET [0:?] OF loop
      ): LOGICAL;

    LOCAL
      poly_loop_type : LOGICAL;
    END_LOCAL;
    IF SIZEOF(l) <= 1 THEN
      RETURN(FALSE);
    END_IF;
    poly_loop_type := 'PROCESS_PLANNING_SCHEMA.POLY_LOOP' IN TYPEOF(l[1]);
    REPEAT i := 2 TO SIZEOF(l) BY 1;
      IF ('PROCESS_PLANNING_SCHEMA.POLY_LOOP' IN TYPEOF(l[i])) <> 
          poly_loop_type THEN
        RETURN(TRUE);
      END_IF;
    END_REPEAT;
    RETURN(FALSE);

  END_FUNCTION; -- mixed_loop_type_set

  FUNCTION  msb_shells(
               brep: manifold_solid_brep
      ): SET [1:?] OF closed_shell;
    IF SIZEOF(QUERY ( msbtype <* TYPEOF(brep) | (msbtype LIKE 
        '*BREP_WITH_VOIDS') )) >= 1 THEN
      RETURN(brep\brep_with_voids.voids + brep.outer);
    ELSE
      RETURN([brep.outer]);
    END_IF;

  END_FUNCTION; -- msb_shells

  FUNCTION  msf_curve_check(
               cv: representation_item
      ): BOOLEAN;
    IF SIZEOF(['PROCESS_PLANNING_SCHEMA.BOUNDED_CURVE',
        'PROCESS_PLANNING_SCHEMA.CONIC',
        'PROCESS_PLANNING_SCHEMA.CURVE_REPLICA',
        'PROCESS_PLANNING_SCHEMA.LINE',
        'PROCESS_PLANNING_SCHEMA.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1 THEN
      RETURN(FALSE);
    END_IF;
    IF (('PROCESS_PLANNING_SCHEMA.B_SPLINE_CURVE' IN TYPEOF(cv)) AND (cv\
        b_spline_curve.self_intersect = FALSE)) OR (cv\b_spline_curve.
        self_intersect = UNKNOWN) THEN
      RETURN(TRUE);
    ELSE
      IF SIZEOF(['PROCESS_PLANNING_SCHEMA.CONIC',
          'PROCESS_PLANNING_SCHEMA.LINE'] * TYPEOF(cv)) = 1 THEN
        RETURN(TRUE);
      ELSE
        IF 'PROCESS_PLANNING_SCHEMA.CURVE_REPLICA' IN TYPEOF(cv) THEN
          RETURN(msf_curve_check(cv\curve_replica.parent_curve));
        ELSE
          IF (('PROCESS_PLANNING_SCHEMA.OFFSET_CURVE_3D' IN TYPEOF(cv)) 
              AND ((cv\offset_curve_3d.self_intersect = FALSE) OR (cv\
              offset_curve_3d.self_intersect = UNKNOWN))) AND (NOT (
              'PROCESS_PLANNING_SCHEMA.POLYLINE' IN TYPEOF(cv\
              offset_curve_3d.basis_curve))) THEN
            RETURN(msf_curve_check(cv\offset_curve_3d.basis_curve));
          ELSE
            IF 'PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(cv) THEN
              RETURN(msf_curve_check(cv\pcurve.reference_to_curve\
                  representation.items[1]) AND msf_surface_check(cv\pcurve.
                  basis_surface));
            ELSE
              IF 'PROCESS_PLANNING_SCHEMA.SURFACE_CURVE' IN TYPEOF(cv)
                   THEN
                IF msf_curve_check(cv\surface_curve.curve_3d) THEN
                  REPEAT i := 1 TO SIZEOF(cv\surface_curve.
                      associated_geometry) BY 1;
                    IF 'PROCESS_PLANNING_SCHEMA.SURFACE' IN TYPEOF(cv\
                        surface_curve.associated_geometry[i]) THEN
                      IF NOT msf_surface_check(cv\surface_curve.
                          associated_geometry[i]) THEN
                        RETURN(FALSE);
                      END_IF;
                    ELSE
                      IF 'PROCESS_PLANNING_SCHEMA.PCURVE' IN TYPEOF(cv\
                          surface_curve.associated_geometry[i]) THEN
                        IF NOT msf_curve_check(cv\surface_curve.
                            associated_geometry[i]) THEN
                          RETURN(FALSE);
                        END_IF;
                      END_IF;
                    END_IF;
                  END_REPEAT;
                  RETURN(TRUE);
                END_IF;
              ELSE
                IF 'PROCESS_PLANNING_SCHEMA.POLYLINE' IN TYPEOF(cv) THEN
                  IF SIZEOF(cv\polyline.points) >= 3 THEN
                    RETURN(TRUE);
                  END_IF;
                END_IF;
              END_IF;
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN(FALSE);

  END_FUNCTION; -- msf_curve_check

  FUNCTION  msf_surface_check(
               surf: surface
      ): BOOLEAN;
    IF 'PROCESS_PLANNING_SCHEMA.ELEMENTARY_SURFACE' IN TYPEOF(surf) THEN
      RETURN(TRUE);
    ELSE
      IF 'PROCESS_PLANNING_SCHEMA.SWEPT_SURFACE' IN TYPEOF(surf) THEN
        RETURN(msf_curve_check(surf\swept_surface.swept_curve));
      ELSE
        IF (('PROCESS_PLANNING_SCHEMA.OFFSET_SURFACE' IN TYPEOF(surf)) AND
             (surf\offset_surface.self_intersect = FALSE)) OR (surf\
            offset_surface.self_intersect = UNKNOWN) THEN
          RETURN(msf_surface_check(surf\offset_surface.basis_surface));
        ELSE
          IF 'PROCESS_PLANNING_SCHEMA.SURFACE_REPLICA' IN TYPEOF(surf)
               THEN
            RETURN(msf_surface_check(surf\surface_replica.parent_surface));
          ELSE
            IF (('PROCESS_PLANNING_SCHEMA.B_SPLINE_SURFACE' IN TYPEOF(surf)) 
                AND (surf\b_spline_surface.self_intersect = FALSE)) OR (
                surf\b_spline_surface.self_intersect = UNKNOWN) THEN
              RETURN(TRUE);
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN(FALSE);

  END_FUNCTION; -- msf_surface_check

  FUNCTION  normalise(
               arg: vector_or_direction
      ): vector_or_direction;

    LOCAL
      ndim   : INTEGER;
      v      : direction;
      vec    : vector;
      mag    : REAL;
      result : vector_or_direction;
    END_LOCAL;
    IF NOT EXISTS(arg) THEN
      result := ?;
    ELSE
      ndim := arg.dim;
      IF 'PROCESS_PLANNING_SCHEMA.VECTOR' IN TYPEOF(arg) THEN
        BEGIN
          v := dummy_gri || direction(arg.orientation.direction_ratios);
          IF arg.magnitude = 0 THEN
            RETURN(?);
          ELSE
            vec := dummy_gri || vector(v,1);
          END_IF;
        END;
      ELSE
        v := dummy_gri || direction(arg.direction_ratios);
      END_IF;
      mag := 0;
      REPEAT i := 1 TO ndim BY 1;
        mag := mag + (v.direction_ratios[i] * v.direction_ratios[i]);
      END_REPEAT;
      IF mag > 0 THEN
        mag := SQRT(mag);
        REPEAT i := 1 TO ndim BY 1;
          v.direction_ratios[i] := v.direction_ratios[i] / mag;
        END_REPEAT;
        IF 'PROCESS_PLANNING_SCHEMA.VECTOR' IN TYPEOF(arg) THEN
          vec.orientation := v;
          result := vec;
        ELSE
          result := v;
        END_IF;
      ELSE
        RETURN(?);
      END_IF;
    END_IF;
    RETURN(result);

  END_FUNCTION; -- normalise

  FUNCTION  open_shell_reversed(
               a_shell: open_shell
      ): oriented_open_shell;

    LOCAL
      the_reverse : oriented_open_shell;
    END_LOCAL;
    IF 'PROCESS_PLANNING_SCHEMA.ORIENTED_OPEN_SHELL' IN TYPEOF(a_shell)
         THEN
      the_reverse := ((dummy_tri || connected_face_set(a_shell\
          connected_face_set.cfs_faces)) || open_shell()) || 
          oriented_open_shell(a_shell\oriented_open_shell.
          open_shell_element,NOT a_shell\oriented_open_shell.orientation);
    ELSE
      the_reverse := ((dummy_tri || connected_face_set(a_shell\
          connected_face_set.cfs_faces)) || open_shell()) || 
          oriented_open_shell(a_shell,FALSE);
    END_IF;
    RETURN(the_reverse);

  END_FUNCTION; -- open_shell_reversed

  FUNCTION  orthogonal_complement(
               vec: direction
      ): direction;

    LOCAL
      result : direction;
    END_LOCAL;
    IF (vec.dim <> 2) OR (NOT EXISTS(vec)) THEN
      RETURN(?);
    ELSE
      result := dummy_gri || direction([-vec.direction_ratios[2],vec.
          direction_ratios[1]]);
      RETURN(result);
    END_IF;

  END_FUNCTION; -- orthogonal_complement

  FUNCTION  path_head_to_tail(
               a_path: path
      ): BOOLEAN;
    LOCAL
      n : INTEGER;
      p : BOOLEAN := TRUE;
    END_LOCAL;
    n := SIZEOF(a_path.edge_list);
    REPEAT i := 2 TO n BY 1;
      p := p AND (a_path.edge_list[i - 1].edge_end :=: a_path.edge_list[i]
          .edge_start);
    END_REPEAT;
    RETURN(p);

  END_FUNCTION; -- path_head_to_tail

  FUNCTION  path_reversed(
               a_path: path
      ): oriented_path;

    LOCAL
      the_reverse : oriented_path;
    END_LOCAL;
    IF 'PROCESS_PLANNING_SCHEMA.ORIENTED_PATH' IN TYPEOF(a_path) THEN
      the_reverse := (dummy_tri || path(list_of_topology_reversed(a_path.
          edge_list))) || oriented_path(a_path\oriented_path.path_element,
          NOT a_path\oriented_path.orientation);
    ELSE
      the_reverse := (dummy_tri || path(list_of_topology_reversed(a_path.
          edge_list))) || oriented_path(a_path,FALSE);
    END_IF;
    RETURN(the_reverse);

  END_FUNCTION; -- path_reversed

  FUNCTION  scalar_times_vector(
               scalar: REAL;
               vec: vector_or_direction
      ): vector;

    LOCAL
      v      : direction;
      mag    : REAL;
      result : vector;
    END_LOCAL;
    IF (NOT EXISTS(scalar)) OR (NOT EXISTS(vec)) THEN
      RETURN(?);
    ELSE
      IF 'PROCESS_PLANNING_SCHEMA.VECTOR' IN TYPEOF(vec) THEN
        v := dummy_gri || direction(vec.orientation.direction_ratios);
        mag := scalar * vec.magnitude;
      ELSE
        v := dummy_gri || direction(vec.direction_ratios);
        mag := scalar;
      END_IF;
      IF mag < 0 THEN
        REPEAT i := 1 TO SIZEOF(v.direction_ratios) BY 1;
          v.direction_ratios[i] := -v.direction_ratios[i];
        END_REPEAT;
        mag := -mag;
      END_IF;
      result := dummy_gri || vector(normalise(v),mag);
    END_IF;
    RETURN(result);
  END_FUNCTION; -- scalar_times_vector

  FUNCTION  second_proj_axis(
               z_axis, x_axis, arg: direction
      ): direction;

    LOCAL
      temp   : vector;
      v      : direction;
      y_axis : vector;
    END_LOCAL;
    IF NOT EXISTS(arg) THEN
      v := dummy_gri || direction([0,1,0]);
    ELSE
      v := arg;
    END_IF;
    temp := scalar_times_vector(dot_product(v,z_axis),z_axis);
    y_axis := vector_difference(v,temp);
    temp := scalar_times_vector(dot_product(v,x_axis),x_axis);
    y_axis := vector_difference(y_axis,temp);
    y_axis := normalise(y_axis);
    RETURN(y_axis.orientation);

  END_FUNCTION; -- second_proj_axis

  FUNCTION  set_of_topology_reversed(
               a_set: set_of_reversible_topology_item
      ): set_of_reversible_topology_item;

    LOCAL
      the_reverse : set_of_reversible_topology_item;
    END_LOCAL;
    the_reverse := [];
    REPEAT i := 1 TO SIZEOF(a_set) BY 1;
      the_reverse := the_reverse + topology_reversed(a_set[i]);
    END_REPEAT;
    RETURN(the_reverse);

  END_FUNCTION; -- set_of_topology_reversed

  FUNCTION  shell_reversed(
               a_shell: shell
      ): shell;
    IF 'PROCESS_PLANNING_SCHEMA.OPEN_SHELL' IN TYPEOF(a_shell) THEN
      RETURN(open_shell_reversed(a_shell));
    ELSE
      IF 'PROCESS_PLANNING_SCHEMA.CLOSED_SHELL' IN TYPEOF(a_shell) THEN
        RETURN(closed_shell_reversed(a_shell));
      ELSE
        RETURN(?);
      END_IF;
    END_IF;

  END_FUNCTION; -- shell_reversed

  FUNCTION  surface_weights_positive(
               b: rational_b_spline_surface
      ): BOOLEAN;

    LOCAL
      result : BOOLEAN := TRUE;
    END_LOCAL;
    REPEAT i := 0 TO b.u_upper BY 1;
      REPEAT j := 0 TO b.v_upper BY 1;
        IF b.weights[i][j] <= 0 THEN
          result := FALSE;
          RETURN(result);
        END_IF;
      END_REPEAT;
    END_REPEAT;
    RETURN(result);

  END_FUNCTION; -- surface_weights_positive

  FUNCTION  topology_reversed(
               an_item: reversible_topology
      ): reversible_topology;
    IF 'PROCESS_PLANNING_SCHEMA.EDGE' IN TYPEOF(an_item) THEN
      RETURN(edge_reversed(an_item));
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.PATH' IN TYPEOF(an_item) THEN
      RETURN(path_reversed(an_item));
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.FACE_BOUND' IN TYPEOF(an_item) THEN
      RETURN(face_bound_reversed(an_item));
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.FACE' IN TYPEOF(an_item) THEN
      RETURN(face_reversed(an_item));
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.SHELL' IN TYPEOF(an_item) THEN
      RETURN(shell_reversed(an_item));
    END_IF;
    IF 'SET' IN TYPEOF(an_item) THEN
      RETURN(set_of_topology_reversed(an_item));
    END_IF;
    IF 'LIST' IN TYPEOF(an_item) THEN
      RETURN(list_of_topology_reversed(an_item));
    END_IF;
    RETURN(?);

  END_FUNCTION; -- topology_reversed

  FUNCTION  type_check_function(
               the_type: GENERIC;
               sub_names: SET OF STRING;
               criterion: INTEGER
      ): LOGICAL;
    IF ((NOT EXISTS(the_type)) OR (NOT ((0 <= criterion) AND (criterion <=
         3)))) OR (SIZEOF(sub_names) = 0) THEN
      RETURN(UNKNOWN);
    ELSE
      CASE criterion OF
        0  :           RETURN(SIZEOF(sub_names * TYPEOF(the_type)) > 0);
        1  :           RETURN(SIZEOF(sub_names * TYPEOF(the_type)) = 0);
        2  :           RETURN(SIZEOF(sub_names * TYPEOF(the_type)) = 1);
        3  :           RETURN(SIZEOF(sub_names * TYPEOF(the_type)) <= 1);
        END_CASE;
    END_IF;

  END_FUNCTION; -- type_check_function

  FUNCTION  using_items(
               item: founded_item_select;
               checked_items: SET OF founded_item_select
      ): SET OF founded_item_select;

    LOCAL
      next_items      : SET OF founded_item_select;
      new_check_items : SET OF founded_item_select;
      result_items    : SET OF founded_item_select;
    END_LOCAL;
    result_items := [];
    new_check_items := checked_items + item;
    next_items := QUERY ( z <* bag_to_set(USEDIN(item,'')) | ((
        'PROCESS_PLANNING_SCHEMA.REPRESENTATION_ITEM' IN TYPEOF(z)) OR (
        'PROCESS_PLANNING_SCHEMA.FOUNDED_ITEM' IN TYPEOF(z))) );
    IF SIZEOF(next_items) > 0 THEN
      REPEAT i := 1 TO HIINDEX(next_items) BY 1;
        IF NOT (next_items[i] IN new_check_items) THEN
          result_items := (result_items + next_items[i]) + using_items(
              next_items[i],new_check_items);
        END_IF;
      END_REPEAT;
    END_IF;
    RETURN(result_items);

  END_FUNCTION; -- using_items

  FUNCTION  using_representations(
               item: founded_item_select
      ): SET OF representation;

    LOCAL
      results            : SET OF representation;
      intermediate_items : SET OF founded_item_select;
      result_bag         : BAG OF representation;
    END_LOCAL;
    results := [];
    result_bag := USEDIN(item,
        'PROCESS_PLANNING_SCHEMA.REPRESENTATION.ITEMS');
    IF SIZEOF(result_bag) > 0 THEN
      REPEAT i := 1 TO HIINDEX(result_bag) BY 1;
        results := results + result_bag[i];
      END_REPEAT;
    END_IF;
    intermediate_items := using_items(item,[]);
    IF SIZEOF(intermediate_items) > 0 THEN
      REPEAT i := 1 TO HIINDEX(intermediate_items) BY 1;
        result_bag := USEDIN(intermediate_items[i],
            'PROCESS_PLANNING_SCHEMA.REPRESENTATION.ITEMS');
        IF SIZEOF(result_bag) > 0 THEN
          REPEAT j := 1 TO HIINDEX(result_bag) BY 1;
            results := results + result_bag[j];
          END_REPEAT;
        END_IF;
      END_REPEAT;
    END_IF;
    RETURN(results);

  END_FUNCTION; -- using_representations

  FUNCTION  valid_calendar_date(
               date: calendar_date
      ): LOGICAL;
    CASE date.month_component OF
      1 :         RETURN((1 <= date.day_component) AND (date.day_component 
            <= 31));
      2 :         BEGIN
          IF leap_year(date.year_component) THEN
            RETURN((1 <= date.day_component) AND (date.day_component <=29));
          ELSE
            RETURN((1 <= date.day_component) AND (date.day_component <=28));
          END_IF;
        END;
      3 :         RETURN((1 <= date.day_component) AND (date.day_component 
            <= 31));
      4 :         RETURN((1 <= date.day_component) AND (date.day_component 
            <= 30));
      5 :         RETURN((1 <= date.day_component) AND (date.day_component 
            <= 31));
      6 :         RETURN((1 <= date.day_component) AND (date.day_component 
            <= 30));
      7 :         RETURN((1 <= date.day_component) AND (date.day_component 
            <= 31));
      8 :         RETURN((1 <= date.day_component) AND (date.day_component 
            <= 31));
      9 :         RETURN((1 <= date.day_component) AND (date.day_component 
            <= 30));
      10  :         RETURN((1 <= date.day_component) AND (date.
            day_component <= 31));
      11  :         RETURN((1 <= date.day_component) AND (date.
            day_component <= 30));
      12  :         RETURN((1 <= date.day_component) AND (date.
            day_component <= 31));
      END_CASE;
    RETURN(FALSE);

  END_FUNCTION; -- valid_calendar_date

  FUNCTION  valid_geometrically_bounded_wf_curve(
               crv: curve
      ): BOOLEAN;
    IF SIZEOF(['PROCESS_PLANNING_SCHEMA.POLYLINE',
        'PROCESS_PLANNING_SCHEMA.B_SPLINE_CURVE',
        'PROCESS_PLANNING_SCHEMA.ELLIPSE','PROCESS_PLANNING_SCHEMA.CIRCLE'] 
        * TYPEOF(crv)) = 1 THEN
      RETURN(TRUE);
    ELSE
      IF 'PROCESS_PLANNING_SCHEMA.TRIMMED_CURVE' IN TYPEOF(crv) THEN
        IF SIZEOF(['PROCESS_PLANNING_SCHEMA.LINE',
            'PROCESS_PLANNING_SCHEMA.PARABOLA',
            'PROCESS_PLANNING_SCHEMA.HYPERBOLA'] * TYPEOF(crv\trimmed_curve
            .basis_curve)) = 1 THEN
          RETURN(TRUE);
        ELSE
          RETURN(valid_geometrically_bounded_wf_curve(crv\trimmed_curve.
              basis_curve));
        END_IF;
      ELSE
        IF 'PROCESS_PLANNING_SCHEMA.OFFSET_CURVE_3D' IN TYPEOF(crv) THEN
          RETURN(valid_geometrically_bounded_wf_curve(crv\offset_curve_3d.
              basis_curve));
        ELSE
          IF 'PROCESS_PLANNING_SCHEMA.CURVE_REPLICA' IN TYPEOF(crv) THEN
            RETURN(valid_geometrically_bounded_wf_curve(crv\curve_replica.
                parent_curve));
          ELSE
            IF 'PROCESS_PLANNING_SCHEMA.COMPOSITE_CURVE' IN TYPEOF(crv)
                 THEN
              RETURN(SIZEOF(QUERY ( ccs <* crv\composite_curve.segments | 
                  (NOT valid_geometrically_bounded_wf_curve(ccs.
                  parent_curve)) )) = 0);
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN(FALSE);

  END_FUNCTION; -- valid_geometrically_bounded_wf_curve

  FUNCTION  valid_geometrically_bounded_wf_point(
               pnt: point
      ): BOOLEAN;
    IF 'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(pnt) THEN
      RETURN(TRUE);
    ELSE
      IF 'PROCESS_PLANNING_SCHEMA.POINT_ON_CURVE' IN TYPEOF(pnt) THEN
        RETURN(valid_geometrically_bounded_wf_curve(pnt\point_on_curve.
            basis_curve));
      ELSE
        IF 'PROCESS_PLANNING_SCHEMA.POINT_REPLICA' IN TYPEOF(pnt) THEN
          RETURN(valid_geometrically_bounded_wf_point(pnt\point_replica.
              parent_pt));
        END_IF;
      END_IF;
    END_IF;
    RETURN(FALSE);

  END_FUNCTION; -- valid_geometrically_bounded_wf_point

  FUNCTION valid_measure_value(
               m: measure_value
      ): BOOLEAN;
    IF 'REAL' IN TYPEOF(m) THEN
      RETURN(m > 0);
    ELSE
      IF 'INTEGER' IN TYPEOF(m) THEN
        RETURN(m > 0);
      ELSE
        RETURN(TRUE);
      END_IF;
    END_IF;

  END_FUNCTION; -- valid_measure_value

  FUNCTION  valid_time(
               time: local_time
      ): BOOLEAN;
    IF EXISTS(time.second_component) THEN
      RETURN(EXISTS(time.minute_component));
    ELSE
      RETURN(TRUE);
    END_IF;

  END_FUNCTION; -- valid_time

  FUNCTION  valid_units(
               m: measure_with_unit
      ): BOOLEAN;
    IF 'PROCESS_PLANNING_SCHEMA.LENGTH_MEASURE' IN TYPEOF(m.
        value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(1,0,0,0,0,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.MASS_MEASURE' IN TYPEOF(m.value_component)
         THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(0,1,0,0,0,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.TIME_MEASURE' IN TYPEOF(m.value_component)
         THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(0,0,1,0,0,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.ELECTRIC_CURRENT_MEASURE' IN TYPEOF(m.
        value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(0,0,0,1,0,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.THERMODYNAMIC_TEMPERATURE_MEASURE' IN 
        TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(0,0,0,0,1,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.CELSIUS_TEMPERATURE_MEASURE' IN TYPEOF(m.
        value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(0,0,0,0,1,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.AMOUNT_OF_SUBSTANCE_MEASURE' IN TYPEOF(m.
        value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(0,0,0,0,0,1,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.LUMINOUS_INTENSITY_MEASURE' IN TYPEOF(m.
        value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(0,0,0,0,0,0,1) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.PLANE_ANGLE_MEASURE' IN TYPEOF(m.
        value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(0,0,0,0,0,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.SOLID_ANGLE_MEASURE' IN TYPEOF(m.
        value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(0,0,0,0,0,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.AREA_MEASURE' IN TYPEOF(m.value_component)
         THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(2,0,0,0,0,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.VOLUME_MEASURE' IN TYPEOF(m.
        value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(3,0,0,0,0,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.RATIO_MEASURE' IN TYPEOF(m.value_component)
         THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(0,0,0,0,0,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.POSITIVE_LENGTH_MEASURE' IN TYPEOF(m.
        value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(1,0,0,0,0,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    IF 'PROCESS_PLANNING_SCHEMA.POSITIVE_PLANE_ANGLE_MEASURE' IN TYPEOF(m.
        value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
          dimensional_exponents(0,0,0,0,0,0,0) THEN
        RETURN(FALSE);
      END_IF;
    END_IF;
    RETURN(TRUE);

  END_FUNCTION; -- valid_units

  FUNCTION  valid_wireframe_edge_curve(
               crv: curve
      ): BOOLEAN;
    IF SIZEOF(['PROCESS_PLANNING_SCHEMA.LINE',
        'PROCESS_PLANNING_SCHEMA.CONIC',
        'PROCESS_PLANNING_SCHEMA.B_SPLINE_CURVE',
        'PROCESS_PLANNING_SCHEMA.POLYLINE'] * TYPEOF(crv)) = 1 THEN
      RETURN(TRUE);
    ELSE
      IF 'PROCESS_PLANNING_SCHEMA.CURVE_REPLICA' IN TYPEOF(crv) THEN
        RETURN(valid_wireframe_edge_curve(crv\curve_replica.parent_curve));
      ELSE
        IF 'PROCESS_PLANNING_SCHEMA.OFFSET_CURVE_3D' IN TYPEOF(crv) THEN
          RETURN(valid_wireframe_edge_curve(crv\offset_curve_3d.
              basis_curve));
        END_IF;
      END_IF;
    END_IF;
    RETURN(FALSE);

  END_FUNCTION; -- valid_wireframe_edge_curve

  FUNCTION  valid_wireframe_vertex_point(
               pnt: point
      ): BOOLEAN;
    IF 'PROCESS_PLANNING_SCHEMA.CARTESIAN_POINT' IN TYPEOF(pnt) THEN
      RETURN(TRUE);
    ELSE
      IF 'PROCESS_PLANNING_SCHEMA.POINT_REPLICA' IN TYPEOF(pnt) THEN
        RETURN(valid_wireframe_vertex_point(pnt\point_replica.parent_pt));
      END_IF;
    END_IF;
    RETURN(FALSE);

  END_FUNCTION; -- valid_wireframe_vertex_point

  FUNCTION  vector_difference(
               arg1, arg2: vector_or_direction
      ): vector;

    LOCAL
      ndim   : INTEGER;
      mag2   : REAL;
      mag1   : REAL;
      mag    : REAL;
      res    : direction;
      vec1   : direction;
      vec2   : direction;
      result : vector;
    END_LOCAL;
    IF ((NOT EXISTS(arg1)) OR (NOT EXISTS(arg2))) OR (arg1.dim <> arg2.dim)
         THEN
      RETURN(?);
    ELSE
      BEGIN
        IF 'PROCESS_PLANNING_SCHEMA.VECTOR' IN TYPEOF(arg1) THEN
          mag1 := arg1.magnitude;
          vec1 := arg1.orientation;
        ELSE
          mag1 := 1;
          vec1 := arg1;
        END_IF;
        IF 'PROCESS_PLANNING_SCHEMA.VECTOR' IN TYPEOF(arg2) THEN
          mag2 := arg2.magnitude;
          vec2 := arg2.orientation;
        ELSE
          mag2 := 1;
          vec2 := arg2;
        END_IF;
        vec1 := normalise(vec1);
        vec2 := normalise(vec2);
        ndim := SIZEOF(vec1.direction_ratios);
        mag := 0;
        res := dummy_gri || direction(vec1.direction_ratios);
        REPEAT i := 1 TO ndim BY 1;
          res.direction_ratios[i] := (mag1 * vec1.direction_ratios[i]) + (
              mag2 * vec2.direction_ratios[i]);
          mag := mag + (res.direction_ratios[i] * res.direction_ratios[i]);
        END_REPEAT;
        IF mag > 0 THEN
          result := dummy_gri || vector(res,SQRT(mag));
        ELSE
          result := dummy_gri || vector(vec1,0);
        END_IF;
      END;
    END_IF;
    RETURN(result);

  END_FUNCTION; -- vector_difference

END_SCHEMA; -- process_planning_schema
