AU registration is open, fuzzy comparison is important for real numbers, Python learning material and time for a break:
- Autodesk University 2021 Open and Free
- Real Number Comparison Requires Fuzz
- Getting Started with Python
- Vacation Time
Autodesk University 2021 Open and Free
Registration is live for Autodesk University 2021.
This year the event is a free, virtual and global conference held on October 5-14.
For more info on the conference as a whole, visit the conference page.
If you are curious what Forge is doing, please check out the web page and blog:
Real Number Comparison Requires Fuzz
On a digital computer, all real number comparisons require fuzz.
This means that you cannot compare two real numbers directly.
Instead, you test whether they are close enough together, where ‘close enough’ is defined by a given tolerance.
The tolerance depends on the context and the type of comparison being made.
Revit BIM geometry often ends up with significant imprecision due to various complex editing steps, so fuzz is especially important in this area.
This was highlighted yet again by the
recent Revit API discussion forum thread
on a weird double value supposed to be zero but isn’t:
Question: This happens after I set the beam family parameter Start Level Offset and End Level Offset to any non-zero value and then change it back to zero again:
Answer: This is due to the imprecision associated with real numbers in digital computers.
The ‘weird’ number that you see is not really weird at all.
It is just a very small number written in exponential or scientific notation.
Read about:
From your description, it was generated by adding an offset and subtracting it again.
Both of the offsets were not represented precisely, e.g., because they were converted from metric to imperial units.
The result is imprecise, almost exactly zero, but very slightly off.
That is completely normal and must be taken into account whenever dealing with real numbers of a digital computer, for instance, in many operations, e.g., comparisons, by adding some fuzz:
- Fuzzy comparison
- Fuzzy comparison versus exact arithmetic for curve intersection
- Importance of fuzz for curtain wall dimensioning
The same issue came up again right away in the discussion
on element geometry not returning expected face count.
As Rudi @Revitalizer Honke very succinctly puts it:
when comparing double values, it is necessary to add some tolerance.
Values may differ by 0.000000001, for example.
Getting Started with Python
In case you are considering learning Python, or to get started with programming in general,
freecodecamp published the ultimate guide
on getting started with Python.
For more material on Dynamo, Python, and .NET, please refer to our earlier notes on
<!–
0964:Python the Hard Way
1057:Interactive Revit Database Exploration Using the Revit Python Shell
1078:How to use Python with Revit
1143:WAV Database, Python and GUI Tutorials
1448:RevitPythonShell Dynamic Model Updater Tutorial
1452:Retrieving a C# out Argument Value in Python
1570:Determining RVT File Version Using Python
1712: Cyril’s Python HVAC Blog
1712: Rotating Elements Around Their Centre in Python
1712: Python Popularity Growing
1715:Retrieving Linked IfcZone Elements Using Python
1756: Retrieve RVT Preview Thumbnail Image with Python
1786:Pet Change – Python + Dynamo Swap Nested Family
1821:Duplicate Legend Component in Python
1821:Convert Latitude and Longitude to Metres in Python
1838: C# versus Python
1838: Python and .NET
1890: Python and Dynamo Autotag Without Overlap
1893: Learning Python and Dynamo
1893: Take Dynamo Further Using Python
0964 1057 1143 1448 1452 1570 1712 1712 1712 1715 1756 1786 1821 1821 1838 1838 1890 1893 1893
–>
- Python and Ruby Scripting Resources and the Sharp Glyph
- Interactive Revit Database Exploration with the Python Shell
- Python Tutorials
- RevitPythonShell Dynamic Model Updater Tutorial
- Retrieving a C# out Argument Value in Python
- Determining RVT File Version Using Python
- Cyril’s Python HVAC Blog
- Rotating Elements Around Their Centre in Python
- Python Popularity Growing
- Retrieving Linked IfcZone Elements Using Python
- Retrieve RVT Preview Thumbnail Image with Python
- Pet Change – Python + Dynamo Swap Nested Family
- Duplicate Legend Component in Python
- Convert Latitude and Longitude to Metres in Python
- C# versus Python
- Python and .NET
- Python and Dynamo Autotag Without Overlap
- Learning Python and Dynamo
- Take Dynamo Further Using Python
Vacation Time
I’ll be mostly offline for the coming three weeks, from July 26 until August 13, spending time in nature in different parts of Switzerland.
I wish you a happy and fruitful time until I return.




Leave a Reply