I'm trying to split a polygon by multipart polyline (created from multiple polylines with GeometryEngine.Union) using GeometryEngine.Cut method expecting multiple (more than 2) geometries as the result. But I get empty collection... In ArcObjects I can do this easily with ITopologicalOperator4.Cut2 method.
Test data is attached – Data.gdb.zip. If you execute this code you'll get an empty collection as the result of GeometryEngine.Cut method.
<SPAN class="keyword token">using</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">var</SPAN> geodatabase <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Geodatabase</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Data.gdb"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">// Construct unified line to cut by</SPAN>
<SPAN class="keyword token">var</SPAN> lines <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">List</SPAN><SPAN class="operator token"><</SPAN>Polyline<SPAN class="operator token">></SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">using</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">var</SPAN> linesFeatureClass <SPAN class="operator token">=</SPAN> geodatabase<SPAN class="punctuation token">.</SPAN>OpenDataset<SPAN class="operator token"><</SPAN>FeatureClass<SPAN class="operator token">></SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Lines"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">using</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">var</SPAN> linesCursor <SPAN class="operator token">=</SPAN> linesFeatureClass<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Search</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">while</SPAN> <SPAN class="punctuation token">(</SPAN>linesCursor<SPAN class="punctuation token">.</SPAN><SPAN class="token function">MoveNext</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">var</SPAN> polyline <SPAN class="operator token">=</SPAN> GeometryEngine<SPAN class="punctuation token">.</SPAN><SPAN class="token function">SimplifyAsFeature</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN>Feature<SPAN class="punctuation token">)</SPAN>linesCursor<SPAN class="punctuation token">.</SPAN>Current<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetShape</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">as</SPAN> Polyline<SPAN class="punctuation token">;</SPAN>
lines<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Add</SPAN><SPAN class="punctuation token">(</SPAN>polyline<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">var</SPAN> unifiedLine <SPAN class="operator token">=</SPAN> GeometryEngine<SPAN class="punctuation token">.</SPAN><SPAN class="token function">SimplifyAsFeature</SPAN><SPAN class="punctuation token">(</SPAN>GeometryEngine<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Union</SPAN><SPAN class="punctuation token">(</SPAN>lines<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">as</SPAN> Polyline<SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// Get polygon to be cut</SPAN>
Polygon polygon <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">using</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">var</SPAN> polygonsFeatureClass <SPAN class="operator token">=</SPAN> geodatabase<SPAN class="punctuation token">.</SPAN>OpenDataset<SPAN class="operator token"><</SPAN>FeatureClass<SPAN class="operator token">></SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Building_pol"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">using</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">var</SPAN> polygonCursor <SPAN class="operator token">=</SPAN> polygonsFeatureClass<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Search</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">while</SPAN> <SPAN class="punctuation token">(</SPAN>polygonCursor<SPAN class="punctuation token">.</SPAN><SPAN class="token function">MoveNext</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
polygon <SPAN class="operator token">=</SPAN> GeometryEngine<SPAN class="punctuation token">.</SPAN><SPAN class="token function">SimplifyAsFeature</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN>Feature<SPAN class="punctuation token">)</SPAN>polygonCursor<SPAN class="punctuation token">.</SPAN>Current<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetShape</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">as</SPAN> Polygon<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">break</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="comment token">// Cut polygon by unified line</SPAN>
<SPAN class="keyword token">var</SPAN> parts <SPAN class="operator token">=</SPAN> GeometryEngine<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Cut</SPAN><SPAN class="punctuation token">(</SPAN>polygon<SPAN class="punctuation token">,</SPAN> unifiedLine<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">// parts will be empty collection</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Input data:

Expected result:
