I am trying to cut a Polyline feature/graphic with a Polyline geometry using the geometryEngine.cut method of the ArcGIS Maps SDK for JavaScript. The problem is that the cut method splits the segments into multiple wrong fragments.
This is how the feature looks before splitting. The orange polyline is the cutter.
The cut returns three fragments
1
2
3
See that the last fragment is on both sides of the cutting polyline, which is wrong.
I am using v4.28 of JS SDK.
A reproducible Code Pen for the above is at
https://codepen.io/haseebanwar/pen/dyaebrj
In Code Pen, use the line tool (on top-left) and then draw a line on the segment to split. The split segments are logged in the console.
I suggest reaching out to Esri support if you suspect this is a bug. They will attempt to reproduce the issue independently then log a bug so the dev team can take a look at it.