(* $Id: scan_data_3d_shape_model_schema.exp,v 1.12 2021/05/06 16:22:59 kevin Exp $ ISO 10303 TC184/SC4/WG12 N10694 EXPRESS Source: ISO 10303-42 ed7 Geometric and topological representation - Scan data 3d shape model schema The following permission notice and disclaimer shall be included in all copies of this EXPRESS schema ("the Schema"), and derivations of the Schema: Copyright ISO 2021 All rights reserved Permission is hereby granted, free of charge in perpetuity, to any person obtaining a copy of the Schema, to use, copy, modify, merge and distribute free of charge, copies of the Schema for the purposes of developing, implementing, installing and using software based on the Schema, and to permit persons to whom the Schema is furnished to do so, subject to the following conditions: THE SCHEMA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SCHEMA OR THE USE OR OTHER DEALINGS IN THE SCHEMA. In addition, any modified copy of the Schema shall include the following notice: THIS SCHEMA HAS BEEN MODIFIED FROM THE SCHEMA DEFINED IN ISO 10303-42 ed7 Geometric and topological representation - Scan data 3d shape model schema AND SHOULD NOT BE INTERPRETED AS COMPLYING WITH THAT STANDARD *) SCHEMA scan_data_3d_shape_model_schema '{iso standard 10303 part(42) version(2) object(1) scan_data_3d_shape_model_schema(4)}'; REFERENCE FROM measure_schema(global_unit_assigned_context, positive_length_measure); -- ISO 10303-41 REFERENCE FROM representation_schema(representation, representation_item, using_representations); -- ISO 10303-43 REFERENCE FROM product_property_representation_schema(shape_representation); -- ISO 10303-41 REFERENCE FROM support_resource_schema(label); -- ISO 10303-41 REFERENCE FROM geometry_schema(axis2_placement_3d, geometric_representation_item, geometric_representation_context); TYPE point_cloud_set_or_superset = SELECT (point_cloud_dataset, point_cloud_superdataset); END_TYPE; ENTITY scan_data_shape_representation SUBTYPE OF(shape_representation); SELF\representation.items : SET[1:?] OF scanned_data_item; WHERE WR1: 'REPRESENTATION_SCHEMA.GLOBAL_UNIT_ASSIGNED_CONTEXT' IN TYPEOF(SELF\representation.context_of_items); END_ENTITY; ENTITY scanned_data_item SUPERTYPE OF (ONEOF(point_cloud_dataset, point_cloud_superdataset, triangulated_point_cloud_dataset,scan_3d_model)) SUBTYPE OF(geometric_representation_item); WHERE WR1: SIZEOF (QUERY (using_rep <* using_representations (SELF) | NOT ('SCAN_DATA_3D_SHAPE_MODEL_SCHEMA.SCAN_DATA_SHAPE_REPRESENTATION' IN TYPEOF(using_rep)))) = 0; END_ENTITY; ENTITY point_cloud_dataset SUBTYPE OF(scanned_data_item); point_coordinates : LIST [1: ?] OF LIST[3:3] OF REAL; END_ENTITY; ENTITY point_cloud_dataset_with_normals SUBTYPE OF(point_cloud_dataset); normals : LIST [1: ?] OF LIST[3:3] OF REAL; WHERE WR1: SIZEOF(normals) = SIZEOF(SELF\point_cloud_dataset.point_coordinates); END_ENTITY; ENTITY point_cloud_dataset_with_colours SUBTYPE OF(point_cloud_dataset); colour_indices : LIST [1: ?] OF LIST[3:3] OF INTEGER; WHERE WR1: SIZEOF(colour_indices) = SIZEOF(SELF\point_cloud_dataset.point_coordinates); END_ENTITY; ENTITY point_cloud_dataset_with_intensities SUBTYPE OF(point_cloud_dataset); intensities : LIST [1: ?] OF REAL; WHERE WR1: SIZEOF(intensities) = SIZEOF(SELF\point_cloud_dataset.point_coordinates); END_ENTITY; ENTITY point_cloud_superdataset SUBTYPE OF(scanned_data_item); pts_per_sublist : INTEGER; sublists : LIST [2 : ?] OF point_cloud_dataset; WHERE WR1 : consistent_sizes(SELF.pts_per_sublist, SELF.sublists); END_ENTITY; ENTITY triangulated_point_cloud_dataset SUBTYPE OF(scanned_data_item); points : point_cloud_set_or_superset; triangles : LIST [1: ?] OF LIST[3:3] OF INTEGER; END_ENTITY; ENTITY scan_3d_model SUBTYPE OF(scanned_data_item); scanner_info : SET [1 : ?] OF scanner_property; scanned_points : SET [1: ?] OF scanned_data_item; WHERE WR1: SIZEOF(QUERY(tmp <* scanned_points | 'SCAN_DATA_3D_SHAPE_MODEL_SCHEMA.SCAN_3D_MODEL' IN TYPEOF(tmp))) = 0; END_ENTITY; ENTITY scanner_property ABSTRACT SUPERTYPE SUBTYPE OF(representation_item); END_ENTITY; ENTITY scanner_basic_properties SUBTYPE OF(scanner_property); scanner_identification: label; scanner_location: axis2_placement_3d; scanner_uncertainty: OPTIONAL positive_length_measure; END_ENTITY; FUNCTION consistent_sizes (max : INTEGER; point_lists : LIST OF point_cloud_dataset) : BOOLEAN; LOCAL ndatasets : INTEGER := SIZEOF(point_lists); RESULT: BOOLEAN := TRUE; END_LOCAL; REPEAT i := 1 TO (ndatasets - 1); IF (SIZEOF(point_lists[i].point_coordinates) <> max) THEN result := FALSE; RETURN(result); END_IF; END_REPEAT; IF (SIZEOF(point_lists[ndatasets].point_coordinates) > max) THEN result := FALSE; RETURN(result); END_IF; RETURN(result); END_FUNCTION; END_SCHEMA; -- scan_data_3d_shape_model_schema