I have this coloured mesh that essentially represents an structural behaviour. This mesh as a normal mesh is divided in UV rows and columns that i need to keep. What I desperately need is to start deforming the size of this quads and make them smaller in the reddest parts and bigger on the bluest ones but WITHOUT deforming the shape of the pipe.
I am attaching the GH nd Rhino file for you to take a look and some images. Sorry for the vagueness of the one that i painted on. I hope you can understand the idea.
the mesh is a result of the plugg-in MILLIPEDE/ in case you donât have it installed, I baked the mesh and place it apart so you can still see it there in the gh definition
THANKS SO MUCH IN ADVANCE FOR ANYONE THAT TAKES A LOOK ON THIS AND TRY TO HELP ME !
I donât work with R6 ⌠but ⌠on first sight this appears to be a K2 task: given an Interval of âForceâ values (related with the vertices colors [or some other similar rule]) for each vertex find the adjacent vertices and apply the equivalent forces (from vertex to neighbor vertices). Then using some obvious goals (onMesh + plasticAnchors on naked vertices + some kind of quad shape control via diagonals or some other) attempt to relax the mesh
Would it be possible to make it macOS compatible please?
When I open it, it asks for the KangarooSolver.dll. I downloaded the latest K2 Release from Food4Rhino and placed only the dll into the GH components folder, since Kangaroo is already included somewhere else, but I couldnât find it.
However, the C# component still raises 2 warnings and an error.
Both warning (CS1701) are about the version of RhinoCommon. The component asks for some kind of runtime policy?
The error (CS0246) is due to the fact that the component canât find the type or namespace KPlankton. An assembly reference seems to be missing!
I have the Plankton dlls installed inside the components folder.
Hi @diff-arch,
This script isnât actually using KPlankton at all, I must have left that reference in by mistake.
If you delete line 27 (âusing KPlanktonâ) in the ShrinkByColour script I think it should work for you.
The other warnings can be ignored.
Hm, line 27 is double RestLength = L * (c.R / 255.0); and Iâve searched the rest of the code and there is no using KPlankton or Kplankton to be found anywhere?
The script editor is split in two!
The top part includes only one line, where the ShrinkByColour class is instantiated and output through A.
The bottom part includes the ShrinkByColour class with all its methods. Nothing more.
try opening your own C# button
and copy the information of Danielâs
the first part in the top window and the second part in the bottom window and try to run it
i used to have mac and C# codes used to work the same
I see what you mean now.
Iâm actually not sure whether it is currently possible to reference the KangarooSolver.dll included with Rhino from a Grasshopper C# script component on a Mac. I think the file is contained in the Rhinoceros.app bundle, but there doesnât seem to be any way to get to this from the C# script assembly reference manager. @dan might know if there is a way around this?
it should be possible
Have you checked if you have the Kangaroo 2
if you have the previous one is not gonna work, you need to have the solver of Kangaroo 2
Perhaps. App bundles on macOS are just directories with a special .app extension that makes them look/behave like an application. The full path to that solver would likely be:
Thanks Dan.
I can find the dll in the location you say via Finder, but Iâm still at a loss how to actually add it in the C# componentâs Referenced Assembly>Add window, because there the applications are all greyed out and there seems to be no way to explore their contents.
Oh yeah, thatâs probably by design. This dirty-hack might work, as a temporary shim:
Use Finder to rename Rhinoceros.app to Rhinoceros (remove the extension). macOS will ask if you are sure and tell it you want to (this is non-destructive as long as you change it back).
Launch Rhino by going to the /Applications/Contents/MacOS/ folder and double-click the Rhinoceros executable (it should start via Terminal).
Try to reference the assembly at the path above.
When done, quit Rhino, then add the .app extension back to Rhinoceros to turn it back into an app.
Probably not a good long-term solution, so we might need to gin-up a better workaround if this is a frequent need.
PS: In most Finder windows, thereâs a âShow Package Contentsâ item in the right-click menu, but I bet the explorer window in GH lacks that option.
Yep, as a long term macOS user, Iâm aware of that. Thanks for the absolute path to the dll. Entering this when prompted for an unresolved reference solved the issue I had!
@DanielPiker, @dan, entering the path into the dialogue, instead of the whole app renaming business seems to be a better, less unprofessional idea (for a pro app)!!
Another long-term solution could simply be to make Rhino/Grasshopper aware of where official dependencies (like K2) are located on Windows AND macOS, so that it knows what to chose in each case. Seems to work fine on WindowsâŚ
Another curiosity is that the IMG (Import Image) component seems to differ between the Windows and Mac version. I couldnât get the component from Danielâs file to run without errors, however when I replaced it, it worked fine.
Ah yes, I was forgetting it gives you a chance to resolve it with a file path when you first open. Much easier! (Danâs workaround did work though) Thanks both
Turns out, it doesnât even work with the latest version from Food4Rhino. You need the official compiled library that comes bundled with Rhino since release 6.