Fill triangulated mesh

Hello,

i am working recently on a script to make quadrics surfaces on blender, i got to go from a point cloud to a mesh without face using a script (using scipy and a voronoi graph).

now i am willing to fill the tiangles that have their edges already built. If i use a simple F from the interface selecting the whole mesh, it doesn’t do very well…

My first question, how do i get the exact same result, if i copy paste the command in the script, i don’t get the same behavior, eventually someone encountered that before

My second is, is there an already existing tool that would fill my triangles without holes or those weird overlapping faces.

My third, does someone have a way to either detect or automatically clean these overlapping faces? (the merge by distance/remove doubles was done already)

Thanks in advance,
Zelfior

I was wondering why such a bunch of triangles and why do you have to go from point cloud to mesh and don’t build up the surface?? Maybe for this task something like MeshLab is more suited? And if we speak of:

then why not use something like the Extra Objects addon using Add → Mesh → Math Function… ?

The terms Dxy Eyz Fzx as in the equation of the section Euclidean space can twist the surface quite far what it would look like without it, they are not really generic.

I don’t know any X(u,v) Y(u,v) Z(u,v) equation that can match any quatric equation, which is necessary if we want to do build those easily. So the Extra objects add-on, which uses that can’t create such surfaces without it (i like the add-on though, i didn’t know about it)

It is indeed exactly what meshlab does that i want to reproduce, but i will remain in blender as much as possible as i don’t have one quadric i want to build but a tool that can make one.

Ahh yes is see now just in special cases like:

did you do script in blender ?

if you get the mesh verts then you could make faces in blender from the verts
but a bit tedious to script faces in 3D

there are other functions in blender to fill up faces from point clouds
did you search addons for that ?
like Convex hull and other external addons

might require to split in parts your original mesh to work well

what is the qty of verts for your point clouds?
it can takes a lot of time to skin a point clouds with 1E6 verts LOL

happy bl

The mesh could and edges you see above are made with a script, so far i randomly place 1k or 3k vertices on the surface and it makes the edges using a 3D voronoi graph, it’s the furthest i have gone, filling faces between the edges that has smallest angle at each vertices looked promising but isn’t as good as i hoped.

I didn’t know the convex hull function, i kind of coded an equivalent which takes a ICO sphere bigger than the surface and shrinkwrap it at closest vertex, but it has issues with concave areas.

I don’t really know where to look for addons, but i didn’t find anything so far.

Now i only want to make a surface that will be remeshed later on to project it back on the theoretical surface, so i can still afford a bit of roughness

hard to tell how you get that points cloud
and i’m not in math field
just know blender with some scripting in python or Numpy

are you generating the mesh verts as columns rows and faces may be ?

then might be easier to make a 3D curves with auto face or use a spline surface

try the points cloud with convex hull see how it works
but you seem to have some concave- non manifold parts which is not good for simple algos

happy bl

So far the generation is random, if i can get to fill those faces, i will change the vertex density where needed.

i didn’t choose columns assuming we don’t know how it will look like in advance and there are areas where i don’t expect it to work easily as i don’t know in which direction make the “grid”. maybe i should step back in this direction.

I’ll give it a try to see how it behaves

can you show the equation you use in your algo
might give ideas how you do it and suggest some changes !

as i said if you have non manifold part may have to split these apart before skinning

happy bl

i use the one given at the beginning of the Euclidean space section of the quadric wiki page given by okidoki. You can just set two of the xyz, and solve the third one

you mean these here ?

zzz4

happy bl

No the one above, ax² +by²+cz²+…

the one wiith like 10 variables

this is to make the Point clouds ?

not certain how to start drawing this in 3 D!

how do you start these values ?

can you elaborate

i use Bmesh to make mesh
not the older deprecated method !

thanks
happy bl

i mean i can make a loop on X then Y but then Z becomes functions of X Y and all the other parameters

like let says

for X dx = 1 and 10 Values
same for Y

same for Z = F ( X Y param )

and build first a point clouds from this
not certain what it would gives

happy bl

if i do the X Y loop
then Z becomes a quadratic equation
what happen if you get some complex numbers ?
do you stop doing the mesh ?

after running first new addon

i get all Z value as complex numbers

for X Y range 10 to 20

what would be the range for this quadric ?

thanks
happy bl

I also used a bmesh, don’t know what is the old thing.

Yes i use the equation to get the third coordinate (set X,Y get Z, set X Z get Y…), complex values are to be discarded, only keep the reals ones, if you only have complex numbers it means that your quadric doesn’t cover the range you proposed. that depends on the abcdefghij you gave, for example if you gave it a radius 1m sphere, the range you gave won’t give anything

I didn’t stop it yet, just not entirely focusing on this part of the code, waiting for new ideas