Thanks, that will ask for either 0 or 1 to be entered manually. Is there a way to make the script more automated, such like always using the last axis and full circle, no need to press the F key and then Enter? Basically only selecting a profile, running the script and then it builds a full circle revolve, assuming that an axis has been already in use before?
Edit: I just tried a custom macro combined with your script and it works somehow!
_-RunPythonScript “D:\PROGRAMI\Rhinoceros 7\Добавки\Revolve last axis\revolve_sg.py”
_Pause _Pause _Pause 0 F Enter
Edit 2: Also works with Multipause:
_-RunPythonScript “D:\PROGRAMI\Rhinoceros 7\Добавки\Revolve last axis\revolve_sg.py”
_Multipause 0 F Enter
PS: I’m failing to make a secondary macro that should apply the number 1 of your script and then await for two mouse clicks to set a new axis, then complete the full circle revolve automatically…
Putting “_Multipause 1 _Pause _Pause F Enter” after the script did not work
Thanks, I made it working the way I want by adding a short macro after the full path. It looks like this for the RMB (manually set axis and automatic full circle revolve):
_-RunPythonScript “D:\PROGRAMI\Rhinoceros 7\Добавки\Revolve last axis\revolve_sg_fullcircle.py”
_Pause 1
For the LMB I use this (use of the last axis and automatic full circle revolve):
_-RunPythonScript “D:\PROGRAMI\Rhinoceros 7\Добавки\Revolve last axis\revolve_sg.py”
_Multipause 0 F Enter
By the way, I found that your script will not use the same axis set by Rhino’s own “Revolve” tool. This could be handy, because now Rhino remembers two last used axis: one from it’s native tool and one from your custom script.
@pascal
I would add a wish to this : would be great to show the axis.
Many newer students got lot of problem understanding the axis request.
Could it be that the command shows the axis as pre selected direction, like @Rhino_Bulgaria is asking, and then you can change the direction by picking 2 points or whatever.
@skysurfer@Rhino_Bulgaria I made this plugin as an exercise in using built in history, curious what you think. You need to draw a curve that can be used as an axis.
The resulting revolves will update when you move or change the input curves or axis. Furthermore it’s only full revolves + it will only show the use last axis option once the command has been run once and the axis curve is still present in the file: RevolveSG.rhp (42 KB)
You did a fantastic job, thanks! I just tried your plug-in and it automates the whole process, greatly reducing the mouse clicks. Is it possible to also add a secondary, alternative command that will ask for a start angle and revolution angle, i.e. not a full circle?
Well, it is indeed possible. But it requires more book keeping of settings that have to be registered making things more complicated. I already went into the rabbit hole of trying to make it work with brep edges.
Due to the history recording this is not a straightforward task.
And while it kind of already works with brep edges now, it will not work when using it as the last axis.
So right now I have no further plans to improve it. As mentioned it was merely an exercise in working with history. This command, while looking simple, still needed about 200 lines of code due to the history recording and axis storage.
@Rhino_Bulgaria I’ve updated the plugin in the post above. It should now work correctly (also the use last axis part) with all input curves of curves, surfaces, polysurfaces and extrusions.
If someone wants to add more functionality, the source code is here.