Itoo Software Forum

Author Topic: XSplineMatID && XSplineNextMatID  (Read 640 times)

RB2300

  • Newbie
  • *
  • Posts: 47
    • DEVconstruction
XSplineMatID && XSplineNextMatID
« 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)));
« Last Edit: November 04, 2021, 05:52:03 AM by RB2300 »

RB2300

  • Newbie
  • *
  • Posts: 47
    • DEVconstruction
Re: XSplineMatID && XSplineNextMatID
« Reply #1 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 :(
« Last Edit: November 04, 2021, 08:31:25 AM by RB2300 »

RB2300

  • Newbie
  • *
  • Posts: 47
    • DEVconstruction
Re: XSplineMatID && XSplineNextMatID
« Reply #2 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

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: XSplineMatID && XSplineNextMatID
« Reply #3 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.



I hope that helps,
Paul
Paul Roberts
iToo Software

RB2300

  • Newbie
  • *
  • Posts: 47
    • DEVconstruction
Re: XSplineMatID && XSplineNextMatID
« Reply #4 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...
« Last Edit: November 05, 2021, 03:22:17 AM by RB2300 »