These examples show how to use the in-process OpenCAD API to model parts that commonly appear in collaborative device-development work across hardware, software, and firmware teams.
hardware/hardware_mounting_bracket.py— mechanical mounting bracket with fastener holeshardware/hardware_pcb_carrier.py— carrier plate for a controller or sensor PCB
software/software_hmi_panel.py— front panel for a software-driven operator interface
firmware/firmware_programmer_fixture.py— fixture plate for firmware flashing or debug access
device/full_device_cable_grommet.py— cable-management part built from primitive booleans
agents/generate_mounting_bracket_code.py— agent-driven example-style code generation
From the repository root:
python -m opencad.cli run examples/hardware/hardware_mounting_bracket.py \
--export bracket.step \
--tree-output bracket-tree.jsonEach script leaves the final part in the default runtime context, so the CLI can export both a STEP file and a serialized feature tree.
For agent-focused examples, see examples/agents/README.md.