Token导航 LogoToken导航TokenDH.com
开发需要联网clawhub未标认证来源可访问clear审计提醒

mechanics-sketches力学草图

Agent Skill

mechanics-sketches 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

15,716

周安装

642

GitHub Stars

公开资料未说明

下载量

5,033
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mechanics-sketches(力学草图)
来源仓库:https://github.com/matthiashbusch/mechanics-sketches
安装命令:
openclaw skills install mechanics-sketches
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install mechanics-sketches

简介

自动生成工程力学技术草图,支持梁、力系与坐标系可视化。

  • 适用于教学演示、作业解答或工程设计初步表达场景。
  • 输出 PDF/PNG/SVG 格式文件,兼容主流绘图工具。
  • 使用前需定义载荷条件与约束类型,确保参数准确无误。
  • 注意:复杂结构建议分步绘制以提高精度与可读性。mechanics-sketches 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
mechanics-sketches
description
>
license
MIT
homepage
https://github.com/MatthiasHBusch/MechanicsSketches
metadata
{"author": "MatthiasHBusch", "version": "1.0.0"}
files
["scripts/*", "references/*"]

MechanicsSketches Skill

You can generate engineering mechanics sketches programmatically using the MechanicsSketches Python library.

Setup

Install the library via pip:

pip install git+https://github.com/MatthiasHBusch/MechanicsSketches.git

Or install dependencies manually and add to PYTHONPATH:

pip install matplotlib PyQt5
export PYTHONPATH="/path/to/parent/of/MechanicsSketches:$PYTHONPATH"

Quick Start — Writing a Script

Create a Python script that builds a sketch and renders it:

from MechanicsSketches import *
import os

sketch = create_sketch("My Sketch")
S = 30.0  # Scale factor (recommended: 20-40)

# Add components
add_beam(sketch, ax=0, ay=0, bx=10*S, by=0, scale_factor=S)
add_pinned_support(sketch, cx=0, cy=0, angle_deg=0, scale_factor=S)
add_roller_support(sketch, cx=10*S, cy=0, angle_deg=0, scale_factor=S)
add_force(sketch, cx=5*S, cy=0, angle_deg=0, scale_factor=S, annotation=r"$F$")

# Render
script_dir = os.path.dirname(os.path.abspath(__file__))
render(sketch, filename=os.path.join(script_dir, "output.pdf"), dpi=300)

Then run: python my_sketch.py

Quick Start — Using the Helper Script

Alternatively, use the bundled helper to render from JSON:

python scripts/generate_sketch.py input.json output.pdf

Key Concepts

Scale Factor (S)

All positions and sizes should be multiples of S (typically 30.0). This keeps proportions consistent across components.

Angle Convention

  • angle_deg=0 → default orientation (upward for supports/forces, horizontal for dimensions)
  • Angles rotate counterclockwise in degrees

Available Components

FunctionDescriptionKey Parameters
add_beam(sketch, ax, ay, bx, by, scale_factor)Rectangular beam A→BEndpoints, scale
add_truss(sketch, ax, ay, bx, by, scale_factor)Line member A→BEndpoints, scale
add_pinned_support(sketch, cx, cy, angle_deg, scale_factor)Fixed-position support (triangle)Center, angle, scale
add_roller_support(sketch, cx, cy, angle_deg, scale_factor)Sliding supportCenter, angle, scale
add_fixed_support(sketch, cx, cy, angle_deg, scale_factor)Clamped wall supportCenter, angle, scale
add_hinge(sketch, cx, cy, scale_factor)Joint circleCenter, scale
add_force(sketch, cx, cy, angle_deg, scale_factor, annotation, ...)Force arrowCenter, angle, scale, label
add_moment(sketch, cx, cy, angle_deg, scale_factor, annotation, ...)Curved moment arrowCenter, angle, scale, label
add_dimension_arrow(sketch, cx, cy, length, angle_deg, scale_factor, annotation, ...)Double-headed dimensionCenter, length, angle, scale, label
add_dimension_thickness(sketch, cx, cy, thickness, angle_deg, scale_factor, annotation, ...)Inward dimension arrowsCenter, thickness, angle, scale, label
add_coordinate_system(sketch, cx, cy, angle_deg, scale_factor, ax1, ax2, ax3, ...)x-y-z axesCenter, angle, scale, axis labels
add_text(sketch, x, y, text, fontsize, name, rotation)Text annotationPosition, text, font size

Annotation Parameters

Force, moment, and dimension functions accept:

  • annotation — LaTeX string (e.g., r"$F$", r"$M_A$")
  • fontsize_scale — relative font size (default 1.0)
  • offsetx, offsety — label position offset
  • rotate_annotation — rotate label with component (default False)

Primitives

For custom shapes, use:

  • make_line(x0, y0, x1, y1, linewidth, layer, edgecolor)
  • make_circle(x, y, r, linewidth, layer, facecolor, edgecolor)
  • make_polygon(points, linewidth, layer, facecolor, edgecolor)
  • make_arc(x, y, width, height, theta1, theta2, angle, linewidth, layer)
  • make_text(x, y, text, fontsize, layer, color, ha, va, rotation)
  • make_rectangle(x0, y0, x1, y1, ...)

Add to sketch via add_to_sketch(sketch, primitive).

Transformations

  • translate(obj, dx, dy) — move by offset
  • rotate(obj, cx, cy, angle_deg) — rotate around point
  • scale(obj, cx, cy, factor) — scale from center

All return new objects (non-destructive). Can be chained.

Rendering

render(sketch, filename="output.pdf", dpi=300)  # Qt renderer (default, recommended)
mpl_render(sketch, filename="output.pdf")        # Matplotlib fallback (deprecated, text scaling issues)

Supported formats: .pdf, .png, .jpg, .svg

Tips for the Agent

  1. Always define S = 30.0 as the scale factor
  2. Place beams first, then supports at endpoints, then loads
  3. Use LaTeX for annotations: r"$F$", r"$M_0$", r"$\ell$"
  4. For detailed API signatures, see references/api_reference.md
  5. The render() function requires a filename — it does not display interactively
  6. Do not use mpl_render() — it is deprecated due to text scaling issues. Always use render().

External Endpoints

This skill makes no network requests. All processing is done locally.

Security & Privacy

  • No data leaves your machine. The skill only reads local JSON files and writes local image/PDF output.
  • No API keys or credentials are required.
  • No telemetry or analytics.
  • The helper script (scripts/generate_sketch.py) only reads the input file specified by the user and writes to the specified output path.

Trust Statement

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).

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

96.16%
按下载量换算4,840

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills