I wish to find distance between a point (pt0) and a line that include 2 points (pt1 and pt2). Following codes can do it.
edge = Sketchup.active_model.entities.add_line(pt1, pt2) line1 = edge.line edge.erase! dis = pt0.distance_to_line(line1)
I have to do it inside “onMouseMove” definition. Drawing edge and delete it cause view will be slow. Is it possible to draw line1 without drawing and deleting edge?