feat: harden CAD showcase skill and delivery pipeline
This commit is contained in:
125
schemas/building_spec.schema.json
Normal file
125
schemas/building_spec.schema.json
Normal file
@@ -0,0 +1,125 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://cad-building-showcase.local/schemas/building-spec-v1.json",
|
||||
"title": "CAD Building Showcase building_spec.json",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "project", "source", "units", "categories", "floors"],
|
||||
"properties": {
|
||||
"schema_version": {"const": 1},
|
||||
"project": {
|
||||
"type": "object",
|
||||
"required": ["name", "description"],
|
||||
"properties": {"name": {"type": "string"}, "description": {"type": "string"}},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"source": {
|
||||
"type": "object",
|
||||
"required": ["config"],
|
||||
"properties": {
|
||||
"dxf_dir": {"type": "string"},
|
||||
"report": {"type": "string"},
|
||||
"config": {"type": "object"}
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"units": {
|
||||
"type": "object",
|
||||
"required": ["source", "scale_to_meters", "origin_source"],
|
||||
"properties": {
|
||||
"source": {"type": "string"},
|
||||
"scale_to_meters": {"type": "number", "exclusiveMinimum": 0},
|
||||
"origin_source": {"$ref": "#/$defs/point"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"categories": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"required": ["label", "color"],
|
||||
"properties": {"label": {"type": "string"}, "color": {"type": "string"}},
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"floors": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "#/$defs/floor"}
|
||||
},
|
||||
"extraction_report": {"type": "array", "items": {"type": "object"}}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"$defs": {
|
||||
"point": {
|
||||
"type": "array",
|
||||
"prefixItems": [{"type": "number"}, {"type": "number"}],
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
},
|
||||
"rect": {
|
||||
"type": "array",
|
||||
"prefixItems": [
|
||||
{"type": "number"}, {"type": "number"}, {"type": "number"}, {"type": "number"}
|
||||
],
|
||||
"minItems": 4,
|
||||
"maxItems": 4
|
||||
},
|
||||
"segment": {
|
||||
"type": "object",
|
||||
"required": ["start", "end", "width", "layer", "source_type"],
|
||||
"properties": {
|
||||
"start": {"$ref": "#/$defs/point"},
|
||||
"end": {"$ref": "#/$defs/point"},
|
||||
"width": {"type": "number", "minimum": 0},
|
||||
"layer": {"type": "string"},
|
||||
"source_type": {"type": "string"},
|
||||
"_z0": {"type": "number"},
|
||||
"_z1": {"type": "number"}
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"polygon": {
|
||||
"type": "array",
|
||||
"minItems": 3,
|
||||
"items": {"$ref": "#/$defs/point"}
|
||||
},
|
||||
"footprint": {
|
||||
"type": "object",
|
||||
"required": ["polygons"],
|
||||
"properties": {
|
||||
"method": {"type": "string"},
|
||||
"source": {"type": "string"},
|
||||
"source_categories": {"type": "array", "items": {"type": "string"}},
|
||||
"area": {"type": "number", "minimum": 0},
|
||||
"polygons": {"type": "array", "items": {"$ref": "#/$defs/polygon"}}
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"cap": {
|
||||
"type": "object",
|
||||
"required": ["z", "polygons"],
|
||||
"properties": {
|
||||
"z": {"type": "number"},
|
||||
"polygons": {"type": "array", "items": {"$ref": "#/$defs/polygon"}}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"floor": {
|
||||
"type": "object",
|
||||
"required": ["name", "z", "height", "bounds", "source_file", "segments"],
|
||||
"properties": {
|
||||
"name": {"type": "string"},
|
||||
"z": {"type": "number"},
|
||||
"height": {"type": "number", "exclusiveMinimum": 0},
|
||||
"bounds": {"$ref": "#/$defs/rect"},
|
||||
"source_file": {"type": "string"},
|
||||
"segments": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"type": "array", "items": {"$ref": "#/$defs/segment"}}
|
||||
},
|
||||
"footprint": {"$ref": "#/$defs/footprint"},
|
||||
"caps": {"type": "array", "items": {"$ref": "#/$defs/cap"}}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
166
schemas/extraction_config.schema.json
Normal file
166
schemas/extraction_config.schema.json
Normal file
@@ -0,0 +1,166 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://cad-building-showcase.local/schemas/extraction-config-v1.json",
|
||||
"title": "CAD Building Showcase extraction config",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"config_version": {"const": 1},
|
||||
"_comment": {"type": ["string", "array", "object"]},
|
||||
"project_name": {"type": "string"},
|
||||
"description": {"type": "string"},
|
||||
"source_units": {"type": "string"},
|
||||
"scale": {"type": "number", "exclusiveMinimum": 0},
|
||||
"scale_to_meters": {"type": "number", "exclusiveMinimum": 0},
|
||||
"origin": {"$ref": "#/$defs/point"},
|
||||
"origin_strategy": {"enum": ["center", "min"]},
|
||||
"floor_height": {"type": "number", "exclusiveMinimum": 0},
|
||||
"floor_order": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
|
||||
"drawings": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "#/$defs/drawing"}
|
||||
},
|
||||
"discarded_frames": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["name", "reason"],
|
||||
"properties": {
|
||||
"name": {"type": "string", "minLength": 1},
|
||||
"reason": {"type": "string", "minLength": 1}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"layers": {"$ref": "#/$defs/patternMap"},
|
||||
"categories": {"type": "object"},
|
||||
"exclude_layers": {"$ref": "#/$defs/stringList"},
|
||||
"default_widths": {"$ref": "#/$defs/numberMap"},
|
||||
"default_disabled_categories": {"$ref": "#/$defs/stringList"},
|
||||
"min_source_length": {"type": "number", "minimum": 0},
|
||||
"min_source_length_by_category": {"$ref": "#/$defs/numberMap"},
|
||||
"min_length_meters": {"type": "number", "minimum": 0},
|
||||
"min_length_meters_by_category": {"$ref": "#/$defs/numberMap"},
|
||||
"curve_chord_source_length": {"type": "number", "exclusiveMinimum": 0},
|
||||
"expand_blocks": {"oneOf": [{"type": "boolean"}, {"$ref": "#/$defs/stringList"}]},
|
||||
"expand_block_names": {"$ref": "#/$defs/stringList"},
|
||||
"expand_blocks_max_depth": {"type": "integer", "minimum": 0, "maximum": 16},
|
||||
"expand_glazing_blocks": {"type": "boolean"},
|
||||
"classify_block_contents": {"type": "boolean"},
|
||||
"block_content_categories": {"$ref": "#/$defs/stringList"},
|
||||
"block_name_categories": {"$ref": "#/$defs/patternMap"},
|
||||
"block_insert_layer_fallback": {"type": "boolean"},
|
||||
"generate_footprints": {"type": "boolean"},
|
||||
"footprint_categories": {"$ref": "#/$defs/stringList"},
|
||||
"footprint_concave_ratio": {"type": "number", "minimum": 0, "maximum": 1},
|
||||
"footprint_simplify_tolerance": {"type": "number", "minimum": 0},
|
||||
"footprint_min_area": {"type": "number", "minimum": 0},
|
||||
"footprint_max_polygons": {"type": "integer", "minimum": 1},
|
||||
"footprint_cluster_linkage": {"type": "number", "exclusiveMinimum": 0},
|
||||
"use_footprint_slabs": {"type": "boolean"},
|
||||
"use_footprint_roofs": {"type": "boolean"},
|
||||
"slab_bounds_fallback": {"type": "boolean"},
|
||||
"slab_thickness": {"type": "number", "exclusiveMinimum": 0},
|
||||
"generate_caps": {"type": "boolean"},
|
||||
"cap_buffer": {"type": "number", "minimum": 0},
|
||||
"cap_groups": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"prefixItems": [{"type": "string"}, {"type": "string"}],
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
}
|
||||
},
|
||||
"roof_specs": {"type": "array", "items": {"$ref": "#/$defs/roofSpec"}},
|
||||
"merge_glazing": {"type": "boolean"},
|
||||
"glazing_gap_tol": {"type": "number", "minimum": 0},
|
||||
"merge_wall_solids": {"type": "boolean"},
|
||||
"glazing_mullions": {"type": "boolean"},
|
||||
"glazing_panel_w": {"type": "number", "exclusiveMinimum": 0},
|
||||
"drop_isolated_clusters": {"type": "boolean"},
|
||||
"cluster_linkage": {"type": "number", "exclusiveMinimum": 0},
|
||||
"isolation_distance": {"type": "number", "minimum": 0},
|
||||
"isolation_min_length": {"type": "number", "minimum": 0},
|
||||
"drop_unsupported_roof_lines": {"type": "boolean"},
|
||||
"roof_support_distance": {"type": "number", "minimum": 0},
|
||||
"shorten_unsupported_columns": {"type": "boolean"},
|
||||
"shorten_unsupported_columns_floor_keys": {"$ref": "#/$defs/stringList"},
|
||||
"unsupported_column_height": {"type": "number", "minimum": 0},
|
||||
"column_support_distance": {"type": "number", "minimum": 0},
|
||||
"column_support_z_tolerance": {"type": "number", "minimum": 0},
|
||||
"column_roof_support_z_tolerance": {"type": "number", "minimum": 0},
|
||||
"column_support_categories": {"$ref": "#/$defs/stringList"},
|
||||
"column_support_requires_upper_plate": {"type": "boolean"},
|
||||
"column_support_allow_plate_only": {"type": "boolean"},
|
||||
"show_floor_labels": {"type": "boolean"},
|
||||
"declared_areas_m2": {"$ref": "#/$defs/numberMap"},
|
||||
"declared_area_tolerance": {"type": "number", "minimum": 0},
|
||||
"expected_storeys_above_ground": {"type": "integer", "minimum": 0},
|
||||
"showcase_variant": {"type": "string"},
|
||||
"showcase_variant_categories": {"oneOf": [{"type": "string"}, {"$ref": "#/$defs/stringList"}]}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"$defs": {
|
||||
"point": {
|
||||
"type": "array",
|
||||
"prefixItems": [{"type": "number"}, {"type": "number"}],
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
},
|
||||
"rect": {
|
||||
"type": "array",
|
||||
"prefixItems": [
|
||||
{"type": "number"}, {"type": "number"}, {"type": "number"}, {"type": "number"}
|
||||
],
|
||||
"minItems": 4,
|
||||
"maxItems": 4
|
||||
},
|
||||
"stringList": {"type": "array", "items": {"type": "string"}},
|
||||
"numberMap": {"type": "object", "additionalProperties": {"type": "number"}},
|
||||
"patternMap": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "#/$defs/stringList"}
|
||||
},
|
||||
"floor": {
|
||||
"type": "object",
|
||||
"required": ["key"],
|
||||
"properties": {
|
||||
"key": {"type": "string", "minLength": 1},
|
||||
"name": {"type": "string"},
|
||||
"z": {"type": ["number", "null"]},
|
||||
"height": {"type": "number", "exclusiveMinimum": 0},
|
||||
"clip": {"$ref": "#/$defs/rect"},
|
||||
"offset": {"$ref": "#/$defs/point"},
|
||||
"side": {"type": "string"},
|
||||
"split_x": {"type": "number"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"drawing": {
|
||||
"type": "object",
|
||||
"required": ["file"],
|
||||
"properties": {
|
||||
"file": {"type": "string", "minLength": 1},
|
||||
"clip": {"$ref": "#/$defs/rect"},
|
||||
"offset": {"$ref": "#/$defs/point"},
|
||||
"split_x": {"type": "number"},
|
||||
"floors": {"type": "array", "items": {"$ref": "#/$defs/floor"}}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"roofSpec": {
|
||||
"type": "object",
|
||||
"required": ["floor_key"],
|
||||
"properties": {
|
||||
"floor_key": {"type": "string"},
|
||||
"bounds_from": {"$ref": "#/$defs/stringList"},
|
||||
"footprint_from": {"$ref": "#/$defs/stringList"},
|
||||
"bounds": {"$ref": "#/$defs/rect"},
|
||||
"z": {"type": "number"},
|
||||
"thickness": {"type": "number", "exclusiveMinimum": 0},
|
||||
"margin": {"type": "number", "minimum": 0}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
31
schemas/variants_manifest.schema.json
Normal file
31
schemas/variants_manifest.schema.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://cad-building-showcase.local/schemas/variants-manifest-v1.json",
|
||||
"title": "CAD Building Showcase variants manifest",
|
||||
"type": "object",
|
||||
"required": ["manifest_version", "name", "default_key", "variants"],
|
||||
"properties": {
|
||||
"manifest_version": {"const": 1},
|
||||
"name": {"type": "string"},
|
||||
"default_key": {"type": "string"},
|
||||
"variants": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["key", "label", "file", "source_glb", "metadata", "spec"],
|
||||
"properties": {
|
||||
"key": {"type": "string", "minLength": 1},
|
||||
"label": {"type": "string"},
|
||||
"description": {"type": "string"},
|
||||
"file": {"type": "string"},
|
||||
"source_glb": {"type": "string"},
|
||||
"metadata": {"type": "string"},
|
||||
"spec": {"type": "string"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user