step-parts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCAD Parts
CAD零件
Overview
概述
Use the hosted step.parts machine endpoints instead of scraping HTML or relying on local repository files. Treat as the canonical API origin and as the site/static-asset origin unless the user provides a different hosted mirror. If the domain does not resolve or the API is unavailable, report that the hosted service is not reachable yet instead of falling back to repo-specific assumptions.
https://api.step.partshttps://www.step.parts使用托管的step.parts机器端点,而非抓取HTML或依赖本地仓库文件。除非用户提供其他托管镜像,否则将视为标准API源,将视为站点/静态资源源。如果域名无法解析或API不可用,请报告托管服务暂无法访问,而非依赖仓库特定假设。
https://api.step.partshttps://www.step.partsQuick Workflow
快速工作流
- Interpret the requested part into search terms and optional facets:
- for fuzzy tokens, standards, aliases, dimensions, source/product URLs, and attribute names/values.
q - ,
category,family, orstandardwhen the user gives an exact facet.tag
- Search and inspect
/v1/parts,items, andtotal.facets - If results are ambiguous, present the best few options with ,
id,name, and key attributes before choosing. If one result clearly matches, return the selected record details without downloading unless the user asked for a local STEP file.standard - When the user asks to download or save a STEP file, download its , then verify the file with the record's
stepUrlwhen present.sha256 - When a STEP file is downloaded as a local CAD asset, hand its explicit path to when available;
$renderchecks/reuses a live viewer and returns a link.$render - If the download path is outside the active CAD workspace/root, such as the default , either choose a workspace output directory or tell
/tmp/step-partsto use the download directory as its workspace/root so the file is inside the viewer scan root.$render - For visual feedback, prefer snapshots over opening the viewer manually or using Playwright. Use still snapshots only; standard-part lookup should not generate GIFs.
$render - Return the local path when downloaded, the render link when available, plus the selected part id and page/API URLs so the user can trace provenance.
- 将请求的零件转换为搜索词和可选筛选条件:
- 用于模糊标记、标准、别名、尺寸、源/产品URL以及属性名/值。
q - 当用户给出明确筛选条件时,使用、
category、family或standard。tag
- 搜索并检查
/v1/parts、items和total。facets - 如果结果存在歧义,先展示几个最佳选项的、
id、name和关键属性再做选择。如果有一个结果明显匹配,直接返回所选记录详情,除非用户要求下载本地STEP文件,否则无需下载。standard - 当用户要求下载或保存STEP文件时,下载其,若存在记录的
stepUrl则验证文件。sha256 - 当STEP文件作为本地CAD资产下载后,若可用,将其明确路径交给
$render;$render会检查/复用实时查看器并返回链接。$render - 如果下载路径在当前CAD工作区/根目录之外(如默认的),要么选择工作区输出目录,要么告知
/tmp/step-parts将下载目录作为其工作区/根目录,确保文件在查看器扫描根目录内。$render - 如需视觉反馈,优先使用快照,而非手动打开查看器或使用Playwright。仅使用静态快照;标准零件查找不应生成GIF。
$render - 返回下载后的本地路径(若已下载)、可用的渲染链接,以及所选零件的id和页面/API URL,方便用户追溯来源。
Bundled Downloader
捆绑下载器
Use for deterministic search, download, and checksum verification:
scripts/download_step_part.pybash
python skills/step-parts/scripts/download_step_part.py "M3 socket head 12" --download --out-dir /tmp/step-parts
python skills/step-parts/scripts/download_step_part.py --id iso4762_socket_head_cap_screw_m3x12 --download --out-dir /tmp/step-parts
python skills/step-parts/scripts/download_step_part.py "bearing 608zz" --limit 5Useful options:
- : override
--originonly when the user provides another hosted API origin.https://api.step.parts - ,
--tag,--category,--family: repeatable facet filters.--standard - : directory for downloaded STEP files. Defaults to
--out-dir./tmp/step-parts - : with
--all, download every result on the returned page as individual STEP downloads.--download - : replace an existing output file.
--overwrite
The script prints JSON to stdout. For searches, it prints matched records. For downloads, it prints saved file paths, checksums, and source URLs.
使用进行确定性搜索、下载和校验和验证:
scripts/download_step_part.pybash
python skills/step-parts/scripts/download_step_part.py "M3 socket head 12" --download --out-dir /tmp/step-parts
python skills/step-parts/scripts/download_step_part.py --id iso4762_socket_head_cap_screw_m3x12 --download --out-dir /tmp/step-parts
python skills/step-parts/scripts/download_step_part.py "bearing 608zz" --limit 5实用选项:
- :仅当用户提供其他托管API源时,覆盖
--origin。https://api.step.parts - 、
--tag、--category、--family:可重复使用的筛选条件。--standard - :下载STEP文件的目录。默认值为
--out-dir。/tmp/step-parts - :配合
--all使用时,下载返回页面中的所有结果作为独立STEP文件。--download - :替换现有输出文件。
--overwrite
该脚本会向标准输出打印JSON。对于搜索操作,打印匹配记录;对于下载操作,打印保存的文件路径、校验和以及源URL。
API Reference
API参考
Read when you need endpoint details, field meanings, or query semantics. Prefer:
references/step-parts-api.md- for filtered search with absolute asset URLs.
/v1/parts - for one enriched record.
/v1/parts/{id} - Returned for STEP downloads.
stepUrl - for a compact discovery index.
/v1/catalog/parts.index.json - for field and family attribute meanings.
/v1/catalog/schema - when generating a client or tool.
/v1/openapi.json
当需要端点详情、字段含义或查询语义时,请阅读。优先使用:
references/step-parts-api.md- :用于带绝对资产URL的筛选搜索。
/v1/parts - :用于获取单个增强记录。
/v1/parts/{id} - 返回的:用于STEP文件下载。
stepUrl - :用于紧凑的发现索引。
/v1/catalog/parts.index.json - :用于字段和系列属性含义。
/v1/catalog/schema - :用于生成客户端或工具时。
/v1/openapi.json
Search Guidance
搜索指南
- Query tokens are ANDed by the API, so start specific but not overconstrained. For example, use before adding exact family and standard filters.
M3 SHCS 12 - Values within one facet are ORed together, and selected ,
tag,category, andfamilyfields are ANDed together. Use exact facets to narrow within known categories, then rank manually by name and attributes.standard - Standards can be queried as ,
ISO 4762, or the exactISO4762.standard.designation - The object contains family-specific facts such as
attributes,thread,lengthMm,bore1Mm,material,profileSeries, and dimensions in millimeters.slotSizeMm - Part, GLB, and PNG URL patterns are predictable on ; STEP URLs are environment-aware and may resolve to GitHub LFS media in production. Use catalog/API
https://www.step.partsfor downloads.stepUrl
- API会对查询标记进行逻辑与运算,因此开始时应具体但不过度限制。例如,先使用,再添加精确的系列和标准筛选条件。
M3 SHCS 12 - 同一筛选条件内的值为逻辑或运算,所选的、
tag、category和family字段为逻辑与运算。使用精确筛选条件缩小已知分类范围,然后根据名称和属性手动排序。standard - 标准可通过、
ISO 4762或精确的ISO4762进行查询。standard.designation - 对象包含系列特定信息,例如
attributes、thread、lengthMm、bore1Mm、material、profileSeries以及毫米单位的尺寸。slotSizeMm - 零件、GLB和PNG的URL模式在上是可预测的;STEP URL会根据环境调整,在生产环境中可能指向GitHub LFS媒体。下载时请使用目录/API提供的
https://www.step.parts。stepUrl