<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AGSGeometryEngine cutGeometry:withCutter locks CPU at 100% in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine-cutgeometry-withcutter-locks-cpu/m-p/651468#M5818</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried that, and unfortunately it does not seem to have any effect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Oct 2014 19:43:04 GMT</pubDate>
    <dc:creator>KevinBupp</dc:creator>
    <dc:date>2014-10-21T19:43:04Z</dc:date>
    <item>
      <title>AGSGeometryEngine cutGeometry:withCutter locks CPU at 100%</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine-cutgeometry-withcutter-locks-cpu/m-p/651465#M5815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a tool that allows a user to draw a polyline that is then used to cut a polygon.&amp;nbsp; I am currently using this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1413583167673848 jive_text_macro" jivemacro_uid="_1413583167673848" modifiedtitle="true"&gt;
&lt;P&gt;AGSMutablePolygon* polygon = [myPolygonGraphic.geometry mutableCopy];&lt;/P&gt;
&lt;P&gt;AGSMutablePolyline* cutline = [(AGSMutablePolyline*)self.mapView.sketchLayer.geometry mutableCopy];&lt;/P&gt;
&lt;P&gt;NSArray* cutResults = [[AGSGeometryEngine defaultGeometryEngine] cutGeometry:polygon withCutter:cutLine];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a majority of the polylines that I draw this works perfectly fine .. however, about 75% of the time, when I create a polyline that is similar to the letter Z, the application freezes on the cutGeometry:withCutter: call locking the CPU at 100% on the main thread.&amp;nbsp; It doesn't seem to matter which part(s) of the Z intersect the polygon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Profiling the app in Instruments shows that the application is doing some heavy processing in the following methods:&lt;/P&gt;&lt;P&gt;Esri_runtimecore::Geometry::Topo_graph::update_chain_area_and_perimeter_(long long)&lt;/P&gt;&lt;P&gt;-&amp;gt; Esri_runtimecore::Geometry::Math_utils:Kahan_summator::add(double)&lt;/P&gt;&lt;P&gt;-&amp;gt; Esri_runtimecore::Geometry::Attribute_stream_of_dbl::read_point_2D(long long) const&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried using non-mutable copies of the geometry as well ... no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So am I missing something here? is there some reason my code is failing or is it just an internal esri runtime bug? (infinite loop?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there another method out there that I can use to cut the polygon (that will work in a disconnected state)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2014 22:13:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine-cutgeometry-withcutter-locks-cpu/m-p/651465#M5815</guid>
      <dc:creator>KevinBupp</dc:creator>
      <dc:date>2014-10-17T22:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: AGSGeometryEngine cutGeometry:withCutter locks CPU at 100%</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine-cutgeometry-withcutter-locks-cpu/m-p/651466#M5816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the similar code to cut polygon or line and it all worked fine including the Z cutter. The only code difference is that I used AGSPolyline for the cutter instead of AGSMutablePolyline. Try this and see if it makes any difference:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt;AGSPolyline* cutline = (AGSPolyline*)self.mapView.sketchLayer.geometry;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt;Shimin&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 01:13:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine-cutgeometry-withcutter-locks-cpu/m-p/651466#M5816</guid>
      <dc:creator>ShiminCai</dc:creator>
      <dc:date>2014-10-20T01:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: AGSGeometryEngine cutGeometry:withCutter locks CPU at 100%</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine-cutgeometry-withcutter-locks-cpu/m-p/651467#M5817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kevin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try and isolate the problem in a small project? If possible, try and keep the sketch layer out of it and instead hardcode a geometry that you've seen cause the problem. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 18:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine-cutgeometry-withcutter-locks-cpu/m-p/651467#M5817</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2014-10-21T18:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: AGSGeometryEngine cutGeometry:withCutter locks CPU at 100%</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine-cutgeometry-withcutter-locks-cpu/m-p/651468#M5818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried that, and unfortunately it does not seem to have any effect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 19:43:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine-cutgeometry-withcutter-locks-cpu/m-p/651468#M5818</guid>
      <dc:creator>KevinBupp</dc:creator>
      <dc:date>2014-10-21T19:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: AGSGeometryEngine cutGeometry:withCutter locks CPU at 100%</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine-cutgeometry-withcutter-locks-cpu/m-p/651469#M5819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I haven't gone as far as creating a simple project to isolate the issue ... but I was able to print out the geometry information for both the polygon and the cutter polyline before the application froze:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: 'Verdana','sans-serif';"&gt;Polygon (wkid: 3857): &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: 'Verdana','sans-serif';"&gt;Ring 0: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: 'Verdana','sans-serif';"&gt;(-9945872.290500, 3557729.840000) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: 'Verdana','sans-serif';"&gt;(-9945416.665400, 3557715.408400) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: 'Verdana','sans-serif';"&gt;(-9945662.002000, 3557181.440500) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: 'Verdana','sans-serif';"&gt;Cutter (wkid: 102100): &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: 'Verdana','sans-serif';"&gt;Path 0: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: 'Verdana','sans-serif';"&gt;(-9945874.788078, 3557560.893746) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: 'Verdana','sans-serif';"&gt;(-9945353.250412, 3557550.928058) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: 'Verdana','sans-serif';"&gt;(-9945702.049488, 3557082.540727) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: 'Verdana','sans-serif';"&gt;(-9945366.537996, 3557139.012959)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 19:46:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine-cutgeometry-withcutter-locks-cpu/m-p/651469#M5819</guid>
      <dc:creator>KevinBupp</dc:creator>
      <dc:date>2014-10-21T19:46:09Z</dc:date>
    </item>
  </channel>
</rss>

