Snapping to Temp Lines


#1

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?


#2

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.


#3

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

See Trimble example code here … http://extensions.sketchup.com/en/content/grid-tool


#4

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


#5

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


#6

So that they don’t appear?


#7

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().


A question about undo stack - external operation within my own start-commit
#8

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.


#9

Well you could temporarily set the snapping in Units options.


#10

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


#11

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