5
$\begingroup$

I would like to instantiate a cube in the middle of an edge of an ico sphere.

Enter image description here

I'm thinking about converting to a curve, subdividing it and then make a mask between the primitive sphere and the subdivided sphere, but I'm stuck on how to do this.

I found the post How to create instances in the centers of faces or edges, instead of on verts?, but it was done with the legacy version of the geometry nodes.

$\endgroup$
1
  • $\begingroup$ What is an "ico sphere"? $\endgroup$ Commented May 19, 2022 at 8:58

3 Answers 3

8
$\begingroup$

Just a follow-up to the commentary on @possibly ferret's answer. You can instance directly on the edges of a mesh, and set the rotation, too..

enter image description here

.. here, in 2 stages: 1. around 'Auto' to put Z on the normal, 2. around the (now good) 'Z' to put Y down the edge.

enter image description here

$\endgroup$
1
  • 2
    $\begingroup$ this is briliant $\endgroup$ Commented May 19, 2022 at 1:52
7
$\begingroup$

You could convert the mesh to curves, then subdivide, and with the node Endpoint Selection select the middle points and instantiate there.

enter image description here

If you also want to transfer the rotation from the edges to the instantiated cubes, you can capture the selection of the middle points with the node Capture Attribute.

In order to align the cubes correctly, you would first have to capture the normals of the faces and combine it with the rotation you get from the Curve to Points node. You can then pass the resulting rotation directly to the Instance on Points node.

enter image description here

$\endgroup$
1
  • $\begingroup$ Perfect, thanks a lot for quick and detailled answer! $\endgroup$ Commented May 18, 2022 at 12:37
3
$\begingroup$

The simplest way to do it, is by using a mesh to points set to edges:

Enter image description here

Enter image description here

$\endgroup$
2
  • $\begingroup$ That's right, this is technically the easiest way to find the center point, but the rotation unfortunately makes no sense at all here because of the missing tangents/normals. $\endgroup$
    – quellenform
    Commented May 18, 2022 at 13:13
  • $\begingroup$ yes that's true, unfortunately you will still need to do the curve tangent method to achieve that $\endgroup$ Commented May 18, 2022 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .