Itoo Software Forum

Author Topic: Choosing corner segment  (Read 330 times)

MO2696

  • Newbie
  • *
  • Posts: 4
Choosing corner segment
« on: January 20, 2023, 09:34:55 AM »
Good morning! I was doing a project that involves different ID numbers in the spline. Everything is fine until I have to do the corners. I would need to choose a different segment for corners dependind on the ID of the spline. Is it even possible to do it? I have tried using the material ID,  conditionals and the Xspline variables but as I am not an advanced user I don't know how to do it properly.
I have attached a drawing and a file to show my problem.
Thanks in advance!

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: Choosing corner segment
« Reply #1 on: January 20, 2023, 12:22:48 PM »
Hi,

Using the Selector Operator driven by the following expression will do the job (XSplineMatID for corners returns the ID of the segment BEFORE the corner and XSplineNextMatID ID of the segment AFTER the corner.):

return if (XSplineMatID==1 && XSplineNextMatID==1,1,if(XSplineMatID==1 && XSplineNextMatID==2,2,if(XSplineMatID==2 && XSplineNextMatID==1,3,4)));

I hope that helps.

Best regards,

MO2696

  • Newbie
  • *
  • Posts: 4
Re: Choosing corner segment
« Reply #2 on: January 20, 2023, 04:43:53 PM »
That's exactly what I needed, thank you a lot! ;D