SketchCurve.trim returns incorrect object collection
The attachment shows a portion of add-in code and some debug printout to illustrate the problem.
The sketch includes a profile made up of several curves, lines and splines. One of these curves is a sketchArc that intersects the profile dividing it into two, and to simplify, this curve is trimmed to remove the portion interior to the profile. The printout following "edges" shows the x,y coordinates of the curve before the trim. The Trim method returns a collection of two sketch arcs. The printout following the "after trim collection count" label shows the x,y coordinates found in the objectCollection as item[0] and item[1], returned by the trim function. This looks OK so far
The printout following the "projecting" label shows all the start and endpoint geometry for the SketchArc type curves in the profile. Note that the item[0] curve from the objectCollection returned by the trim method is duplicated in this output, and the item[1] curve is missing.
I believe this is a bug.
Fusion 360, 2.0.6670
VSCode
Version: 1.40.1
Commit: 8795a9889db74563ddd43eb0a897a2384129a619
Date: 2019-11-13T16:47:44.719Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 17.7.0
Model Name: iMac
Model Identifier: iMac14,1
Processor Name: Intel Core i5
Processor Speed: 2.7 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 4 MB
Memory: 8 GB
Boot ROM Version: 133.0.0.0.0
SMC Version (system): 2.14f24
Serial Number (system): C02NK54WF8J2
Hardware UUID: 03489683-BA29-50C1-AB02-59D8C7007C28