generative modeling for Rhino
Tags: E+, notation, number, scientific, view
Does anyone know if there is a connection between the 'absolute tolerance' setting in 'Units' dialogue box in Rhino and the point that GH converts the number to scientific notation.
Thank you in advance for any information that might help me.
Stan

Nope, it's a constant defined inside Grasshopper. I'll put it into the settings xml file so you can change it, though I doubt I'll make a UI for it.
Starting from the next version, you'll be able to adjust the thresholds for scientific notation formatting in the grasshopper_kernel.xml file inside the Grasshopper Settings folder (accessible via the Grasshopper menu). If you do change this file, do so while Grasshopper is not running as the file gets overwritten on Rhino shutdown.
These are the values you can change:
<item name="Format:ScientificNotation_Lower" type_name="gh_double" type_code="6">0.001</item>
<item name="Format:ScientificNotation_Upper" type_name="gh_double" type_code="6">10000</item>
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hello David,
Thank you for the feed back. The ability to adjust the threshold will be a welcome addition, although changing constants in code is a bit scary.
In the meantime, can you think of an alternate method to avoid the undesirable scientific notation rounding challenge?
Thank you for all your hard work. GH is an amazing tool. I am so happy it came along during my lifetime. It allows me to get the edge on my competition.
Stan

Nope, at present the formatting is hard-coded, you can't change it.
And relax, you're not changing 'code'. It's just xml. And you can always rip out the entire line to revert to default, or even delete the entire xml file.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
I did figure one way to work around the scientific notation issue. I offer it here in case it might help someone in the future. I was originally working on a coordinate system dictated by my client. The project location was a very far distance from the 0,0,0. Therefore, all my point coordinates were 7 or 8 digit numbers which was the reason the scientific notation kicked in. As a work around, I moved my model closer to 0,0,0 and will translate to owner coordinates when needed. Can it be that simple???? Yes it can... At least it was for me this time.
It never fails, I learn something every single day.
Permalink Reply by Daniel Kautz on February 26, 2012 at 12:38am Hi David,
This XML fix works perfectly, thank you!
I encountered the limits of scientific notation for the first time in grasshopper as a result of trying to work with WGS84 decimal coordinates and GIS data.
Would you consider adding a UI control for the upper and lower limits? Perhaps within the right-click menu for the numbers components? Or does this cause problems elsewhere?
© 2012 Created by Scott Davidson.
Powered by