public override void DrawViewportWires(Grasshopper.Kernel.IGH_PreviewArgs args) { if (lpS != null) { foreach (GH_particleSystem pS in lpS) { if (pS != null) { if (pS.DVPW != null) { pS.DVPW(args); } } var x = FriedChiken.getParticles(); if (_VN) { for (int i = 0; i < FriedChiken.nParticles; i++) { args.Display.Draw2dText(i.ToString("000"), System.Drawing.Color.Red, new Rhino.Geometry.Point3d(x[i, 0] + __dist, x[i, 1], x[i, 2]), true); } } } } base.DrawViewportWires(args); }
public override void BakeGeometry(Rhino.RhinoDoc doc, Rhino.DocObjects.ObjectAttributes att, List <Guid> obj_ids) { if (lpS != null) { foreach (GH_particleSystem pS in lpS) { if (pS != null) { if (pS.BKGT != null) { pS.BKGT(doc, att, obj_ids); } } } } if (_VN) { var x = FriedChiken.getParticles(); for (int i = 0; i < FriedChiken.nParticles; i++) { Rhino.DocObjects.ObjectAttributes a2 = att.Duplicate(); a2.LayerIndex = 2; obj_ids.Add(doc.Objects.AddTextDot(new Rhino.Geometry.TextDot(i.ToString("000"), new Rhino.Geometry.Point3d(x[i, 0] + __dist, x[i, 1], x[i, 2])), a2)); } } base.BakeGeometry(doc, att, obj_ids); }