algorithmic modeling for Rhino
You can look up the source code of rhinoscriptsyntax on Github (edit: direct link) or on your system. Should be on your hard drive here-ish:
C:\Users\YOURUSERNAME\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript
rs.AddPoint() is in the geometry.py namespace.
using C#:
if there's a List of type Point3d named tomas ... then for a given Point3d p simply do:
tomas,Add(p); (if p is a List: tomas.AddRange(p);)
if tomas is a Tree:
tomas.Add(p, new GH_Path(path_name)); (if p is List: tomas.AddRange(p, new GH_Path(path_name));)
if you have to add p1, p2, p3 "at once":
tomas.AddRange(new Point3d[3]{p1,p2,p3});
if you have to order tomas pts VS their distance to a point named focus:
tomas = tomas.OrderBy(x => x.DistanceTo(focus)).ToList();
etc etc
rs.AddPoint() adds a point to the current document (as given by the scriptcontext), not a list or a tree..
I have no idea about P things.
PS: You mean that Tomas needs this C#?
The equivalent in RhinoCommon would be AddPoint().
If you are doing this from a GH C# component, you already have a reference to the active doc as RhinoDocument. So, you could do this:
RhinoDocument.Objects.AddPoint(new Point3d(0,0,0));
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by