Skip to content

Add vertices and faces to the Mesh #3906

Answered by Fedr
czc98 asked this question in Q&A
Dec 21, 2024 · 3 comments · 12 replies
Discussion options

You must be logged in to vote

Hi,

Is there an easy way to add new vertices and faces to the Mesh?
For example, fill holes, the new face will have some vertices from the old Mesh as well as some new vertices.

Actually, there are many different ways of accomplishing it. You can look at our fill hole implementation, for example.

As to high-level function, please consider addTriangles from MRMeshBuilder.h:

// adds triangles in the existing topology, given face indecies must be free;
// settings.region on output contain the remaining triangles that could not be added into the topology right now, but may be added later when other triangles appear in the mesh
MRMESH_API void addTriangles( MeshTopology & res, const Triangul…

Replies: 3 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
11 replies
@Fedr
Comment options

Fedr Dec 25, 2024
Maintainer

@Grantim
Comment options

@czc98
Comment options

@Grantim
Comment options

@czc98
Comment options

Answer selected by czc98
Comment options

You must be logged in to vote
1 reply
@czc98
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants