Strayed coordinates
-
Hi. I'm facing to an unexpected problem. The problem is simple.
I made a plugin which creates cone shape and it can be placed after inputting coordinates in input box. Here, I inputted (1000.mm, 1000.mm, 1000.mm), but the cone was placed at '991.mm, 991.mm, 991.mm). Why did it happen??
FYI, I used 'class' method and
a = Geom::Transformation.new([@@x.to_i, @@y.to_i, @@z.to_i])
. Is the problem related with what i have coded?
-
Without seeing your code, this is just a guess, but I suspect that you are falling victim to the fact that all coordinates in SketchUp are internally represented as inches, regardless of the visible units you have set for the model. So, 1000mm=39.37inches. Apply #to_i and you get 39 inches = 990.6mm.
Advertisement