CurtainGrid.AddGridLineByPoint operation failed

I have created a graph that uses rhythm package CurtainGrid.AddGridLineByPoint to add gridlines to a curtain wall according to some logic , and I get this error which is not very usefull . Any ideas will be highly appriciated . !

I am attaching an image of the graph , the graph and a revit file (2019) with one curtain wall.

one curtain wall.rvt (1.7 MB)

CW_ADD_H_GRID.dyn (16.1 KB)

Your points are not on the surface.
image

Adding a Geometry.Translate to move the points up works for all of them except for the last one that still misses.
image

Result
image

Hi @john_pierson , first of all thanks .
1- I don’t understand how it can be off the surface as I am taking the element location (via element.GetLocation - and using PointAtSegmentLength , shouldn’t I be getting point on the surface ? should I be using some other node rather than GetLocation ?
2- How would you know how much to translate the points ? I am aiming at graphs that work in many projects/ scenarios ?
Thanks again , Jonathan

  1. The location of a wall will be it’s base line. So if your wall has a positive offset, the actual geometry of the wall will not be at those points.
  2. Geometry.ClosestPointTo + a minimal Z offset will ensure it works with most* scenarios.

* I hesitate to ever say something will work in all scenarios with Dynamo because it is so utterly unpredictable.

Ok, so a possible solution would be to add the wall base offset to the z coordinate of each point, right ?
I believe I wrote many rather than all for that reason.
Thanks

Plus a little buffer in the Z direction to make sure the point is on the surface for sure.

:grin:

This may help: https://dictionary.dynamobim.com/#/Geometry/Geometry/Action/ClosestPointTo

Helps to resolve: points not hitting after the vertical offset, points not hitting if there is a horizontal offset, difficulty finding the offset distance, a negative offset vs positive offset.

You might want to add a prune duplicates node to remove any duplicates points, and perhaps always drop the first/last endpoints as those corners may or may not need them (modification of your Python node would help there).