I think I have a problem with the re-defined method in row 41:
Originally here:
#pick_segment (points)
method is defined by the same name.
I’m using in my plugin the code somthing like this:
module Mymodule
class Tool_test_picksegment
###dirty!!###
def initialize
end
def onMouseMove(flags, x, y, view)
ph = view.pick_helper
ph.init(x, y, 10)
pick_add = ph.pick_segment([ORIGIN,[1,1,1]])
puts pick_add
end
end
end
Sketchup.active_model.select_tool(Mymodule::Tool_test_picksegment.new)
If the TrueBend has not been used befor, the code is doing what it shoud do. But after TrueBend has been used I got the following error:
Error: #<NoMethodError: undefined method `*’ for nil:NilClass> C:/Users/dezmo/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_truebend/dpi/pick_helper.rb:43:in ‘pick_segment’
main :9:in ‘onMouseMove’
It seems to me that the method defined by @tt_su somehow is “global” or “visible from outside”, and coming before the “original one”, then give an unexpected result.
Sorry about my “no professional description” but I’m still not familiar in deep with all Ruby magic.
I think I heve been properly calling the #pick_segment() method from “isolated” namespace above, but I have no real clue about the all the code of ThomThom, specially the:
super(*args)
I guess this causing the “problem” and make me confused.
I would appreciate it if you would give an explanation and tell me what’s going on?
How can I call the “original” #.pick_segment(segment)
method??
Did I made a mistake with my test code above or could it be something else… ?
(BTW TrueBend can be download from:
Extension | SketchUp Extension Warehouse )