三角网格点云插值

问题描述 投票:1回答:2

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

我在meshlab中找不到这样的东西,因为我的形状非常大,迭代所有的三角形网格会花费太多时间......

matlab 3d mesh meshlab
2个回答
2
投票

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

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

然后单击“应用”。在我的情况下,我还必须将“布尔函数”字段中的“和”更改为“&&”,否则会出现错误消息。

像魅力一样工作:

Original geometry

The mesh after the first refinement

The mesh after the second refinement


0
投票

找到(懒惰)回答 - 在迭代整个卷时调整网格:

    [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
© www.soinside.com 2019 - 2024. All rights reserved.