algorithmic modeling for Rhino
Simple script to deform manually (from Rhino) mesh points, using its vertices, edges and faces.
http://www.grasshopper3d.com/profiles/blogs/deform-a-mesh-manually-from-rhino?xg_source=activity
Tags:
Comment
Hi Daniel,
I found your script really useful and thank you for that.
I have one question, if I work with multiple meshes in a tree, how can I use your script to manipulate all of them at once because right now the output of the input tree is just one branch (one mesh)?
Is it a code thing or gh data management?
I see - nice :)
When a baked object is selected, the corresponding point is substituted in the mesh. This is the case for vertices.You have the code in the link (below the video).
(...)
' <> POINTS <>
If (Type = 0) Then
'Geometry.
Dim ptm As Point3d() = Malla.Vertices.ToPoint3dArray
'Bake.
If storeGuid.count = 0 Then
storeGuid = doc.Objects.AddPoints(ptm)
End If
'Rebuild Mesh.
For Each obj As rhinoobject In doc.Objects.GetObjectList(objecttype.Point)
'IsSelected?.
If obj.IsSelected(False) AndAlso storeGuid.contains(obj.Id) Then
'Index of point.
Dim idx As Integer = storeGuid.indexof(obj.Id)
'New point.
Dim pt As rhino.Geometry.point = DirectCast(obj.Geometry, rhino.Geometry.Point)
Dim pt3d As point3d = pt.Location
'Rebuild mesh.
malla.Vertices.SetVertex(idx, pt3d)
End If
Next
M = Malla
(...)
ahhh I see, so you are actively reading the different layers for object position?
They are RhinoObjects. Using the geometry of gh, is baked, modified in Rhino as RhinoObjects, and the position of the points is updated to the gh mesh.
Nice - I am slightly confused are editing the GH points or the physical points in Rhino?
It wold be great to add something like that to the SubD Rhino6 workflow. Now it's a total pain in the ass to model anything with it.
Thanks guys.
I've never used maya, yes 3DMax, it would be something like EditablePoly + TurboSmooth. But I just smoothed to directly view the final result. The idea is only slightly soften the harshness of gh for such operations.
Cool! Reminds me of the workflow of maya (switching between smooth and sharp). Is that the idea?
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
You need to be a member of Grasshopper to add comments!