Braced grid 3D script efficiency

Is this the most efficient script for a braced grid 3D?

Braced grid 3D (63.7 KB)

More efficient will be to separate lines on cube and lines inside cube, so you will just provide in duplicate lines just some lines, not all
More efficient will be to use blocks.
More efficient will be to use a custom C#

1 Like

Thankyou for response.

What are blocks, groups?

Blocks (Rhino blocks) are on some plugins (Elefront, Human, …). They are useful if you want to not duplicate a complex geometry, for example if you replace line by the geometry of a realistic component. They are some discussions on block and instance on this forum.
Edit :
And it will be interesting that you explain why you need more efficiency.

Because, when I have 16.000 boxes, the script will become very heavy,
3D Grasshopper let my computer sweat sparks because of this inefficiency.

I have not solved it yet.
I do not need to bake it.

I want to use it for a ‘shortest walk.’
And I want also to use not diagonal curves, but even the half of the diagonal degree, etc.

Is this a familiar topic?

Create a grid of points and connect them like you want to avoid duplicated lines. Because they are the Problem in your Script, which take you 90% of computing Time. In the afternoon I can create an example.
Two more ideas:
1.Create a shortest Walk with Anemone and closest point, to avoid using curves.
2. Because I don‘t understand what you want to say with „half of the diagonal degree“ may use closest vector from Michael Pryor‘s Pufferfish plugin and create the vectors you want.

Thankyou for your response.

With ‘half of the diagonal degree’ I mean, normally you have 90, 45 direction angles, but with ‘half of the diagonal degree’ I mean that you also have 22.5 direction angles for the curves in the box.

That would be nice if possible.
I do not know if you are paid for doing this or anything or just answer questions because you are that kind or you just have fun with it.

Here for example, without duplcated lines. Testet it with 1030301 (100x100x100 grid) node Points, 6090300 lines and it took around 20 seconds to calculate.

For example on a smaller grid. You can see no duplicated lines.


Just Change the bottom Group, so the diagonal lines fit your Needs. (that’s the example)

No, I don’t get paid :smiley: I got a lot of help in this community and I’m trying my best to give it back. And for me the best way of learning is helping others. :slightly_smiling_face: (17.2 KB)


Thank you for your time Tim Stark,
I appreciate your help very much.