cloudcad.model


The cloudcad.model namespace provides functions for creating and managing CAD models.


cloudcad.model.create#

Creates a new CAD model from a cad_data object.

KeyTypeDescription
cad_dataobjectA CAD data object. See CAD Data Format for the full schema description.
Sample input for cloudcad.model.create
{
"function": "cloudcad.model.create",
"arguments": {
"cad_data": {
"settings": {
"canvasLengthUnits": "mm"
},
"canvases": [
{
"version": "2.0.0",
"schema": "canvas-json-v2-optimized",
"name": "My Drawing",
"drawing_type": "Plan",
"is_base": true,
"points": [],
"lines": [
{
"p1": { "x": 0, "y": 0 },
"p2": { "x": 5000, "y": 0 }
}
],
"polylines": [],
"dimensions": [],
"angleDimensions": [],
"radiusDimensions": [],
"leaderTexts": [],
"multiLeaderTexts": [],
"texts": [],
"tables": [],
"axes": [],
"constructionLines": [],
"revisionClouds": [],
"hatches": [],
"images": [],
"block_references": [],
"block_instances": [],
"layers": []
}
]
}
}
}
Sample response for cloudcad.model.create
{
"status": 0,
"msg": "CAD model was successfully created.",
"data": ""
}