Where did the formula node go?

Hello! I was watching a tutorial on YouTube about Dynamo where the person was using Formula node which surprisingly I couldn’t find on my Dynamo
He was using a bit older ver

image

Removed in 2.0 if memory serves. If I recall the usage was astoundingly low and there were alternative methods for most uses. Would be easier to find a work-around if we had a link to the video and the timestamp of when it was used.

Formula node was technically removed in Dynamo 3.0 as it uses an unsupported assembly in the .NET8 world.

However, it was an unpopular node over the past handful of years comparative to simply using a Code Block, which we suggest is the alternative path forward :slight_smile:

3 is too near 2… Logging a feature request to add space between keys on my keyboard. :laughing:

3 Likes

the problem with code block is that I can’t use the lacing on it unlike the formula

In a Code Block you can apply Replication, it is the same as Lacing but has a different name.

I wrote a blog about it, it is in Dutch but there is a translation button:

Actually a good choice to remove the Formula Node. The result could differ from the Math Nodes.

This:

Has not the same result in the Formula Node:

image

The Math Nodes (which are also used in Code Blocks) work with Degrees and the Formula Node with Radians. Very confusing.

1 Like

This node utilizes the NCalc language to do the work. Sadly their documentation is quite high level - they don’t appear to indicate degrees or radians in the docs (least not that I can find).

https://ncalc.github.io/ncalc/articles/index.html

2 Likes

Should have noted that the lack of clarity on angle units is t unique to NCalc.

What is the unit of measure for this AutoCAD API call? Help

Compare that with the Revit API documentation here, which spells out Radians in the angle input’s description: Rotate Method

It is in any professional programming language common to use radians, so it is obvious why it is not mentioned. It is Dynamo that does not respect this usage :slight_smile: All nodes in my package follow the Dynamo behavior, while it was a bit weird for me as programmer, but it has advantages for users.

But because the result of a Formula Node differs from the Math Nodes, it can be highly confusing for Dynamo users. So I’m glad the node was removed. Also because a Code Block is as useful and more as a Formula Node.

Code Block and I are BFF :yum:

2 Likes

Correct, but remember Dynamo aims at opening the door to more end users rather than developers, and end users (and sane individuals) specify angles in degrees. Other languages which aim for end users (OpenGL as one example) and which aim primarily for geometry (see any CAD engine) tend to utilize degrees as that is what end users expect. Similarly if you open the calculator on your phone and take the sin of a number it assumes you’re in degrees. Plus it’s hard to specify that you want to rotate by 0,349066 as no one is gonna remember all those extra digits, but 20 degrees is rather attainable… and so it’s best to indicate the units in the documentation. :slight_smile:

That said I absolutely agree that switching between Degrees and Radians is a PITA and makes changing systems harder… every time I jump between Revit, AutoCAD and Dynamo APIs and have to deal with an angle I get the units wrong, and this happens often enough in Python that you’d think I would learn by now…

4 Likes

As a surveyor I’ve worked for decades with gradians, 400 degrees in a full circle instead of 360. I am really happy nobody uses that anymore. At least, not that I am aware of.

1 Like

There is a unit I have not heard in a long time… so long I had forgotten it.

If anyone needs me I will be trying to forget it once again. The world (and my mental state) are better off with this not even existing in the history books… :rofl:

3 Likes