Itoo Software Forum

Author Topic: Starting a XSplinePosition at the beginning of a segment (or equivalent)  (Read 171 times)

Anthony Lester

  • Newbie
  • *
  • Posts: 24
I am trying to set up a RC where the handrail of a bridge gradually grows over the length of a segment then maintains a height for another segment, then drops back to the original height over the length of the next segment.

Using an series of condition statements for segment ID's I am able to split up the spline, then I have used the expression: return ((XSplinePosition)*50)+100; to take the geometry z scale from 100 to 150 over the course of a specific segment id (I would use an inverse of the XSpline position to take it back down again.  The problem is the XSplinePosition is generated using the entire length of the spline not the individual segment, is there away of making the XSplineposition 'counter' start at the beginning of the segment and not the spline as a whole?

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1396
Re: Starting a XSplinePosition at the beginning of a segment (or equivalent)
« Reply #1 on: October 09, 2017, 12:26:56 PM »
Hi Anthony,

The XSectionPosition attribute can be used for these purposes. Hope that helps.

Best regards,

Anthony Lester

  • Newbie
  • *
  • Posts: 24
Re: Starting a XSplinePosition at the beginning of a segment (or equivalent)
« Reply #2 on: October 09, 2017, 01:44:29 PM »
so it does :)

thanks

Anthony Lester

  • Newbie
  • *
  • Posts: 24
Re: Starting a XSplinePosition at the beginning of a segment (or equivalent)
« Reply #3 on: October 09, 2017, 05:27:50 PM »
So as a follow up to the original question, the XsectionPosition attribute works fine, but when I introduce a distribute evenly rule the Section length is restarted at every iteration of the evenly distributed geometry, is there a work around?