{
  "schemaVersion": "1.0",
  "item": {
    "slug": "mechanics-sketches",
    "name": "Mechanics Sketches",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/MatthiasHBusch/mechanics-sketches",
    "canonicalUrl": "https://clawhub.ai/MatthiasHBusch/mechanics-sketches",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/mechanics-sketches",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=mechanics-sketches",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CHANGELOG.md",
      "references/api_reference.md",
      "scripts/generate_sketch.py",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/mechanics-sketches"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/mechanics-sketches",
    "agentPageUrl": "https://openagent3.xyz/skills/mechanics-sketches/agent",
    "manifestUrl": "https://openagent3.xyz/skills/mechanics-sketches/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/mechanics-sketches/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "MechanicsSketches Skill",
        "body": "You can generate engineering mechanics sketches programmatically using the MechanicsSketches Python library."
      },
      {
        "title": "Setup",
        "body": "Install the library via pip:\n\npip install git+https://github.com/MatthiasHBusch/MechanicsSketches.git\n\nOr install dependencies manually and add to PYTHONPATH:\n\npip install matplotlib PyQt5\nexport PYTHONPATH=\"/path/to/parent/of/MechanicsSketches:$PYTHONPATH\""
      },
      {
        "title": "Quick Start — Writing a Script",
        "body": "Create a Python script that builds a sketch and renders it:\n\nfrom MechanicsSketches import *\nimport os\n\nsketch = create_sketch(\"My Sketch\")\nS = 30.0  # Scale factor (recommended: 20-40)\n\n# Add components\nadd_beam(sketch, ax=0, ay=0, bx=10*S, by=0, scale_factor=S)\nadd_pinned_support(sketch, cx=0, cy=0, angle_deg=0, scale_factor=S)\nadd_roller_support(sketch, cx=10*S, cy=0, angle_deg=0, scale_factor=S)\nadd_force(sketch, cx=5*S, cy=0, angle_deg=0, scale_factor=S, annotation=r\"$F$\")\n\n# Render\nscript_dir = os.path.dirname(os.path.abspath(__file__))\nrender(sketch, filename=os.path.join(script_dir, \"output.pdf\"), dpi=300)\n\nThen run: python my_sketch.py"
      },
      {
        "title": "Quick Start — Using the Helper Script",
        "body": "Alternatively, use the bundled helper to render from JSON:\n\npython scripts/generate_sketch.py input.json output.pdf"
      },
      {
        "title": "Scale Factor (S)",
        "body": "All positions and sizes should be multiples of S (typically 30.0). This keeps proportions consistent across components."
      },
      {
        "title": "Angle Convention",
        "body": "angle_deg=0 → default orientation (upward for supports/forces, horizontal for dimensions)\nAngles rotate counterclockwise in degrees"
      },
      {
        "title": "Available Components",
        "body": "FunctionDescriptionKey Parametersadd_beam(sketch, ax, ay, bx, by, scale_factor)Rectangular beam A→BEndpoints, scaleadd_truss(sketch, ax, ay, bx, by, scale_factor)Line member A→BEndpoints, scaleadd_pinned_support(sketch, cx, cy, angle_deg, scale_factor)Fixed-position support (triangle)Center, angle, scaleadd_roller_support(sketch, cx, cy, angle_deg, scale_factor)Sliding supportCenter, angle, scaleadd_fixed_support(sketch, cx, cy, angle_deg, scale_factor)Clamped wall supportCenter, angle, scaleadd_hinge(sketch, cx, cy, scale_factor)Joint circleCenter, scaleadd_force(sketch, cx, cy, angle_deg, scale_factor, annotation, ...)Force arrowCenter, angle, scale, labeladd_moment(sketch, cx, cy, angle_deg, scale_factor, annotation, ...)Curved moment arrowCenter, angle, scale, labeladd_dimension_arrow(sketch, cx, cy, length, angle_deg, scale_factor, annotation, ...)Double-headed dimensionCenter, length, angle, scale, labeladd_dimension_thickness(sketch, cx, cy, thickness, angle_deg, scale_factor, annotation, ...)Inward dimension arrowsCenter, thickness, angle, scale, labeladd_coordinate_system(sketch, cx, cy, angle_deg, scale_factor, ax1, ax2, ax3, ...)x-y-z axesCenter, angle, scale, axis labelsadd_text(sketch, x, y, text, fontsize, name, rotation)Text annotationPosition, text, font size"
      },
      {
        "title": "Annotation Parameters",
        "body": "Force, moment, and dimension functions accept:\n\nannotation — LaTeX string (e.g., r\"$F$\", r\"$M_A$\")\nfontsize_scale — relative font size (default 1.0)\noffsetx, offsety — label position offset\nrotate_annotation — rotate label with component (default False)"
      },
      {
        "title": "Primitives",
        "body": "For custom shapes, use:\n\nmake_line(x0, y0, x1, y1, linewidth, layer, edgecolor)\nmake_circle(x, y, r, linewidth, layer, facecolor, edgecolor)\nmake_polygon(points, linewidth, layer, facecolor, edgecolor)\nmake_arc(x, y, width, height, theta1, theta2, angle, linewidth, layer)\nmake_text(x, y, text, fontsize, layer, color, ha, va, rotation)\nmake_rectangle(x0, y0, x1, y1, ...)\n\nAdd to sketch via add_to_sketch(sketch, primitive)."
      },
      {
        "title": "Transformations",
        "body": "translate(obj, dx, dy) — move by offset\nrotate(obj, cx, cy, angle_deg) — rotate around point\nscale(obj, cx, cy, factor) — scale from center\n\nAll return new objects (non-destructive). Can be chained."
      },
      {
        "title": "Rendering",
        "body": "render(sketch, filename=\"output.pdf\", dpi=300)  # Qt renderer (default, recommended)\nmpl_render(sketch, filename=\"output.pdf\")        # Matplotlib fallback (deprecated, text scaling issues)\n\nSupported formats: .pdf, .png, .jpg, .svg"
      },
      {
        "title": "Tips for the Agent",
        "body": "Always define S = 30.0 as the scale factor\nPlace beams first, then supports at endpoints, then loads\nUse LaTeX for annotations: r\"$F$\", r\"$M_0$\", r\"$\\ell$\"\nFor detailed API signatures, see references/api_reference.md\nThe render() function requires a filename — it does not display interactively\nDo not use mpl_render() — it is deprecated due to text scaling issues. Always use render()."
      },
      {
        "title": "External Endpoints",
        "body": "This skill makes no network requests. All processing is done locally."
      },
      {
        "title": "Security & Privacy",
        "body": "No data leaves your machine. The skill only reads local JSON files and writes local image/PDF output.\nNo API keys or credentials are required.\nNo telemetry or analytics.\nThe helper script (scripts/generate_sketch.py) only reads the input file specified by the user and writes to the specified output path."
      },
      {
        "title": "Trust Statement",
        "body": "This skill is developed and maintained by MatthiasHBusch. The source code is fully open under the MIT license. All functionality runs locally with no external dependencies beyond standard Python packages (matplotlib, PyQt5)."
      }
    ],
    "body": "MechanicsSketches Skill\n\nYou can generate engineering mechanics sketches programmatically using the MechanicsSketches Python library.\n\nSetup\n\nInstall the library via pip:\n\npip install git+https://github.com/MatthiasHBusch/MechanicsSketches.git\n\n\nOr install dependencies manually and add to PYTHONPATH:\n\npip install matplotlib PyQt5\nexport PYTHONPATH=\"/path/to/parent/of/MechanicsSketches:$PYTHONPATH\"\n\nQuick Start — Writing a Script\n\nCreate a Python script that builds a sketch and renders it:\n\nfrom MechanicsSketches import *\nimport os\n\nsketch = create_sketch(\"My Sketch\")\nS = 30.0  # Scale factor (recommended: 20-40)\n\n# Add components\nadd_beam(sketch, ax=0, ay=0, bx=10*S, by=0, scale_factor=S)\nadd_pinned_support(sketch, cx=0, cy=0, angle_deg=0, scale_factor=S)\nadd_roller_support(sketch, cx=10*S, cy=0, angle_deg=0, scale_factor=S)\nadd_force(sketch, cx=5*S, cy=0, angle_deg=0, scale_factor=S, annotation=r\"$F$\")\n\n# Render\nscript_dir = os.path.dirname(os.path.abspath(__file__))\nrender(sketch, filename=os.path.join(script_dir, \"output.pdf\"), dpi=300)\n\n\nThen run: python my_sketch.py\n\nQuick Start — Using the Helper Script\n\nAlternatively, use the bundled helper to render from JSON:\n\npython scripts/generate_sketch.py input.json output.pdf\n\nKey Concepts\nScale Factor (S)\n\nAll positions and sizes should be multiples of S (typically 30.0). This keeps proportions consistent across components.\n\nAngle Convention\nangle_deg=0 → default orientation (upward for supports/forces, horizontal for dimensions)\nAngles rotate counterclockwise in degrees\nAvailable Components\nFunction\tDescription\tKey Parameters\nadd_beam(sketch, ax, ay, bx, by, scale_factor)\tRectangular beam A→B\tEndpoints, scale\nadd_truss(sketch, ax, ay, bx, by, scale_factor)\tLine member A→B\tEndpoints, scale\nadd_pinned_support(sketch, cx, cy, angle_deg, scale_factor)\tFixed-position support (triangle)\tCenter, angle, scale\nadd_roller_support(sketch, cx, cy, angle_deg, scale_factor)\tSliding support\tCenter, angle, scale\nadd_fixed_support(sketch, cx, cy, angle_deg, scale_factor)\tClamped wall support\tCenter, angle, scale\nadd_hinge(sketch, cx, cy, scale_factor)\tJoint circle\tCenter, scale\nadd_force(sketch, cx, cy, angle_deg, scale_factor, annotation, ...)\tForce arrow\tCenter, angle, scale, label\nadd_moment(sketch, cx, cy, angle_deg, scale_factor, annotation, ...)\tCurved moment arrow\tCenter, angle, scale, label\nadd_dimension_arrow(sketch, cx, cy, length, angle_deg, scale_factor, annotation, ...)\tDouble-headed dimension\tCenter, length, angle, scale, label\nadd_dimension_thickness(sketch, cx, cy, thickness, angle_deg, scale_factor, annotation, ...)\tInward dimension arrows\tCenter, thickness, angle, scale, label\nadd_coordinate_system(sketch, cx, cy, angle_deg, scale_factor, ax1, ax2, ax3, ...)\tx-y-z axes\tCenter, angle, scale, axis labels\nadd_text(sketch, x, y, text, fontsize, name, rotation)\tText annotation\tPosition, text, font size\nAnnotation Parameters\n\nForce, moment, and dimension functions accept:\n\nannotation — LaTeX string (e.g., r\"$F$\", r\"$M_A$\")\nfontsize_scale — relative font size (default 1.0)\noffsetx, offsety — label position offset\nrotate_annotation — rotate label with component (default False)\nPrimitives\n\nFor custom shapes, use:\n\nmake_line(x0, y0, x1, y1, linewidth, layer, edgecolor)\nmake_circle(x, y, r, linewidth, layer, facecolor, edgecolor)\nmake_polygon(points, linewidth, layer, facecolor, edgecolor)\nmake_arc(x, y, width, height, theta1, theta2, angle, linewidth, layer)\nmake_text(x, y, text, fontsize, layer, color, ha, va, rotation)\nmake_rectangle(x0, y0, x1, y1, ...)\n\nAdd to sketch via add_to_sketch(sketch, primitive).\n\nTransformations\ntranslate(obj, dx, dy) — move by offset\nrotate(obj, cx, cy, angle_deg) — rotate around point\nscale(obj, cx, cy, factor) — scale from center\n\nAll return new objects (non-destructive). Can be chained.\n\nRendering\nrender(sketch, filename=\"output.pdf\", dpi=300)  # Qt renderer (default, recommended)\nmpl_render(sketch, filename=\"output.pdf\")        # Matplotlib fallback (deprecated, text scaling issues)\n\n\nSupported formats: .pdf, .png, .jpg, .svg\n\nTips for the Agent\nAlways define S = 30.0 as the scale factor\nPlace beams first, then supports at endpoints, then loads\nUse LaTeX for annotations: r\"$F$\", r\"$M_0$\", r\"$\\ell$\"\nFor detailed API signatures, see references/api_reference.md\nThe render() function requires a filename — it does not display interactively\nDo not use mpl_render() — it is deprecated due to text scaling issues. Always use render().\nExternal Endpoints\n\nThis skill makes no network requests. All processing is done locally.\n\nSecurity & Privacy\nNo data leaves your machine. The skill only reads local JSON files and writes local image/PDF output.\nNo API keys or credentials are required.\nNo telemetry or analytics.\nThe helper script (scripts/generate_sketch.py) only reads the input file specified by the user and writes to the specified output path.\nTrust Statement\n\nThis skill is developed and maintained by MatthiasHBusch. The source code is fully open under the MIT license. All functionality runs locally with no external dependencies beyond standard Python packages (matplotlib, PyQt5)."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/MatthiasHBusch/mechanics-sketches",
    "publisherUrl": "https://clawhub.ai/MatthiasHBusch/mechanics-sketches",
    "owner": "MatthiasHBusch",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/mechanics-sketches",
    "downloadUrl": "https://openagent3.xyz/downloads/mechanics-sketches",
    "agentUrl": "https://openagent3.xyz/skills/mechanics-sketches/agent",
    "manifestUrl": "https://openagent3.xyz/skills/mechanics-sketches/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/mechanics-sketches/agent.md"
  }
}