Snapping to Temp Lines

I would like to create a grid along the length of my wall (temporary) with the GL and draw method within my move opening tool.

However, after creating some temporary lines I just realized that the cursor will not snap to these lines or inference from them.

Has anyone else confronted this same situation and what is the the best solution?

I’m still pretty green when it comes to the SketchUp Tool class so I am probably missing something here.

What would be the best way to create some grid lines that the user could snap to?

I’ve tried making some custom snapping but it is quite messy as the API wasn’t designed for it.

You can check out the source code of my 3D Rotate Tool. Be prepared for messy code though as this was my first ever tool.

1 Like

Put temporary cpoints at the intersections of the GL grid, … or just use a temporary grid of clines.

See Trimble example code here … Extension | SketchUp Extension Warehouse

1 Like

I put clines in a group then delete it once the move distance is determined, seems to work reasonably well.

The only problem with creating actually geometry is that the SketchUp undo function now has this geometry added so it messes up my system slightly. Is there a way to purge certain actions from the undo function

So that they don’t appear?

There is no current access (at all) to the undo / redo stack.

The best you can do is use the transparent boolean arguments to Sketchup::Model#start_operation().

The transparent thing is just a mess.

I guess I’ll just have to forego the grid lines even though it would be really nice to have.

Well you could temporarily set the snapping in Units options.

1 Like

Yes, but if the wall is not orthogonal to the global axis system than the snapping really doesn’t work.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.