@bentley/civil-physical-schema 1.0.3-dev.3 → 1.0.4-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"$schema":"https://dev.bentley.com/json_schemas/ec/32/ecschema","name":"CivilPhysical","version":"01.00.03","alias":"cvphys","description":"Main schema for the physical modeling of elements used in Civil infrastructure.","references":[{"name":"CoreCustomAttributes","version":"01.00.05"},{"name":"BisCustomAttributes","version":"01.00.00"},{"name":"BisCore","version":"01.00.26"},{"name":"LinearReferencing","version":"02.00.04"},{"name":"CivilUnits","version":"01.00.01"}],"customAttributes":[{"className":"CoreCustomAttributes.ProductionStatus","SupportedUse":"NotForProduction"},{"className":"BisCustomAttributes.SchemaLayerInfo","Value":"DisciplinePhysical"}],"items":{"LayeredStructure":{"schemaItemType":"EntityClass","label":"Layered Structure","description":"A bis:PhysicalElement that assembles multiple layers, designed to provide durability, load distribution, and/or environmental resistance.","modifier":"Abstract","baseClass":"BisCore.PhysicalElement","mixins":["BisCore.IParentElement"]},"LayeredStructureType":{"schemaItemType":"EntityClass","label":"Layered Structure Type","description":"Defines a shared set of properties whose values vary per-type of Layered Structure rather than per-instance.","modifier":"Abstract","baseClass":"BisCore.PhysicalType"},"LayeredStructureIsOfType":{"schemaItemType":"RelationshipClass","description":"A type-instance relation; one that indicates that the specific LayeredStructure is an instance of the defined LayeredStructureType.","modifier":"None","baseClass":"BisCore.PhysicalElementIsOfType","strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"is of","polymorphic":true,"constraintClasses":["CivilPhysical.LayeredStructure"]},"target":{"multiplicity":"(0..1)","roleLabel":"is type of","polymorphic":true,"constraintClasses":["CivilPhysical.LayeredStructureType"]}},"LayeredStructureAssemblesLayers":{"schemaItemType":"RelationshipClass","description":"A relationship between a LayeredStructure and the constituent layers that it assembles.","modifier":"None","baseClass":"BisCore.PhysicalElementAssemblesElements","strength":"Embedding","strengthDirection":"Forward","source":{"multiplicity":"(0..1)","roleLabel":"assembles","polymorphic":true,"constraintClasses":["CivilPhysical.LayeredStructure"]},"target":{"multiplicity":"(0..*)","roleLabel":"is assembled by","polymorphic":true,"constraintClasses":["BisCore.PhysicalElement"]}},"LayeredStructureTypeComposesSubTypes":{"schemaItemType":"RelationshipClass","description":"A relationship used to identify the bis:PhysicalType instances that are sub-parts to compose a larger LayeredStructureType.","modifier":"Abstract","baseClass":"BisCore.PhysicalTypeComposesSubTypes","properties":[{"name":"SubTypeThickness","type":"PrimitiveProperty","description":"The thickness measurement of the sub-type.","label":"Thickness","kindOfQuantity":"CivilUnits.LENGTH_SHORT","typeName":"double"}],"strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"composes","polymorphic":true,"constraintClasses":["CivilPhysical.LayeredStructureType"]},"target":{"multiplicity":"(0..*)","roleLabel":"is composed by","polymorphic":true,"constraintClasses":["BisCore.PhysicalType"]}},"Course":{"schemaItemType":"EntityClass","label":"Course","description":"A bis:PhysicalElement modeling a typical layer assembled by a LayeredStructure, usually of a single material, whose length greatly exceeds its thickness and often also its width, laid on site on top of another horizontal or nearly horizontal element.","baseClass":"LinearReferencing.LinearPhysicalElement"},"CourseType":{"schemaItemType":"EntityClass","label":"Course Type","description":"Defines a shared set of properties whose values vary per-type of Course rather than per-instance.","baseClass":"BisCore.PhysicalType"},"CourseIsOfType":{"schemaItemType":"RelationshipClass","description":"A type-instance relation; one that indicates that the specific cp:Course is an instance of the defined cp:CourseType.","modifier":"None","baseClass":"BisCore.PhysicalElementIsOfType","strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"is of","polymorphic":true,"constraintClasses":["CivilPhysical.Course"]},"target":{"multiplicity":"(0..1)","roleLabel":"is type of","polymorphic":true,"constraintClasses":["CivilPhysical.CourseType"]}},"Curb":{"schemaItemType":"EntityClass","label":"Curb","description":"A bis:PhysicalElement intended to separate surfacings of different surfaces and to provide physical delineation or containment.","baseClass":"LinearReferencing.LinearPhysicalElement"},"CurbType":{"schemaItemType":"EntityClass","label":"Curb Type","description":"Defines a shared set of properties whose values vary per-type of Curb rather than per-instance.","baseClass":"BisCore.PhysicalType"},"CurbIsOfType":{"schemaItemType":"RelationshipClass","description":"A type-instance relation; one that indicates that the specific cp:Curb is an instance of the defined cp:CurbType.","modifier":"None","baseClass":"BisCore.PhysicalElementIsOfType","strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"is of","polymorphic":true,"constraintClasses":["CivilPhysical.Curb"]},"target":{"multiplicity":"(0..1)","roleLabel":"is type of","polymorphic":true,"constraintClasses":["CivilPhysical.CurbType"]}},"RetainingWall":{"schemaItemType":"EntityClass","label":"Retaining Wall","description":"A lr:LinearPhysicalElement modeling a structure built to hold back soil or other materials, supporting them laterally, preventing them from sliding or eroding away.","baseClass":"LinearReferencing.LinearPhysicalElement"},"RetainingWallType":{"schemaItemType":"EntityClass","label":"Retaining Wall Type","description":"Defines a shared set of properties whose values vary per-type of RetainingWall rather than per-instance.","baseClass":"BisCore.PhysicalType"},"RetainingWallIsOfType":{"schemaItemType":"RelationshipClass","description":"A type-instance relation; one that indicates that the specific cp:RetainingWall is an instance of the defined cp:RetainingWallType.","modifier":"None","baseClass":"BisCore.PhysicalElementIsOfType","strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"is of","polymorphic":true,"constraintClasses":["CivilPhysical.RetainingWall"]},"target":{"multiplicity":"(0..1)","roleLabel":"is type of","polymorphic":true,"constraintClasses":["CivilPhysical.RetainingWallType"]}},"SurfaceMarking":{"schemaItemType":"EntityClass","label":"Surface Marking","description":"A bis:PhysicalElement modeling markings on a surface.","baseClass":"BisCore.PhysicalElement"},"SurfaceMarkingType":{"schemaItemType":"EntityClass","label":"Surface Marking Type","description":"Defines a shared set of properties whose values vary per-type of SurfaceMarking rather than per-instance.","baseClass":"BisCore.PhysicalType"},"SurfaceMarkingIsOfType":{"schemaItemType":"RelationshipClass","description":"A type-instance relation; one that indicates that the specific SurfaceMarking is an instance of the defined SurfaceMarkingType.","modifier":"None","baseClass":"BisCore.PhysicalElementIsOfType","strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"is of","polymorphic":true,"constraintClasses":["CivilPhysical.SurfaceMarking"]},"target":{"multiplicity":"(0..1)","roleLabel":"is type of","polymorphic":true,"constraintClasses":["CivilPhysical.SurfaceMarkingType"]}}}}
1
+ {"$schema":"https://dev.bentley.com/json_schemas/ec/32/ecschema","name":"CivilPhysical","version":"01.00.04","alias":"cvphys","description":"Main schema for the physical modeling of elements used in Civil infrastructure.","references":[{"name":"CoreCustomAttributes","version":"01.00.05"},{"name":"BisCustomAttributes","version":"01.00.00"},{"name":"BisCore","version":"01.00.26"},{"name":"LinearReferencing","version":"02.00.04"},{"name":"CivilUnits","version":"01.00.01"}],"customAttributes":[{"className":"CoreCustomAttributes.ProductionStatus","SupportedUse":"NotForProduction"},{"className":"BisCustomAttributes.SchemaLayerInfo","Value":"DisciplinePhysical"}],"items":{"LayeredStructure":{"schemaItemType":"EntityClass","label":"Layered Structure","description":"A bis:PhysicalElement that assembles multiple layers, designed to provide durability, load distribution, and/or environmental resistance.","modifier":"Abstract","baseClass":"BisCore.PhysicalElement","mixins":["BisCore.IParentElement"]},"LayeredStructureType":{"schemaItemType":"EntityClass","label":"Layered Structure Type","description":"Defines a shared set of properties whose values vary per-type of Layered Structure rather than per-instance.","modifier":"Abstract","baseClass":"BisCore.PhysicalType"},"LayeredStructureIsOfType":{"schemaItemType":"RelationshipClass","description":"A type-instance relation; one that indicates that the specific LayeredStructure is an instance of the defined LayeredStructureType.","modifier":"None","baseClass":"BisCore.PhysicalElementIsOfType","strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"is of","polymorphic":true,"constraintClasses":["CivilPhysical.LayeredStructure"]},"target":{"multiplicity":"(0..1)","roleLabel":"is type of","polymorphic":true,"constraintClasses":["CivilPhysical.LayeredStructureType"]}},"LayeredStructureAssemblesLayers":{"schemaItemType":"RelationshipClass","description":"A relationship between a LayeredStructure and the constituent layers that it assembles.","modifier":"None","baseClass":"BisCore.PhysicalElementAssemblesElements","strength":"Embedding","strengthDirection":"Forward","source":{"multiplicity":"(0..1)","roleLabel":"assembles","polymorphic":true,"constraintClasses":["CivilPhysical.LayeredStructure"]},"target":{"multiplicity":"(0..*)","roleLabel":"is assembled by","polymorphic":true,"constraintClasses":["BisCore.PhysicalElement"]}},"LayeredStructureTypeComposesSubTypes":{"schemaItemType":"RelationshipClass","description":"A relationship used to identify the bis:PhysicalType instances that are sub-parts to compose a larger LayeredStructureType.","modifier":"Abstract","baseClass":"BisCore.PhysicalTypeComposesSubTypes","properties":[{"name":"SubTypeThickness","type":"PrimitiveProperty","description":"The thickness measurement of the sub-type.","label":"Thickness","kindOfQuantity":"CivilUnits.LENGTH_SHORT","typeName":"double"}],"strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"composes","polymorphic":true,"constraintClasses":["CivilPhysical.LayeredStructureType"]},"target":{"multiplicity":"(0..*)","roleLabel":"is composed by","polymorphic":true,"constraintClasses":["BisCore.PhysicalType"]}},"Course":{"schemaItemType":"EntityClass","label":"Course","description":"A bis:PhysicalElement modeling a typical layer assembled by a LayeredStructure, usually of a single material, whose length greatly exceeds its thickness and often also its width, laid on site on top of another horizontal or nearly horizontal element.","baseClass":"LinearReferencing.LinearPhysicalElement"},"CourseType":{"schemaItemType":"EntityClass","label":"Course Type","description":"Defines a shared set of properties whose values vary per-type of Course rather than per-instance.","baseClass":"BisCore.PhysicalType"},"CourseIsOfType":{"schemaItemType":"RelationshipClass","description":"A type-instance relation; one that indicates that the specific cp:Course is an instance of the defined cp:CourseType.","modifier":"None","baseClass":"BisCore.PhysicalElementIsOfType","strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"is of","polymorphic":true,"constraintClasses":["CivilPhysical.Course"]},"target":{"multiplicity":"(0..1)","roleLabel":"is type of","polymorphic":true,"constraintClasses":["CivilPhysical.CourseType"]}},"Curb":{"schemaItemType":"EntityClass","label":"Curb","description":"A bis:PhysicalElement intended to separate surfacings of different surfaces and to provide physical delineation or containment.","baseClass":"LinearReferencing.LinearPhysicalElement"},"CurbType":{"schemaItemType":"EntityClass","label":"Curb Type","description":"Defines a shared set of properties whose values vary per-type of Curb rather than per-instance.","baseClass":"BisCore.PhysicalType"},"CurbIsOfType":{"schemaItemType":"RelationshipClass","description":"A type-instance relation; one that indicates that the specific cp:Curb is an instance of the defined cp:CurbType.","modifier":"None","baseClass":"BisCore.PhysicalElementIsOfType","strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"is of","polymorphic":true,"constraintClasses":["CivilPhysical.Curb"]},"target":{"multiplicity":"(0..1)","roleLabel":"is type of","polymorphic":true,"constraintClasses":["CivilPhysical.CurbType"]}},"RetainingWall":{"schemaItemType":"EntityClass","label":"Retaining Wall","description":"A lr:LinearPhysicalElement modeling a structure built to hold back soil or other materials, supporting them laterally, preventing them from sliding or eroding away.","baseClass":"LinearReferencing.LinearPhysicalElement"},"RetainingWallType":{"schemaItemType":"EntityClass","label":"Retaining Wall Type","description":"Defines a shared set of properties whose values vary per-type of RetainingWall rather than per-instance.","baseClass":"BisCore.PhysicalType"},"RetainingWallIsOfType":{"schemaItemType":"RelationshipClass","description":"A type-instance relation; one that indicates that the specific cp:RetainingWall is an instance of the defined cp:RetainingWallType.","modifier":"None","baseClass":"BisCore.PhysicalElementIsOfType","strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"is of","polymorphic":true,"constraintClasses":["CivilPhysical.RetainingWall"]},"target":{"multiplicity":"(0..1)","roleLabel":"is type of","polymorphic":true,"constraintClasses":["CivilPhysical.RetainingWallType"]}},"SurfaceMarking":{"schemaItemType":"EntityClass","label":"Surface Marking","description":"A bis:PhysicalElement modeling markings on a surface.","baseClass":"BisCore.PhysicalElement"},"SurfaceMarkingType":{"schemaItemType":"EntityClass","label":"Surface Marking Type","description":"Defines a shared set of properties whose values vary per-type of SurfaceMarking rather than per-instance.","baseClass":"BisCore.PhysicalType"},"SurfaceMarkingIsOfType":{"schemaItemType":"RelationshipClass","description":"A type-instance relation; one that indicates that the specific SurfaceMarking is an instance of the defined SurfaceMarkingType.","modifier":"None","baseClass":"BisCore.PhysicalElementIsOfType","strength":"Referencing","strengthDirection":"Forward","source":{"multiplicity":"(0..*)","roleLabel":"is of","polymorphic":true,"constraintClasses":["CivilPhysical.SurfaceMarking"]},"target":{"multiplicity":"(0..1)","roleLabel":"is type of","polymorphic":true,"constraintClasses":["CivilPhysical.SurfaceMarkingType"]}}}}
@@ -3,7 +3,7 @@
3
3
  | * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
4
  | * See LICENSE.md in the project root for license terms and full copyright notice.
5
5
  ======================================================================================= -->
6
- <ECSchema schemaName="CivilPhysical" alias="cvphys" version="01.00.03" description="Main schema for the physical modeling of elements used in Civil infrastructure." xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.2">
6
+ <ECSchema schemaName="CivilPhysical" alias="cvphys" version="01.00.04" description="Main schema for the physical modeling of elements used in Civil infrastructure." xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.2">
7
7
  <ECSchemaReference name="CoreCustomAttributes" version="01.00.03" alias="CoreCA"/>
8
8
  <ECSchemaReference name="BisCustomAttributes" version="01.00.00" alias="bisCA"/>
9
9
  <ECSchemaReference name="BisCore" version="01.00.14" alias="bis"/>
@@ -61,4 +61,34 @@ Therefore, individual `bis:PhysicalType`s (e.g. `CourseType`) composing a `Layer
61
61
 
62
62
  An instance of `LayeredStructureTypeComposesSubTypes` captures the _thickness_ and _order_ of a `bis:PhysicalType` at its target end-point (e.g. a `CourseType`) in context of a `LayeredStructureType` instance at its source end-point. They are captured on its _SubTypeThickness_ and _MemberPriority_ properties.
63
63
 
64
- By convention, the top-layer of a `LayeredStructureType` shall have the _MemberPriority_ property of this relationship set to 0 (zero). The subsequent layer down shall have this property set to 1 (one), and so on.
64
+ By convention, the top-layer of a `LayeredStructureType` shall have the _MemberPriority_ property of this relationship set to 0 (zero). The subsequent layer down shall have this property set to 1 (one), and so on.
65
+
66
+ ## Sample ECSQL queries
67
+
68
+ - Query for the _thickness_ of a particular layer (e.g. `Course`) in a `LayeredStructure` (e.g. Pavement).
69
+
70
+ ```sql
71
+ SELECT
72
+ comp.SubTypeThickness [Layer Thickness]
73
+ FROM
74
+ bis.PhysicalElement layer INNER JOIN bis.PhysicalType pt ON layer.TypeDefinition.Id = pt.ECInstanceId
75
+ INNER JOIN cvphys.LayeredStructure structure ON structure.ECInstanceId = layer.Parent.Id
76
+ INNER JOIN cvphys.LayeredStructureType structType ON structure.TypeDefinition.Id = structType.ECInstanceId
77
+ INNER JOIN cvphys.LayeredStructureTypeComposesSubTypes comp ON comp.TargetECInstanceId = pt.ECInstanceId
78
+ AND comp.SourceECInstanceId = structType.ECInstanceId
79
+ WHERE
80
+ layer.ECInstanceId = :layerId
81
+ ```
82
+
83
+ - Compute the overall _thickness_ of a particular `LayeredStructure` (e.g. Pavement).
84
+
85
+ ```sql
86
+ SELECT
87
+ SUM(comp.SubTypeThickness) [Overall Thickness]
88
+ FROM
89
+ cvphys.LayeredStructure structure
90
+ INNER JOIN cvphys.LayeredStructureType structType ON structure.TypeDefinition.Id = structType.ECInstanceId
91
+ INNER JOIN cvphys.LayeredStructureTypeComposesSubTypes comp ON comp.SourceECInstanceId = structType.ECInstanceId
92
+ WHERE
93
+ structure.ECInstanceId = :layeredStructureId
94
+ ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bentley/civil-physical-schema",
3
3
  "license": "MIT",
4
- "version": "1.0.3-dev.3",
4
+ "version": "1.0.4-dev.1",
5
5
  "homepage": "https://www.itwinjs.org/",
6
6
  "keywords": [
7
7
  "Bentley",