I am trying to write a script in ghpython that runs a command taking in point inputs. The points are written in rs.Command() as parts of the string with the format x,y,z. This works in the standard perspective view, but creates wrong results in the orthographic views. I am guessing this is because of how point user inputs are interpreted in ortho, but I want this script to run correctly regardless of which view and settings I am using. Is there a way to create point inputs that are always 3d points regardless of this?
Also, an additional question. I want this script to cancel any current commands. I am trying to do this with having rs.Command(“_Cancel”) before my own command. This seems to work to cancel a command by itself, but for some reason, if it cancels a command, it will prevent the command in my script from running. Any ideas why?
Why are you doing this? Why don’t you just create the points with Rhino.Geometry.Point3d(x,y,z) ? That will always create 3d points with x, y and z in world coordinates.
I don’t understand this either… Are you perhaps writing a script that runs in Grasshopper when you should be writing a script that simply runs in Rhino without going through Grasshopper?
The method with “!” does not work either. The documentation here actually mentions that this method does not work, but does not mention any alternatives. Command (rhino3d.com)
I will share it when finished. The core functionality of the script already works, so now I just need to fix some bugs.
The results are super smooth and consistent for very complex and irregular deformations. I believe many people could have use for this.