I wanna learn to scrip a bit in rhino, I have no idea about any of the topic. Bit ima dive in to it at some point. What I wanna know at this point can you use python in rhino?, can I create my own commands? Someone please give advice
Mostly you’ll be using the RhinoScriptSyntax API. Most Rhino commands have an equivalent here, and you can use the rs.Command()
method in a pinch.
import Rhino
import rhinoscriptsyntax as rs
def my_method
foo = rs.Example()
if __name__ == "__main__":
my_method()
To run your scripts, you can use the RunPythonScript
command to browse for the script you want, or create a button or alias for your script:
_NoEcho -_RunPythonScript "full\path\to\script.py"
oh brother reading this and looking it up…oh do i have a long way to go lol
i can use learn a bit of python and use it in rhinoscript right??
and just for my ignorance, will i be able to create and run a custom command that isnt part of rhinos command list?
It would probably help to start with a small example of something you’d like to use python for. What would you want your custom command to do?
Hi again, ok ima try and make this short, your aware of isotherm weather mapping right? I’m in the jewelry industry and I obviously do the CAD for them. It’s a casting company and when I’m spruing the jewelry pieces to be placed on a tree to be casted, one of the things I look for is the heaviest part of the model, that’s usually the best place for the sprue. So I was thinking what if there was some type of mapping command that shows the heaviest part of the model! I know there’s the hydro command that shows you the same but mistake me if I’m wrong I think that command of more for finding the center of floatation (kinda similar). So I wanna create a command using this type of thermalage to find the heaviest part of a model.
There might be an existing grasshopper plugin that does this. It could be done in python if you have an algorithm to find the point you want, but finding such an algorithm seems non-trivial.
I see this video on line once, I would have to go on a manhunt to find it again but maybe it mite be worth it maybe not. How are you using the word algorithm? As in knowledge? Ima start getting in to Grasshopper this weekend abot I see it mite be a handy tool for modeling. Thank you for your answers to my questions
By algorithm, I mean a process of finding the answer through a series of computational steps.
ok got it " computational" is a cool word