Application module: Constructive solid geometry 2D ISO/TS 10303-1731:2019(E)
© ISO

Cover page
Table of contents
Copyright
Foreword
Introduction
1 Scope
2 Normative references
3 Terms, definitions and abbreviated terms
    3.1 Terms and definitions
    3.2 Abbreviated terms

4 Information requirements
   4.1 Required AM ARMs
   4.2 ARM type definitions
   4.3 ARM entity definitions
5 Module interpreted model
   5.1 Mapping specification
   5.2 MIM EXPRESS short listing
     5.2.1 MIM type definitions
     5.2.2 MIM entity definitions
     5.2.3 MIM function definitions

A MIM short names
B Information object registration
C ARM EXPRESS-G   EXPRESS-G
D MIM EXPRESS-G   EXPRESS-G
E Computer interpretable listings
F Change history
Bibliography
Index

5.2 MIM EXPRESS short listing

This clause specifies the EXPRESS schema derived from the mapping table. It uses elements from the common resources or from other application modules and defines the EXPRESS constructs that are specific to this part of ISO 10303.

This clause constitutes the Module Interpreted Module (MIM) of the application module.

This clause also specifies the modifications that apply to the constructs imported from the common resources.

The following restrictions apply to the use, in this schema, of constructs defined in common resources or in application modules:

Short names of entities defined in this schema are described in Annex A. Unambiguous identification of this schema is defined in Annex B.

EXPRESS specification:

*)
SCHEMA Constructive_solid_geometry_2d_mim;

USE FROM Area_2d_mim;    --  ISO/TS 10303-1631

USE FROM Basic_curve_mim;    --  ISO/TS 10303-1651

USE FROM geometric_model_schema    --  ISO 10303-42
  (area_with_outer_boundary,
   boolean_result,
   bounded_primitive_2d,
   csg_solid,
   half_space_2d);

USE FROM geometry_schema    --  ISO 10303-42
  (composite_curve);

USE FROM representation_schema    --  ISO 10303-43
  (compound_representation_item,
   mapped_item,
   set_representation_item);
(*

NOTE 1   The schemas referenced above are specified in the following part of ISO 10303:

Area_2d_mim ISO/TS 10303-1631
Basic_curve_mim ISO/TS 10303-1651
geometric_model_schema ISO 10303-42
geometry_schema ISO 10303-42
representation_schema ISO 10303-43

NOTE 2   See Annex D, Figures D.1and D.2 for a graphical representation of this schema.

5.2.1 MIM type definitions

This subclause specifies the MIM types for this application module. The MIM types and definitions are specified below.

5.2.1.1 boolean_operand_2d   EXPRESS-G

A boolean_operand_2d is a specialization of boolean_operand.

EXPRESS specification:

*)
TYPE boolean_operand_2d = SELECT
   (bounded_primitive_2d,
    boolean_result_2d);
END_TYPE;
(*

5.2.1.2 compound_inner_area_boundary   EXPRESS-G

A compound_inner_area_boundary is a specialization of compound_item_definition.

EXPRESS specification:

*)
TYPE compound_inner_area_boundary = SELECT
   (set_inner_area_boundary);
END_TYPE;
(*

5.2.1.3 csg2d_bounded_primitive_2d   EXPRESS-G

EXPRESS specification:

*)
TYPE csg2d_bounded_primitive_2d = SELECT BASED_ON bounded_primitive_2d WITH
   (path_area_with_parameters);
END_TYPE;
(*

5.2.1.4 csg_2d_area_select   EXPRESS-G

EXPRESS specification:

*)
TYPE csg_2d_area_select = SELECT
   (axis2_placement_2d,
    csg_primitive_solid_2d);
END_TYPE;
(*

5.2.1.5 csg_2d_shape_select   EXPRESS-G

EXPRESS specification:

*)
TYPE csg_2d_shape_select = SELECT
   (mapped_item,
    axis2_placement_2d,
    csg_solid_2d);
END_TYPE;
(*

5.2.1.6 csg_select_2d   EXPRESS-G

A csg_select_2d is a specialization of csg_select.

EXPRESS specification:

*)
TYPE csg_select_2d = SELECT
   (bounded_primitive_2d,
    boolean_result_2d);
END_TYPE;
(*

5.2.1.7 set_inner_area_boundary   EXPRESS-G

A set_inner_area_boundary is a specialization of set_representation_item.

EXPRESS specification:

*)
TYPE set_inner_area_boundary = SET[1:?] OF bounded_primitive_2d;
END_TYPE;
(*

5.2.2 MIM entity definitions

This subclause specifies the MIM entities for this module. The MIM entities and definitions are specified below.

5.2.2.1 boolean_result_2d   EXPRESS-G

A boolean_result_2d is a type of boolean_result in two dimensions.

EXPRESS specification:

*)
ENTITY boolean_result_2d
  SUBTYPE OF (boolean_result);
  SELF\boolean_result.first_operand : boolean_operand_2d;
  SELF\boolean_result.second_operand : boolean_operand_2d;
END_ENTITY;
(*

Attribute definitions:

first_operand: an attribute inherited from the boolean_result shall be redeclared as the boolean_operand_2d for the boolean_result_2d.

second_operand: an attribute inherited from the boolean_result shall be redeclared as the boolean_operand_2d for the boolean_result_2d.

5.2.2.2 closed_curve_style_parameters   EXPRESS-G

A closed_curve_style_parameters is a type of curve_style_parameters_representation that implements the ARM concept of Closed_curve_style_parameters.

EXPRESS specification:

*)
ENTITY closed_curve_style_parameters
  SUBTYPE OF (curve_style_parameters_representation);
END_ENTITY;
(*

5.2.2.3 complex_area   EXPRESS-G

A complex_area is a type of primitive_2d. that has a more complex geometry than the other primitive_2d specializations rectangular_area, circular_area, elliptic_area or polygonal_area.

EXPRESS specification:

*)
ENTITY complex_area
  ABSTRACT SUPERTYPE OF (path_area_with_parameters
                         ANDOR primitive_2d_with_inner_boundary)
  SUBTYPE OF (primitive_2d);
END_ENTITY;
(*

5.2.2.4 csg_2d_shape_representation   EXPRESS-G

A csg_2d_shape_representation is a type of shape_representation that implements the ARM concept of Csg_2d_model. A csg_2d_shape_representation is a two-dimensional shape_representation that represents the shape of a product using constructive solid geometry operations and techniques. The solid objects may be either 2D primitives, or half-space 2D solids.

EXPRESS specification:

*)
ENTITY csg_2d_shape_representation
  SUBTYPE OF (shape_representation);
  SELF\representation.items : SET[1:?] OF csg_2d_shape_select;
WHERE
  WR1: SELF.context_of_items\geometric_representation_context.coordinate_space_dimension = 2;
  WR2: SIZEOF(QUERY ( it <* SELF.items | (SIZEOF(['GEOMETRIC_MODEL_SCHEMA.CSG_SOLID'] * TYPEOF(it)) = 1) OR (('REPRESENTATION_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) AND ('CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.' + 'CSG_2D_SHAPE_REPRESENTATION' IN TYPEOF(it\mapped_item.mapping_source.mapped_representation))) )) >= 1;
  WR3: SIZEOF(QUERY ( it <* SELF.items | (('REPRESENTATION_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) AND (NOT (( 'CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.' + 'CSG_2D_SHAPE_REPRESENTATION') IN TYPEOF(it\mapped_item.mapping_source.mapped_representation)))) )) = 0;
END_ENTITY;
(*

Attribute definitions:

items: an attribute inherited from the representation shall be redeclared as the csg_2d_shape_select for the csg_2d_shape_representation. There shall exist more than one csg_2d_shape_select for the csg_2d_shape_representation.

Formal propositions:

WR1: The geometric_representation_context of the csg_2d_shape_representation shall have a coordinate_space_dimension equal to two.

WR2: At least one of the items in a csg_2d_shape_representation shall be a csg_solid, or a mapped_item with a mapped_representation of the mapping_source attribute of the type csg_2d_shape_representation.

WR3: If a mapped_item is in the items set then the mapped_representation of the mapping_source attribute shall be a csg_2d_shape_representation.

5.2.2.5 csg_primitive_solid_2d   EXPRESS-G

A csg_primitive_solid_2d is a type of csg_solid_2d.

EXPRESS specification:

*)
ENTITY csg_primitive_solid_2d
  SUBTYPE OF (csg_solid_2d);
  SELF\csg_solid.tree_root_expression : bounded_primitive_2d;
END_ENTITY;
(*

Attribute definitions:

tree_root_expression: an attribute inherited from the csg_solid shall be redeclared as the primitive_2d for the csg_primitive_solid_2d.

5.2.2.6 csg_solid_2d   EXPRESS-G

A csg_solid_2d is a type of csg_solid in two dimensions.

EXPRESS specification:

*)
ENTITY csg_solid_2d
  SUBTYPE OF (csg_solid);
  SELF\csg_solid.tree_root_expression : csg_select_2d;
WHERE
  WR1: valid_csg_2d_primitives(SELF);
END_ENTITY;
(*

Attribute definitions:

tree_root_expression: an attribute inherited from the csg_solid shall be redeclared as the csg_select_2d for the csg_solid_2d.

Formal propositions:

WR1: A csg_solid_2d shall be a valid solid.

5.2.2.7 curve_style_parameters_representation   EXPRESS-G

A curve_style_parameters_representation is a type of representation.

EXPRESS specification:

*)
ENTITY curve_style_parameters_representation
  SUBTYPE OF (representation);
END_ENTITY;
(*

5.2.2.8 curve_style_parameters_with_ends   EXPRESS-G

A curve_style_parameters_with_ends is a type of curve_style_parameters_representation that implements the ARM concept of Curve_style_parameters_with_ends.

EXPRESS specification:

*)
ENTITY curve_style_parameters_with_ends
  SUBTYPE OF (curve_style_parameters_representation);
END_ENTITY;
(*

5.2.2.9 path_area_with_parameters   EXPRESS-G

A path_area_with_parameters is a type of complex_area and of mapped_item that implements the ARM concepts of:

EXPRESS specification:

*)
ENTITY path_area_with_parameters
  SUBTYPE OF (complex_area, mapped_item);
WHERE
  WR1: 'GEOMETRY_SCHEMA.CURVE' IN TYPEOF(SELF\mapped_item.mapping_target);
  WR2: 'CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.CURVE_STYLE_PARAMETERS_REPRESENTATION' IN TYPEOF(SELF\mapped_item.mapping_source\representation_map.mapped_representation);
  WR3: SELF\mapped_item.mapping_source\representation_map.mapping_origin\representation_item.name = 'curve width';
END_ENTITY;
(*

Formal propositions:

WR1: The mapping_target attribute inherited from mapped_item shall be a curve.

WR2: The representation that is the mapped_representation of the representation_map specified by the mapping_source attribute inherited from mapped_item shall be a curve_style_parameters_representation.

WR3: The name of the representation_item that is the mapping_origin of the representation_map specified by the mapping_source attribute inherited from mapped_item shall have a name of 'curve width'.

5.2.2.10 primitive_2d_with_inner_boundary   EXPRESS-G

A primitive_2d_with_inner_boundary is a type of primitive_2d and of compound_representation_item.

EXPRESS specification:

*)
ENTITY primitive_2d_with_inner_boundary
  SUBTYPE OF (complex_area, compound_representation_item);
  SELF\compound_representation_item.item_element RENAMED inner_boundary : compound_inner_area_boundary;
WHERE
  WR1: SIZEOF(['GEOMETRIC_MODEL_SCHEMA.CIRCULAR_AREA', 'GEOMETRIC_MODEL_SCHEMA.ELLIPTIC_AREA', 'GEOMETRIC_MODEL_SCHEMA.RECTANGULAR_AREA', 'GEOMETRIC_MODEL_SCHEMA.POLYGONAL_AREA', 'GEOMETRIC_MODEL_SCHEMA.AREA_WITH_OUTER_BOUNDARY', 'CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.PATH_AREA_WITH_PARAMETERS'] * TYPEOF(SELF)) > 0;
  WR2: SIZEOF(QUERY(inner <* inner_boundary | 'CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.PRIMITIVE_2D_WITH_INNER_BOUNDARY' IN TYPEOF(inner))) = 0;
  WR3: open_path_based_inner_boundary(inner_boundary);
END_ENTITY;
(*

Attribute definitions:

inner_boundary: specifies the role of the compound_inner_area_boundary for the primitive_2d_with_inner_boundary.

Formal propositions:

WR1: A primitive_2d_with_inner_boundary must be either a circular_area, an elliptic_area, a rectangular_area, a polygonal_area, an area_with_outer_boundary, or a path_area_with_parameters.

WR2: The inner_boundary of a primitive_2d_with_inner_boundary shall not be a type primitive_2d_with_inner_boundary.

WR3: If the inner_boundary is path based, then the path shall be an open path.

NOTE    A closed path would create invalid geometry since the closed path would generate two conflicting boundary curves.

5.2.2.11 single_area_csg_2d_shape_representation   EXPRESS-G

A single_area_csg_2d_shape_representation is a type of csg_2d_shape_representation that implements the ARM concept of Single_area_csg_2d_model.

EXPRESS specification:

*)
ENTITY single_area_csg_2d_shape_representation
  SUBTYPE OF (csg_2d_shape_representation);
  SELF\representation.items : SET[1:?] OF csg_2d_area_select;
WHERE
  WR1: SIZEOF (QUERY (it <* SELF.items| ('CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.MAPPED_ITEM' IN TYPEOF(it)) )) = 0;
  WR2: SIZEOF (QUERY (it <* SELF.items| ('CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.CSG_SOLID_2D' IN TYPEOF(it)) )) = 1;
END_ENTITY;
(*

Attribute definitions:

items: an attribute inherited from the representation shall be redeclared as the csg_2d_area_select for the single_area_csg_2d_shape_representation. There shall exist more than one csg_2d_area_select for the single_area_csg_2d_shape_representation.

Formal propositions:

WR1: The items in a csg_2d_shape_representation shall not be of type mapped_item.

WR2: Exactly one of the items in a csg_2d_shape_representation shall be a csg_solid.

5.2.2.12 single_boundary_csg_2d_shape_representation   EXPRESS-G

A single_boundary_csg_2d_shape_representation is a type of single_area_csg_2d_shape_representation that implements the ARM concept of Single_boundary_csg_2d_model.

EXPRESS specification:

*)
ENTITY single_boundary_csg_2d_shape_representation
  SUBTYPE OF (single_area_csg_2d_shape_representation);
WHERE
  WR1: SIZEOF(QUERY ( it <* SELF.items | (('CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.CSG_PRIMITIVE_SOLID_2D' IN TYPEOF(it)) AND (('CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.PRIMITIVE_2D_WITH_INNER_BOUNDARY') IN TYPEOF(it\csg_primitive_solid_2d.tree_root_expression))) )) = 0;
END_ENTITY;
(*

Formal propositions:

WR1: If the member of items is a csg_primitive_solid_2d, then the primitive_2d used as a tree_root_expression for the csg_primitive_solid_2d shall not be a primitive_2d_with_inner_boundary.

5.2.3 MIM function definitions

This subclause specifies the MIM functions for this module. The MIM functions and definitions are specified below.

5.2.3.1 open_path_based_inner_boundary

The function open_path_based_inner_boundary returns FALSE if a path_area_with_parameters is included in the input and that member of path_area_with_parameters specifies a composite_curve as a mapping_source. It returns TRUE otherwise.

EXPRESS specification:

*)
FUNCTION open_path_based_inner_boundary (input : SET[0:?] OF primitive_2d) : BOOLEAN;
LOCAL
   pass : BOOLEAN := TRUE;
  END_LOCAL;
  REPEAT i := 1 TO SIZEOF(input);
      IF ('CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.PATH_AREA_WITH_PARAMETERS' IN TYPEOF(input[i]))
        AND ( 
         ('GEOMETRY_SCHEMA.CIRCLE' IN TYPEOF(input[i]\mapped_item.mapping_source\representation_map.mapping_origin))
          OR
          (('GEOMETRY_SCHEMA.COMPOSITE_CURVE' IN TYPEOF(input[i]\mapped_item.mapping_source\representation_map.mapping_origin))
           AND
            (input[i]\mapped_item.mapping_source\representation_map.mapping_origin\composite_curve.closed_curve = TRUE) 
          )
        )  
      THEN
       pass := FALSE;
      END_IF;
  END_REPEAT;
  RETURN(pass);
END_FUNCTION;
(*

Argument definitions:

input: the specified primitive_2d.

5.2.3.2 valid_csg_2d_primitives

The function valid_csg_2d_primitives returns TRUE if any of the following conditions exist:

  1. the tree_root_expression is a primitive_2d and if the type of tree_root_expression includes circular_area, complex_area, elliptic_area, half_space_2d, polygonal_area, primitive_2d_with_inner_boundary, or rectangular_area;
  2. the tree_root_expression is a boolean_result_2d and the operands of the tree_root_expression are themselves valid csg 2d primitives If none of the conditions is met, the function returns FALSE.

EXPRESS specification:

*)
FUNCTION valid_csg_2d_primitives (input : csg_solid_2d) : BOOLEAN;
CASE TRUE OF
  ('GEOMETRIC_MODEL_SCHEMA.PRIMITIVE_2D' IN TYPEOF(input\csg_solid_2d.tree_root_expression)) :
  BEGIN
    IF (SIZEOF(['GEOMETRIC_MODEL_SCHEMA.CIRCULAR_AREA', 
       'CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.COMPLEX_AREA',
       'GEOMETRIC_MODEL_SCHEMA.ELLIPTIC_AREA',
       'GEOMETRIC_MODEL_SCHEMA.HALF_SPACE_2D',
       'GEOMETRIC_MODEL_SCHEMA.POLYGONAL_AREA',
       'CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.PRIMITIVE_2D_WITH_INNER_BOUNDARY',
       'GEOMETRIC_MODEL_SCHEMA.RECTANGULAR_AREA'] * TYPEOF(input\csg_solid_2d.tree_root_expression)) > 0)
    THEN 
           RETURN(TRUE);
    ELSE
           RETURN(FALSE);
    END_IF;
  END;

  ('CONSTRUCTIVE_SOLID_GEOMETRY_2D_MIM.BOOLEAN_RESULT_2D' IN TYPEOF(input\csg_solid_2d.tree_root_expression)) : 
    RETURN (valid_csg_2d_primitives(input\csg_solid_2d.tree_root_expression\boolean_result_2d.first_operand) 
        AND valid_csg_2d_primitives(input\csg_solid_2d.tree_root_expression\boolean_result_2d.second_operand));

  OTHERWISE : RETURN(FALSE);
END_CASE;
END_FUNCTION;
(*

Argument definitions:

input: the specified csg_solid_2d.



*)
END_SCHEMA;  -- Constructive_solid_geometry_2d_mim
(*


© ISO 2019 — All rights reserved