Domanda

I have a triangle mesh stl/wrl file that I would like to dense the mesh by adding points. For example, each triangle can be divided into 4 smaller triangle. How can this mesh interpolation be performed?

I could not find such thing in meshlab,and since my shape is quite big, iterating over all of the triangle meshes will take too much time...

È stato utile?

Soluzione

Just in case someone stumbles across this question, there is such a functionality available in Meshlab now. Open your file, go to

Filters > Remeshing, Simplification and Reconstruction > Refine User-Defined

and click on "Apply". In my case, I also had to change the "and" in the "boolean function" field to "&&", otherwise an error message appeared.

Worked like a charm:

Original geometry

The mesh after the first refinement

The mesh after the second refinement

Altri suggerimenti

Found the (lazy) answer -densing the grid while iterating over the entire volume:

    [tri,pts]; % tri is triples of indices from pts
    triperms=[1 1; 1 2; 1 3; 2 2 ;2 3 ; 3 3];
    newTri = [1 2 3;2 4 5;3 5 6;2 5 3];

    triI = [];
    ptsI=[];
    for i=1:size(tri,1)
        facetPts = pts(tri(i,:)',:);

        newPts=squeeze(mean(reshape(facetPts(triperms,:),[6 2 3]),2));

        indx = size(ptsI,1);
        ptsI(indx+(1:6),:)=newPts;
        triI(end+1:end+4,:)=indx+newTri;
    end
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top