MeshFile.Write writes a 3 21 header for meshes with 6- or 8-node elements
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with mikecore/MeshFile.py:345-348 and the element-writing loop to see how the header is chosen; compare that with element creation in mikecore/MeshBuilder.py:150-153 and mikecore/MeshFile.py:390-393. Reproduce with a 6-node mesh and MeshFile.ReadMesh(path). Done means unsupported element widths are rejected rather than written with a mismatched header; the suggested read-side exception is also worth checking at mikecore/MeshFile.py:305-313.
索引モデルが issue の本文から書いたものです。
説明
Summary
MeshFile.Write() picks the element header line from _hasQuads alone (mikecore/MeshFile.py:345-348):
if not self._hasQuads:
maxNodesPerElmt, elmtType = 3, 21
else:
maxNodesPerElmt, elmtType = 4, 25
Elements with 6 or 8 nodes (types 32/33) are never considered. MeshBuilder.CreateMesh() accepts them (mikecore/MeshBuilder.py:150-153), and MeshFile.Create() only sets _hasQuads for 4-node elements (mikecore/MeshFile.py:390-393). So a mesh of quadratic elements is written with the header <n> 3 21, while the row loop still writes every node, which makes the rows 6 or 8 values wide.
Reproduce
Build a mesh with 6-node triangles via MeshBuilder, call CreateMesh().Write(path), then MeshFile.ReadMesh(path).
- The written header claims max 3 nodes per element, code 21, and doesn't match the rows.
- On read,
Read()only recognises 3 and 4 nodes per element (mikecore/MeshFile.py:305-313), so those elements getElementType = 0.
mikeio can reach this too: it writes .mesh through MeshBuilder().CreateMesh().Write(), e.g. to_mesh on a quadratic mesh.
Background
The .mesh format documents only codes 21 (all triangles) and 25 (quads present) for the element header. There's no documented quadratic form (32/33 are dfsu element types).
Suggested fix
- In
Write(), derivemaxNodesPerElmtfrom the widest element instead of_hasQuads, and raise on any element with other than 3 or 4 nodes, since.meshcan't represent it. - Probably make
Read()raise on such elements too, instead of the silentElementType = 0(there's a# TODO: Throw an exception?there).
Found while reviewing #53.
🤖 Generated with Claude Code
- 主要言語
- Python
- スター
- 5
- フォーク
- 1
- 平均マージ
- 1時間 19分
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DHI/mikecore-python のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DHI/mikecore-python#70 ·
メンテナーはふだん 1 日以内に返信
-
Four test assertions carried over from the C# suite are still commented out対応中かも @ryan-kipawa が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DHI/mikecore-python#49 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
DHI/mikecore-python#59 ·
メンテナーはふだん 1 日以内に返信
-
New submesh feature (2027) makes all dfsu fail!対応中かも @ryan-kipawa が 9 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
DHI/mikecore-python#54 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
DHI/mikecore-python#52 ·
メンテナーはふだん 1 日以内に返信
DHI/mikecore-python の issue をすべて見る
似ている issue
-
HTML: <template> content is extracted as document text対応中かも @ryanmeowy が今日担当しました。 オープンbug html
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
docling-project/docling#4714 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Qdrant RAG client applies score_threshold to raw cosine similarity, not the 0-1 score it returns対応中かも @roydonsequeira が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ashhart/TensorFold#536 ·
メンテナーはふだん 1 日以内に返信
-
area/install-update comp/cli duplicate P2 python:uv sweeper:risk-compatibility type/bug
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
NousResearch/hermes-agent#135440 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Deepak3699/Ai_Mentor#244 ·
メンテナーはふだん 1 日以内に返信