Contour component - wrong contours

I am trying to generate “parallel” points along the boundary of a geometry starting from a specific side.
Image below for reference.

The “Dir” is the direction of contour. Blue blob is the z-oriented plane on one side of the rectangle with its normal pointing in the “Dir” direction. In this case, for the first intersection, it generates a point at the bottom but not at the top.

The problem happens at the first intersection only. Sometimes the intersection only generates one point instead of one on each side. I am using orthogonally oriented rectangles only. Happens only to a few rectangles not all.

Any help is appreciated. Thanks!