Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: RB2300 on November 04, 2021, 05:39:16 AM

Title: XSplineMatID && XSplineNextMatID
Post by: RB2300 on November 04, 2021, 05:39:16 AM
Hello guys please,

I would like to generate on the spline object that consist of "Corner", "Mid section" and "End".
Unfortunately it doesnt work.

Here is test.max 2016. With almost working solution, but first section doesnt work and I dont know why.

### Spline ID
id 1 = empty
id 2 = some another test object just for testing purpose
id 3 = object that should be generated (3x parts "start, middle section, end section" but one of the section doesnt work and I dont know why)

--- Here is condition for ID 3 that should generate 3x parts but it somehow doesnt work----

return
if (XSplineMatID != 3 &&  XSplineNextMatID == 3, 2,
if (XSplineMatID == 3 &&  XSplineNextMatID == 3, 3,
if (XSplineMatID == 3 &&  XSplineNextMatID != 3, 4,
1)));
Title: Re: XSplineMatID && XSplineNextMatID
Post by: RB2300 on November 04, 2021, 08:25:04 AM
I found some handicap solution :D but there is another problem, I dont know how to do it and restrict start and end that is not going to repeat it, just once and then load middle section as a second repeat...... I feel bad, I have no clue :(
Title: Re: XSplineMatID && XSplineNextMatID
Post by: RB2300 on November 04, 2021, 12:35:39 PM
I found working solution, maybe someone will appreciate it.... Problem is you can not do it easily... You need to do it through this nasty way.
Best regards Pavol. Thanks everzone
Title: Re: XSplineMatID && XSplineNextMatID
Post by: Paul Roberts on November 04, 2021, 04:03:18 PM
Hi,

Thanks for the file. Unless I am misunderstanding what you need, then you might find the attached solution easier. The key here is to use the Generator's limit to material IDs options and then you can use the start/end/corner/evenly options as normal with no need for expressions.

(https://i.imgur.com/wyHyZOq.png)

I hope that helps,
Paul
Title: Re: XSplineMatID && XSplineNextMatID
Post by: RB2300 on November 05, 2021, 03:19:29 AM
Ohhh you are right, it works ......
I didnt know about this MaterialID that works for these situations...  Thank you, I will use your method rather my method.

(NOTE: Sorry I didnt say why I need this. For an example you have fence or road... and you would like to rewrite part of the spline/road with different modified object "bridge or etc", then you need to use this method for rewriting part of the spline..... I didnt find any working solution expect yours and mine :D )

Thanks for your replay and insight into your alternative way how to do it...