@tig said:
Oxer[and probably SUFractal in the absence of a Console error report from him...]
The reason the 'Shell' part works is that the basic shell is added before any raytesting starts [it still fails BUT then the shell is there], but with no shell specified the raytesting starts early-on - before any new geometry is added at all.
From the error messages I can see the error is that your setup seems to think that the model.raytest
is expecting a Float
[number] not a Point3d
as it is getting.
In fact it has to be that
model.raytest([**point**, vector], true)
which is of course exactly what the code in line #599 does.
rayt=@model.raytest([zcent, Z_AXIS], true)
where 'zcent' is clearly defined as a point [as it ought to be],
the Z_AXIS is clearly a vector, and 'true' is simply saying 'ignore hidden objects'.
So... I can but deduce that another third-party script is ill-advisedly redefining the model.raytest()
method 
Though God knows why...
To see if the error occurs outside of my tool's code, please do the following and report back...
Use an empty SKP.
Switch Axes 'on'.
Make ~1m radius circle, based flat on the ground [Z/Blue=0], centered on the origin [crossing of XYZ/RGB axes].
Now open the Ruby Console.
Then copy/paste +<enter> this line of code
Sketchup.active_model.raytest([Geom;;Point3d.new(0,0,-1),Z_AXIS],true)
You should get a result something like this [although the face's 'reference' will vary].
[Point3d(0, 0, 0), [#<Sketchup::Face:0x11aba8e0>]]
If it succeeds then I can't immediately see why it'd work in the Ruby Console and not my code... 
If you get an error similar to the one you've posted we know the built-in model.raytest()
method has been broken.
If there is an error could you try to 'grep' [i.e. 'search' through files for certain text inside them] through the files in the 'Plugins' folder, and its subfolders [and also in the 'Tools' folder], for the text ' def raytest
'.
If you find a file please report back.
If you disable that file does the model.raytest()
'test' work now ??? 
I get this ruby console 'result' when trying your suggestion to Oxer.
Sketchup.active_model.raytest([Geom::Point3d.new(0,0,-1),Z_AXIS],true)
Error: #<TypeError: (eval):61:in `raytest': can't convert Geom::Point3d into Float>
(eval):61
(eval):61
By the way ... I do not see 'def raytest' in my plugins folder anywhere. Using the "Find" function, I do not 'def raytest' anywhere on my computer.