If i have some geometry and i manipulate it in ghdoc, is it possible to push it in RhinoDoc, without baking?
(because i get “does not exist in ObjectTable”, of course)
From what you have said, you have taken geometry from Rhino into grasshopper, manipulated the geometry and are now trying to push the changes back into Rhino?
When you brought the geometry from the Rhino space to the grasshopper space, you have effectively severed the connection between the two.
You could have the script delete the original geometry and then bake the new geometry in, but there is no way of pushing the geometry into Rhino as the manipulated geometry does not exist in Rhino.
The script below works well. But I want to take the surface, manipulate it in ghdoc, and then input the result to RhinoDoc
this is not working anymore because I manipulated it.
Scale takes the geometry and severs the connection so that the grasshopper geometry is no longer linked to the rhino geometry.
It will only work if you manipulate the geometry in the ghpython component using rhinoscriptsyntax or rhinocommon.
Baking is the only way to send manipulated geometry back.
Yes, I understand, I thought that there could be a way to do it.
I need to use rs.MaterialTexture
I don’t want to use only scale, I need to do many other things as well before. scale was just an example to illustrate the problem/ I need to switch completely to RhinoDoc and script everything instead of using grasshopper…
If grasshopper could directly manipulate the objects like that, there is a chance that the geometry in Rhino would be constantly changing everytime the script is run.
So baking is the only way to export changes to geometry.
so then I have to bake it and pick it up again from rhino and bake it again and so on… but this method is ugly.
First answer when googling “ghpython bake”:
This script allows you to bake the new geometry.
You can then follow instructions to modify the materials in there.
I forgot about the coercerhinoobject function.
i don’t want to bake because i’ll end up having hundreds of surfaces baked each time i switch a slider…
what is coercerhinoobject ? i remember using it in a few situations.
Is the number of surfaces generated by the script not equal to the number of surfaces you first put in?
The other option, if you are using stuff like scaleNU, is take the transform data output from them and apply that transformation to the geometry. rs.TransformObject() But I don’t know how that will work if you have say 10 objects starting and 300 objects by the end of the script as it is meant to work one to one.
i want to take a surface, split it in 100 smaller surfaces, assign a different texture for each. and then change the textures by shifting a slider and record the resulting animation.
There are animation plugins for grasshopper. I think use one of those, or just split your surface up in the first place.
Thanks for your suggestions, but i cannot split the surface in the first place because i want to change the number of subsurfaces and their proportions parametrically.
the animation part is not a problem. the only problem i have is with rs.MaterialTexture() which will not work in ghdoc.
The problem is your 100 smaller surface that you are applying textures to only exist in the grasshopper space.
this plugin takes a list of materials, you would setup all your materials in Rhino before hand, the 100 surfaces you have and take a picture of the viewport with the material applied to your 100 surfaces in grasshopper space.
i’ll look into it, thanks
Never tried the plugin before so nothing I can help you with.
Best of luck.