(*
 $Id$
 ISO TC184/SC4/WG12 N4685 - ISO/CD-TS 10303-1327 Compound shape representation - EXPRESS MIM
*)

SCHEMA Compound_shape_representation_mim;

USE FROM Edge_based_wireframe_mim; -- ISO/TS 10303-1501

USE FROM Non_manifold_surface_mim; -- ISO/CD-TS 10303-1324

  ENTITY compound_shape_representation
    SUBTYPE OF (shape_representation);
    WHERE
      WR1: ( 'GEOMETRY_SCHEMA.'+ 'GEOMETRIC_REPRESENTATION_CONTEXT'
        IN TYPEOF ( SELF.context_of_items ) ) AND (
        SELF.context_of_items\
        geometric_representation_context.coordinate_space_dimension =3 ) ;
      WR2: SIZEOF ( QUERY ( cbsr_i <* SELF.items | SIZEOF (
        ['GEOMETRIC_MODEL_SCHEMA.'+ 'EDGE_BASED_WIREFRAME_MODEL' ,
         'GEOMETRIC_MODEL_SCHEMA.'+ 'FACE_BASED_SURFACE_MODEL' ,
         'REPRESENTATION_SCHEMA.'+ 'MAPPED_ITEM' , 'GEOMETRY_SCHEMA.'+
         'AXIS2_PLACEMENT_3D']* TYPEOF ( cbsr_i ) ) <>1 ) ) =0;
      WR3: SIZEOF ( QUERY ( cbsr_i <* SELF.items | SIZEOF (
        ['GEOMETRIC_MODEL_SCHEMA.'+ 'EDGE_BASED_WIREFRAME_MODEL' ,
         'GEOMETRIC_MODEL_SCHEMA.'+ 'FACE_BASED_SURFACE_MODEL' ,
         'REPRESENTATION_SCHEMA.'+ 'MAPPED_ITEM']* TYPEOF ( cbsr_i ) ) =1 ) ) >0;
      WR4: SIZEOF ( QUERY ( cbsr_i <* SELF.items | (
         'REPRESENTATION_SCHEMA.'+ 'MAPPED_ITEM' IN TYPEOF ( cbsr_i ) )
         AND ( SIZEOF ( ['COMPOUND_SHAPE_REPRESENTATION_MIM.'+
         'COMPOUND_SHAPE_REPRESENTATION' , 'AIC_EDGE_BASED_WIREFRAME.'+
         'EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION' ,
         'AIC_NON_MANIFOLD_SURFACE.'+
         'NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION']* TYPEOF (
         cbsr_i\ mapped_item.mapping_source ) ) <>1 ) ) ) =0;
  END_ENTITY;

END_SCHEMA;
