Replies: 1 comment 3 replies
-
There isn't a method to return the closest point given an element id if that is what you are asking. There are closest point methods for various GeometryQuery sub-classes though, like CurvePrimitive.closestPoint, CurveCollection.closestPoint, and PolyfaceRangeTreeContext.searchForClosestPoint that can be used like the LineSegment3d.closestPoint method you showed. You'll need to extract/iterate the element's geometry. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, does itwin.js provide a method to find the coordinates of the closest point on an iModel element to a mouse-clicked point in the interface?
It's somewhat similar to const curve = LineSegment3d.create(points) curve.closestPoint(point, false); where closestPoint method is used.
If you have any suggestions, I would greatly appreciate it
Beta Was this translation helpful? Give feedback.
All reactions