Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: Dragan on February 12, 2019, 06:29:41 PM

Title: Sequence or Compose from Digits of input number
Post by: Dragan on February 12, 2019, 06:29:41 PM
Hi,
Object 1 to 9 will be some architectural elements (it will be even better if I can set more then 9...).
I need to set a sequence or compose or `anything` to make a linear sequence of elements selected from value of digits of input parameter.
eg. Input parameter is number: 316452112
So, my elements should be picked from selector in order: 3rd then 1st then 6th, 4th, 5th.... etc
Problem: I do not have final number of digits but I could end it with `0`
Any idea?


Title: Re: Sequence or Compose from Digits of input number
Post by: Dragan on February 12, 2019, 10:37:57 PM
progress..  ???

I manage to do with two parameters: first to set number of digits and second with `Sequence number`

Title: Re: Sequence or Compose from Digits of input number
Post by: Rokas on February 13, 2019, 07:43:39 AM
Hi.This is interesting topic.
I have been experimenting with this before as well.
I attach You a makro which converts supplied array to number digits.

(https://i.imgur.com/NDOfqfg.png)
Title: Re: Sequence or Compose from Digits of input number
Post by: Dragan on February 13, 2019, 08:10:50 AM
Great!
Now we just need to find a way to use more then 9 segments...  :D
Maybe it is time to introduce a string parameter or some `multinumber`parameter node (numbers separated with coma).

Once again, thank You for great support!!

Dragan
Title: Re: Sequence or Compose from Digits of input number
Post by: Dragan on February 13, 2019, 08:26:57 AM
well, I have idea but don`t know how to do it  :D

For more then 10 element I could use 2 digit separation...
Like:
230311020506
____________
23 03 11 02 05 06   (for selector index: 23,3,11,2,05,06)

Only problem is how to place `0` as first digit. Maybe to use decimal 0.1 23 24 02 06

Hope this make any sense or to solve this kind of `problem` via new Parameter node.

Best Regards
Dragan


Title: Re: Sequence or Compose from Digits of input number
Post by: Rokas on February 13, 2019, 08:32:06 AM
I have discarded this idea as numeric input supports not that large numbers. It is scarce amount for 1 digit number. For two digits it is not worth it. You could define 4 numbers.
Title: Re: Sequence or Compose from Digits of input number
Post by: Dragan on February 13, 2019, 08:48:35 AM
Yes, that is true..
Some sort of new Selector Operator using multiple numbers or Spline ID numbers will bi nice feature.

Thank You for the macro, works great!