BEAM ORDERING NOT BASED ON THE COORDINATES BUT SEQUENCE OF DRAWING.

BEAM ORDERING NOT BASED ON THE COORDINATES BUT SEQUENCE OF DRAWING.

AGYEMANG.OFOSU
Advocate Advocate
234 Views
0 Replies
Message 1 of 1

BEAM ORDERING NOT BASED ON THE COORDINATES BUT SEQUENCE OF DRAWING.

AGYEMANG.OFOSU
Advocate
Advocate

I am trying to assign Marks to beam. The code works but my only issue is even though the code seeks to order based on the points, the numbering is not consistent. The marks are based on the order they were created. 

 foreach(Element beam in beams)
            {
                if( beamgeometry.IsBeamHorizontal(beam))
                horizontalbeams.Add(beam, beamgeometry.GetHorizontalBeamCurve(beam));
            }
            var hbeams = horizontalbeams.OrderBy(curve => curve.Value.Evaluate(0.5, false).Y).
                ThenBy(curve => curve.Value.Evaluate(0.5, false).X);

            return hbeams.ToDictionary(element=>element.Key,curve=>curve.Value).Keys.ToList();
0 Likes
235 Views
0 Replies
Replies (0)