1

我有一个三角形网格 stl/wrl 文件,我想通过添加点来密集网格。例如,每个三角形可以分成4个较小的三角形。如何执行此网格插值?

我在meshlab中找不到这样的东西,而且由于我的形状很大,迭代所有三角形网格会花费太多时间......

4

2 回答 2

2

以防万一有人偶然发现这个问题,Meshlab 现在有这样的功能。打开你的文件,转到

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

并点击“应用”。就我而言,我还必须将“布尔函数”字段中的“与”更改为“&&”,否则会出现错误消息。

像魅力一样工作:

原始几何

第一次细化后的网格

第二次细化后的网格

于 2018-03-01T10:27:08.157 回答
1

找到(懒惰的)答案 - 在遍历整个卷时密集网格:

    [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
于 2013-09-23T11:19:43.040 回答