科研 Skill
产品爆炸图与技术图纸
technical-drawing
Produces vector technical drawings from a Blender model: an exploded blueprint with BOM, plus dimensioned orthographic views, exported as SVG/PDF/PNG. Use for a quote-ready drawing.
SKILL.md
Technical drawing
This skill turns a validated 3D assembly into drawings that a supplier can quote from. The output is vector linework: hidden lines are removed, every part has a numbered balloon, and the parts list has real dimensions. Talk to the user in their language. The drawings themselves use the language set in the config labels.
Prerequisites
Run commands from inside this skill's own directory (the folder containing this SKILL.md), since script and reference paths below (such as scripts/foo.py) are written relative to it, not to the project root.
Inputs
- The assembly
.blendinhw/mech/, fromenclosure-engineer, after the geometry validator passed (hw/validation/). Do not draw an assembly that failed validation. Parts that intersect produce wrong linework and a wrong drawing. hw/bom.csvfor item names, part numbers, materials and quantities.hw/brief.mdfor the product name.hw/state.jsonfor the revision (EVT-0, DVT-1 …).
Outputs
hw/drawings/drawing.json: the config. Keep it in the project so the drawing can be regenerated after every design change.hw/drawings/<name>_blueprint.svg|pdf|png: the exploded view, blue theme.hw/drawings/<name>_print.svg|pdf|png: the exploded view, white theme for print and PDFs.hw/drawings/<name>_ortho_<theme>.svg|pdf|png: the orthographic views with overall dimensions. Themes come fromortho_themes, or fromthemeswhen it is not set.- One slide per drawing.
product-presentationturns every file stem inhw/drawings/into a slide. Keep one theme there, usually print. Put the other theme inhw/drawings/<theme>/, for examplehw/drawings/blue/. hw/drawings/<name>_items.json: the anchor, envelope and visibility of each item. Other skills reuse it, for exampleproduct-presentation.
Gate
The drawing is done when all of these hold:
- The script ends with
BLUEPRINT okand lists neitherITEMS WITHOUT GEOMETRYnorhidden in this view. - You have looked at the PNG and every check in "Review" passes.
- The BOM items match
hw/bom.csv: same items, same quantities.
Tools
Everything runs headless in Blender, with no UI. Tested with Blender 5.2, using only bpy, mathutils and numpy. If rsvg-convert is installed (librsvg, via toolchain-setup), the scripts also write PDF and PNG. Without it they write SVG only.
# exploded isometric + BOM (both themes)
blender -b hw/mech/assembly.blend --python-exit-code 1 --python scripts/blueprint.py -- hw/drawings/drawing.json hw/drawings/product
# orthographic views with overall dimensions
blender -b hw/mech/assembly.blend --python-exit-code 1 --python scripts/ortho_views.py -- hw/drawings/drawing.json hw/drawings/product
# self-test on a fictional assembly (builds it, draws it)
BLENDER=/path/to/blender scripts/selftest.sh /tmp/td-selftest
scripts/drawing_core.py: the shared engine, covering mesh extraction, feature edges, ray visibility, sheets, title block and export.scripts/line_clean.py: the line-merge pass used byortho_views.py. It removes the short ticks and dots that two nearly coincident outlines leave at a seam. Configure it withline_clean:{"enabled", "tol_mm", "maxlen_mm"}, in paper mm. It is pure Python and tested byscripts/test_line_clean.py, which needs no Blender.ortho_include: the group names to draw in the orthographic views, for example only the exterior parts. All groups are drawn when it is not set.scripts/make_test_scene.py: builds the fictional sensor puck used by the self-test and bytemplates/blueprint.example.json.
On a large assembly with 1M+ triangles and thousands of parts, ray casting can take minutes. Run it on the machine that holds the assembly. A cloud box is worth it only when it already runs the renders.
Procedure
- Copy the template
templates/blueprint.example.jsontohw/drawings/drawing.jsonand edit it. Every rule lists in order and the first match wins:frame_object: the object whose local axes are the product axes, usually the top empty of the device. The drawing ignores how the device is posed for renders.root: draw only meshes under this object.skip_prefixes: solder, markings, labels, lights, cords and boolean cutters. They clutter the linework and are not parts.groups: what moves together in the explode, withoffset_mmalongexplode_axis. Use"fine": truefor PCB assemblies so that the parts are drawn with thin lines.items: BOM rows, asid,name,spec,qtyandmatch. Put specific rules first, such as a connector found through its ancestorJ1, and general rules after, such as "everything in the board collection".- A match rule takes
names(base names, without.001),prefixes,collections,ancestors, orall: true. envelopeper item:auto, the default: the whole item when qty is 1, else one unit "(each)";item;largest;all: list each distinct unit, for example the two halves of a connector pair;false.
view: azimuth 35° and elevation 24° is a good three-quarter view. Raise the elevation when the parts are flat.sheet: A4, A3, A2, LETTER or TABLOID.standard_scale: truesnaps to ISO 5455 scales.projection:third(US) orfirst(Europe and most of Asia). Ask the user which market the supplier is in if it is unknown.title: product, subtitle, revision,date: "auto", units, sheet.decimal: ","for markets that use a decimal comma.labels: translations of all fixed texts, such as "BILL OF MATERIALS" and "Item". Translate them all when the drawing goes to a non-English supplier.
- Choose explode offsets so that each group clears the next in the projected view, not only in 3D.
- Gap per flat part: about its plan diagonal × sin(view elevation), plus its height. For example, a 32 mm square part at 24° needs about 18 mm, not its thickness.
- A thin flex or film hidden behind a cover needs more spacing, or it disappears.
- Put every part on one axis, in assembly order, and include the small visible parts: button caps, membranes, screws and gaskets.
- Run
blueprint.pyand read its last line.ITEMS WITHOUT GEOMETRY [n]: a rule matched nothing. Fix the rule.hidden in this view [n]: no point of item n is visible, so its leader is dashed. Increase that group's offset, move the part to its own group, or change the view.
- Look at the PNG. Use the Read tool on the
_print.png, then do the review below. Fix the config and run again until it is clean. - Run
ortho_views.pyfor the overall-dimension sheet. Keephidden_lines: falsefor assemblies. Dashed internals clutter the sheet. Turn them on for single parts. - Check the numbers: the overall size in the title block against
hw/brief.mdandhw/requirements.md, and each envelope against the datasheet's maximum dimensions inhw/parts/. A mismatch is a design error. Report it. Do not edit it in the drawing. - Write the outputs to
hw/drawings/and record the drawing revision inhw/state.json.
Review (look at every sheet before you show it)
- Every part is visible and has exactly one balloon. The dots sit on the part they name.
- Leaders do not cross and do not pass over another dot. Balloons do not overlap.
- No text leaves its cell. Long specifications wrap inside the table, and the table ends above the title block.
- Nothing touches the frame. The drawing is centred in its area.
- Outlines are clean single lines. A hatched or doubled edge means a mesh with split vertices. The engine merges vertices by position, so if it persists, check for duplicated, overlapping geometry in the model.
- Envelopes are per unit, and the overall size matches the product.
- The scale shown is a standard scale, and the sheet size is right for it. Small products often read better on A4 or Letter at the same scale.
Taste and pitfalls
These are mistakes made and fixed while drawing a real wearable:
- Hatched board edges. Imported PCB meshes have split vertices at every face, so every edge looked like a boundary and the board edge became a comb of short strokes. Merge vertices by position before you classify edges. The engine does this.
- Hidden parts. A thin flex under the cover disappeared in the exploded view. The fix was more spacing between groups, not a different line style.
- Crossing leaders. Placing balloons in anchor order is not enough when two anchors are at nearly the same height. The engine places them in order with a minimum gap, then swaps slots while any two leaders cross or a leader runs over another dot.
- Summed envelopes. The BOM showed one item the size of all its instances added together. Envelopes are for one physical unit, and an assembly bought as one item, such as a PCBA, shows its whole envelope.
- Axis views lose outlines. In exact front, top and side views, many faces are seen edge-on. Treat edge-on faces as not front-facing when you detect silhouettes, or box outlines vanish.
- Draw from the frozen, validated assembly. Never draw a scene posed for a render (rotated, on a cord, with fibers). Set
frame_objectso that the product axes are used. - Title block overflow. Bold values are about 0.64 em per character, not 0.56. With the lower estimate, "32.0 × 32.0 × 10.0 mm" ran into the next cell. The engine now shrinks values with the higher factor. Use
title.overall_sizefor a shorter text. - Seam ticks in orthographic views. A shell rim and a lid rim with 1° draft are both partly visible and leave short ticks along the seam.
line_cleanremoves them. Check the seam at full resolution. - Do not decorate. One accent color for balloons and leaders, ink for the linework, and a grid only on the blueprint theme. The drawing is a document, not a render.
- Name parts the supplier understands. Use a material and process ("PC, optical grade, injection molded, SPI A2"), a full orderable part number, and a quantity per product. Never use an internal nickname.
References
references/drawing-standards.md: what an RFQ drawing must contain, line types (ISO 128), title block (ISO 7200), scales (ISO 5455), projection methods, general tolerances (ISO 2768), and balloon and parts-list conventions. Read it before the first drawing of a project, and when the user asks for a drawing "by the standard".templates/blueprint.example.json: the full config, with comments, for the fictional test assembly.
示例提示词
帮我根据这个Blender模型生成带编号的爆炸图和三视图。
所属插件
安装该插件会一并获得同领域的 63 个 Skill / MCP。
同插件的其他科研 Skill
- ANDES电力系统动态仿真Runs ANDES power-system dynamic studies via PowerMCP: power flow, eigenvalue analysis, and time-domain simulation. Use for damping, stability, or oscillation-mode questions.
- 电池选型与电源预算Builds an evidence-tagged power budget and sizes a manufacturable battery with pouch outline, seals, and derating. Use when sizing runtime, mAh, charging, or supply rails.
- FPGA比特流生成与烧录Generates a Xilinx FPGA bitstream and programs it over JTAG, or burns an MCS image into flash for power-on boot. Use when flashing a board or diagnosing boot failures.
- 硬件项目发布包组装Assembles a hardware release package (fab files, BOM/CPL, carts, assembly guide, hashed manifest) and runs a ready-to-build gate. Use before ordering prototypes.
- 时钟域交叉风险审查Audits clock-domain-crossing risk on an FPGA design and applies the smallest safe synchronizer or constraint fix. Use to resolve CDC violations before sign-off.
- 硬件产品认证合规规划Plans certifications a hardware product needs per target market (FCC, CE/RED, UKCA, battery/radio rules), with cost and lead-time estimates. Use before PCB or enclosure tooling.
- Vivado XDC时序约束编写Authors a Vivado XDC timing constraint set from scratch: clocks, I/O delays, and timing exceptions. Use first, before timing closure, on a design with no or incomplete constraints.
- N-1/N-2应急违规处置Playbook for N-1/N-2 contingency violations: ranks contingencies and proposes preventive and corrective actions. Use after a study shows voltage or thermal problems.
- 潮流计算不收敛诊断Playbook for power-flow convergence failures in PSS/E, PSLF, PowerWorld, pandapower, PyPSA, surge, or OpenDSS. Use when a case diverges or fails to solve.
- 硬件成本核算与采购Prices a hardware product at multiple volumes with one-time vs per-unit cost, landed cost per country, and sourcing leads. Use to estimate unit cost before a pitch.
- RTL仿真覆盖率收敛Measures RTL simulation code coverage and iteratively closes it toward a target by adding testbench stimulus. Use for a sign-off-grade coverage report.
- 配电网DER接纳能力治理Playbook for distribution DER hosting-capacity limits: voltage rise, reverse flow, and thermal limits from PV and storage. Use to estimate how much DER a feeder can host.
- 电子电路设计与审查Designs, audits, or corrects an electronic circuit from a brief, schematic, or netlist, checking power domains, reset sequencing, and ratings. Use for circuit review.
- 硬件可制造性红队审查Red-team audit that fix-loops a hardware project to ready-to-build, re-deriving parts, rails, battery physics, and cost. Use for a reality check before committing to a design.
- 电力系统动态稳定处置Playbook for dynamic stability problems: poor damping, angle instability, or sustained oscillations from eigenvalue or time-domain studies. Use after an unstable study result.
- Egret电力市场调度优化Runs Egret market/operations optimization (DC-OPF, AC-OPF, unit commitment) via PowerMCP. Use for cheapest dispatch, unit commitment, or congestion checks.
- 电子元器件选型核查Researches electronic components against primary sources: part numbers, datasheet limits, lifecycle, stock, and price breaks, one dossier per part. Use to verify or source a BOM.
- EMC电磁兼容预测试Plans grounding, shielding, and filtering for EMC/EMI, and runs an emissions pre-scan with a root-cause fix sequence. Use before a lab test or after a failed EMI scan.
- 产品外壳参数化建模Designs a hardware enclosure as parametric CAD with STEP/STL/GLB output, a DFM check, and Blender assembly validation. Use when designing a case or checking fit.
- 电网频率响应问题处置Playbook for frequency problems: low inertia, high RoCoF, weak primary response, or UFLS risk after loss of the largest unit. Use when a study flags frequency issues.
- FPGA RTL到比特流全流程Drives a Xilinx FPGA design end to end through RTL, simulation, synthesis, implementation, and bitstream, gated at every stage. Use to run the complete build flow in one pass.
- 硬件产品全流程总协调Leads a physical electronic product from idea to a doable design, coordinating specs, parts, battery, PCB, enclosure, render, and cost sub-skills. Use starting a hardware product.
- 硬件原理图与BOM审查Reviews hardware projects: checks schematics against datasheets, pin connections, and firmware-to-hardware alignment across KiCad/Altium files. Use for a design alignment check.
- FPGA ILA在线逻辑调试Inserts an Integrated Logic Analyzer, programs the board, arms a trigger, and reads captured waveforms on real FPGA hardware. Use when sim passes but the board fails.
常见问题
产品爆炸图与技术图纸能做什么?
Produces vector technical drawings from a Blender model: an exploded blueprint with BOM, plus dimensioned orthographic views, exported as SVG/PDF/PNG. Use for a quote-ready drawing。
如何安装产品爆炸图与技术图纸?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「产品爆炸图与技术图纸」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
产品爆炸图与技术图纸需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
产品爆炸图与技术图纸经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。