I use Sketchup in metric(mm) mode and am writing ruby script but there appears to be an error in the calculation of p2 from the offset of p1 in the following example
p1 = Geom::Point3d.new(0,0,0) p2 = Geom::Point3d.new(1000,0,0) v1 = p1.vector_to(p2) panelLength = 94.488 # 2400mm in inches v1.length = panelLength p2 = p1.offset v1 print("p1 = ", p1, "\n") print("v1 = ", v1, "\n") print("p2 = ", p2, "\n") print("panelLength= ", panelLength, "\n")
The Ruby console output appears thus:
p1= (0mm, 0mm, 0mm)
v1= (94.48818897637796, 0.0, 0.0)
p2= (2400mm, 0mm, 0mm)
Whereas the Point3d objects report metric values, the Vector3d objects report the internal imperial measure. This would appear to be an error.