I need to remesh more or less uniformly a mesh from inside a Python scripts running in Rhino. I already installed Grasshopper and the Kangaroo0099 version of Kangaroo (I was not sure the version 2 and up had MeshMachine in them?)
I seem to be able to write this import:
import ghpythonlib.components.MeshMachine as ghmm
but I don’t know how to create the MeshMachine object or how to feed it its parameters. I saw people calling Rhino from GrassHopper but can we do the other way around? If so, how?
Maybe @DanielPiker can suggest ways for this. However, I do not think that they can only use ghpythonlib, as most Kangaroo components cannot be used as single functions, but need to hold a state. I will let Daniel see about this.
I’ve been meaning for a while to clean up the MeshMachine code and turn it into something that is easier to call into from other scripts, but it still needs some work. The code for the GH version is all on GitHub now: https://github.com/meshmash/MeshMachine
I’ll maybe also put the source up later for the rhp that wattzie just linked above if that would help.
That would be really great. I bet it will make a lot of noise if you release a version of MeshMachine that could be used directly from Rhino. Without trying to pressure you , do you have any idea when you think this might be done?
Also, I know I said it but I think the old MeshMachine only worked from a B-rep… I don’t have a B-Rep, just a scanned 3D surface. Will it also work?
Thanks fo doing this! I have some questions though.
When I tried building the solution, I have error messages about a missing PlanktonMesh component. Could you add something like a small Readme.txt to show where to get this and how to install it so I could build your solution?
When I found it was not building, I tried using the MeshMachine files from the .zip you posted at: Triangular meshing
I have installed the following files
MeshMachine.rhp
PlanktonGh.dll
Plankton.dll
in my “…\AppData\Roaming\Grasshopper\Libraries” and unlocked them.
I cannot seem to be able to call MMTriangles from the Rhino command line?
I must admit I’m quite confused about the exact relationship between the Rhino/GrassHopper ecosystem and I don’t know how to install Rhino Plugins (.rhp files?) to make them runnable by Rhino. I found the following link:
but I don’t really know what to make of it? Is it even relevant?
The interpreter seems to do fine up to and including the surface ID but I cannot find how to Specify a Target Edge Length in the string I’m building for the rs.Command execution?
It seems like this function differs slightly from other rhino functions, you don’t need to press enter after selecting an object (or feeding in the GUID). Just adding a space after it seems to work.