ENH: Expose geometry length units in the Python bindings
メンテナーはふだん 6 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
調査の方向性
Read src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp and compare its bindings for CreateImageGeometryAction and CreateVertexGeometryAction with the C++ constructors described in the issue. Check how geometry classes and enums are exposed in the Python module, then add the requested unit access and action arguments while preserving the stated defaults. Done when Python can read and set geometry units and pass units to both creation actions; the issue leaves broader action coverage open.
索引モデルが issue の本文から書いたものです。
説明
Summary
Python code that builds geometries cannot set or read their length unit. Filters written in Python, or scripts that call the geometry actions directly, always get the C++ default unit, and they cannot tell what unit an existing geometry has.
What is requested: make geometry length units available in the Python bindings:
- the
IGeometry::LengthUnitenum (Nanometer, Micrometer, Millimeter, Meter, …, Unspecified); - reading and setting the unit of a geometry (
IGeometry::getUnits()andsetUnits()); - the
unitsargument of the geometry creation actions, starting withCreateImageGeometryActionandCreateVertexGeometryAction.
Why it is needed: several filters now set the unit on purpose. For example, #1838 creates orientation-space and pole-figure geometries with the unit Unspecified, because their coordinates are not lengths. A Python filter cannot do the same, and a Python script cannot check the unit of a geometry that a C++ filter created. Open issues such as #1782, #1784, #1792, #1796 and #1813 are about geometries losing their unit. Code written in Python has no way to avoid or detect the same problem.
How it works now (src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp on develop at 2eb6b878f6ff408d1454754d4c0e63edd676d7e0):
CreateImageGeometryActionis bound with five arguments (path,dims,origin,spacing,cell_attribute_matrix_name). The C++ constructor also takesunits, which defaults to Micrometer; Python always gets that default.CreateVertexGeometryActionis bound with its two four-argument constructors. #1838 adds aunitsargument (default Meter) to both C++ constructors; the bindings do not pass it.IGeometry::LengthUnitis not bound, and the geometry classes do not exposegetUnits()orsetUnits()to Python.
Where it applies: the SimplnxCore Python module (simplnxpy.cpp), and any Python filter or script that creates or inspects geometries.
Still open: whether the other geometry creation actions (Rectilinear Grid, Edge, Triangle, Quad, Tetrahedral, Hexahedral) should also take a unit. They take none in C++ today.
Existing Python calls should keep their current defaults: Micrometer for image geometries and Meter for vertex geometries.
- 主要言語
- C++
- スター
- 18
- フォーク
- 15
- 平均マージ
- 4日 23時間
- マージ済み PR(30日)
- 42
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
BlueQuartzSoftware/simplnx のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BlueQuartzSoftware/simplnx#1987 ·
メンテナーはふだん 6 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
BlueQuartzSoftware/simplnx#1980 ·
メンテナーはふだん 6 日以内に返信
-
Testing
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
BlueQuartzSoftware/simplnx#1979 ·
メンテナーはふだん 6 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
BlueQuartzSoftware/simplnx#1978 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
BlueQuartzSoftware/simplnx#1945 ·
メンテナーはふだん 6 日以内に返信
BlueQuartzSoftware/simplnx の issue をすべて見る
似ている issue
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
26.04 bug dark-mode Easy Hack impress symptom: visual
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CollaboraOnline/online#16421 · コメント 1 件 ·
-
area/cs bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ydb-platform/ydb#59881 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
documentation enhancement lua server
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100