I’m encountering a precision issue when using Rhino and Grasshopper to perform unit conversions and calculations involving feet and inches.
The Problem:
When converting inches to decimal feet and then performing operations, I’m not getting the expected precision in results. Specifically:
- Example Calculation:
- Starting with:
0.083333333333333
(should represent 1 inch as a decimal of a foot) - Operation: Multiply by 2 (should result in
0.166666666666667
) - Operation: Multiply back by 12 to convert to inches (should result in exactly 2 inches)
- Starting with:
Instead, I’m getting a result close to 1.999992
rather than exactly 2
, indicating a loss of precision.
What I’ve Tried:
- Adjusting Rhino’s Document Settings:
- Went to
File > Properties > Units
- Increased
Number of Decimal Places
to 15 or more.
- Using Grasshopper:
- Used
Expression
components for precise calculation steps:x / 12
,x * 2
, andx * 12
. - Configured
Panel
components to display more decimal places for verification.
Despite these adjustments, the precision issue persists.
My Setup:
- Software Versions:
- Rhino: [Specify version, e.g., Rhino 7]
- Grasshopper:
Request:
Has anyone else experienced similar issues with precision in Rhino and Grasshopper? If so, how did you resolve them? Are there any additional settings or best practices I might be overlooking?
Thank you for your assistance!
Unit Precision Issues with Feet and Inches.gh (12.8 KB)