Author Topic: Object Distance from Another  (Read 121 times)

0 Members and 1 Guest are viewing this topic.

FriendFromArea51

  • Swamp Rat
  • Posts: 612
  • Mars sucks!
Object Distance from Another
« on: August 25, 2017, 12:10:22 am »
Is there a way to check a polylines distance from another object without iterating through every point?

nullptr

  • BricsCAD
  • Needs a day job
  • Posts: 6733
  • AKA Daniel
Re: Object Distance from Another
« Reply #1 on: August 25, 2017, 03:12:42 am »
maybe AcDbCurve::getClosestPointTo ?

Bryco

  • Water Moccasin
  • Posts: 1806
Re: Object Distance from Another
« Reply #2 on: August 25, 2017, 11:32:44 am »
Usually you use the bounding box first to check whether the object is within the desired range, then find out if the polyline is simpler than the object you are checking to define the next step