Schema: draughting_element_schema

Source : ISO 10303-101



SCHEMA draughting_element_schema;

REFERENCE FROM geometric_model_schema   -- ISO 10303-42
  (geometric_set,
   tessellated_geometric_set);

REFERENCE FROM geometry_schema   -- ISO 10303-42
  (axis2_placement,
   axis2_placement_2d,
   axis2_placement_3d,
   cartesian_point,
   geometric_representation_item,
   plane);

REFERENCE FROM mechanical_design_schema   -- ISO 10303-113
  (annotation_placeholder_occurrence);

REFERENCE FROM presentation_appearance_schema   -- ISO 10303-46
  (invisible_item,
   presentation_style_assignment,
   styled_item);

REFERENCE FROM presentation_definition_schema   -- ISO 10303-46
  (annotation_occurrence,
   annotation_curve_occurrence,
   annotation_fill_area_occurrence,
   annotation_text_occurrence,
   annotation_symbol_occurrence);

REFERENCE FROM presentation_organization_schema   -- ISO 10303-46
  (annotation_representation_select,
   area_dependent_annotation_representation,
   camera_model,
   presentation_area,
   presentation_view,
   view_dependent_annotation_representation);

REFERENCE FROM presentation_resource_schema   -- ISO 10303-46
  (planar_box);

REFERENCE FROM product_property_definition_schema   -- ISO 10303-41
  (product_definition_shape,
   property_definition,
   shape_aspect,
   shape_aspect_relationship);

REFERENCE FROM product_property_representation_schema   -- ISO 10303-41
  (item_identified_representation_usage,
   shape_definition_representation);

REFERENCE FROM representation_schema   -- ISO 10303-43
  (representation,
   representation_item,
   mapped_item,
   representation_map,
   using_representations);

REFERENCE FROM support_resource_schema   -- ISO 10303-41
  (label,
   text,
   bag_to_set);

REFERENCE FROM topology_schema   -- ISO 10303-42
  (face_surface);


TYPE annotation_plane_element = SELECT
   (draughting_callout,
    styled_item);
END_TYPE;

TYPE des_annotation_representation_select = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON annotation_representation_select WITH
   (draughting_model);
END_TYPE;

TYPE des_apll_point_select = SELECT
   (apll_point,
    apll_point_with_surface);
END_TYPE;

TYPE des_apll_point_symbol = ENUMERATION OF
   (circle,
    dot,
    internal_pair_forward_arrowhead,
    internal_pair_reverse_arrowhead,
    none,
    positive_arrowhead,
    triangle);
END_TYPE;

TYPE des_invisible_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON invisible_item WITH
   (draughting_callout);
END_TYPE;

TYPE dimension_extent_usage = ENUMERATION OF
   (origin,
    target);
END_TYPE;

TYPE draughting_callout_element = EXTENSIBLE GENERIC_ENTITY SELECT
   (annotation_curve_occurrence,
    annotation_fill_area_occurrence,
    annotation_symbol_occurrence,
    annotation_text_occurrence,
    tessellated_annotation_occurrence);
END_TYPE;

TYPE draughting_model_item_association_select = SELECT
   (annotation_occurrence,
    draughting_callout);
END_TYPE;

TYPE draughting_model_item_definition = EXTENSIBLE GENERIC_ENTITY SELECT
   (product_definition_shape,
    property_definition,
    shape_aspect,
    shape_aspect_relationship);
END_TYPE;

TYPE draughting_model_item_select = SELECT
   (mapped_item,
    styled_item,
    axis2_placement,
    camera_model,
    draughting_callout);
END_TYPE;

TYPE plane_or_planar_box = SELECT
   (plane,
    planar_box);
END_TYPE;

ENTITY annotation_placeholder_leader_line
  ABSTRACT SUPERTYPE OF (ONEOF (annotation_to_annotation_leader_line,
                                annotation_to_model_leader_line,
                                auxiliary_leader_line))
  SUBTYPE OF (geometric_representation_item);
  geometric_elements : LIST[2:?] OF UNIQUE des_apll_point_select;
DERIVE
  model_end : des_apll_point_select := geometric_elements[HIINDEX(geometric_elements)];
INVERSE
  container : annotation_placeholder_occurrence_with_leader_line FOR leader_line;
UNIQUE
  UR1: geometric_elements;
END_ENTITY;

ENTITY annotation_placeholder_occurrence_with_leader_line
  SUBTYPE OF (annotation_placeholder_occurrence);
  leader_line : SET[1:?] OF annotation_placeholder_leader_line;
UNIQUE
  UR1: leader_line;
END_ENTITY;

ENTITY annotation_plane
  SUBTYPE OF (annotation_occurrence, geometric_representation_item);
  elements : OPTIONAL SET[1:?] OF annotation_plane_element;
  SELF\styled_item.item : plane_or_planar_box;
WHERE
  WR1: SELF\geometric_representation_item.dim = 3;
  WR2: NOT('PRESENTATION_RESOURCE_SCHEMA.'+'PLANAR_BOX' IN TYPEOF(SELF\styled_item.item)) OR ('GEOMETRY_SCHEMA.'+'AXIS2_PLACEMENT_3D' IN TYPEOF(SELF\styled_item.item\planar_box.placement));
  WR3: (('PRESENTATION_RESOURCE_SCHEMA.'+'PLANAR_BOX' IN TYPEOF(SELF\styled_item.item)) AND ('PRESENTATION_APPEARANCE_SCHEMA.'+'CURVE_STYLE' IN TYPEOF(SELF\styled_item.styles[1]\presentation_style_assignment.styles[1]))) OR (('GEOMETRY_SCHEMA.'+'PLANE' IN TYPEOF(SELF\styled_item.item)) AND ('PRESENTATION_APPEARANCE_SCHEMA.'+'FILL_AREA_STYLE' IN TYPEOF(SELF\styled_item.styles[1]\presentation_style_assignment.styles[1])));
  WR4: (SIZEOF(SELF\styled_item.styles) = 1) AND (SIZEOF(SELF\styled_item.styles[1]\presentation_style_assignment.styles) = 1);
END_ENTITY;

ENTITY annotation_to_annotation_leader_line
  SUBTYPE OF (annotation_placeholder_leader_line);
DERIVE
  start_end : des_apll_point_select := SELF\annotation_placeholder_leader_line.geometric_elements[1];
WHERE
  WR1: (SIZEOF (['DRAUGHTING_ELEMENT_SCHEMA.APLL_POINT_WITH_SURFACE'] * TYPEOF(SELF\annotation_placeholder_leader_line.model_end)) = 0) AND (SIZEOF (['DRAUGHTING_ELEMENT_SCHEMA.APLL_POINT_WITH_SURFACE'] * TYPEOF(start_end)) = 0);
END_ENTITY;

ENTITY annotation_to_model_leader_line
  SUBTYPE OF (annotation_placeholder_leader_line);
DERIVE
  start_end : des_apll_point_select := SELF\annotation_placeholder_leader_line.geometric_elements[1];
WHERE
  WR1: SIZEOF (['DRAUGHTING_ELEMENT_SCHEMA.APLL_POINT_WITH_SURFACE'] * TYPEOF(SELF\annotation_placeholder_leader_line.model_end)) = 1;
  WR2: SIZEOF (['DRAUGHTING_ELEMENT_SCHEMA.APLL_POINT_WITH_SURFACE'] * TYPEOF(start_end)) = 0;
END_ENTITY;

ENTITY apll_point
  SUBTYPE OF (cartesian_point);
  symbol_applied : des_apll_point_symbol;
INVERSE
  container : annotation_placeholder_leader_line FOR geometric_elements;
WHERE
  WR1: SIZEOF(['DRAUGHTING_ELEMENT_SCHEMA.APLL_POINT_WITH_SURFACE'] * TYPEOF(SELF)) = 0;
  WR2: SIZEOF(USEDIN(SELF, 'GEOMETRY_SCHEMA.GEOMETRIC_SET.ELEMENTS')) = 0;
END_ENTITY;

ENTITY apll_point_with_surface
  SUBTYPE OF (cartesian_point);
  symbol_applied : des_apll_point_symbol;
  associated_surface : face_surface;
INVERSE
  container : annotation_placeholder_leader_line FOR geometric_elements;
WHERE
  WR1: SIZEOF(['DRAUGHTING_ELEMENT_SCHEMA.APLL_POINT'] * TYPEOF(SELF)) = 0;
  WR2: SIZEOF(USEDIN(SELF, 'GEOMETRY_SCHEMA.GEOMETRIC_SET.ELEMENTS')) = 0;
END_ENTITY;

ENTITY auxiliary_leader_line
  SUBTYPE OF (annotation_placeholder_leader_line);
  controlling_leader_line : annotation_to_model_leader_line;
DERIVE
  free_space_end : des_apll_point_select := SELF\annotation_placeholder_leader_line.geometric_elements[1];
WHERE
  WR1: SELF\annotation_placeholder_leader_line.container :=: controlling_leader_line\annotation_placeholder_leader_line.container;
  WR2: SIZEOF (['DRAUGHTING_ELEMENT_SCHEMA.APLL_POINT_WITH_SURFACE'] * TYPEOF(free_space_end)) = 0;
  WR3: SIZEOF (['DRAUGHTING_ELEMENT_SCHEMA.APLL_POINT_WITH_SURFACE'] * TYPEOF(SELF\annotation_placeholder_leader_line.model_end)) = 1;
END_ENTITY;

ENTITY dimension_curve
  SUBTYPE OF (annotation_curve_occurrence);
WHERE
  WR1: (SIZEOF( QUERY(dct <* USEDIN(SELF,'DRAUGHTING_ELEMENT_SCHEMA.' + 'TERMINATOR_SYMBOL.ANNOTATED_CURVE') | (('DRAUGHTING_ELEMENT_SCHEMA.'+ 'DIMENSION_CURVE_TERMINATOR' IN TYPEOF(dct)) )) ) <= 2);
  WR2: SIZEOF( QUERY( dcdc <* USEDIN(SELF,'DRAUGHTING_ELEMENT_SCHEMA.' + 'DRAUGHTING_CALLOUT.CONTENTS') | ('DRAUGHTING_ELEMENT_SCHEMA.'+ 'DIMENSION_CURVE_DIRECTED_CALLOUT' IN TYPEOF(dcdc))) )>= 1;
  WR3: (SIZEOF( QUERY(dct1 <* USEDIN(SELF,'DRAUGHTING_ELEMENT_SCHEMA.' + 'TERMINATOR_SYMBOL.ANNOTATED_CURVE') | (('DRAUGHTING_ELEMENT_SCHEMA.'+ 'DIMENSION_CURVE_TERMINATOR' IN TYPEOF(dct1)) AND (dct1\dimension_curve_terminator.role = dimension_extent_usage.origin))) ) <= 1) AND (SIZEOF( QUERY (dct2 <* USEDIN(SELF,'DRAUGHTING_ELEMENT_SCHEMA.'+ 'TERMINATOR_SYMBOL.ANNOTATED_CURVE') | (('DRAUGHTING_ELEMENT_SCHEMA.'+ 'DIMENSION_CURVE_TERMINATOR' IN TYPEOF(dct2)) AND (dct2\dimension_curve_terminator.role = dimension_extent_usage.target))) ) <= 1);
END_ENTITY;

ENTITY dimension_curve_directed_callout
  SUBTYPE OF (draughting_callout);
WHERE
  WR1: SIZEOF(QUERY(d_c<*SELF\draughting_callout.contents | 'DRAUGHTING_ELEMENT_SCHEMA.DIMENSION_CURVE' IN (TYPEOF(d_c))))<=2;
  WR2: SIZEOF(SELF\draughting_callout.contents) >= 2;
END_ENTITY;

ENTITY dimension_curve_terminator
  SUBTYPE OF (terminator_symbol);
  role : dimension_extent_usage;
WHERE
  WR1: 'DRAUGHTING_ELEMENT_SCHEMA.DIMENSION_CURVE' IN TYPEOF (SELF\terminator_symbol.annotated_curve);
END_ENTITY;

ENTITY draughting_callout
  SUBTYPE OF (geometric_representation_item);
  contents : SET[1:?] OF draughting_callout_element;
WHERE
  WR1: (SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents | 'DRAUGHTING_ELEMENT_SCHEMA.LEADER_CURVE' IN (TYPEOF(l_1)))) = 0) OR ('DRAUGHTING_ELEMENT_SCHEMA.LEADER_DIRECTED_CALLOUT' IN (TYPEOF(SELF))) AND (SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents | 'DRAUGHTING_ELEMENT_SCHEMA.PROJECTION_CURVE' IN (TYPEOF(l_1)))) = 0) OR ('DRAUGHTING_ELEMENT_SCHEMA.PROJECTION_DIRECTED_CALLOUT' IN (TYPEOF(SELF))) AND (SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents | 'DRAUGHTING_ELEMENT_SCHEMA.DIMENSION_CURVE' IN (TYPEOF(l_1)))) = 0) OR ('DRAUGHTING_ELEMENT_SCHEMA.DIMENSION_CURVE_DIRECTED_CALLOUT' IN (TYPEOF(SELF)));
  WR2: SIZEOF (QUERY ( apo <* contents | 'MECHANICAL_DESIGN_SCHEMA.ANNOTATION_PLACEHOLDER_OCCURRENCE' in TYPEOF(apo) )) < 2;
END_ENTITY;

ENTITY draughting_callout_relationship;
  name : label;
  description : text;
  relating_draughting_callout : draughting_callout;
  related_draughting_callout : draughting_callout;
END_ENTITY;

ENTITY draughting_model
  SUBTYPE OF (representation);
  SELF\representation.items : SET[1:?] OF draughting_model_item_select;
UNIQUE
  UR1: SELF\representation.name;
WHERE
  WR1: SIZEOF (QUERY (mi <* QUERY (it <* SELF.items | ('REPRESENTATION_SCHEMA.MAPPED_ITEM' IN TYPEOF(it))) | NOT ( SIZEOF (['PRODUCT_PROPERTY_REPRESENTATION_SCHEMA.SHAPE_REPRESENTATION', 'DRAUGHTING_ELEMENT_SCHEMA.DRAUGHTING_MODEL'] * TYPEOF (mi\mapped_item.mapping_source. mapped_representation)) = 1 ))) = 0;
  WR2: SIZEOF (QUERY (smi <* QUERY (si <* QUERY (it <* SELF.items | ('PRESENTATION_APPEARANCE_SCHEMA.STYLED_ITEM' IN TYPEOF(it))) | ('REPRESENTATION_SCHEMA.MAPPED_ITEM' IN TYPEOF(si\styled_item.item))) | (NOT (('PRODUCT_PROPERTY_REPRESENTATION_SCHEMA.SHAPE_REPRESENTATION' IN TYPEOF(smi\styled_item.item\mapped_item. mapping_source.mapped_representation)) AND (SIZEOF (QUERY (sty <* smi\styled_item.styles | (NOT (SIZEOF (QUERY (psa <* sty.styles | (NOT ('PRESENTATION_APPEARANCE_SCHEMA.CURVE_STYLE' IN TYPEOF(psa))))) = 1 )))) = 1))) )) = 0;
END_ENTITY;

ENTITY draughting_model_item_association
  SUBTYPE OF (item_identified_representation_usage);
  SELF\item_identified_representation_usage.definition : draughting_model_item_definition;
  SELF\item_identified_representation_usage.used_representation : annotation_representation_select;
  SELF\item_identified_representation_usage.identified_item : draughting_model_item_association_select;
END_ENTITY;

ENTITY leader_curve
  SUBTYPE OF (annotation_curve_occurrence);
WHERE
  WR1: SIZEOF( QUERY(ldc <* USEDIN( SELF, 'DRAUGHTING_ELEMENT_SCHEMA.' + 'DRAUGHTING_CALLOUT.CONTENTS') | 'DRAUGHTING_ELEMENT_SCHEMA.' + 'LEADER_DIRECTED_CALLOUT' IN TYPEOF(ldc))) >= 1;
END_ENTITY;

ENTITY leader_directed_callout
  SUBTYPE OF (draughting_callout);
WHERE
  WR1: SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents | 'DRAUGHTING_ELEMENT_SCHEMA.LEADER_CURVE' IN (TYPEOF(l_1)))) >= 1;
  WR2: SIZEOF(SELF\draughting_callout.contents) >=2;
END_ENTITY;

ENTITY leader_terminator
  SUBTYPE OF (terminator_symbol);
WHERE
  WR1: 'DRAUGHTING_ELEMENT_SCHEMA.LEADER_CURVE' IN TYPEOF (SELF\terminator_symbol.annotated_curve);
END_ENTITY;

ENTITY projection_curve
  SUBTYPE OF (annotation_curve_occurrence);
END_ENTITY;

ENTITY projection_directed_callout
  SUBTYPE OF (draughting_callout);
WHERE
  WR1: SIZEOF(QUERY(p_1<*SELF\draughting_callout.contents | 'DRAUGHTING_ELEMENT_SCHEMA.PROJECTION_CURVE' IN (TYPEOF(p_1))))<=2;
  WR2: SIZEOF(SELF\draughting_callout.contents) >=2;
END_ENTITY;

ENTITY terminator_symbol
  SUBTYPE OF (annotation_symbol_occurrence);
  annotated_curve : annotation_curve_occurrence;
END_ENTITY;

ENTITY tessellated_annotation_occurrence
  SUBTYPE OF (annotation_occurrence);
  SELF\styled_item.item : tessellated_geometric_set;
END_ENTITY;

SUBTYPE_CONSTRAINT annotation_curve_subtypes FOR annotation_curve_occurrence;
  ONEOF (dimension_curve,
         leader_curve,
         projection_curve);
END_SUBTYPE_CONSTRAINT;

END_SCHEMA;  -- draughting_element_schema