Search the Community
Showing results for tags 'control point'.
Found 2 results
Wondering if anyone can advise on this - I'm having some trouble with control point precision that is leading to erroneous behavior in a plugin object. I detected this issue in part through the debugger. Basically, when I drag a control point, it seems that the values I get when I access its coordinates from inside the scripting environment are truncated to only 6 decimal places. This introduces error into calculations based on that value. I have tested further by creating an object to use as a snapping location, and setting the position of this object to coordinates that require more than 6 decimal places to represent. If I increase the decimal place precision in the document unit preferences, I can see all of these decimal places in the OIP for the reference object. If I drag a control point in my plugin object to snap to this reference object, and then, by setting a breakpoint, inspect the value I get inside my script by accessing the control point (with, for example, vs.PControlPoint01Y), I see the value is still truncated, regardless of the document unit / precision settings. At only 6 decimal places, this can introduce pretty significant error. Is there some obvious thing I am missing to correct this behavior? I would expect that when I snap a control point to a location, the control point would be assigned a value as accurate as possible, or at least as accurate as the document settings indicate. Not sure if this is specific to Python scripting or not.
Hi, wondering if anyone has any advice -- Sorry for the cross post; I was in the wrong topic area before. I have a plugin that includes a control point that is draggable, but which also exposes one of its coordinate input fields in the OIP to allow the user to type a precise value. When the user origin has been dragged, typed values in this field get offset in ways that lead to "incorrect" values, but dragging the control point behaves as if the current User Origin is the Internal Origin. I imagine I could use GetOrigin() to find the offset and fix this behavior, but how do I detect whether the parameter changed from a drag operation (in which case I should leave it alone) or a typed value in the OIP (in which case I need to fix it)? Or is there a way to get Control Points to only look at the user origin? (the documentation on plugin parameters would suggest not) thanks