NaN result when optimizing geometry location with Topo

When I try to prepare a simple optimization of a point location, projecting on the toposurface, it failed in generating the length result and preview images. I have tried “first item” and “round” to make sure the only single result with less number digits.

But when I try to replace the “baseGeometry” with a XY plane, Generative Design could generate the result. So I am wondering whether polysurface is not recommended for optimisation.

You need to remember the geometry element (right after the Springs.Mesh.ToPolysurface) to get results; otherwise the Dynamo instances (which are Dynamo sandbox instances, not Dynamo for Revit ones) will not be able to see the host element.

Thanks @JacobSmall

Now I can see the host geometry preview. However, the length data (List.FirstItem *) still fails to be retrieved.

Can you post an image of your graph instead of the GD results?

The output of the data.remember needs to be wired into the Point.Project node where the polysurface previously went in.

If you open your graph in Dynamo sandbox you’ll see the graph as Dynamo Sandbox does, and the issue should become clear.