← API Guide / Native commands and features
Native commands and features
Sketches, extrusion, fillet and holes through the real SolidCraft vocabulary.
Use SolidCraft's command IDs
SCPC does not freeze a list of command IDs or parameters. Obtain the authoritative registry and schemas from the installed SolidCraft version (see Command discovery). The examples below are verified with SolidCraft 0.30.1; other versions may differ.
Create and finish a sketch
Every command is explicit. First create the XY sketch, draw its rectangle and finish the sketch before extruding.
script.add("sketch.create", plane="XY", name="Plate footprint")
script.add("sketch.rectangle.two_point",
p0=[-50, -30], p1=[50, 30])
script.add("sketch.finish")
script.add("solid.extrude", distance="10 mm", body_name="Plate")
Native model parameters
Names and expressions remain editable in the SolidCraft document. These are native commands, not properties interpreted by SCPC.
for name, value in (("length", 100), ("width", 60), ("thickness", 10)):
script.add("parameters.add", name=name,
expression=str(value), unit="mm")
Fillet and hole features
In the tested Plate example, fillet selection uses native edge pick coordinates. Hole positions likewise use the native command parameters. SCPC does not translate a higher-level edge or face selection model.
script.add("solid.fillet", body="Plate", radius=2,
edges=[[-50, -30, 5], [50, -30, 5],
[50, 30, 5], [-50, 30, 5]])
for x, y in ((-35, -15), (35, -15), (35, 15), (-35, 15)):
script.add("solid.hole", position=[x, y, 10],
diameter=8, targets=["Plate"])
See the full Plate source and the native JSON sequence side by side. It is tested by actually evaluating the generated SolidCraft model, not just its command count.
Native validation, not guesswork
The CLI is invoked with --param-check strict.
That is a native check, but it does not guarantee every unexpected
parameter is rejected or every geometrical outcome matches your intent.
Verify the actual saved BRep, feature history and dimensions.