How to disable or change default gumball?

Sorry I didn’t try too much and wanted to ask you guys directly.

We want to achieve this effect

  1. Generate polylines through the LineCurve class
  2. End-to-end link between lines, similar to PolylineCurve
  3. The difference is that we don’t need these lines to really be a whole, we want the user to be able to select a line or some lines individually
  4. It is also the most critical, and also the problem that I have not found a suitable solution at present. We want to restrict the direction of movement of a line based on its topology. This is a relatively complicated judgment, and it is not easy to describe clearly, but the fundamental purpose is to limit gumball. For example, I hope that a certain line can only move along the X-axis or Y-axis. For example, I hope that each line has its own gumball, gumball’s X-axis always points in the direction of this line, which is somewhat similar to the concept of Plane.

Solutions I’ve tried so far:

  1. PolyCurve, which is not suitable because it forces all the wires together into one

  2. LineCurve, currently using this class

  3. In order to solve the problem of gumball, learn the content of rhino-developer-samples/SampleCsGumballCylinder.cs at 7 · mcneel/rhino-developer-samples · GitHub, but this example is not for an existing Lines go to change gumball, so only part of it is borrowed. Specifically, based on the content of this example, I realized the effect that each line can have its own gumball, which is actually a new gumball, but I can’t hide or disable or modify Rhino’s built-in gumball.

Is there a better solution?


Sorry I just remembered that the built-in gumballcan be turned off via the options under Rhino, but is there a better way? For example, modify the original gumball

Hi @ken_zhang,

Rhino does not have a disjoint curve object. That is, curve segments in a PolyCurve must form a contiguous curve. If you need a collection of disjoint curves to select as one, then you can Group them together. But that’s all grouping does.

There is not a way of doing this with Rhino’s built-in gumball. If you want to use a gumball to manipulate objects in your manner, you’ll need to write custom commands that use a custom gumball. You can, however, turn off Rhino’s built-in gumball. The Gumball command will do this. There may be an API that does this too.

Not sure I’ve offered much help…

– Dale

I realized the effect of restricting the free movement of the Gumball, but I found that I can move freely without the Gumball. It looks a bit similar to the movement function that comes with Line. For example, Line comes with a Grip, and then you can move through this Grip. In this way, the movement will be free from my restrictions. I tried to customize the Grip, but I still can’t simply restrict (that is to say, I don’t need to limit it at the algorithm level) to move freely. Is there any simple way to disable this movement function?

I have not read the whole topic. You can customize the gumball in certain ways. If you do not want the scale option, you can enter a value of ‘0’ in the settings.

Scale handle size value ‘5’

Scale handle size value ‘0’

Hi @ken_zhang,

It’s not going to be easy, if even possible, to restrict the behavior of excising Rhino objects.

Again, it would be helpful for us to get a “big picture” what you are trying to do and, importantly, why. With more background information, we might be able to provide better suggestions.

– Dale

If it was easy to post a picture to explain the problem, I would definitely post it in the first place. Even when I’m demonstrating to a colleague, I have to point my hand at a particular place on the screen and explain to him what kind of problem I’m having. Unless I send a well-crafted GIF, the picture doesn’t describe the problem.

The corresponding scenario of this problem is also more difficult to describe. In fact, I have already described it at the beginning. It involves industry details, not for confidentiality, and it is really not so easy to describe.

However, I probably know now that it is not that simple to achieve this effect, and this is enough. thank you all.

Hi @ken_zhang,

I should add that it may be possible to do what you want using a display conduit.

If you are familiar with Grasshopper, you’ll know that it draws its results in Rhino viewports. The geometry you see it not selectable, as it’s just drawn in a conduit. So you have full control over how it’s transformed.

Something to ponder.

– Dale