Discretizing Geometry Based on Point Clusters for Robotic Fabrication

Hi everyone,

I’m working on a project where I have a Brep, a set of points, and clusters of those points as inputs. My goal is to discretize the original geometry based on these clusters — each cluster will correspond to a piece of wood that will be CNC-milled using a robotic arm and later assembled.


I’m trying to figure out the best way to generate output geometries (ideally Breps or Meshes) that correspond to these clusters and share borders for a good fit during assembly. Does anyone have suggestions or examples of how to approach this?
Discretization forum.gh (224.5 KB)
I’ve attached the Grasshopper file in case it helps.
Any guidance would be greatly appreciated!

Can you post a version that doesn’t require extra plugins?

Data.gh (218.0 KB)
In the first file I internalized the data, it should have worked but maybe try with this one that have just the brep the points and the clusters. Thank for giving it a look!

My first thought was to do a 3D Voronoi with the points and then Mesh Union by clusters, but that’s really slow.

1 Like

Hello
I didn’t look at your script but I think these discussions could be useful

2 Likes

Hi,

Second file also has external plugins.

Are the points from a point cloud? You’d probably rather use a pointcloud rather than a point container then.

You’d probably want to use Cockroach poisson meshing to get a mesh first. Not sure how it would handle all of the points inside the geometry though – I think it prefers points approximating a surface. Maybe ShrinkWrap could work as well. It will inflate the points, and you could probably use a negative offset value to and some smoothing to tone down the artifacts.

Or maybe I’m misunderstanding. Is the original geometry already a closed brep/mesh?

point cloud.gh (324.0 KB)
@Measure @maje90 @GW1 I hope this one works, I used point cloud instead.


You have so many points that making the average point for each cluster and doing the 3d voronoi seems enough…
Is it?

2 Likes

I did quite the same

2 Likes

Hi guys, thank for having a look @laurent_delrieu @maje90 ! Actually I tryed that too but I was looking for another method because when you do average point and 3d voronoi you loose control over the geometry because of the voronoi logics. I need to consider all the points and to have a rational discretization to have more control over the shared boundaries and the solids itself. For example here the clusters of point are not that well organizaed like in the cube, its more challenging.

Im uploading internalized data for with the brep (a bounding box of the points) and the clustered points.
Discretized beam.gh (622.4 KB)

I was thinking maybe inflating the clusters with kagaroo and making them collapse with each other but again it will be nice to have some control over the geometry and each part have to share the boundaries with the other parts. Can you think of a workflow to achieve that? @laurent_delrieu

the core logic is to subdivide the whole volume into smaller units, and then assign each cell to a different group depending on (for instance) to which point-cloud group the closest point to the cell center belongs to

the main difficulty is to give the basic unit-cells a shape that follows the “flow” of the points in the cloud, for which @Measure suggestion to use 3D Voronoi looks like the best way… but it will take “a million year” to compute such a high number of 3D Voronoi Brep-cells

the logic might be:

  1. using the bounding box of the points as boundary, compute the 3D Voronoi for each point in the Point Cloud (you need to flatten the points in the point cloud to do so)
  2. Unflatten Tree on the flat list of 3D Voronoi cells using the (non-flattened) Point Cloud points as guide
  3. Solid Union those (eventually also Merge Faces)

you can try something similar with Meshes (I used Ngon plugin component Mesh from Polyline):

Discretized beam_inno.gh (981.3 KB)

next step might be to solid union meshes that belong to the same group, or shrinkwrap them?

be also aware that there are cells that belong to a given group but have a phisical separation between the others from the same group (that happens because points of other groups are located in-between, and each point wants its own cut of 3D space)

Your “clusters” do intersect each-other badly… how should we interpret that?

Is it possible to force the points to go to the predominant / most convinient cluster in order to have the data to discretize?