Special "point on a curve" editing

 From:  Michael Gibson
4338.10 In reply to 4338.9 
Hi Burr,

> With the current mechanism for controling the surrounding
> points movement, is there a means to control the radius of
> the constraint??

No - basically the mechanism works by moving control points by the least amount that is possible to satisfy the constraint - satisfy the constraint means make the curve pass through the new point location where you are dragging to.

The mechanism doesn't use a radius value for determining that - but the overall way the math works is that the control point that contributes the most to that particular location of the curve will get moved the most, and the ones to either side of it which contribute somewhat lesser percentage amounts of their position to that location of the curve will move somewhat less. Control points that are more than 3 (or maybe 4 I forget) points away from the current one do not contribute anything at all to that one point on the curve where the drag started from, so points outside of that zone will not be moved at all. That's kind of a side effect of how NURBS work - the control points of a NURBS curve define the shape of the curve in a local area around those control points, if you move a single control points some area on the curve a few spans away will not be affected by that change.


There could be some possibility of trying to do a kind of multi-pass modification, something like move the curve as it currently does and then try to analyze what kind of change in the curve tangents took place and try to move some other areas of the curve where tangents were modified to kind of pull some more pieces of the curve along with it to reduce the overall change in tangent shapes. That's something I would like to try in the future but it will take a fair amount of experimentation to get something that avoids introducing wiggles.


Another way to do a weighted radius type soft movement is to have it just work on control point editing instead of with "drag the point on the curve" type editing - that's generally how it works with polygon sub-d modelers for example, where you really only do control point editing and not direct "pull the point directly on the surface" editing at all.


> Also, it seems the "drag" command is located in the Command
> processor part and not a js file?

Yeah, it's a command that is built in to moi_lib.dll - it gets implicitly triggered when you do a drag when in selection mode. There are a few other built-in C++ implemented commands like that that get triggered with some kind of specific action other than clicking on a command button, like the "drag/drop" command is executed when you drop a file from an Explorer window on to the MoI window, and the "Change unit system" command gets executed when there is a change in unit system and you have "Scale on unit system changes" enabled.

Currently the undo system is built around the command system so if something makes a change that should go into the undo buffer as an undoable step it needs to be set up as a command.

- Michael