Itoo Software Forum

Author Topic: Sequence or Compose from Digits of input number  (Read 286 times)

Dragan

  • Sr. Member
  • ****
  • Posts: 316
Sequence or Compose from Digits of input number
« 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?


« Last Edit: February 12, 2019, 08:08:26 PM by Dragan »

Dragan

  • Sr. Member
  • ****
  • Posts: 316
Re: Sequence or Compose from Digits of input number
« Reply #1 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`

« Last Edit: February 12, 2019, 10:59:11 PM by Dragan »

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1918
    • iToo
Re: Sequence or Compose from Digits of input number
« Reply #2 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.

Rokas
iToo Software

Dragan

  • Sr. Member
  • ****
  • Posts: 316
Re: Sequence or Compose from Digits of input number
« Reply #3 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

Dragan

  • Sr. Member
  • ****
  • Posts: 316
Re: Sequence or Compose from Digits of input number
« Reply #4 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



Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1918
    • iToo
Re: Sequence or Compose from Digits of input number
« Reply #5 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.
Rokas
iToo Software

Dragan

  • Sr. Member
  • ****
  • Posts: 316
Re: Sequence or Compose from Digits of input number
« Reply #6 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!

 
« Last Edit: February 13, 2019, 08:50:07 AM by Dragan »