Skip to content
BadBit Documentation
Sign in Download the beta

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

NameTypeRequiredDescription
default_formFormSpec | nullNoThe form of new dimensional constraints: dynamic or annotational.
inferboolean | nullNoInfers geometric constraints while drawing.
relaxboolean | nullNoRelaxes constraints when editing objects.
show_barsboolean | nullNoShows the constraint bars.
show_dynamicboolean | nullNoShows the dynamic constraints.

Errors

CodeJSON-RPCMeaning
invalid_params-32602The parameters do not follow the schema or a rule of the operation.
not_found-32001The object, operation, file or name does not exist.
conflict-32004The current state does not allow this now.
failed-32005The 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

CONSTRAINTSETTINGS

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"
}
Search the documentation