Itoo Software Forum

Author Topic: X Evenly distance problem  (Read 15347 times)

Joker1979

  • Jr. Member
  • **
  • Posts: 71
X Evenly distance problem
« on: July 18, 2024, 10:46:20 pm »
I have a serious problem, I would like to use x evenly, but when I add an object to the corner each time, the distance is never equal or it overlaps the next elements. Is it possible to make x evenly adapt somehow along with other basic elements, because this is not the first time I am creating a building and I would like to use xevenly, but each time it is such a problem that I give up on it and I have to deal with it in some other way.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 3061
Re: X Evenly distance problem
« Reply #1 on: July 19, 2024, 01:44:10 pm »
Hi,

Thanks for the question. At present, evenly distances don't take into consideration the size of segments in the start/end/marker/corner inputs. This is something we're planning to look into in future, but until then, there is a workaround that involves nesting segments. Here's how I'd adapt your styles.

1 . Add a linear generator and wire the Bottom segment to the L1S' Default Input and the Evenly to the Evenly input. Disconnect them from the A2S array
2. Wire the L1S array to the A2S array's bottom input.
3. Export the L1S array's X Size parameter. wire it to Arithmetic node and change the mode to expression.
4. Open the Expression editor and use the following code.

return Array_2S1.XSectionAdjustedLength;

You may need to change Array_2S1 to the name of your A2S generator if it is different from this.

the XSectionAdjustedLength variable is useful because it returns the current section of spline with the sizes of the start/end/marker/corner segments deducted. In essence we have created a 1D array that perfectly fits that length.

5. Make any adjustments to evenly spacing etc in the L1S array's setting.



I've attached a modified version of your sample file to illustrate how this works. Note that here I used an L1S array, you could equally easily nest an A2S array and use the same technique.

I hope that helps,

Paul
« Last Edit: July 19, 2024, 01:49:24 pm by Paul Roberts »
Paul Roberts
iToo Software

Joker1979

  • Jr. Member
  • **
  • Posts: 71
Re: X Evenly distance problem
« Reply #2 on: July 19, 2024, 01:56:20 pm »
THANKS PAUL FOR QUICK SOLUTION :) Have a nice weekend.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 3061
Re: X Evenly distance problem
« Reply #3 on: July 19, 2024, 01:57:23 pm »
You're very welcome - have a good weekend too!
Paul Roberts
iToo Software

Joker1979

  • Jr. Member
  • **
  • Posts: 71
Re: X Evenly distance problem
« Reply #4 on: July 19, 2024, 02:01:50 pm »
Thanks :)