SOLIDCRAFT · PYTHON · NATIVE COMMANDS

Write SolidCraft commands in Python.

SCPC is a small, direct interface to SolidCraft's native command API. Build an ordered command script without manually writing JSON or creating a second CAD modelling language.

01

Describe

Use Script.add(native_command, **params). IDs and parameters follow SolidCraft itself, not SCPC-specific geometry rules.

02

Export

Generate the native {"commands":[...]} JSON, with the original order and parameter names preserved.

03

Execute

Run with the verified native CLI or send a batch to an already-open SolidCraft GUI document. The CAD engine performs the modelling.

A MINIMAL EXAMPLE

Native operations, readable Python

This is the same command vocabulary exposed by SolidCraft. There is no mandatory main() or show().

See the complete Plate script, command JSON and verification details →

script = Script()
script.add("sketch.create", plane="XY", name="Base")
script.add("sketch.rectangle.two_point", p0=[0, 0], p1=[100, 60])
script.add("sketch.finish")
script.add("solid.extrude", distance="10 mm", body_name="Plate")

Learn and test

Built from source commit 26ce20d30b2fa8ba23be0b21b15fd7236576a891.