Describe
Use Script.add(native_command, **params). IDs and parameters
follow SolidCraft itself, not SCPC-specific geometry rules.
SOLIDCRAFT · PYTHON · NATIVE COMMANDS
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.
Use Script.add(native_command, **params). IDs and parameters
follow SolidCraft itself, not SCPC-specific geometry rules.
Generate the native {"commands":[...]} JSON, with the original
order and parameter names preserved.
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
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")
Built from source commit 26ce20d30b2fa8ba23be0b21b15fd7236576a891.