algorithmic modeling for Rhino
I'm not entirely sure how to best summarize, as I'm unsure of the efficiency of my approach so far, but ultimately I'm trying to take a numerical variable (from the number slider preferably) and add leading zeros to it, outputting a final form such as 001, 002, 003, etc.
I've run into the issue of my output, when using a number slider, returning values such as 001.0, 002.0, 003.0, etc due to the output of the number slider being in the decimal form x.0.
As I'm typing this, I realize I am going to have to refine my approach because a value of 010 would break the functionality of my current thinking, but the issue of removing the decimal and zero would remain.
My goal is to have the panel which reads 002.0 read 002
Any help would be appreciated.
Tags:
Hi Zack, what would be the wanted output if your input is 10 or more? Should that result in 010 or 0010? Or are your input values allway smaller than 10?
It would need to be 010. As 100 would need to be 100, not 00100.
I realized as I was posting this that even solving the integer problem wound't bring me to the final solution for my definition.
My list of potential input values will most certainly exceed 10.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by