Trying to glue a DisplayConduit to a point object

Hello @dale,

continuing the discussion from CustomPointObject OnDraw method issue:

I am exactly at the same point as @bovasbenjacob was in his thread, also trying to attach a circle to a CustomPointObject via the same OnDraw method. After reading your comment in his thread, I’m now trying to implement the solution you recommended with a standard point object and a connected display conduit.

I got quite far already by adding the conduit to the point’s userdata and transforming the conduit geometry when the that userdata raises OnTransform. So the conduit geometry always sticks to the point and I’m able to update the conduit’s bounding box to get rid of the clipping issue - as you suggested.
Great! Thanks a lot for the tip!

Now the only thing that bothers me a bit is that with the CustomPointObject OnDraw method, the attached circle moved with the point - also in dynamic mode e.g. when dragging or moving the point.
As the OnTransform event of the object’s user data is only raised afte the dragging is finished, I don’t have any visual update while dragging now. Not before dragging is finished the conduit is updated.

Long explanation, short question:

Is there any possibility e.g. a certain event to translate the conduit’s geometry while in dynamic mode / while dragging or moving? Is it possible to get the transformation of a move command while it’s not yet finished?

Sorry for this wall of text.
Is my question understandable or do you need a sample of what I’m working on?

Maybe this can help

Hi @menno,

thanks for your input!
As HasDynamicTransform seems to be a pure get Property, i’m not shure how to use it for my case…
Can you give me a hint on how you would use it in my case?

Sorry for being a bit vague :crazy_face:
I was thinking that this property should return true during a move/drag operation. The you can retrieve the dynamic transform with .GetDynamicTransform and draw your circle at the correct location.

1 Like

Oh yes, GetDynamicTransform was the piece I was missing!
Now my circle is really glued to that point :slight_smile:

Great, thanks a lot for the instant help, @menno!

1 Like

Can you disable drawing of the original point and only display your circle, though? Or do we need a CustomPointObject and an override of its OnDraw method?

If you delete base.OnDraw(e) from a CustomPointObject > OnDraw event or comment it out, the point disappears and you can work with your own Draw-Commands - with the clipping problems described in the original thread… So your second approch should basically work.

I don’t know how to do this with standard points and conduits, sorry…
Maybe someone else does?