C# Converter -> points.ConvertAll(new Converter<Point3f, Point3d>( ? ) ); - Grasshopper2024-03-29T07:24:10Zhttps://www.grasshopper3d.com/forum/topics/points-convertall-new-converter-point3f-point3d?commentId=2985220%3AComment%3A1595098&feed=yes&xn_auth=noNow a days it is probably pre…tag:www.grasshopper3d.com,2016-09-09:2985220:Comment:15968372016-09-09T21:25:10.687ZVicente Solerhttps://www.grasshopper3d.com/profile/VicenteSoler
<p>Now a days it is probably preferred to use the select LINQ extension method:</p>
<p></p>
<p>var doublePrecisionPoints = singlePrecisionPoints.Select(p => new Point3d(p.X, p.Y, p.Z));</p>
<p></p>
<p>Now a days it is probably preferred to use the select LINQ extension method:</p>
<p></p>
<p>var doublePrecisionPoints = singlePrecisionPoints.Select(p => new Point3d(p.X, p.Y, p.Z));</p>
<p></p> Nice thanks:)tag:www.grasshopper3d.com,2016-09-07:2985220:Comment:15951732016-09-07T09:28:55.903ZTomas Vinkeviciushttps://www.grasshopper3d.com/profile/TomasVinkevicius
<p>Nice thanks:)</p>
<p>Nice thanks:)</p> I think you have to write a m…tag:www.grasshopper3d.com,2016-09-07:2985220:Comment:15950982016-09-07T09:26:55.718ZDavid Ruttenhttps://www.grasshopper3d.com/profile/DavidRutten
<p>I think you have to write a method that you pass in as a delegate. You probably can't use anonymous methods in the C# editor.</p>
<p></p>
<p><span>List<Point3d> pts = points.ConvertAll(Convert3fTo3d</span><span>);</span></p>
<p>...</p>
<p></p>
<p>/// additional code</p>
<p>private Point3d Convert3fTo3d(Point3f point)</p>
<p>{</p>
<p> return new Point3d(point.X, point.Y, point.Z);</p>
<p>}</p>
<p>I think you have to write a method that you pass in as a delegate. You probably can't use anonymous methods in the C# editor.</p>
<p></p>
<p><span>List<Point3d> pts = points.ConvertAll(Convert3fTo3d</span><span>);</span></p>
<p>...</p>
<p></p>
<p>/// additional code</p>
<p>private Point3d Convert3fTo3d(Point3f point)</p>
<p>{</p>
<p> return new Point3d(point.X, point.Y, point.Z);</p>
<p>}</p>