Grasshopper

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

Views: 435

Comment

You need to be a member of Grasshopper to add comments!

Comment by Stefan Ilic on January 21, 2019 at 4:10am

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?

Comment by Jens Pedersen on June 18, 2015 at 11:23pm

I see - nice :)

Comment by Daniel González Abalde on June 18, 2015 at 10:31am

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

(...)

Comment by Jens Pedersen on June 18, 2015 at 10:21am

ahhh I see, so you are actively reading the different layers for object position? 

Comment by Daniel González Abalde on June 18, 2015 at 10:02am

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.

Comment by Jens Pedersen on June 18, 2015 at 9:29am

Nice - I am slightly confused are editing the GH points or the physical points in Rhino?

Comment by Ángel Linares on June 18, 2015 at 4:04am

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.

Comment by Daniel González Abalde on June 18, 2015 at 3:57am

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.

Comment by emlplsn on June 17, 2015 at 5:22pm

Cool! Reminds me of the workflow of maya (switching between smooth and sharp). Is that the idea?

Comment by Igor Mitrić Lavovski on June 17, 2015 at 2:07pm
Really amazing!

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service