https://linen.dev logo
o
no cell size difference, it comes from a 3D scan therefore from voxels, therefore all same size in area (it is a surface mesh)
q
Many questions to make it work: If we castellate a coarse mesh on this scan, does that give us any non connected regions? Instead of selecting location using point, can we invert the selection and select all other non-connected regions ?
o
the two are fully connected regions, the negative of it is fully (or almost fully) connected.
what do you mean by castellate? the snappy first step?
i imagine, that at one point the pores will disapear but how do you plan to use this to identify on the finer geometry after?
q
I thought it'll give us disconnected regions on snap step....
It is difficult to automate I imagine... May be very case/pore specific.
o
as while you coarse it more and more it will be different to the geometry itself, no? (also the size of the pores are ~same size of the wall in other direction, so if you miss the pores one would miss the wall also, no?
i am continuing working on this https://discord.com/channels/397772779870486529/616621476853841930/1430808583892631652 i have soooome ideas how to remove some false trues,
right now i am strugling to fill up the holes inside each section, as it can be seen here https://discord.com/channels/397772779870486529/616621476853841930/1430564925419552840 thre are 'blue' patches inside the red ones.
i am trying to clean up this blue things, then i will select all the cells (faces) that are not red, and check the connectivity, as they will be disconnected then, but the identification (IDs) of one or the other does not keep constant while appling filters (it resets each time) so i need to solve this...
q
What does the blue and red indicate? Must be some kind of index you assign? Any way of using the 'normal' to identify the correct side of the red?
o
but my current idea is: 1. get the red sections 2. separate by connectivity so each pore and some false trues 3. check their bounding box to eliminate really large false trues and really small ones (pores are more or less same size) 4. go back to the geoemtry and turn the section in 3. to blue 5. extract the blue part with a threshold 6. use connectivity in 5. 7. bring back this regionsIDs of 6. to the orginila geometry, which, i dont have a fucking clue how to do it.
is a flag i made myself with a programmable filter. it values 0 or 1. and 1 should be only the pores zones.
which it quite okeish? at least for the moment
q
Hmm can it be 0,1,-1 for different sides of 0?
o
?
q
Like if one side is pore... The other is -1 or 2, i.e. not pore
o
will it is 0 if it is not a pore 1 if it is, i feel i am not understanding you
q
And how did we identify pore?
Asking because there is 0 on both side of 1,.. one side could be marked as something else, and then eliminated
o
i am not sure of understanding, i identified with 1 the faces where the pores are,
with the idea of divide the channels by 'removing' temporarly the faces on the pores (so it should disconnect the channels)
but need to remove the false trues before lol, and be able to detect 'better' the pores.
q
What is the current condition?
o
checking variation on the normals of the faces to their neighbours faces:
Copy code
# For each cell, gather neighbors via the points and check max normal difference
idsSelected=[]
idsNotSelected=[]
for cell_id in range(num_cells):
    pid_list = input0.GetCell(cell_id).GetPointIds()
    neighbor_ids = set()
    for k in range(pid_list.GetNumberOfIds()):
        pid = pid_list.GetId(k)
        idlist.Initialize()
        input0.GetPointCells(pid, idlist)   # fills idlist with cells using point pid
        for n in range(idlist.GetNumberOfIds()):
            neighbor_ids.add(idlist.GetId(n))
    neighbor_ids.discard(cell_id)
    n_i = norms[cell_id]
    max_diff = 0.0
    for nid in neighbor_ids:
        diff = np.linalg.norm(n_i - norms[nid])
        if diff > f:
            idsSelected.append(cell_id)
            flag_array.SetValue(cell_id, 1.0)
            break
    if diff < f:
        idsNotSelected.append(cell_id)
        flag_array.SetValue(cell_id, 0.0)
it is quite ugly but well i am prototyping right now....
and changing the f value it selects more or less cells.
my issue is removing the false trues. (faces that are detected as pores and are not). my first approach is to remove them using the BB, as i mentionned before, but there is some issues like this for example, where the pore will be removed because it is touching a false true zone: https://cdn.discordapp.com/attachments/1430819945507197010/1430827744480202772/image.png?ex=68fb31ad&is=68f9e02d&hm=957e88a0cf97eae148a9fe6a64e685f472530027c099bbec4c774219c05f6067&
q
Okay, one question which might help. What will this detect if two negihbours are parallel flat but they have normals oriented 180 degree back to back
There is also the metric of curvature (divergence of normal..) similar to your difference metric, but could show different accuracy (if it can be calculated within paraview.. maybe gradients)
https://docs.pyvista.org/examples/01-filter/voxelize.html This one demos a metric called distance to bounding mesh, which could be different for a lot of cells in the pore region.. so that you save this value and then use high distance cells as starting point of your connectivity search..
It's technically available in paraview through import
o
sorry i was out
well if they are 180 degrees it will be 2 the diff so it will detect them, but the normals are correctly orientated and surface are not overlaping so this should not happend
q
Of course here we again need a volume mesh..castellation of some sort and then resample back to the surface mesh.
o
gradient does not give much of difference...
mmm this is promising