Extract geometry from Revit. CSS difference

Hello,

I’ve encountered a problem I cannot explain.
I try to extract geometry from Revit (start/endpoint coordinates of beams/columns). When it comes to beams it’s easy:

  1. Element.GetLocation (Dynamo line)
  2. Get startpoint, endpoint (include Z offset)

But columns are a different story. First I tried:

  1. Element.GetLocation (Dynamo point).
  2. Extract X,Y from points above and take Z coord from “Top Level” and “Base Level” + (top/base offset)

Result of that approach (screenshot below) results in some Z coord shift.

(Red solids are Element.Geometry - solids from Revit elements
Grey cylinders are created based on points from steps above)

Second try, successful one:

  1. Element.GetLocation (Dynamo point) as a base point
  2. Extract X,Y,Z from points above and add “Lenght” parameter to Z coord.

Why Dynamo’s elevation is not synchronized with Revit’s elevation?