7
$\begingroup$

enter image description hereenter image description hereenter image description hereIs there a way to have the bolts instanced along a curve in geometry nodes with proper spacing between one another on each side of the pipe? I want each segment of pipe to have the same amount of bolts on each side.

$\endgroup$
0

3 Answers 3

13
$\begingroup$

The Curve to Points node is really useful for this. If you need even spacing instead of even amounts, change the mode from Count to Length.

enter image description here

This would work on any curve (or multiple curves at once):

enter image description here

The same curves but with mode changed to Length:

enter image description here

Update

What you really need to do to make this work correctly is to create two offset curves based on the original base curve (I'm assuming that your pipe is based on a curve) and then use the Curve to Points node to spread out the instances evenly:

enter image description here

$\endgroup$
11
  • $\begingroup$ Sorry this is not what I need, I want the bolts along the curve to be evenly spaced not the ones on the connecting peice $\endgroup$ Commented Jun 3, 2022 at 6:01
  • $\begingroup$ @MasonHeilman Just saw your edit, doesn't the Curve to Points node with Count set to 11 solve your problem? The curve circle is just a representation of your curve, it could be whatever shape. Otherwise, you need to clarify what you're trying to achieve. $\endgroup$ Commented Jun 3, 2022 at 6:09
  • $\begingroup$ I am talking about the bolts along the length of the tube not the flange, they are closer together on the inner bend $\endgroup$ Commented Jun 3, 2022 at 6:24
  • 1
    $\begingroup$ You can set the Curve-to-Points node to "Length" mode to get even spacing between the points, instead of a fixed count over the whole curve. It will change the total amount based on how long the curve is. This may or may not be what the OP needs, it's hard to tell without more detail. $\endgroup$
    – user436
    Commented Jun 3, 2022 at 7:29
  • 1
    $\begingroup$ @TobiasEinarsson Thank you for another update, this solves my problem. Sorry for all the confusion $\endgroup$ Commented Jun 3, 2022 at 15:40
7
$\begingroup$

This is a near-repeat of @Tobias Einarrson 's answer since he's edited it (.. the main point being to sample a curve by length). This adds a workflow option, though, so maybe it's worth posting.

Starting after you've made your mesh, somehow, inside or outside a GN tree.

  • You can select edge-loops of the mesh to carry the bolts, weighted 1, and add them to a vertex-group.
  • Feed that group as an input to an 'Add Bolts' GN modifier

In this example, the vertex-group input as 'Linear':

enter image description here

  • First of all, the Normal of the underlying mesh is captured.. (curves can twist undesirably)
  • Then the vertices with enough weight in the group are separated from the mesh. (Edges are preserved)
  • The separated edge-segments are converted to a multi-spline curve.
  • The curve is sampled by length, and the bolts instanced on it.
  • The bolt-instances are rotated to align with the mesh-surface Normal.

enter image description here

When you sample a curve by length in GN, the endpoints are always included, and the rest are 'best fit'. Which, in this case, IMO, is quite helpful.

The method would work just as well for stitches in upholstery or clothing, ornamental beading.. etc.

$\endgroup$
2
$\begingroup$

you can use this node setup, to achieve the effect:

enter image description here

The resample curve node with "length" gives you even spaces.

result:

enter image description here

by adding scene time, some map range nodes, you can even animate the bolts:

enter image description here

enter image description here

$\endgroup$

You must log in to answer this question.

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