Rename SolveCraft to SolidCraft everywhere, with compatibility shims (#389)
* WIP deep rename (not for push) * WIP2 * WIP3 * WIP4 wxs fix * rustfmt * Rename the remaining identifiers in merged crash-report code Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
27415e4dd7
commit
296683229d
464 files changed
+3408
-2956
No files matched your search
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Build an electronics enclosure in a running SolveCraft over MCP, one command at a time.
|
||||
"""Build an electronics enclosure in a running SolidCraft over MCP, one command at a time.
|
||||
|
||||
solvecraft --control 7878 &
|
||||
solidcraft --control 7878 &
|
||||
python3 examples/demo/enclosure_mcp.py --port 7878
|
||||
|
||||
The script is a minimal MCP client: it starts `solvecraft-cli mcp --connect 127.0.0.1:PORT`
|
||||
The script is a minimal MCP client: it starts `solidcraft-cli mcp --connect 127.0.0.1:PORT`
|
||||
(stdio, JSON-RPC 2.0, one message per line), initializes, then sends one `execute` tool call
|
||||
per step of enclosure_steps.json, waiting `pause` seconds after each so the timeline can be
|
||||
watched growing. Camera moves (fit, home view, the closing orbit) go over the app's control
|
||||
@@ -24,7 +24,7 @@ HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class Mcp:
|
||||
"""A stdio MCP client for `solvecraft-cli mcp`."""
|
||||
"""A stdio MCP client for `solidcraft-cli mcp`."""
|
||||
|
||||
def __init__(self, argv):
|
||||
self.p = subprocess.Popen(argv, stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True, bufsize=1)
|
||||
@@ -79,7 +79,7 @@ def control(port, method, params=None):
|
||||
def main():
|
||||
ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||
ap.add_argument("--port", type=int, default=7878, help="the app's --control port")
|
||||
ap.add_argument("--cli", default="solvecraft-cli", help="path to solvecraft-cli")
|
||||
ap.add_argument("--cli", default="solidcraft-cli", help="path to solidcraft-cli")
|
||||
ap.add_argument("--steps", default=os.path.join(HERE, "enclosure_steps.json"))
|
||||
ap.add_argument("--pause", type=float, default=2.5, help="seconds after each step (unless the step says)")
|
||||
ap.add_argument("--log", help="write a JSON line per step: {t, caption, command}")
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Demo v2/v3: build an electronics enclosure in a running SolveCraft the way a person would,
|
||||
"""Demo v2/v3: build an electronics enclosure in a running SolidCraft the way a person would,
|
||||
with the parametric steps sent over MCP.
|
||||
|
||||
--story v3 (default): one standoff placed from the parameters and patterned 2 x 2 in the
|
||||
Rectangular Pattern dialog, then width and wall changed in the Parameters dialog.
|
||||
--story v2: four standoffs from one sketch, then the width changed over MCP.
|
||||
|
||||
solvecraft --control 7878 &
|
||||
python3 examples/demo/enclosure_ui_mcp.py --port 7878 --cli solvecraft-cli [--story v2|v3]
|
||||
solidcraft --control 7878 &
|
||||
python3 examples/demo/enclosure_ui_mcp.py --port 7878 --cli solidcraft-cli [--story v2|v3]
|
||||
|
||||
Modelling steps go through the app's UI over its control channel: the pointer glides to a
|
||||
toolbar button and clicks it (the real dialog opens), glides to the face or point it picks and
|
||||
@@ -15,7 +15,7 @@ clicks, and values are typed into the dialog, as by hand. The port and boss sket
|
||||
directly to the enclosure's side face and inner floor, as in the original demo.
|
||||
The camera follows like a user's would (Look At on a new sketch, back out to a 3/4 view on
|
||||
Finish Sketch, a little orbit between features). The parameters and the dimensions that use them
|
||||
are MCP `execute` calls through `solvecraft-cli mcp --connect` (enclosure_mcp.py's client).
|
||||
are MCP `execute` calls through `solidcraft-cli mcp --connect` (enclosure_mcp.py's client).
|
||||
|
||||
--log writes one JSON line per caption and per pointer event, which record.sh turns into burnt-in
|
||||
captions and a drawn cursor (the app gets synthetic pointer events, so the screen's own pointer
|
||||
@@ -398,7 +398,7 @@ def run_v3(d):
|
||||
def main():
|
||||
ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||
ap.add_argument("--port", type=int, default=7878, help="the app's --control port")
|
||||
ap.add_argument("--cli", default="solvecraft-cli", help="path to solvecraft-cli")
|
||||
ap.add_argument("--cli", default="solidcraft-cli", help="path to solidcraft-cli")
|
||||
ap.add_argument("--log", help="write a JSON line per caption and pointer event")
|
||||
ap.add_argument("--story", choices=["v2", "v3"], default="v3", help="v2: standoffs from one sketch, width over MCP; v3: one standoff patterned, Parameters dialog")
|
||||
ap.add_argument("--until", type=int, default=10**6, help="stop before step N (trying the script out)")
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
set -e
|
||||
DISP=${1:-:0}; PORT=${2:-7878}; OUT=${3:-.}
|
||||
HERE=$(cd "$(dirname "$0")" && pwd)
|
||||
CLI=${SOLVECRAFT_CLI:-solvecraft-cli}
|
||||
CLI=${SOLIDCRAFT_CLI:-solidcraft-cli}
|
||||
mkdir -p "$OUT"
|
||||
# x11grab stamps frames with the wall clock: its "start:" is when the first frame was taken.
|
||||
ffmpeg -loglevel info -nostats -y -f x11grab -draw_mouse 0 -video_size 1920x1080 -framerate 30 -i "$DISP" \
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
# gets synthetic pointer events, so the screen's own pointer never moves). Needs ffmpeg with
|
||||
# x11grab and libass.
|
||||
# PLAYBACK_RATE defaults to 1; label accelerated previews with their rate when publishing.
|
||||
# SOLVECRAFT_DEMO_NAME overrides the filename stem; PAUSE scales UI pauses, CAPTION is the
|
||||
# SOLIDCRAFT_DEMO_NAME overrides the filename stem; PAUSE scales UI pauses, CAPTION is the
|
||||
# minimum real-time caption duration, and HOLD keeps the live completed model on screen.
|
||||
# For a readable 4x preview use SOLVECRAFT_DEMO_CAPTION=4 and SOLVECRAFT_DEMO_HOLD=8.
|
||||
# For a readable 4x preview use SOLIDCRAFT_DEMO_CAPTION=4 and SOLIDCRAFT_DEMO_HOLD=8.
|
||||
set -e
|
||||
DISP=${1:-:0}; PORT=${2:-7878}; OUT=$(cd "${3:-.}" && pwd); STORY=${4:-v3}; RATE=${5:-1}
|
||||
HERE=$(cd "$(dirname "$0")" && pwd)
|
||||
CLI=${SOLVECRAFT_CLI:-solvecraft-cli}
|
||||
NAME=${SOLVECRAFT_DEMO_NAME:-enclosure-demo-$STORY}
|
||||
PAUSE=${SOLVECRAFT_DEMO_PAUSE:-0.55}
|
||||
CAPTION=${SOLVECRAFT_DEMO_CAPTION:-1.4}
|
||||
HOLD=${SOLVECRAFT_DEMO_HOLD:-1}
|
||||
CLI=${SOLIDCRAFT_CLI:-solidcraft-cli}
|
||||
NAME=${SOLIDCRAFT_DEMO_NAME:-enclosure-demo-$STORY}
|
||||
PAUSE=${SOLIDCRAFT_DEMO_PAUSE:-0.55}
|
||||
CAPTION=${SOLIDCRAFT_DEMO_CAPTION:-1.4}
|
||||
HOLD=${SOLIDCRAFT_DEMO_HOLD:-1}
|
||||
python3 -c 'import math,sys; r=float(sys.argv[1]); assert math.isfinite(r) and 0<r<=16' "$RATE"
|
||||
# Frame the actual app at capture resolution before the first recorded blank viewport.
|
||||
python3 - "$HERE" "$PORT" <<'PY'
|
||||
@@ -38,7 +38,7 @@ FF=$!
|
||||
# Waiting lets ffmpeg write the MP4 index so the failed take remains inspectable.
|
||||
trap 'kill -INT $FF 2>/dev/null || true; wait $FF 2>/dev/null || true' EXIT
|
||||
sleep 1
|
||||
python3 "$HERE/enclosure_ui_mcp.py" --port "$PORT" --cli "$CLI" --story "$STORY" --speed "$PAUSE" --minimum-caption "$CAPTION" --log "$OUT/steps.log" --save "$OUT/enclosure-$STORY.solvecraft"
|
||||
python3 "$HERE/enclosure_ui_mcp.py" --port "$PORT" --cli "$CLI" --story "$STORY" --speed "$PAUSE" --minimum-caption "$CAPTION" --log "$OUT/steps.log" --save "$OUT/enclosure-$STORY.solidcraft"
|
||||
sleep "$HOLD"
|
||||
kill -INT $FF; wait $FF || true
|
||||
START=$(grep -o "start: [0-9.]*" "$OUT/ffmpeg.log" | head -1 | cut -d" " -f2)
|
||||
|
||||
Reference in new issue
Block a user