Operaciones de BadBit CAD
cad.parametric.settings
Cambia la configuración del dibujo paramétrico (CONSTRAINTSETTINGS).
- Programa: BadBit CAD
- Tipo de acción: Cambia el dibujo
- Modifica el dibujo
- Desde la versión 2027.0.0-beta.8
Cambia lo que venga: infer (inferir restricciones al dibujar), relax (relajar al editar), default_form (la forma de las restricciones dimensionales nuevas), show_dynamic y show_bars, como la ventana de CONSTRAINTSETTINGS. Devuelve la configuración.
Parámetros
| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
default_form | FormSpec | null | No | La forma de las restricciones dimensionales nuevas: dynamic o annotational. |
infer | boolean | null | No | Infiere las restricciones geométricas al dibujar. |
relax | boolean | null | No | Relaja las restricciones al editar los objetos. |
show_bars | boolean | null | No | Muestra las barras de restricción. |
show_dynamic | boolean | null | No | Muestra las restricciones dinámicas. |
Errores
| Código | JSON-RPC | Qué significa |
|---|---|---|
invalid_params | -32602 | Los parámetros no siguen el esquema o una regla de la operación. |
not_found | -32001 | El objeto, la operación, el archivo o el nombre no existe. |
conflict | -32004 | El estado actual no lo permite ahora. |
failed | -32005 | La operación falló. |
Ejemplo
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"
}
}Comandos que hacen lo mismo
Esquema completo
JSON Schema 2020-12, con las descripciones en inglés.
Parámetros (entrada)
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"
}Resultado (salida)
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"
}