zcbot/software-contracts/cad.drawing.author.v1.json

142 lines
7.9 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"capability": "cad.drawing.author@v1",
"display_name": "二维 CAD 工程制图",
"default_enrollment": false,
"lifecycle": {
"status": "active",
"visibility": "standard",
"replacement": null,
"detail": "用于平面 CAD、户型图、布局图、实验室或车间设备布置、DXF 和门窗尺寸图STEP、三维实体及仿真前处理请使用仿真几何准备STEPFCStd 请使用 FreeCAD。"
},
"output_namespace": "cad2d",
"input_policy": {
"suffixes": [],
"max_count": 0,
"max_bytes": 0,
"max_total_bytes": 0
},
"outputs": {
"drawing_dxf": {"filename": "drawing.dxf", "media_type": "image/vnd.dxf", "relative_path": "drawing.dxf", "publish": true, "required": true},
"drawing_svg": {"filename": "drawing.svg", "media_type": "image/svg+xml", "relative_path": "drawing.svg", "publish": true, "required": true},
"drawing_png": {"filename": "drawing.png", "media_type": "image/png", "relative_path": "drawing.png", "publish": true, "required": true},
"drawing_pdf": {"filename": "drawing.pdf", "media_type": "application/pdf", "relative_path": "drawing.pdf", "publish": true, "required": true},
"drawing_recipe": {"filename": "drawing-recipe.json", "media_type": "application/json", "relative_path": "drawing-recipe.json", "publish": true, "required": true},
"drawing_manifest": {"filename": "drawing-manifest.json", "media_type": "application/json", "relative_path": "drawing-manifest.json", "publish": true, "required": true},
"validation_report": {"filename": "validation-report.json", "media_type": "application/json", "relative_path": "validation-report.json", "publish": true, "required": true},
"provenance": {"filename": "provenance.json", "media_type": "application/json", "relative_path": ".meta/provenance.json", "publish": false, "required": true}
},
"feature_path": ["operation", "drawing", "type"],
"features": {"floor_plan": "1.0.0", "equipment_layout": "1.0.0"},
"summary": {"title_path": ["operation", "drawing", "title"]},
"legacy_runtime": null,
"workspace": {
"state_output": "drawing_dxf",
"preview_outputs": ["drawing_png"],
"required_adapter_version": "1.0.0"
},
"request_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"x-maxBytes": 524288,
"required": ["schema_version", "inputs", "operation", "outputs"],
"additionalProperties": false,
"properties": {
"schema_version": {"const": 1},
"inputs": {"type": "array", "maxItems": 0},
"operation": {
"type": "object",
"required": ["drawing"],
"additionalProperties": false,
"properties": {"drawing": {"$ref": "#/$defs/drawing"}}
},
"outputs": {"type": "array", "maxItems": 0}
},
"$defs": {
"identifier": {"type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"},
"text": {"type": "string", "minLength": 1, "maxLength": 160, "pattern": "^[^\\u0000-\\u001F\\u007F]*$"},
"coordinate": {"type": "number", "minimum": -1000000, "maximum": 1000000},
"positive": {"type": "number", "exclusiveMinimum": 0, "maximum": 1000000},
"point": {"type": "array", "minItems": 2, "maxItems": 2, "items": {"$ref": "#/$defs/coordinate"}},
"size": {"type": "array", "minItems": 2, "maxItems": 2, "items": {"$ref": "#/$defs/positive"}},
"sheet": {
"type": "object",
"required": ["size", "orientation", "scale"],
"additionalProperties": false,
"properties": {
"size": {"enum": ["A4", "A3", "A2", "A1", "A0"]},
"orientation": {"enum": ["portrait", "landscape"]},
"scale": {"type": "integer", "enum": [10, 20, 25, 50, 100, 200, 500]}
}
},
"wall": {
"type": "object",
"required": ["id", "start", "end", "thickness", "kind"],
"additionalProperties": false,
"properties": {
"id": {"$ref": "#/$defs/identifier"}, "start": {"$ref": "#/$defs/point"}, "end": {"$ref": "#/$defs/point"},
"thickness": {"type": "number", "minimum": 50, "maximum": 2000}, "kind": {"enum": ["exterior", "interior"]}
}
},
"opening": {
"type": "object",
"required": ["id", "wall_id", "offset", "width", "type"],
"additionalProperties": false,
"properties": {
"id": {"$ref": "#/$defs/identifier"}, "wall_id": {"$ref": "#/$defs/identifier"},
"offset": {"type": "number", "minimum": 0, "maximum": 1000000}, "width": {"$ref": "#/$defs/positive"},
"type": {"enum": ["single_door", "double_door", "sliding_door", "window", "high_window", "opening"]},
"hinge": {"enum": ["start", "end"]}, "swing": {"enum": ["left", "right", "in", "out"]}
}
},
"area": {
"type": "object",
"required": ["id", "boundary", "name", "label_position", "show_area"],
"additionalProperties": false,
"properties": {
"id": {"$ref": "#/$defs/identifier"}, "boundary": {"type": "array", "minItems": 4, "maxItems": 256, "items": {"$ref": "#/$defs/point"}},
"name": {"$ref": "#/$defs/text"}, "label_position": {"$ref": "#/$defs/point"}, "show_area": {"type": "boolean"}
}
},
"object": {
"type": "object",
"required": ["id", "type", "position"],
"additionalProperties": false,
"properties": {
"id": {"$ref": "#/$defs/identifier"},
"type": {"enum": ["desk", "chair", "cabinet", "lab_bench", "fume_hood", "machine", "tank", "safety_exit", "extinguisher", "custom_rectangle", "custom_circle"]},
"position": {"$ref": "#/$defs/point"}, "size": {"$ref": "#/$defs/size"},
"radius": {"$ref": "#/$defs/positive"}, "rotation": {"type": "number", "minimum": -360, "maximum": 360}, "label": {"$ref": "#/$defs/text"}
}
},
"linear_dimension": {
"type": "object", "required": ["id", "type", "start", "end", "offset"], "additionalProperties": false,
"properties": {"id": {"$ref": "#/$defs/identifier"}, "type": {"enum": ["horizontal", "vertical", "aligned"]}, "start": {"$ref": "#/$defs/point"}, "end": {"$ref": "#/$defs/point"}, "offset": {"$ref": "#/$defs/coordinate"}}
},
"multi_dimension": {
"type": "object", "required": ["id", "type", "points", "offset"], "additionalProperties": false,
"properties": {"id": {"$ref": "#/$defs/identifier"}, "type": {"enum": ["chain", "overall"]}, "points": {"type": "array", "minItems": 2, "maxItems": 64, "items": {"$ref": "#/$defs/point"}}, "offset": {"$ref": "#/$defs/coordinate"}}
},
"dimension": {"oneOf": [{"$ref": "#/$defs/linear_dimension"}, {"$ref": "#/$defs/multi_dimension"}]},
"note": {
"type": "object", "required": ["id", "position", "text"], "additionalProperties": false,
"properties": {"id": {"$ref": "#/$defs/identifier"}, "position": {"$ref": "#/$defs/point"}, "text": {"$ref": "#/$defs/text"}, "rotation": {"type": "number", "minimum": -360, "maximum": 360}}
},
"drawing": {
"type": "object",
"required": ["type", "recipe_version", "title", "unit", "sheet", "walls", "openings", "areas", "objects", "dimensions", "notes"],
"additionalProperties": false,
"properties": {
"type": {"enum": ["floor_plan", "equipment_layout"]}, "recipe_version": {"const": 1},
"title": {"$ref": "#/$defs/text"}, "unit": {"const": "mm"}, "sheet": {"$ref": "#/$defs/sheet"},
"walls": {"type": "array", "maxItems": 256, "items": {"$ref": "#/$defs/wall"}},
"openings": {"type": "array", "maxItems": 256, "items": {"$ref": "#/$defs/opening"}},
"areas": {"type": "array", "maxItems": 128, "items": {"$ref": "#/$defs/area"}},
"objects": {"type": "array", "maxItems": 256, "items": {"$ref": "#/$defs/object"}},
"dimensions": {"type": "array", "maxItems": 256, "items": {"$ref": "#/$defs/dimension"}},
"notes": {"type": "array", "maxItems": 128, "items": {"$ref": "#/$defs/note"}}
}
}
}
}
}