Application module: Constructive solid geometry 2D | ISO/TS 10303-1731:2019(E) © ISO |
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.
This subclause specifies the MIM types for this application module. The MIM types and definitions are specified below.
EXPRESS specification:
*)
TYPE
boolean_operand_2d =
SELECT
(bounded_primitive_2d,
boolean_result_2d);
END_TYPE;
(*
EXPRESS specification:
*)
TYPE
compound_inner_area_boundary =
SELECT
(set_inner_area_boundary);
END_TYPE;
(*
EXPRESS specification:
*)
TYPE
csg2d_bounded_primitive_2d =
SELECT
BASED_ON
bounded_primitive_2d
WITH
(path_area_with_parameters);
END_TYPE;
(*
EXPRESS specification:
*)
TYPE
csg_2d_area_select =
SELECT
(axis2_placement_2d,
csg_primitive_solid_2d);
END_TYPE;
(*
EXPRESS specification:
*)
TYPE
csg_2d_shape_select =
SELECT
(mapped_item,
axis2_placement_2d,
csg_solid_2d);
END_TYPE;
(*
EXPRESS specification:
*)
TYPE
csg_select_2d =
SELECT
(bounded_primitive_2d,
boolean_result_2d);
END_TYPE;
(*
EXPRESS specification:
*)
TYPE
set_inner_area_boundary =
SET[1:?] OF bounded_primitive_2d;
END_TYPE;
(*
This subclause specifies the MIM entities for this module. The MIM entities and definitions are specified below.
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.
EXPRESS specification:
*)
ENTITY closed_curve_style_parameters
SUBTYPE OF (curve_style_parameters_representation);
END_ENTITY;
(*
EXPRESS specification:
*)
ENTITY complex_area
ABSTRACT SUPERTYPE
OF (path_area_with_parameters
ANDOR primitive_2d_with_inner_boundary)
SUBTYPE OF (primitive_2d);
END_ENTITY;
(*
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.
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.
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.
EXPRESS specification:
*)
ENTITY curve_style_parameters_representation
SUBTYPE OF (representation);
END_ENTITY;
(*
EXPRESS specification:
*)
ENTITY curve_style_parameters_with_ends
SUBTYPE OF (curve_style_parameters_representation);
END_ENTITY;
(*
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'.
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.
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.
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.
This subclause specifies the MIM functions for this module. The MIM functions and definitions are specified below.
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.
The function valid_csg_2d_primitives returns TRUE if any of the following conditions exist:
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