algorithmic modeling for Rhino
Hello Alexander,
Sandbox has mesh topology components with indexes output.
edit. chcked the components does not seem to have what you are after right out of the box
cheers
alex
Private Sub RunScript(ByVal Msh As Mesh, ByRef A As Object)
If Msh Is Nothing Then Return
Dim N As New datatree(Of Integer)
For i as int32 = 0 To Msh.Faces.count - 1
N.addRange(Msh.Faces.AdjacentFaces(i), New gh_path(i))
Next
A = N
End Sub
ng5 Alex Thanks, it works!
I don't work in vb but i learn c# a bit, tried to translate but it doens't work (there is something wrong in addRange, propably with gh_path but I am not sure). Could you help?
private void RunScript(Mesh Msh, ref object A)
{
List<int> N = new List<int>();
for (int i = 0;i < (Msh.Faces.Count - 1);i++)
{
N.AddRange(Msh.Faces.AdjacentFaces(i), new gh_path(i));
}
A = N;
}
DataTree<int> N = new DataTree<int>();
for (int i = 0;i < (Msh.Faces.Count - 1);i++)
{
N.AddRange(Msh.Faces.AdjacentFaces(i), new GH_Path(i));
}
A = N;
already done it in c#, but thanks!
when are you old heads gonna start using the text buttons so i can translate your work without hunting for every little picture? :)
Can you give me a quick explanation on how to use the index values that come out of the F-F-angle component, matching them with the indices of the edges-midpoint component?
I don't know enough about mesh information ordering to know what I'm looking at.
I resemble that remark... I went the way of DR and jumped on the picture band wagon. It's more compact (or so the theory goes).
I've played around a bit more with all of these add-ons. I think m+ is pretty slick, but if you have faces w/ more than 4 sides it's a non-starter because of mesh limitations (until everybody starts writing components for Plankton meshes which can do n-gons).
Sandbox is the way to go to stick with BReps (but I copied the way m+ does labels).
And now to answer your questions:
OK YOU ARE GREAT!
The second half of that quick question: by which process would one then use those indices to tag those edge midpoints with the angle measurements? Or, how do you determine which text those labels are displaying (instead of index numbers).
Or, in other words-- how do I match the structure of the data coming out of the edge-midpoint component with the structure of that list of angles?
If you think I'm going to get it anyway, feel free not to answer. Young ones must sometimes learn hard way.
or, does that indexing of faces match what you get if you "deconstruct mesh" ?
m+ plankton edition on its way... hopefully before 2017
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
© 2024 Created by Scott Davidson. Powered by