Itoo Software Forum

Author Topic: Material ID Limit  (Read 1789 times)

arch3d

  • Sr. Member
  • ****
  • Posts: 281
    • arch3d.pl
Material ID Limit
« on: August 10, 2016, 09:46:44 AM »
Hi, all

"To set a generator to use only spline segments with a designated material ID
With the L1S generator selected, go to Properties>Limits and turn on Material Id.
Designate a Material ID Value. From the drop down list identify whether a segment is used by being either equal, lesser, greater, on not equal to this value."

Is it possible to get "from--->to" value (e.g. 3,4,5....20)

Exported parameter doesnt work for me

Thanks

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Material ID Limit
« Reply #1 on: August 10, 2016, 02:20:31 PM »
Hi,

Thanks for contacting us. At the moment RailClone's Generator Limit by material ID feature doesn't work with a range or list of IDs. This is already on our wishlist to implement.

Until then you can get around this limitation using Conditional operators and turning on/off segments based on IDs. To create a From --> To condition you would wire two together like this:



In this example I've exported the range start and end values so that they're easy to edit from the modify panel. I've attached a sample file, if you have any questions about this please just let me know.

Many thanks!

Paul
Paul Roberts
iToo Software

arch3d

  • Sr. Member
  • ****
  • Posts: 281
    • arch3d.pl
Re: Material ID Limit
« Reply #2 on: August 10, 2016, 02:49:32 PM »
Thank you very much

I got second problem. I know you can help
I got spline with four IDs
I would like to control height of the element using param  1 for ID 1 and 2 for ID 2 ...x for IDx


Please find attached screen

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Material ID Limit
« Reply #3 on: August 10, 2016, 04:10:34 PM »
No problem at all.

You should be able to do this using and expression and some nested If statements. First wire the heights in order to a new Arithmetic node, like this:



Then select the Arithmetic node and change the mode to expression. To create an if statement you use this syntax

if(x=y,value returned if true, value returned if false)

So to test for a material ID, you would use...

(XSplineMatID=1,Input1,0)

By nesting many if statements together you can create as many possible outcomes as you need, for example, here's a group of nested if statements to detect 6 materials IDs and return the values wired to the corresponding inputs:

if(XSplineMatID=1,Input1,
if(XSplineMatID=2,Input2,
if(XSplineMatID=3,Input3,
if(XSplineMatID=4,Input4,
if(XSplineMatID=5,Input5,
if(XSplineMatID=6,Input6,0
))))))



I've attached a sample file that combines this with the limiting nodes shown in the other post. I hope that helps.

Many thanks!

Paul

Paul Roberts
iToo Software

arch3d

  • Sr. Member
  • ****
  • Posts: 281
    • arch3d.pl
Re: Material ID Limit
« Reply #4 on: August 10, 2016, 05:12:06 PM »
Thanks,
Ill check it. I was trying to solve it using 2d arrays and empty object with fixed height as a controller. But your way is much more simple:)
« Last Edit: August 10, 2016, 05:14:17 PM by arch3d »

arch3d

  • Sr. Member
  • ****
  • Posts: 281
    • arch3d.pl
Re: Material ID Limit
« Reply #5 on: August 24, 2016, 07:22:24 AM »
Paul,
Dead end again:)
I try to reach two effects:
1.Add expression to change material depend on spline ID (id changing for n*2+1 element) So i would have same material on 1,3,5,7....ID;
2.I got problem to fit default and side panels;
3.For inner corner use different compose if corner angle is grater than defined angle;

File is attached

Thank you for help
« Last Edit: August 24, 2016, 07:35:09 AM by arch3d »

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Material ID Limit
« Reply #6 on: August 24, 2016, 04:47:34 PM »
Hi!

That was a tricky one! But I think I have a solution :)



Please take a look at the attached file for a possible solution. There are a couple of reasons why this is difficult, the main one being that Row height calculations are always based on the tallest segment, even when they're on disconnected splines, so the A2S generator doesn't work well for this because it's very hard to get the rows to align correctly when different heights are used. To solve this I've split the window into 3 L1S generators, one each for the bottom, middle and top.

To solve the Material question I've ditched the Conditional operators (the test conditions for these cannot be updated dynamically) and instead I'm controlling the Material node directly with the expression, like this:



I hope that this helps out but it's a complex style so please let me know if you have any questions.

Cheers!

Paul
« Last Edit: August 24, 2016, 04:51:49 PM by Paul Roberts »
Paul Roberts
iToo Software

arch3d

  • Sr. Member
  • ****
  • Posts: 281
    • arch3d.pl
Re: Material ID Limit
« Reply #7 on: August 24, 2016, 06:00:31 PM »
Paul
Thanks for sollution!
I thing i find out different way.
I just use separate A2S for each opening type with different  fixed Y size as shown on screen.
I have to duplicate them for different ID (because lack of A2S limitation from-->to :) )
In this way i can easy (i think:P) add some horizontal divisions
 
Michal

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Material ID Limit
« Reply #8 on: August 24, 2016, 07:15:05 PM »
That sounds good too! Nice solution and actually even though there are more generators the graph looks simpler.

Cheers!

Paul
Paul Roberts
iToo Software

CO2158

  • Newbie
  • *
  • Posts: 3
Re: Material ID Limit
« Reply #9 on: December 02, 2021, 07:32:32 PM »
Hi, is this still valid as a solution in 2021? I cannot seem to be able to get it to work. I have simple wall (a box) and I want its height to change according to the spline material id. (eg matID1 = 45cm, matID2 = 60cm etc)

This is what I am using:
if(XSplineMatID==1,Input1,
if(XSplineMatID==2,Input2,
if(XSplineMatID==3,Input3,
if(XSplineMatID==4,Input4,
if(XSplineMatID==5,Input5,
if(XSplineMatID==6,Input6,0
))))));

Is there another way to do this?