Wish: Create a "Scale box" tool

While the “BoxEdit” tool is handy for some operations, I often find it too slow and limited due to the lack of ability to snap to other geometry in the scene. In my opinion, Rhino lacks a proper, more direct tool to enable editing the size of objects via the mouse and capable to snap to other geometry. This is why I propose a new too called “Scale box”, whose purpose is to fill the gap between “BoxEdit” and “PushPull”.

“PushPull” works great on simple geometry, but it can’t be used properly on more complex models, not to mention that it’s purpose is to edit individual surfaces of a polysurface, rather than the whole object.

The “ScaleBox” should use the bounding box of the selected object(s) as a way to position its global edit arrows. The edit arrows are similar in size like the move arrows of Gumball, but their purpose is to scale the selection instead of moving it. This could become a real game changer for those who work on architectural or furniture projects where quick and convenient edit of multiple objects is needed.

I’m aware that combining the Sticky Gumball with sub-object selection could do some of these edits on simple geometry, but it’s still limited in comparison. Not to mention that it forces the users with 3d mouse to use the keyboard with their other hand. Also, the Gumball’s center must be often relocated, then use the “SetScaleHandles” option (also extremely limited), which is another huge disadvantage.


I will use the attached picture to explain it better. The black curve is located 5 mm lower and 3 mm away from the “ScaleBox” (or the bounding box) of the selected object.

  • To scale the object sideways, so that it will reach the black curve along the horizontal axis (left to right direction), we simply grab the arrow marked with A and it will let us scale the object in this direction. Note that the opposite end (marked with E) will remain in place. If Osnap is active, we could drag the mouse pointer to the curve and snap the scaling of the cylinder to it.

  • To scale the object vertically, so that it will reach the black curve along the vertical axis, we simply grab the arrow marked with B and it will let us scale the object vertically. That will make the object shorter. Note that the opposite end (marked with F at the bottom) will remain in place. If Osnap is active, we could drag the mouse pointer to the curve and snap the scaling of the cylinder to it.

  • To scale the object freeform, so that it will reach the black curve along all 3 axis in this corner, we simply grab the corner between the arrows marked with C and it will let us scale the object freeform depending on the mouse movement. Note that the opposite ends (marked with E and F) will remain in place. If Osnap is active, we could drag the mouse pointer to the curve and snap the scaling of the cylinder to it.

  • To scale the object vertically, so that the middle of the scale box will reach the black curve along the vertical axis, we simply grab the upper vertical arrow marked with G and it will let us scale the object accordingly, making the object taller in the process. Note that the opposite end (marked with F at the bottom) will remain in place. And vice-versa: if we grab the lower arrow opposite of G, the object will be scaled from the bottom while the top will remain in place. If Osnap is active, we could drag the mouse pointer to the curve and snap the scaling of the cylinder to it.

  • To scale the object sideways, so that the middle of the scale box will reach the black curve along the same direction, we simply grab the arrow marked with D and it will let us scale the object accordingly, making the object considerably wider. Note that the opposite end (marked with E) will remain in place. And vice-versa: if we grab the arrow opposite of D, the object will be scaled from the side marked with E, whereas the side marked with G will remain in place. If Osnap is active, we could drag the mouse pointer to the curve and snap the scaling of the cylinder to it.

If Grid snap is active, we can scale the object the same way like scaling a box from one edge to the opposite edge, snapping to every line of the grid.

The “Scale box” tool could be either activated manually in a similar fashion like the control points or edit points, or automatically upon selecting an object.


I also created a 3dm file with the different ways to scale the cylinder, as explained above, complete with the corresponding letters. The Notes of the file also consist the same text just in case.

Scale box tool.3dm (474.4 KB)

Does this only operate on standalone objects? (so you don’t have to worry about connections or such with other objects that aren’t entirely in the box)

I guess something like an annotation connected with an end inside and an end outside of the box should do the best it can to stay anchored to the ‘same’ point.

Are there other special cases?

The proposed “Scale box” is supposed to work as a global scale tool for the selected object and use its bounding box as a reference for the location and position of the arrow handles. This means that no portion of the selected model will ever remain outside of the scale box (unlike the “Cage edit” tool). Multiple objects will have a common scale box based on their bounding box.

The orientation of the “Scale box” should be adjustable, which is done in a similar way like setting a CPlane and building a regular box object in the 3d space accordingly. That will enable the tool to scale the object in virtually any direction depending on the need. You first scale it along the World CPlane, then switch to another CPlane with random orientation, do extra scaling along those different axes, then switch back to the previous CPlane and “Scale box” orientation.
For example, the “BoundingBox” tool also has an option to be oriented along the active CPlane.

You will notice the the right “Scale box” cage on the right side in this image has arrows that intersect with each other. That’s because I used absolute units to build the arrows, whereas the size of the actual handles (if this tool ever gets made) will be based on screen pixels. Just like the regular Gumball.

Shown below are two “Scale box” cages. The left one uses the World coordinates, and the right one uses CPlane coordinates (I preliminary set the CPlane to orient to the face of the star). I leaved the bounding box of each star visible to show that it’s the base for the arrow handles. Sometimes it may be handy if there is also an option to show or hide the auto-update of the bounding box while using the “Scale box” tool.

Scale box tool 2.3dm (389.9 KB)

1 Like

Maybe I’m missing something, but I find all of these pretty easy & fast to do with Gumball. I have a key set to GumballRelocate and a key set to ToggleGumballSnap, so I think that makes it fast & easy.

you might find some of these tools handy:

bounding-points
set_gumball_min
set_gumball_max

1 Like

Hi @Gijs ! Seems like there is some error in the script I tried. At least this is what the error says in my Rhino 7.

---------------------------
Exception Occured
---------------------------
Message: Non-ASCII character '\xc2' in file D:\PROGRAMI\Rhinoceros 7\Добавки\Bounding points\bounding_points.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

  File "D:\PROGRAMI\Rhinoceros 7\Добавки\Bounding points\bounding_points.py", line 1

SyntaxError: Non-ASCII character '\xc2' in file D:\PROGRAMI\Rhinoceros 7\Добавки\Bounding points\bounding_points.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
---------------------------
OK   
---------------------------

I’ll attach the scripts here. I think you downloaded them in the wrong way from github

bounding_points.py (1.2 KB)
set_gumball_max.py (503 Bytes)
set_gumball_min.py (503 Bytes)
set_gumball
bounding_points

2 Likes

I just tried the uploaded one and it works. This is a nice work in the right direction. :slight_smile: I noticed that I have to use ! _Ungroup to separate the bounding points from the selected object(s). If I use ! _Explode, the tiny black points convert to large white points with a black border. Not sure if that was done for a different purpose.

However, while this script could help with scaling the object by using “Scale 1D”, I find it quite slow and requiring several times mouse clicks compared to my proposed tool. Especially for repeating the scaling via the different arrow handles (or points in your script). The arrow handles pictured in my examples consist 3 directions per corner for a 1D scaling, along with a common point where they meet for a 3D scaling. This alone eliminates the need to use “Scale 1D”, “Scale 2D” and “Scale 3D”, hence it makes the editing as quick and simple as possible. The proposed “Scale box” tool is a simple single-click-and-drag solution. No need to relocate or reset the Gumball, no need to use the 3 scale tools, no need to ungroup boudning points.

I also can’t find a way to orient those bounding points relative to a custom CPlane. Instead, they are always oriented to the Wodld coordinates.

Anyway, until a proper “Scale box” tool is created, I may use your script. This is why I added it as a RMB command to the ! _SolidPtOn icon. :slight_smile:

Both Set Gumball scripts work nicely and could also contribute to the scaling the way I proposed. Not same, but fairly useful. Thank you for the nice job! :slight_smile:

I noticed that after using the “set_gumball_min.py” and “set_gumball_max.py” scripts, the ! _GumballAlignment _Object command fails to align the Gumball to the object (like it used to do before), so the _GumballReset command must be used instead. Running ! _GumballAlignment _Object does nothing in this case.


And lastly, there is a small bug I found (check the video below). The Gumball in Rhino disappears when the transformation (move, scale, rotate) is equal to zero and the object stays in place unchanged. While this bug is not a big deal, it will still force the user to either deselect and then select again the object(s), or run the _GumballReset command.