Simulation & MeshingChinese & English

Mesh Element Quality & Printability

This plugin checks a published surface mesh the way a solver or a 3D printer will, optionally together with a volumetric grid loaded from a .vtu / .vtk file. It never modifies your input: every result is either a new sca

Updated 2026-09-10User manual

Mesh Element Quality & Printability(网格单元质量与可打印性)

Mesh Element Quality & Printability - User Manual

Dragonfly Prototype Apps · Mesh Element Quality & Printability...

版本 Version 1.0 · 2026-08-01


第一部分 中文手册

目录

1. 简介

2. 适用场景

3. 安装与启用

4. 运行环境与首次配置

5. 界面说明

6. 使用步骤

7. 参数说明

8. 输出结果

9. 常见问题与故障排除

10. 注意事项与已知限制

11. 参考资料

1. 简介

本插件按求解器和3D 打印机的标准检查一个已发布的表面网格,并可选地一并检查从 .vtu / .vtk 文件加载的体网格。它不修改你的输入:所有结果要么写成网格的新标量槽,要么发布为新的网格对象。

面板分为 6 个编号步骤,前一步完成后才会启用下一步;任何上游输入或参数变化都会使下游结果失效,因此导出的数字永远对应当前设置。

所有单元质量指标遵循 Verdict 定义(VTK 的 vtkMeshQuality 即其参考实现),并由自动化测试逐值比对,保证与其他基于 Verdict 的工具可直接对照。

第一个页签上的一键执行全部步骤(按当前设置)会无人值守地跑完流程:曲面 → 网格质量 → 可打印性,每一步都使用你按下按钮那一刻各自页签上显示的设置。有三个步骤是复选框且默认全部关闭:朝向扫描(最多要做 512 次完整的悬垂分析),以及两个发布步骤(它们会向会话写入对象)。所有页签始终可以打开和修改参数,以便在运行之前检查各项阈值与打印设置;某一步所需的输入尚不存在时,按下它自己的按钮会给出提示,说明缺的是哪一步。

2. 适用场景

  • 有限元前处理:确认网格没有反转单元、没有极端长宽比或过小的最小角。
  • 增材制造:评估某个打印朝向的悬垂面积与最小壁厚,并让插件扫描出更优朝向。
  • 工业 CT 分割重建后:检查网格是否水密、有无自相交,再送去仿真或打印。
  • 定位修复位置:发布只包含不合格单元的网格副本,在 3D 视图中直接看到问题在哪。

3. 安装与启用

1. 安装 Prototype Apps 完整包(或在 App Store 中勾选本插件)。

2. 本插件默认未启用,请在 App Store 或菜单项管理器中启用它。

3. 完全重启 Dragonfly(插件只在启动时被发现)。

4. 从菜单打开:Prototype Apps ▸ Mesh Element Quality & Printability…(分组:Simulation & Meshing)。

4. 运行环境与首次配置

无需任何安装或配置。 本插件完全运行在 Dragonfly 自带的 Python 进程内,使用其已附带的 VTK 9.4.2 与 trimesh。不联网、不下载、不需要 GPU、不创建虚拟环境。

面板顶部的 Environment 一行会实时显示三项能力:VTK 版本、标量写回是否可用、壁厚计算是否可用(依赖 trimesh)。若某项显示不可用,相关功能会被禁用并说明原因,而不会给出错误结果。

5. 界面说明

面板顶部固定显示:运行环境、当前输入、当前任务、进度条与 Cancel 按钮。长时间计算在工作线程中进行,界面不会卡死;取消或失败都不会发布任何半成品。

1. 环境与输入

选择一个已发布的网格(列表只显示已发布对象),可选填一个 .vtu / .vtk 体网格文件,并选择分析配置:Surface QA、FEM QA 或 Additive Manufacturing。配置决定第 3、5 步使用的阈值。

2. 表面完整性

报告顶点/面/边数量、是否水密、是否流形、边界边数、非流形边数、重复面、退化面、重复顶点、朝向一致性、Euler 示性数、亏格、表面积与封闭体积。勾选「检查自相交」后会额外做三角形两两求交(较慢);若候选对数超出预算,会明确标注「搜索被截断,结果不完整」。

3. 单元质量

按指标给出最小/最大/平均值,以及在当前配置阈值下的合格/警告/不合格计数,并列出最差的 25 个单元。加载了体网格时,四面体与六面体的体积、scaled Jacobian、二面角和反转单元一并计算。

4. 可打印性

给定打印方向后,报告悬垂面数与面积、构建宽/深/高与占地面积、锐边数量、以及射线法测得的壁厚最小值与中位数。「运行朝向扫描」会在球面上均匀取若干方向,按悬垂面积(其次按高度)排名,结果是确定性的。

5. 复查与修复

列出在当前配置下不合格的单元及其触发原因。本插件只负责诊断:补洞、重网格化、抽稀等修复操作请使用 PyMeshLab 插件,不在此重复实现。

6. 发布与导出

把结果写回原网格的标量槽、发布只含不合格单元的网格副本,或导出 CSV、VTP、自包含 HTML 报告。

6. 使用步骤

1. 在第 1 步选择网格并选定分析配置。

2. 在第 2 步点击「运行表面检查」。若网格不水密或存在非流形边,先记下来——后续的体积与可打印性判断会受影响。

3. 在第 3 步点击「运行单元质量」,查看不合格计数与最差单元列表。

4. 在第 4 步设置打印方向与悬垂角上限,点击「运行可打印性」;如需寻找更好的朝向,再点「运行朝向扫描」。

5. 在第 5 步核对不合格单元清单。

6. 在第 6 步写回标量、发布问题单元副本或导出报告。

任何时候都可以回到前面的步骤修改参数;插件会自动清空受影响的下游结果并提示需要重新运行。

7. 参数说明

参数

默认值

范围

说明

分析配置

Surface QA

Surface QA / FEM QA / Additive Manufacturing

决定第 3、5 步的合格/警告/不合格阈值

检查自相交

关闭

开 / 关

三角形两两求交,较慢;超出候选预算时会标注结果不完整

打印方向

0, 0, 1

各分量 −1…1

构建方向;悬垂与构建尺寸都相对它计算

悬垂角上限

45

0…89 度

墙面相对竖直方向允许的最大倾角,超过即判为需要支撑

锐边角度

80

0…180 度

相邻面法向夹角超过该值即计为锐边

壁厚采样数

4000

0…200000

射线法采样的面数;设为 0 则跳过壁厚计算

朝向扫描方向数

64

4…512

球面上均匀取向的数量,越多越细但越慢

8. 输出结果

  • 网格标量槽:MQ Aspect Ratio、MQ Min Angle、MQ Scaled Jacobian、MQ Skewness、MQ Face Slope(度)、MQ Overhang。逐面指标按面积加权散布到顶点。
  • 问题单元网格副本:一个新发布的网格,只包含在当前配置下不合格的面(顶点已压缩重编号)。原网格不被修改。
  • CSV:逐面全部指标;未运行单元质量时导出表面完整性汇总。
  • VTP:带逐单元标量的表面文件,可在 ParaView 中打开。
  • HTML:自包含报告,只包含实际运行过的步骤。

9. 常见问题与故障排除

列表里没有我的网格。 列表只显示已发布的对象。请先发布该网格,再点第 1 步的「刷新」。

壁厚显示「未计算」。 采样数被设为 0,或该环境缺少 trimesh。顶部 Environment 一行会写明是哪一种。

封闭体积显示「—」。 只有水密网格的封闭体积才有意义;先在第 2 步确认水密性。

自相交结果标注「搜索被截断」。 候选三角形对数超过预算,结果不完整;请先减面或分块检查,不要把它当作「没有自相交」。

体网格文件加载后没有单元质量结果。 目前从文件读取的体网格支持四面体与六面体;其他单元类型会被跳过。

10. 注意事项与已知限制

  • 本插件只做诊断,不做修复。补洞、重网格化、抽稀请用 PyMeshLab 插件。
  • distortion 指标由 VTK 提供;本插件刻意不自行实现该指标(Verdict 定义需要完整 Jacobian,自行近似会产生同名但不可比的数值)。
  • 六面体体积由五个四面体求和得到,对严重扭曲的单元只是估计值。
  • 壁厚为射线法测量,是沿面法向反方向到对面的距离;它与 VertexMeasurements 的局部厚度定义不同,两者不可直接互换。
  • 从 Dragonfly 对象直接读取体网格连通性在部分版本上不可用;此时请改用 .vtu 文件输入,插件会明确提示。

11. 参考资料

  • VTK vtkMeshQuality:https://vtk.org/doc/nightly/html/classvtkMeshQuality.html
  • Verdict 几何质量库(VTK 中的参考实现)
  • Blender 3D-Print Toolbox(仅作为功能需求参考,未使用其源码):https://docs.blender.org/manual/en/3.6/addons/mesh/3d_print_toolbox.html


Part II English Manual

Contents

1. Introduction

2. Use cases

3. Installation & enabling

4. Runtime environment & first-run setup

5. Interface

6. How to use

7. Parameters

8. Output

9. FAQ & troubleshooting

10. Notes & known limitations

11. References

1. Introduction

This plugin checks a published surface mesh the way a solver or a 3D printer will, optionally together with a volumetric grid loaded from a .vtu / .vtk file. It never modifies your input: every result is either a new scalar slot on the mesh or a newly published object.

The panel is six numbered steps. A step stays disabled until its inputs exist, and changing anything upstream invalidates the results below it, so an exported number always matches the settings on screen.

All element-quality metrics follow the Verdict definitions (VTK's vtkMeshQuality is the reference implementation) and are cross-checked value-by-value by automated tests, so a number here is directly comparable with any other Verdict-based tool.

Execute All Steps with Current Settings on the first tab runs the workflow unattended - surface, mesh quality, printability - each step with whatever its own tab shows when you press it. Three steps are tick boxes and all three are OFF by default: the orientation sweep, because it runs up to 512 full overhang analyses, and the two publishing steps, because they write to the session. Every tab stays open so the thresholds and the print settings can be read and changed BEFORE the run; a step whose input does not exist yet refuses when you press ITS button and says which step is missing.

2. Use cases

  • FEM pre-processing: confirm there are no inverted cells, extreme aspect ratios or tiny minimum angles.
  • Additive manufacturing: evaluate overhang area and minimum wall thickness for a build direction, and let the plugin sweep for a better one.
  • After segmenting industrial CT: verify the reconstructed mesh is watertight and free of self-intersections before simulation or printing.
  • Locate what to repair: publish a mesh copy containing only the failing elements and see the problem in the 3D view.

3. Installation & enabling

1. Install the Prototype Apps package (or tick this plugin in the App Store).

2. The plugin is disabled by default — enable it in the App Store or the Menu Item Manager.

3. Restart Dragonfly completely (plugins are discovered at startup only).

4. Open it from Prototype Apps ▸ Mesh Element Quality & Printability… (group: Simulation & Meshing).

4. Runtime environment & first-run setup

Nothing to install or configure. The plugin runs entirely inside Dragonfly's own Python using the VTK 9.4.2 and trimesh it already ships. No internet, no download, no GPU, no virtual environment.

The Environment line at the top of the panel reports three capabilities live: the VTK version, whether scalar write-back is available, and whether wall thickness can be computed (it needs trimesh). Anything unavailable disables the matching feature and says why, rather than returning a wrong answer.

5. Interface

A fixed header shows the environment, the current input, the current task, a progress bar and Cancel. Long analyses run on a worker thread so the UI stays responsive, and a cancelled or failed run publishes nothing.

1. Setup & Source

Pick a published mesh (the list shows published objects only), optionally point at a .vtu / .vtk volumetric grid, and choose an analysis profile: Surface QA, FEM QA or Additive Manufacturing. The profile supplies the thresholds used in steps 3 and 5.

2. Surface Integrity

Reports vertex/face/edge counts, watertightness, manifoldness, boundary and non-manifold edges, duplicate and degenerate faces, duplicate vertices, orientation consistency, Euler characteristic, genus, surface area and enclosed volume. Ticking self-intersection adds a pairwise triangle test (slow); if the candidate budget is exhausted the result is explicitly marked as truncated and incomplete.

3. Element Quality

Min/max/mean per metric plus OK / warn / fail counts under the active profile, and the 25 worst elements. When a volumetric grid is loaded, tet and hex volume, scaled Jacobian, dihedral angles and inverted-cell detection are computed too.

4. Printability

For the chosen build direction: overhang face count and area, build width/depth/height and footprint, sharp-edge count, and ray-cast wall thickness (minimum and median). The orientation sweep samples directions uniformly on the sphere and ranks them by overhang area then height — the ranking is deterministic.

5. Review & Repair

Lists the elements that fail the active profile and why. This plugin diagnoses only: hole filling, remeshing and decimation live in the PyMeshLab plugin and are not duplicated here.

6. Publish & Export

Write the results back as scalar slots, publish a mesh copy containing only the failing elements, or export CSV, VTP and a self-contained HTML report.

6. How to use

1. In step 1 select the mesh and the analysis profile.

2. In step 2 click Run surface checks. If the mesh is not watertight or has non-manifold edges, note it — volume and printability answers depend on it.

3. In step 3 click Run element quality and read the fail counts and the worst-element list.

4. In step 4 set the build direction and overhang limit and click Run printability; click Run orientation sweep to look for a better direction.

5. In step 5 review the failing elements.

6. In step 6 write the scalars back, publish the failed-element copy, or export a report.

You can go back to an earlier step at any time; the plugin clears the results that depended on what you changed and tells you to re-run.

7. Parameters

Parameter

Default

Range

Meaning

Analysis profile

Surface QA

Surface QA / FEM QA / Additive Manufacturing

Supplies the OK / warn / fail thresholds used in steps 3 and 5

Check self-intersections

off

on / off

Pairwise triangle intersection test; slow, and marked incomplete if the candidate budget is exhausted

Build direction

0, 0, 1

each component −1…1

Build-up direction; overhangs and build dimensions are measured relative to it

Overhang limit

45

0…89 deg

How far a wall may lean from vertical before it needs support

Sharp edge angle

80

0…180 deg

An edge counts as sharp when the angle between its two face normals exceeds this

Wall thickness samples

4000

0…200000

Number of faces sampled by the ray cast; 0 skips thickness entirely

Sweep directions

64

4…512

Directions sampled uniformly on the sphere; more is finer but slower

8. Output

  • Mesh scalar slots: MQ Aspect Ratio, MQ Min Angle, MQ Scaled Jacobian, MQ Skewness, MQ Face Slope (degrees) and MQ Overhang. Per-face metrics are scattered to vertices with area weighting.
  • Failed-element mesh copy: a newly published mesh containing only the faces that fail the active profile, with vertices compacted. The original mesh is untouched.
  • CSV: every metric per face; if element quality has not been run, the surface-integrity summary is exported instead.
  • VTP: the surface with per-cell scalars, ready to open in ParaView.
  • HTML: a self-contained report containing only the steps that actually ran.

9. FAQ & troubleshooting

My mesh is not in the list. The list shows published objects only. Publish the mesh, then press Refresh in step 1.

Wall thickness says not computed. Either the sample count is 0 or trimesh is missing in this environment; the Environment line at the top says which.

Enclosed volume shows a dash. Enclosed volume is only meaningful for a watertight mesh — check step 2 first.

Self-intersection says the search was truncated. The candidate budget was exhausted, so the result is incomplete; decimate or check in blocks, and do not read it as 'no self-intersections'.

A loaded volumetric grid produced no element quality. Grids read from file currently support tetrahedra and hexahedra; other cell types are skipped.

10. Notes & known limitations

  • This plugin diagnoses only — hole filling, remeshing and decimation belong to the PyMeshLab plugin.
  • The distortion metric comes from VTK. It is deliberately not reimplemented here: the Verdict definition needs the full Jacobian, and a look-alike approximation under the same name would not be comparable.
  • Hex volume is the sum of five tetrahedra, which is an estimate for badly warped cells.
  • Wall thickness is a ray cast along the inward face normal to the opposite wall. That is a different definition from VertexMeasurements' local thickness, and the two are not interchangeable.
  • Reading volumetric cell connectivity straight from a Dragonfly object is not available on every build; the plugin says so and asks you to use the .vtu file input instead.

11. References

  • VTK vtkMeshQuality: https://vtk.org/doc/nightly/html/classvtkMeshQuality.html
  • The Verdict geometric quality library (the reference implementation inside VTK)
  • Blender 3D-Print Toolbox (used only as a reference for which checks matter; no source was copied): https://docs.blender.org/manual/en/3.6/addons/mesh/3d_print_toolbox.html
You’ve reached the end of this manual.Explore the library →