Need help optimizing my script

Hi guys,

I have a triangular panel grid which I have then cut with circles using region difference. Problem is that it takes super long to calculate and I’m not even done with the whole script yet. I still need to add point attractor and then warp the surface on a different geometry. At this rate it will take me days to get the result I want. Is there any way I can modify my script so it processes faster?

Triangles.gh (8.1 KB)

many thanks!

Surface missing

Sorry, here’s the 3dm. It’s just a flat surface. I’ve also attached the updated grasshopper definition here…

Triangles.gh (9.4 KB)
Triangles.3dm (33.1 KB)

You can use trim with regions or trim solid(slower)

Triangles (1).gh (9.5 KB)

And don’t plug panels directly to base plane ; you need first cull duplicates points

Ah I get it. So much better… thank you!

So I was able to add a point attractor to scale down the triangles towards the middle. It doesn’t seem to be working in your definition. It keeps scaling the whole thing down instead of gradually scaling the triangles down from their center points. How can I make the point attractor work with this?

Are you already create point attractor to scale the triangles?

Nevermind, got it. Thanks for your help!

Seems like I attached the wrong files. I’m trying to morph the surface now but having a hard time figuring it out. It keeps deforming in weird ways. Any help is appreciated!

Triangles.3dm (93.4 KB)
Triangles.gh (13.4 KB)

Your target surface has a uv domain with radial topology. That is simply different topology from your bounding box of tri-grid pattern which has a rectangular grid uv domain. Try to use the target surface which has the same topology if you don’t want to get a weird outcome.

Oh I get it. Problem is, I can’t change the target surface. Is there a way to change the UV domain to match the flat surface without changing the target surface itself?