Metadata-Version: 2.4
Name: dxcad-sdk
Version: 0.1.1
Summary: The DX-CAD SDK: plugin API, model.py type stubs, docs and examples
Author: Designmatix Ltd
License-Expression: Apache-2.0
Keywords: cad,dxcad,plugin,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
Classifier: Typing :: Stubs Only
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Dynamic: license-file

<!-- SPDX-License-Identifier: Apache-2.0 -->
<!-- Copyright 2026 Designmatix Ltd -->
# DX-CAD SDK

Everything needed to build on DX-CAD, under the Apache License 2.0:

- **The plugin API** (`dxcad_sdk.plugin`): the protocols and constants a
  plugin meets. A plugin adds model names, subcommands, MCP tools for agents,
  window actions and dialogs, kinds of sheet part that unfold through DX-CAD's
  flat pipeline, its own section of a saved file, and may say it needs an
  entitlement.
- **Type stubs** (`dxcad-stubs`): every function and class a DX-CAD model.py
  starts with, so an editor completes and checks a model.
- **A checker**: `dxcad-sdk check PATH` checks an add-on's declarations
  before DX-CAD loads it, one line per check.
- **A sweep**: `dxcad-sdk sweep NAME` runs DX-CAD's command sweep on an
  installed add-on's commands: each opened offscreen, its dialogs checked on
  a 1366 x 768 screen at 100, 125 and 150 percent and the parts it builds
  checked valid (DX-CAD installed beside it; see DX-CAD's docs/plugins.md).
- **Examples and a template**: three example plugins under `examples/` and a
  starter under `template/`.
- **Docs**: `docs/agents.md` (DX-CAD with Claude and other MCP clients, every
  tool's inputs, example prompts) and `docs/format.md` (the .dxcprt, .dxcasm and
  .dxcdrg file formats, and how older files open).

The SDK holds interfaces, stubs, docs and examples only. DX-CAD itself is
installed apart and is not part of the SDK or licensed by it (see NOTICE).

## A first plugin

Copy `template/` to a folder of your own, rename `dxcad_myplugin`, then:

    dxcad-sdk check my-plugin
    python -m pip install -e my-plugin

and start DX-CAD: the plugin's names, tools and actions are there. A plugin
that draws on drawings registers view kinds, annotation kinds and sheet tools
(`registry.view_kind`, `registry.annotation_kind`, `registry.sheet_tool`; see
`dxcad_sdk.plugin` and the plugins page of the docs). Anything a
plugin takes from DX-CAD (`from dxcad.model import ...`) is imported inside
the functions that use it, so the checker can import the plugin without
DX-CAD.
