OpenMesh convert Circulators to iterator - mesh

I'm using OpenMesh, and try to iterate in BFS base on a vertex, I can get the neighbor of this vertex in the form of VertexVertexiterator, but I want the neighbor in the form of Vertexitrator, how can I get it in this form, thanks~

Related

How to apply a m-dim filter on a image across multiple channel?

So, I have to apply a Gaussian filter on a RGB image. So, I was able to figure out the logic but I am not able to apply the filter on the image.
Basically, what I am trying to do is to multiply a sub-array of shape (1,m) with a sub-array of same size in a row of an image of size n x n, while moving the sub-array (filter) along till the end.
What I am here trying to do is that I want to apply the filter across all the channels (axis2) at once, thus I am trying to broadcast the array in axis2, while keeping all the elements along axis1.
At the end I got this error:
I already tried finding answers which can help me with sweeping this sub-array(filter) across the image but I was unable to get a clear answer.

When loading a model with Assimp how can I get the Vertices that correspond to my materials (C++)

So what I want to do is render each material 1 at a time. Which means that each Material will have it's own vertices. Is there some kind of function within Assimp when I process a mesh that will tell me which material the vertices belong to.
Of course I would put the position, the normal and the texCoord in the vertex and I need the induces.
There is no query to get these meshes implemented in Asset-Importer-Lib right now. But you can write this easily by yourself:
Import your model
Check whether there are any meshes loaded
Loop over all meshes stored in aiScene
Sort them for meshes with the same material index
Loop over all vertices of the list of meshes.
I wrote a blog-post about that: Batch-Rendering for Assimp-Scene

Corefinement of two meshes with CGAL, obtaining the intersection polylines

How could I identify the polylines of intersection, from the own meshes resulting from the corefinement using CGAL::Polygon_mesh_processing::corefine()?, but without having to use additionally CGAL::Polygon_mesh_processing::surface_intersection(), for example, what repeats the intersection calculation.
Would having the edges in both meshes sufficient?
If so, you can use the named parameter edge_is_constrained_map to mark the edges that are at the intersection. If you don't want to iterate over the edges of the mesh to collect them, you can write a property map that will collect them (IIRC, put is only called once per halfedge).
If not, it should be possible to get it but not with the public API.

Show 2D celldata fields in 3D domains with Paraview

I have a .vtu file composed of tetrahedral and triangular elements (located on an outer surface). I also have a celldata field (for example, nrc1) defined on the triangular elements and being zero in the tetrahedral ones. When I select to plot this field in Paraview, I only see a zero field, corresponding with the 3D elements, but no trace of the field in the 2D elements.
Is there a way to show that 2D field in Paraview?
P.D.: I cannot interpolate the 2D celldata field into a pointdata one, since part of the information (discontinuities,...) would be lost.
There is indeed a conflict between the information on the 3D cells (zeroes) and information on the 2D cells (actual information), where the 2D cells and the 3D cells overlap.
Even though your dataset is valid, mixed dimension dataset are not easy to manage correctly, hence your issue.
In any case, you should extract your 2D cells to be able to visualize your data correctly, here is how I would do it :
Create a new view, click on Spreadsheet view
show your dataset in the spreadsheet view
order by CellType
Manually select all 2D CellType has they will be located together
Add an Extract Selection filter, Apply
You can now visualize your data on this 2D cells only dataset
You could also use Edit->Find Data and select by ID since your cells seems to be ordoned.
Finally, you could write a small Python Programmable Filter to do all that for you completelly automatically, but it is not very easy to implement.

Why am I getting an error when trying to plot this graph?

Everything else works except when I try to plot this graph.
That is because the type of data expected by the Waveform Graph is not what you give it.
You may want to use Waveform Chart. Have a look at Type of Graphs and Charts. A graph expects a data-set (or multiple data points) as an array or waveform, while a chart expects a data-point.
You must connect array of numbers to Waveform Graph.
Just add a shift register with empty array on initialization and build new array by adding a new value on any iteration.