Author Topic: Distance Between Objects  (Read 2058 times)

0 Members and 1 Guest are viewing this topic.

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Distance Between Objects
« on: September 23, 2016, 05:24:34 PM »
Trying to find the best way to get the coordinates for the closest points between two polylines.  I am thinking of iterating through the longer polyline every 0.05' and storing the distances in an array.  Once I find out the minimum distance I will reiterate to find that same location (using the distance), but this time store the coordinates.  Problem is, this can result in thousands upon thousands of calculations.  Anyone know a better way to do this?
« Last Edit: September 25, 2016, 05:11:45 PM by Area51Visitor »

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Distance Between Objects
« Reply #1 on: September 26, 2016, 10:19:28 AM »
Curves or straight segments?
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: Distance Between Objects
« Reply #2 on: September 26, 2016, 04:18:04 PM »
Curves or straight segments?

Curves preferably but suppose I could limit to straight segments for now.