模型信息
+ +白模渲染
+渲染记录
+还没有渲染记录
+
-A local 3D viewer for MiniMax Code. Open STL and STEP models from your project folder — STEP assemblies keep their part names, colours, and real CAD edges — watch models pushed live from CadQuery scripts, then mark positions on the model and send them to the conversation in one click, so the AI knows exactly which face, hole, or edge you mean. The AI can register model folders and open models in the viewer through MCP tools, and the package bundles flowful-ai's CadQuery parametric-design skill.
+A local 3D viewer for MiniMax Code. Opened in a conversation, it lists every STL and STEP model in that conversation's folder — STEP assemblies keep their part names, colours, and real CAD edges — and opens the ones you tick; it also shows models pushed from CadQuery scripts. Orbit around any point you press on, pan with two fingers or the right mouse button, then mark positions on the model and send them to the conversation in one click, so the AI knows exactly which face, hole, or edge you mean. One more click turns the current view into a finished product image: the Viewer captures a clean white model and a background Agent renders it with MiniMax image generation, following any description you add. The AI can register model folders and open models in the viewer through MCP tools, and the package bundles flowful-ai's CadQuery parametric-design skill.
-Authors: [HanZijie](https://github.com/HanZijie) · [flowful-ai](https://github.com/flowful-ai) (bundled CadQuery skill) · Version: `1.2.1`
+Authors: [HanZijie](https://github.com/HanZijie) · [flowful-ai](https://github.com/flowful-ai) (bundled CadQuery skill) · Version: `1.4.0`

@@ -18,17 +18,20 @@ Authors: [HanZijie](https://github.com/HanZijie) · [flowful-ai](https://github.
| Area | Detail |
| --- | --- |
| Viewer | Full-window canvas, orthographic camera, Z up (CadQuery convention). Seven preset views, fit, edges, grid, X/Y/Z section plane, axis gizmo. Follows the light/dark theme. |
-| Project folders | Lists every `.stl`, `.step`, `.stp` in a folder (recursive); tick a file to open it. Open files reload when they change on disk. |
+| Navigation | Press on the model and drag: it orbits around the point you pressed (a ring marks it), nothing jumps. Trackpad: two fingers pan, pinch zooms towards the pointer. Mouse: the wheel zooms towards the cursor, right or middle drag pans. Shift + drag pans on both. **操作方式** (toolbar) tells trackpad and mouse apart on each scroll, or lets you fix one, and lists the gestures. |
+| Conversation folder | Opened in a conversation, the Viewer lists every `.stl`, `.step`, `.stp` in that conversation's folder (recursive), hidden folders such as `~/.mavis/workspace` included, and opens nothing until you tick a file. Outside a conversation it lists nothing. Extra folders can be added to a conversation's list (and removed). Open files reload when they change on disk. |
| STEP | Converted locally into a mesh that keeps the assembly: part names, placements, colours, and B-rep edges (seam lines hidden). The "Opened" list shows how many parts a file has. Results are cached. |
-| CadQuery push | `python/cqview.py` → `show(part_or_assembly, "name")` writes into `~/.cqview/scene/`; the Viewer shows it immediately. Assemblies are pushed as STEP so names and colours survive. |
+| CadQuery push | `python/cqview.py` → `show(part_or_assembly, "name")` writes into `~/.cqview/scene/`; the files panel lists that folder like any other (tick to open). Assemblies are pushed as STEP so names and colours survive. |
| Annotate | Pick mode (`P`): click the first points on the surface and confirm them (`Enter`). Pick mode then stays on: every further click goes straight into the annotation list with its note box focused, so you can pick a point, write what you want there, and pick the next one. Each point records part, sub-part (for assemblies), coordinates, and surface normal; add a note per point plus one instruction for the AI. |
-| Send to AI | One button sends the composed message to the conversation (see [Sending to the conversation](#sending-to-the-conversation)). The same data is kept in `~/.cqview/selection.json` for agents and scripts. |
-| AI tools (MCP) | `add_model_folder`, `add_model_file`, `list_model_folders` — the AI registers folders and opens the models it just exported; an open viewer switches to them at once, a closed one does so when it next opens (see [AI tools](#ai-tools-mcp)). |
+| Send to AI | One button sends the composed message to the conversation (see [Sending to the conversation](#sending-to-the-conversation)). Annotations are kept per conversation folder in `~/.cqview/selections/
-MiniMax Code 里的本地 3D 模型查看器。打开项目文件夹里的 STL 和 STEP(STEP 装配保留零件名称、颜色和真实 CAD 边线),实时显示 CadQuery 脚本推送的模型,在模型上标出位置后一键发到对话里,让 AI 准确知道你说的是哪个面、哪个孔、哪条边。AI 可以通过 MCP 工具登记模型文件夹、在查看器里打开模型;包里还内置了 flowful-ai 的 CadQuery 参数化建模 skill。
+MiniMax Code 里的本地 3D 模型查看器。在对话里打开时,列出这个对话所在文件夹里的所有 STL 和 STEP(STEP 装配保留零件名称、颜色和真实 CAD 边线),勾选哪个打开哪个;也能显示 CadQuery 脚本推送的模型。按住模型上任意一点拖动就绕那一点旋转,双指或右键平移,在模型上标出位置后一键发到对话里,让 AI 准确知道你说的是哪个面、哪个孔、哪条边。再点一下,就能把当前视角渲染成成品图:Viewer 截一张干净的白模,后台 Agent 用 MiniMax 图像生成把它渲染出来,并按你补充的描述调整。AI 可以通过 MCP 工具登记模型文件夹、在查看器里打开模型;包里还内置了 flowful-ai 的 CadQuery 参数化建模 skill。
-作者:[HanZijie](https://github.com/HanZijie) · [flowful-ai](https://github.com/flowful-ai)(内置的 CadQuery skill) · 版本:`1.2.1`
+作者:[HanZijie](https://github.com/HanZijie) · [flowful-ai](https://github.com/flowful-ai)(内置的 CadQuery skill) · 版本:`1.4.0`

@@ -18,17 +18,20 @@ MiniMax Code 里的本地 3D 模型查看器。打开项目文件夹里的 STL
| 模块 | 说明 |
| --- | --- |
| 查看 | 全窗口画布,正交相机,Z 轴向上(与 CadQuery 一致)。7 个预设视角、适配、边线、网格、X/Y/Z 剖切、坐标轴指示,跟随亮色/暗色主题。 |
-| 项目文件夹 | 递归列出文件夹里的 `.stl`、`.step`、`.stp`,勾选即打开;文件在磁盘上变化时自动重新加载。 |
+| 视角操作 | 在模型上按下并拖动,就绕按下的那一点旋转(有一个圆环标出旋转中心),画面不会跳。触控板:双指滑动平移,双指捏合朝指针缩放。鼠标:滚轮朝光标缩放,右键或中键拖动平移。两种方式都可以 Shift + 拖动平移。工具栏的 **操作方式** 每次滚动自动判断是触控板还是鼠标,也可以手动固定,并列出所有手势。 |
+| 会话文件夹 | 在对话里打开时,递归列出这个对话所在文件夹里的 `.stl`、`.step`、`.stp`(包括 `~/.mavis/workspace` 这类隐藏目录),勾选之前一个都不打开。不在对话里打开时什么都不列。可以给对话的列表添加额外的文件夹,也可以移除。文件在磁盘上变化时自动重新加载。 |
| STEP | 在本机转换成网格,保留装配结构:零件名称、位置、颜色和 B-rep 边线(隐藏缝合线)。「已打开」里显示文件包含几个零件。转换结果会缓存。 |
-| CadQuery 推送 | `python/cqview.py` 的 `show(零件或装配, "名字")` 写入 `~/.cqview/scene/`,Viewer 立即显示。装配以 STEP 推送,名称和颜色都保留。 |
+| CadQuery 推送 | `python/cqview.py` 的 `show(零件或装配, "名字")` 写入 `~/.cqview/scene/`,文件面板把这个文件夹和其他文件夹一样列出来(勾选即打开)。装配以 STEP 推送,名称和颜色都保留。 |
| 标注 | 选点模式(`P`):先在表面上点几个位置并确认(`Enter`)。之后选点模式保持开启,每点一下就直接加入标注列表,并自动聚焦到它的备注框:点一个位置、写一句要求、再点下一个,想一步写一步。每个点记录所在零件、装配里的子零件、坐标和表面法向;每个点可写备注,再写一句想让 AI 做什么。 |
-| 发给 AI | 一个按钮把整理好的消息发到对话(见[发送到对话](#发送到对话))。同样的数据也保存在 `~/.cqview/selection.json`,方便 Agent 和脚本读取。 |
-| AI 工具(MCP) | `add_model_folder`、`add_model_file`、`list_model_folders`:AI 登记文件夹、打开它刚导出的模型。查看器开着就立刻切过去,没开就在下次打开时执行(见 [AI 工具](#ai-工具mcp))。 |
+| 发给 AI | 一个按钮把整理好的消息发到对话(见[发送到对话](#发送到对话))。标注按会话文件夹分开保存在 `~/.cqview/selections/<文件夹 ID>.json`;最近一次写入也在 `~/.cqview/selection.json`,方便脚本读取。 |
+| 白模渲染 | 点 **渲染**,把当前角度下可见的模型截成一张裁到模型的白模图,后台 Agent 用 MiniMax 图像生成(图生图)渲染成照片级成品图。可选风格(影棚产品照、使用场景、设计效果图、3D 打印实物)、画幅、是否参考零件颜色,并补充自己的描述。进度、Agent 请求的授权和结果(与白模对比、复制、下载)都在面板里(见[白模渲染](#白模渲染))。 |
+| AI 工具(MCP) | `add_model_folder`、`add_model_file`、`list_model_folders`:AI 把它刚导出的模型打开在它自己这个对话的查看器里(把工作目录作为 `workspace` 传入)。查看器开着就立刻显示,没开就在下次打开时执行(见 [AI 工具](#ai-工具mcp))。 |
| CadQuery skill | 来自 [flowful-ai/cad-skill](https://github.com/flowful-ai/cad-skill) 的 `parametric-3d-printing`:需求梳理 → 分阶段 CadQuery 建模 → 导出 STL/STEP → watertight 校验 → 多视角预览,另带一个经过测试的 Gridfinity 生成器(见[内置 CadQuery skill](#内置-cadquery-skill))。 |
## 运行要求
-- 支持 Mini App 的 MiniMax Code。
+- MiniMax Code 3.1.4 或更高版本:Viewer 需要读取自己是在哪个对话里打开的(Agent 权限 `session.read`)。宿主不提供这个信息时,只有用 `/viewer?root=<文件夹>` 打开才会列出文件夹。
+- 白模渲染需要 MiniMax Code 3.1.2 或更高版本(Agent 权限),以及账号里可用的 `mcode-tools` MiniMax 图像生成工具。每次渲染调用一次图像生成,计费方式和你自己发起的生成一样。
- STL 不需要额外依赖。
- STEP 需要本机 Python 3 和 [CadQuery](https://github.com/CadQuery/cadquery)(`pip install cadquery`)。Viewer 依次查找 `$CQVIEW_PYTHON`、`python3`、`python`、`/usr/bin/python3`、`/opt/homebrew/bin/python3`、`/usr/local/bin/python3`,使用第一个能 `import cadquery` 的。
- 内置 skill 的脚本另外需要 `trimesh`、`pyrender`、`Pillow`、`numpy`、`lxml`(见 `skills/parametric-3d-printing/requirements.txt`);`outline_from_scan.py` 还需要 `shapely`。
@@ -41,12 +44,13 @@ MiniMax Code 里的本地 3D 模型查看器。打开项目文件夹里的 STL
还没有渲染记录
+