Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: suppenhuhn on September 27, 2017, 11:24:20 AM

Title: Method to check MatID change within a Spline
Post by: suppenhuhn on September 27, 2017, 11:24:20 AM
Hi,

in my RC-Object ( Array 2S ) i got 2 Variations : Window with opening Wings ( assigned to MatID 1 ) and a fixed Frame (  assigned to MatID 2 ). Both are using Inner-Corner Elements.

Works fine as long there is a seperate spline for each MatID  ( attached Screenshot: upper / middle Spline )

But often i need to combine those 2 variations in one spline ( Screenshot: lower Spline ) so i have to check on Vertex V2 if it's a inner corner or not. Because in this case i need:


I'm sure this could be fixed with Expressions and/or Conditions ... but to be honest i have no glue which Expressions are needed :-/ Or is there a Tutorial which covers this "requirement" ?

Would be thankful for every hint:)
Title: Re: Method to check MatID change within a Spline
Post by: Michal KarmazĂ­n on September 27, 2017, 03:20:45 PM
Hi,

As mentioned here (https://forum.itoosoft.com/railclone-pro-(*)/spline-id/msg17638/#msg17638): "... to handle this kind of situations, there are two attributes: XSplineMatID & XSplineNextMatID. The XSplineMatID for Corners returns ID of segment BEFORE the corner and the XSplineNextMatID, which in case of Corners returns ID of segment AFTER the corner."

Hope that helps.

Best regards,
Title: Re: Method to check MatID change within a Spline
Post by: suppenhuhn on September 28, 2017, 10:30:18 AM
Awesome - thank you! :-)