Volume from points in 3D Space (problem with invalid mesh)

unhandled

#1

Hey everybody,

I am trying to create a volume from a few points in 3Dspace. I tried to use the method I found here:


(You have to download Mesh Analysis and Utility Plug-In for the component cullVertices)

The mesh that is created looks good, just like I want it, but for some reason it is invalid so I cannot bake it.

I tried some tricks from the forum for invalid meshes (deconstruct mesh and reconstruct, explode mesh and rejoin) but it did not work.

In the end I want to use the volume as a boundary region in millipede, so it has to be a brep. Maybe there is also an easier way to get a brep from these points.

points_to_mesh.gh (11.5 KB)


(Laurent Delrieu) #2

Hello
You could use Convex Hull from MeshEdit


Alpha Shape


Generate buldings from Lidar points
(Tim Stark) #3

:confused: Didn’t see you already answered and made him an example with your alpha shape :smiley:

Anyways here it is:


points_to_mesh_re.gh (14.7 KB)

The reason why you got a invalid mesh is, that you created a sphere with 4600 faces.You pulled the verticies to the nearest point of 24. So you got an endless amount of faces and verticies, overlapping etc.


#4

Thanks guys!

It works fine for me with the ConvexHull component.

With Alpha Shape I always get holes in my mesh, no matter which radius I use.


(Tim Stark) #5

As you can de in my file, there are no holes.

Funny, as I made the example for you I also tried convex Hull, but got holes :smiley:


#6

Pretty sure there is a rectangular hole at the top (you can see that the area is a little darker in your image). At least that is where my hole was when I tried it out.


(Michael Pryor) #7

Please don’t rely on my 7 year old blog :smiley:
Grasshopper and I have changed a lot since then.


(Michael Pryor) #8

However, I think the issue is a Rhino 6 one. Opened your file in R5 and works as expected. I think R6 has more conditions on what it considers Invalid. R5 had less restrictions (not such a good thing).


(Laurent Delrieu) #9

The same here

I get the same thing also, my script has flaws. It is possible to fill that in Rhino with FillMeshHole


(Tim Stark) #10

You’re right. Don‘t know how I couln‘t see that… should check always twice :confused:


(Michael Pryor) #11

I get the same thing also, my script has flaws. It is possible to fill that in Rhino with

You might add something like that in the script to cover the holes.

if (!M.IsClosed)
{
Polyline[] nakedBoundaries = M.GetNakedEdges();

  for (int i = 0; i < nakedBoundaries.Length; i++)
  {
    if (nakedBoundaries[i].IsClosed)
    {
      Mesh fillHole = Mesh.CreateFromClosedPolyline(nakedBoundaries[i]);
      M.Append(fillHole);
    }
  }
}

(Laurent Delrieu) #12

Thanks Michael. This is really helpful, also for other script I have in mind.