How to use lock_inference ?
-
I'm working on a tool. For now is something like LineTool, but I want to force it to draw just parallel to global axis. I know I must use lock_inference for this. But there are two optional parameters (inputpoint) and I don't really understand too much from this http://code.google.com/intl/ro/apis/sketchup/docs/ourdoc/view.html#lock_inference
Can somebody give me a clue?
Thanks. -
You need to have an inputpoint for inference to work. Check out the InputPoint class for how that works. That's about all I can say. I am currently working on inputpoints too, and its going slowly.
There is a good example in the utilities directory. Open utilitiestools.rb and look at the TrackMouseTool in there. It is found in Tools>Utilities>Query Tool inside of Sketchup. It uses inference points. It seems more complex than I thought it should be, but it definitely works.
Chris
Advertisement