mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-17 01:54:42 +00:00
refactored the filter that builds an edgemesh with the function in platonic.h
This commit is contained in:
parent
4a749a7357
commit
2f208bb6fa
@ -1491,19 +1491,7 @@ bool ExtraMeshFilterPlugin::applyFilter(QAction * filter, MeshDocument & md, Ric
|
||||
case FP_FAUX_EXTRACT :
|
||||
{
|
||||
MeshModel *em= md.addNewMesh("","EdgeMesh",true,RenderMode(GLW::DMWire));
|
||||
tri::RequireCompactness(m.cm);
|
||||
for(CMeshO::VertexIterator vi=m.cm.vert.begin();vi!=m.cm.vert.end();++vi)
|
||||
tri::Allocator<CMeshO>::AddVertex(em->cm, vi->cP());
|
||||
|
||||
std::vector< tri::UpdateTopology<CMeshO>::PEdge > edgeVec;
|
||||
tri::UpdateTopology<CMeshO>::FillUniqueEdgeVector(m.cm,edgeVec,false);
|
||||
|
||||
for(size_t i=0;i<edgeVec.size();++i)
|
||||
{
|
||||
int v0i = tri::Index(m.cm,edgeVec[i].v[0]);
|
||||
int v1i = tri::Index(m.cm,edgeVec[i].v[1]);
|
||||
tri::Allocator<CMeshO>::AddEdge(em->cm, &em->cm.vert[v0i],&em->cm.vert[v1i]);
|
||||
}
|
||||
BuildFromNonFaux(m.cm,em->cm);
|
||||
} break;
|
||||
case FP_VATTR_SEAM :
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user