Terrain generation for laser cutting

I wipe the sweat and blood from my face and go back for another round :smiley:

A bit late to the party.

Here is my try with mesh.

First use points to make a Delaunay mesh and make the border with naked edges.

Then I use mesh Iso Splitting From Nautilus plugin.I tried Mesh Contour but bad results.

It seems to work better with Rhino tolerance set to 0.01 (not 0.001)

Also I shift Z a bit for the slices. Slicing Exactly on previous heights is not good.

So not sure it is very useful.

terrain_generation_for_laser_cutting_LD1.gh (2.7 MB)

terrain_generation_for_laser_cutting_FF5.gh (2.7 MB)

this should take correctly every hill and valley (I hope)

Edit: actually you don’t need to build a surface out of the border, you can take the curve and merge it with the surfaces (the pull point component works with more types of geometry simultaneously), making it faster

The missing layers were the only ones with a single loop. I now filter them out of the de-duping process and merge them back in. I’ve spun this round and round and can’t see any more errors. It works on the new data.


terrain_generation_TN V6-1 (FINAL).gh (5.5 MB)

It looks a lot neater than mine, but I don’t have your plugins installed… It looks like some data tree components that probably do the job of a handful of vanilla ones?

from my experience, using delaunay with just control point of the curves is risky, because you can get situations like this (just a made up example): points on the same curve being too much far so the triangulation “cuts” the curves.

delaunay problem.gh (4.9 KB)

maybe dividing curves will help but it slows down things

yeah sorry, heteroptera and wombat. I highly recommend those

terrain_generation_for_laser_cutting_FF5.gh (2.7 MB)

this is the final version without plugins, all should work fine (I hope) and it is light enough (the bottleneck is the surface split at the beginning, wich you can’t avoid)

100% — I realized that and know where the bug is :man_facepalming:

Thanks for pointing it out! My fresh eyes from day 2 weren’t as fresh by the time I posted :sweat_smile:

Music to my ears—I’ll see if I can return to roll the dice with the curve-only approach.

Is it? I feel like you’re going to come back with yet another complete data file haha jk, thanks!

Incredible, you are very very close to the perfect. I closely checked up the result of your script.

  1. It seems all the final surfaces are moved up one layer over the original contours. (Note: Easy to fix and not an issue for the final cut at all)

  1. It still struggles in one specific area (local bottoms) for unknown reason. (Note: Should be not an issue for the final laser cut I believe. It’s just a waste which would be made anyway).

So after all, I consider this as a nearly perfect solution which solve the problem well enough. Thank you very much.

I checked up very closely and realized the solution struggles in one specific area (local tops on the edges). (Note: But strange enough, only in some specific areas.)

Could it be that it is because those curves are not actually touching the border even if they look like? If you take endpoints and pull to border, distance is actually zero?

That’s my kind of solution :grin:

I think I can see why those bits are being turned back into surfaces, and it would probably be fixable by feeding the end result back through the Look Down process all over again.

I love this kind of problem. So intuitively obvious to do by hand, yet fiendishly complex to automate, with so many edge (lol) cases.

Should not be the case. The contours provided within the investigated area are the result of trimming of original vast contours data set which exceeds the investigated area all around.

Also when you check the data after “Surface Split” everything seems ok, the surfaces are there.

I have tried something similar to prepare topography for lasercutting. Like splitting contours every 2nd or 3rd layer to save on material (like deck of cards weave shuffle). So you should need only 2 or 3 paper sheets. But havent tested if everything aligned correctly.

SplitTopoEveryNthLayerForLasercut.gh (33.7 KB)

Good Catch

Create From Tessellation could help

https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.mesh/createfromtessellation

Important to keep the “False”
delaunay problem.gh (7.0 KB)

 private void RunScript(List<Polyline> polylines, object y, ref object a)

    {

          List<List<Point3d>> edges = new List<List<Point3d>>();

            List<Point3d> points = new List<Point3d>();

            foreach (Polyline pl in polylines)

            {

                points.AddRange(pl);

              edges.Add(pl.ToList());

            }

           a= Mesh.CreateFromTessellation( points, edges, Plane.WorldXY, false);

    }

How do you make the scrolly image thing?

Oh, I need to be in the Rich Text editor, I see. Thank you!