openmesh-python issueshttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues2018-01-30T09:54:43Zhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/2Request standard properties on demand2018-01-30T09:54:43ZIsaak LimRequest standard properties on demandThe openmesh python bindings should request [standard properties](http://openmesh.org/Daily-Builds/Doc/a01839.html#a9787dd5b9b6e3abc8a2401964f998696) (i.e. vertex normals) on demand.
For example:
the wrapper for ```normal(vh)``` should ...The openmesh python bindings should request [standard properties](http://openmesh.org/Daily-Builds/Doc/a01839.html#a9787dd5b9b6e3abc8a2401964f998696) (i.e. vertex normals) on demand.
For example:
the wrapper for ```normal(vh)``` should first check if vertex normals are available with ```mesh.has_vertex_normals()``` and request them if necessary before returning the normal.
This avoids unexpected crashes, while also circumventing the unnecessary copying around of unneeded vectors if we just request all standard properties for our mesh.Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/3edge_indices and halfedge_indices2018-02-01T09:18:27ZIsaak Limedge_indices and halfedge_indices`edge_indices` and `halfedge_indices` should return a (nx2) integer numpy array if the mesh has n edges or halfedges`edge_indices` and `halfedge_indices` should return a (nx2) integer numpy array if the mesh has n edges or halfedgesAlexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/4unit tests fail for Python 2.72018-02-01T16:05:19ZJanis Bornunit tests fail for Python 2.7```
AttributeError: 'openmesh.FaceVertexIter' object has no attribute '__next__'
```
see [pipeline](https://www.graphics.rwth-aachen.de:9000/adielen/openmesh-python/-/jobs/39853)```
AttributeError: 'openmesh.FaceVertexIter' object has no attribute '__next__'
```
see [pipeline](https://www.graphics.rwth-aachen.de:9000/adielen/openmesh-python/-/jobs/39853)Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/1Use ninja for building if possible2018-02-03T13:36:22ZIsaak LimUse ninja for building if possiblesetup.py should use ninja if possible (see [pytorch](https://github.com/pytorch/pytorch/blob/5a5afa5c17f92a3910e766aeef12218a76cb7ba8/setup.py#L27) for example)setup.py should use ninja if possible (see [pytorch](https://github.com/pytorch/pytorch/blob/5a5afa5c17f92a3910e766aeef12218a76cb7ba8/setup.py#L27) for example)Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/6Remove all VectorT occurrences2018-02-05T10:35:42ZAlexander DielenRemove all VectorT occurrencesThere are still some mesh functions that take VectorT arguments.
We need to update these functions to take numpy arrays.There are still some mesh functions that take VectorT arguments.
We need to update these functions to take numpy arrays.Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/9More element index array methods2018-02-06T15:09:22ZJanis BornMore element index array methodsI noticed that for rendering, we will probably need a few more index array methods. Probably, we will eventually need all of them:
`vertex_vertex_indices` (n_vertices, max_vertex_valence), `vv_indices`
`vertex_face_indices` (n_vertice...I noticed that for rendering, we will probably need a few more index array methods. Probably, we will eventually need all of them:
`vertex_vertex_indices` (n_vertices, max_vertex_valence), `vv_indices`
`vertex_face_indices` (n_vertices, max_vertex_valence), `vf_indices`
`vertex_edge_indices` (n_vertices, max_vertex_valence), `ve_indices`
`vertex_outgoing_halfedge_indices` (n_vertices, max_vertex_valence), `voh_indices`
`vertex_incoming_halfedge_indices` (n_vertices, max_vertex_valence), `vih_indices`
`face_vertex_indices` (n_faces, max_face_valence), `fv_indices`
`face_face_indices` (n_faces, max_face_valence), `ff_indices`
`face_edge_indices` (n_faces, max_face_valence), `fe_indices`
`face_halfedge_indices` (n_faces, max_face_valence), `fh_indices`
`edge_vertex_indices` (n_edges, 2), `ev_indices`
`edge_face_indices` (n_edges, 2), `ef_indices`
`edge_halfedge_indices` (n_edges, 2), `eh_indices`
`halfedge_to_vertex_indices` (n_halfedges,), `htv_indices`
`halfedge_from_vertex_indices` (n_halfedges,), `hfv_indices`
`halfedge_face_indices` (n_halfedges,), `hf_indices`
`halfedge_edge_indices` (n_halfedges,), `he_indices`Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/8New property interface2018-02-06T18:08:22ZAlexander DielenNew property interfaceWe want to replace property handles with string ids. The new interface should look like this:
single-item access:
`val = mesh.vertex_property('test_prop', vh)
mesh.set_vertex_property('test_prop', vh, val)`
all-element access (generic...We want to replace property handles with string ids. The new interface should look like this:
single-item access:
`val = mesh.vertex_property('test_prop', vh)
mesh.set_vertex_property('test_prop', vh, val)`
all-element access (generic):
`list = mesh.vertex_property('test_prop')
mesh.set_vertex_property('test_prop', list)`
all-element access (numpy):
`arr = mesh.vertex_property_array('test_prop')
mesh.set_vertex_property_array('test_prop', vh, arr)`Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/7Expose decimation classes2018-02-07T14:21:03ZAlexander DielenExpose decimation classesDecimation is still missing.Decimation is still missing.Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/5Build on Windows and Mac2018-02-16T08:46:51ZAlexander DielenBuild on Windows and MacAs far as I know, nobody has done this yet.
We should also add ci scripts.As far as I know, nobody has done this yet.
We should also add ci scripts.Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/10use new OpenMesh all_*s ranges to construct data arrays2018-02-27T12:21:22ZJanis Bornuse new OpenMesh all_*s ranges to construct data arraysOpenMesh/OpenMesh!153 introduces a distinction between ranges that skip over deleted elements (e.g. `mesh.vertices()`) and those that include them (e.g. `mesh.all_vertices()`). As soon as we depend on this new version, we need to make su...OpenMesh/OpenMesh!153 introduces a distinction between ranges that skip over deleted elements (e.g. `mesh.vertices()`) and those that include them (e.g. `mesh.all_vertices()`). As soon as we depend on this new version, we need to make sure to use the `all_*s` ranges for all exposed property access methods that return data as arrays. Otherwise, the entries of index arrays returned by `*_indices` will be invalid.Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/11Add unittests for index array dimensions (with deleted elements)2018-02-28T11:54:33ZIsaak LimAdd unittests for index array dimensions (with deleted elements)https://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/12constructors / functions to create meshes from index arrays2018-03-16T13:55:24ZJanis Bornconstructors / functions to create meshes from index arraysAn option to construct meshes from arrays, useful e.g. for interop with libigl.
Possible interfaces:
* `om.TriMesh(points=V, face_vertex_indices=F)`
* `om.tri_mesh_from_arrays(points=V, face_vertex_indices=F)`
Need some feedback on the...An option to construct meshes from arrays, useful e.g. for interop with libigl.
Possible interfaces:
* `om.TriMesh(points=V, face_vertex_indices=F)`
* `om.tri_mesh_from_arrays(points=V, face_vertex_indices=F)`
Need some feedback on the interface choice and naming first.Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/14read_trimesh fails silently2018-03-26T08:02:27ZJanis Bornread_trimesh fails silentlyCalling `read_trimesh` with a nonexistent file just returns an empty mesh. It should throw an exception.Calling `read_trimesh` with a nonexistent file just returns an empty mesh. It should throw an exception.Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/17copy method for meshes2018-04-25T12:37:48ZJanis Borncopy method for meshesnumpy arrays have a `copy` method, so maybe meshes should have toonumpy arrays have a `copy` method, so maybe meshes should have tooAlexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/15cannot set 1D arrays as property arrays2018-06-13T18:18:10ZJanis Borncannot set 1D arrays as property arrays```python
m = om.TriMesh()
for _ in range(4):
m.add_vertex(np.random.rand(3))
m.set_vertex_property_array('test', [1,2,3,4]) # doesn't work (fails silently)
m.vertex_property_array('test') # fails here
m.set_vertex_property_array('...```python
m = om.TriMesh()
for _ in range(4):
m.add_vertex(np.random.rand(3))
m.set_vertex_property_array('test', [1,2,3,4]) # doesn't work (fails silently)
m.vertex_property_array('test') # fails here
m.set_vertex_property_array('test', [[1],[2],[3],[4]]) # this works
```
The first `set_vertex_property_array` call should also work and set a property that assigns a scalar to every vertex.Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/22*_property_array fails for scalar-valued properties2018-07-10T11:58:13ZJanis Born*_property_array fails for scalar-valued propertiesWhen 0-dimensional, i.e. scalar properties are set using `set_*_property`, they cannot be queried as a NumPy array afterwards using `*_property_array`:
```python
mesh = om.TriMesh()
v0 = mesh.add_vertex([1,0,0])
v1 = mesh.add_vertex([0,...When 0-dimensional, i.e. scalar properties are set using `set_*_property`, they cannot be queried as a NumPy array afterwards using `*_property_array`:
```python
mesh = om.TriMesh()
v0 = mesh.add_vertex([1,0,0])
v1 = mesh.add_vertex([0,1,0])
v2 = mesh.add_vertex([0,0,1])
mesh.set_vertex_property('foo', v0, 1.0)
mesh.set_vertex_property('foo', v1, 2.0)
mesh.set_vertex_property('foo', v2, 3.0)
mesh.vertex_property_array('foo') # fails:
# IndexError: too many indices for an array: 1 (ndim = 0)
```
Higher-dimensional-valued properties work though:
```python
mesh.set_vertex_property('bar', v0, [1.0])
mesh.set_vertex_property('bar', v1, [2.0])
mesh.set_vertex_property('bar', v2, [3.0])
mesh.vertex_property_array('bar') # works:
# array([[1.],
# [2.],
# [3.]])
```Alexander DielenAlexander Dielenhttps://gitlab.vci.rwth-aachen.de:9000/OpenMesh/openmesh-python/-/issues/20unbundle the lib2022-03-08T10:39:31ZGhost Userunbundle the libthe python bindings are now in a separate package.
it would be great if the bindings did not bundle the lib (and pybind11 possibly)
or at least there should be an option not to use the bundled lib.
For example it would be possible to pos...the python bindings are now in a separate package.
it would be great if the bindings did not bundle the lib (and pybind11 possibly)
or at least there should be an option not to use the bundled lib.
For example it would be possible to possibly use several versions of the lib (eg 7.1 for which the bundled version was not updated), but this simplifies the packaging.
Here a modified CMakeLists that uses an already built openmesh lib, and external pybind11.
[CMakeLists.txt](/uploads/c308409de1d04694ce33c891587c8c79/CMakeLists.txt)