Operações do BadBit CAD
cad.parametric.settings
Muda as configurações do desenho paramétrico (CONSTRAINTSETTINGS).
- Programa: BadBit CAD
- Tipo de ação: Altera o desenho
- Altera o desenho
- Desde a versão 2027.0.0-beta.8
Muda o que vem: infer (inferir restrições ao desenhar), relax (afrouxar ao mexer), default_form (a forma das restrições dimensionais novas), show_dynamic e show_bars, como a janela do CONSTRAINTSETTINGS. Devolve as configurações.
Parâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
default_form | FormSpec | null | Não | A forma das restrições dimensionais novas: dynamic ou annotational. |
infer | boolean | null | Não | Infere as restrições geométricas ao desenhar. |
relax | boolean | null | Não | Afrouxa as restrições ao mexer nos objetos. |
show_bars | boolean | null | Não | Mostra as barras de restrição. |
show_dynamic | boolean | null | Não | Mostra as restrições dinâmicas. |
Erros
| Código | JSON-RPC | O que significa |
|---|---|---|
invalid_params | -32602 | Os parâmetros não seguem o esquema ou uma regra da operação. |
not_found | -32001 | O objeto, a operação, o arquivo ou o nome não existe. |
conflict | -32004 | O estado atual não permite isso agora. |
failed | -32005 | A operação falhou. |
Exemplo
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 fazem o mesmo
Esquema completo
JSON Schema 2020-12, com as descrições em 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 (saída)
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"
}