christophwaibel / GH_Solar_V2

Solar irradiation model plug-in for Rhinoceros Grasshopper. Version 2.
GNU General Public License v3.0
5 stars 0 forks source link

writing-data-into-grasshopper #32

Open christophwaibel opened 4 years ago

christophwaibel commented 4 years ago

when writing lots of numbers into rhino grasshopper, it always converts it into GH_Numbers? According to Long Nguyen, if this is done explicitly, it should save tons of time:

private void RunScript(object x, object y, ref object A)
  {
    Mesh myMesh = (Mesh) x;
    GH_Mesh ghMesh = new GH_Mesh(myMesh); // saves time if explicitly converted before!
    GH_Point ghPoint = new GH_Point(new Point3d(0.0, 0.0, 0.0)); // same here... faster if done explicitly
    A = ghMesh;
  }
christophwaibel commented 4 years ago

https://github.com/christophwaibel/GH_Wind/issues/12#issue-640448815 https://github.com/architecture-building-systems/hive/issues/273#issuecomment-645371949

GH_Numbers slower than custom param by a factor >100