3
$\begingroup$

I want to make a Curve Array with constant 0 step, like on the gif. For now, i guess, in geometry nodes, if you want to do an array, you should use setup below, but it provides non constant step.

(Of course we are talking about several curved splines in a curve, not just a straight line in this task)

enter image description here

Simple setup, that I'm using: enter image description here

$\endgroup$

2 Answers 2

3
$\begingroup$

Curve to Points and Resample Curve nodes at Length mode will round the provided value down so there's no small piece of curve left at the end. From the user manual:

Length: Sample each spline by splitting it into segments with specified length. The length will be rounded down so that a whole number of samples will fit in each input spline. To counteract jumping when the length of the spline changes, the Trim Curve node can be used with a multiple of this length.

Here's a setup where you can get the Curve Length, Divide that by the desired length (the length of your instances) and Round down the result to see how many instances would fit the curve we have. Then you Trim Curve to the exact length before resampling it:

enter image description here

This should work, but it seems to fail at some particular values. I'm not sure why that is—if I'm missing something or if it's a bug:

Using a Subdivide Curve instead of Curve to Mesh or Resample Curve seems to work without any hitches, if that suits you:

enter image description here

$\endgroup$
8
  • $\begingroup$ I didn't get it: why are the cubes scaling on your example? $\endgroup$
    – Bicukow
    Feb 3, 2023 at 10:03
  • $\begingroup$ and it's also not working.. sorry, but thanks for your attention $\endgroup$
    – Bicukow
    Feb 3, 2023 at 10:08
  • $\begingroup$ @Bicukow Because I'm using the dividing value to also size the cubes, if you simply move the endpoint of the curve to lengthen it, cubes won't scale. I'll change the gif when I find the time if that's confusing. $\endgroup$
    – Kuboå
    Feb 3, 2023 at 10:09
  • $\begingroup$ @Bicukow What do you mean by "not working"? $\endgroup$
    – Kuboå
    Feb 3, 2023 at 10:10
  • $\begingroup$ I mean it's not working like on my first gif $\endgroup$
    – Bicukow
    Feb 3, 2023 at 10:14
1
$\begingroup$

enter image description here

Using Simple Mesh Line node with Sample Curve node, due to specific behavior of Mesh Line Node we are able to "create" instances with constant step

enter image description here

So we need just to Sample Position from that Mesh Line and Set those Position to the original Curve

enter image description here

Also working with many curves thanks to All Curves Radio button on the Sample Curve NOde enter image description here

$\endgroup$
1
  • $\begingroup$ Hi Bicukow, can you share the node setup for this please, the above one is not working, or the blend file if you will $\endgroup$ Aug 15, 2023 at 7:50

You must log in to answer this question.

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