BadBit CAD operations
cad.parametric.settings
Changes the parametric drawing settings (CONSTRAINTSETTINGS).
- Program: BadBit CAD
- Type of action: Changes the drawing
- Changes the drawing
- Since version 2027.0.0-beta.8
Changes what is given: infer (infer constraints while drawing), relax (relax when editing), default_form (the form of new dimensional constraints), show_dynamic and show_bars, like the CONSTRAINTSETTINGS dialog. Returns the settings.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
default_form | FormSpec | null | No | The form of new dimensional constraints: dynamic or annotational. |
infer | boolean | null | No | Infers geometric constraints while drawing. |
relax | boolean | null | No | Relaxes constraints when editing objects. |
show_bars | boolean | null | No | Shows the constraint bars. |
show_dynamic | boolean | null | No | Shows the dynamic constraints. |
Errors
| Code | JSON-RPC | Meaning |
|---|---|---|
invalid_params | -32602 | The parameters do not follow the schema or a rule of the operation. |
not_found | -32001 | The object, operation, file or name does not exist. |
conflict | -32004 | The current state does not allow this now. |
failed | -32005 | The operation failed. |
Example
MCP
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"arguments": {
"infer": true
},
"operation": "cad.parametric.settings"
},
"name": "badbit_call_operation"
}
}Python
Python
import badbit
result = badbit.cad.parametric.settings(infer=True)LISP
LISP
(badbit-call "cad.parametric.settings" '(("infer" . T)))JSON-RPC
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "badbit/call",
"params": {
"arguments": {
"infer": true
},
"operation": "cad.parametric.settings"
}
}Commands that do the same
Full schema
JSON Schema 2020-12.
Parameters (input)
JSON
{
"$defs": {
"FormSpec": {
"oneOf": [
{
"const": "dynamic",
"type": "string"
},
{
"const": "annotational",
"type": "string"
}
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"default_form": {
"anyOf": [
{
"$ref": "#/$defs/FormSpec"
},
{
"type": "null"
}
],
"description": "The form of new dimensional constraints: dynamic or annotational."
},
"infer": {
"default": null,
"description": "Infers geometric constraints while drawing.",
"type": [
"boolean",
"null"
]
},
"relax": {
"default": null,
"description": "Relaxes constraints when editing objects.",
"type": [
"boolean",
"null"
]
},
"show_bars": {
"default": null,
"description": "Shows the constraint bars.",
"type": [
"boolean",
"null"
]
},
"show_dynamic": {
"default": null,
"description": "Shows the dynamic constraints.",
"type": [
"boolean",
"null"
]
}
},
"type": "object"
}Result (output)
JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"default_form": {
"description": "The form of new dimensional constraints: dynamic or annotational.",
"type": "string"
},
"infer": {
"description": "Infers geometric constraints while drawing.",
"type": "boolean"
},
"relax": {
"description": "Relaxes constraints when editing objects.",
"type": "boolean"
},
"show_bars": {
"description": "Shows the constraint bars.",
"type": "boolean"
},
"show_dynamic": {
"description": "Shows the dynamic constraints.",
"type": "boolean"
}
},
"required": [
"infer",
"relax",
"default_form",
"show_dynamic",
"show_bars"
],
"type": "object"
}