# How to instance objects on points only on an edge

Using the Cube mesh node under the Mesh Primitives menu, I want to create a cube that has a length of L and (L+1) vertices. Using that cube, I want to instance smaller cubes only on the vertices that are on the edge of the cube.

Basically, it should look like a hollow box frame of 10m sides made of smaller solid cubes of 1m sides. I think I can do it using Grid mesh, but it's getting too complicated.

• What do you mean by "...create a cube that has a length of L and (L+1) vertices"? The default cube has an edge length of L=2m. So it should have 3 vertices(points) per edge? Something like this? Commented May 13, 2022 at 1:43
• @Blunder: yep, i think too that this is what he wants Commented May 13, 2022 at 5:33

One way to discriminate, (on a mesh-primitive cube of any size,) would be to select vertices whose normals have no component reaching a length of 1:

The '1.00' is in the Less Than to illustrate the point. For floating-point safety, it would probably be better to go to '0.95' or something like that.

Or for more complicated cases, where you want to do other stuff too, it might be worth using an Indexed Grid group:

Which can, for example, use a vertex-neighbour count.

• very clever...as usual +1 Commented May 13, 2022 at 7:34
• @Chris Unusual. You guys have been much better and quicker than me at this stuff recently.. gettin' old :D Commented May 13, 2022 at 7:47
• i am not sure whether you are older than me.... ;) Commented May 13, 2022 at 7:48
• Math Gangster Robin ::sunglasses:: at it again. Commented May 13, 2022 at 11:02

for non-mathematic genius you can use this node setup:

• Very flexible! :) (Bearing in mind, Einstein wasn't actually that great at arithmetic) Commented May 13, 2022 at 10:13
• thanks mate! i appreciate that ;) Commented May 13, 2022 at 10:14
• Your solution will work on lots of things that aren't cubes. Commented May 13, 2022 at 10:20
• Honestly - I didn’t think about that 🙈and I was looking quite a time to that solution….😉 Commented May 13, 2022 at 10:21

Well this is awkward. I created this question using a guest account and thought that I could have it registered using the email link I received. Now that I have registered it, I cannot seem to be able to upvote or comment on the answers. And this new account seems to be a completely different after registration, so I can't select an answer as a solution.