in my project I need a mesh which has regularly subdivided exterior borders and a voronoi diagram structure inside. Then I have to weld the two meshes.
I would like to end with the output of my definition in a valid welded mesh. The problem is that the points of the borders don’t match with the voronoi boundaries points.
Is there a way for creating a triangulated mesh between the two as shown in the picture below?
Ciao Giacomo, Meshes-weld-triangulation_re.gh (92.0 KB)
Have a look at attached definition, 2 methods with descriptions step by step.
1st method:
creating the 2 polyline perimeters
creating a list of all the vertexes that new mesh will need; the vertexes of the 2 perimeters (without duplicates)
for each segment of perimeter A, finding the nearest point to the vertexes of perimeter B, and vice versa (used midpoint of segment); every segment will have a 3rd point, thus we have a triangle (endpoints+point)
finding the index of every point and building up the mesh
2nd method:
creating the 2 polyline perimeters
creating a list of all the vertexes that new mesh will need, the vertexes of the 2 perimeters (without duplicates)
do dealunay mesh with all the points
“deleting” mesh faces that are outside external perimeter but inside internal perimeter
Theoretically 1st method could be faster than 2nd, but it is not deep-scripted so its not sure.
Maybe with large point lists the difference is noticeable.
Tell me if something is unclear, or if i missed your answer.
Cya.
These edges could be eliminated and have a more simple mesh configuration.
So, what I am trying to do is weld de closer points using Cull Duplicates and a tolerance of proximity of about 6 mm. It works if you flatten the tree, but then I loose the tree structure and I am no longer able to get my closed polylines.
On the other hand, If you don’t flatten it will keep the old points in adjacent polylines’ branches.
Trying to weld the points once the mesh is done would collapse some faces, that is way I would like to perform the operation before.Average-points.gh (60.2 KB)
I have to figure out how to flatten and average closer points;
find index of eliminated points in the tree;
replace them with the averaged points.
Cull Duplicates has to outputs, I and V … but I don’t know how to use them.