JBenghiat Posted July 23, 2021 Share Posted July 23, 2021 I have a particular custom object and insertion tool that is inserting a locus point at the first click point in addition to the object. I just searched the entire code, and I'm not actually creating this locus point, so it seems to happen either as part of some default action or because I'm not flagging something as handled. Anyone have any ideas where it might be coming from? Quote Link to comment
Hans Martin Kern Posted July 23, 2021 Share Posted July 23, 2021 Haven't seen this one. Off the top of my head - Is it a master snap in disguise? Quote Link to comment
JBenghiat Posted July 23, 2021 Author Share Posted July 23, 2021 No, it's an independent locus point. I'm manually selecting and deleting them after the tool completes. Quote Link to comment
Pat Stanford Posted July 23, 2021 Share Posted July 23, 2021 I think I might have seen something like this like 15 years ago when PIOs were first added. Too long ago to really remember. I think what was happening was that if an invalid object was inserted it was replaced by a locus at the insertion point. Is your insertion tool accidentally inserting two objects including one before it is really set up with the object you want to insert? Complete guess but happy to look at the code if you want to DM it. Quote Link to comment
JBenghiat Posted July 23, 2021 Author Share Posted July 23, 2021 ok, that's got me in the right direction. I'm overriding VWToolDefaultPoint_EventSink::PointAdded() If at the end of the block, I call VWToolDefaultPoint_EventSink::PointAdded(), I get the extra locus points. However, if I don't call it, after the first click, I'm not getting the preview of the object while it's rotating. Quote Link to comment
MullinRJ Posted July 24, 2021 Share Posted July 24, 2021 Josh, Based on your last comment, this may not be related, but another way to get a locus is to delete a SymDef when that Symbol is still in the drawing. You mentioned Locus which I interpret as a 2D Locus. Deleting a SymDef would leave 3D Loci in the drawing. If you are getting a 2D Locus, then this is not the reason why. Raymond Quote Link to comment
Maarten DE Posted July 24, 2021 Share Posted July 24, 2021 23 hours ago, JBenghiat said: I'm overriding VWToolDefaultPoint_EventSink::PointAdded() If at the end of the block, I call VWToolDefaultPoint_EventSink::PointAdded(), I get the extra locus points. However, if I don't call it, after the first click, I'm not getting the preview of the object while it's rotating. That's odd, I'm doing the same thing (overriding and calling VWToolDefaultPoint_EventSink::PointAdded(); at the end) and don't get that locus... If it helps, I have this in the VWToolDefaultPoint_EventSink::Draw(IToolDrawProvider* pDrawProvider) function: pDrawProvider->DrawDefault2D(); And in TToolStatus VWToolDefaultPoint_EventSink::GetStatus(const IToolStatusProvider* pStatusProvider) return pStatusProvider->GetTwoPointToolStatus(); Quote Link to comment
JBenghiat Posted July 26, 2021 Author Share Posted July 26, 2021 For me, pDrawProvider->DrawDefault2D(); will draw a line, and not the preview of the object. I need to call: VWToolDefaultPoint_EventSink::Draw( pDrawProvider ); This is also definitely a change for 2021. Prior, I would get the object preview even without calling the default Draw() method, and that seems to be the case for all my tools. I'm also returning the two point tool status. I seem to be stuck between having the extra locus point or not seeing the object preview during rotation, which is fairly important for the application. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.