-
Member
Wish: rs.PointClosestObject
The subject says it all.
I am missing the RhinoScript method PointClosestObject in Python.
Can this be added?
thx, Tobias
-
Senior Member
Hi Tobias,
I added this function. You can get it at:
https://github.com/mcneel/rhinopytho...pointvector.py
If you use the code from github, it won't work with point clouds until the next V5 WIP is released.
Thanks,
-Steve
-
Member
Hi Steve,
This is really cool. Very fast! But... how to use that code? I downloaded the zip containing a folder scripts and in there the folders rhinoscript and samples and the files rhcommand.template and scriptcontext.py. You probably know what I mean. So what to do with it?
thx, Tobias
-
Member
Ok, Steve. Got it. Found it.
Sometimes I'm just to quick to ask. Then I just need to dig a little more and I find it out myself.
thx again,
Tobias
-
Senior Member
Sorry, I should write a sticky post on how to work with the github scripts.
You need to go to the directory where your python rhinoscript package is located. You can find this by running EditPythonScript and then pick Tools->Options from the editor's menu.
You should see a list of directories which define the search paths for python. Double click on the one that looks something like
C:\Users\tobias\AppData\Roaming\McNeel\Rhinoceros\ 5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib
This will open file explorer to that location. Go into the rhinoscript subdirectory and paste the pointvector.py file you got from github over the one in that directory.
Close the options dialog and then either go up to Tools->Reset Script Engine in the menu or restart Rhino.
You should have to updated functions after performing these steps.
Thanks,
-Steve
-
Senior Member
By the way, these changes automatically get built into the next WIP of Rhino.
-
Member
Hi Steve,
I was a bit confused for a moment cause the path to the RhinoScript package mentioned in the sticky "7 questions" post under 0. (cool the 0...) "What’s the RhinoScript package and where is it?" is not right. But in the end the right one was easy to find.
thanks again,
Tobias
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules