+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Senior Member
    Computer Details
    aaryan's Computer Details
    Operating System:
    Windows 10 x64 bit
    Using
    Mechanical 2015
    Join Date
    May 2011
    Location
    India
    Posts
    162

    Default Maximum distance on a curve from point list

    Registered forum members do not see this ad.

    Dear All,

    I have a list of points which lies on the curve, is there a way to find which point has maximum distance on a curve. If so please give me a solution.


    Thanks in advance
    Aaryan

  2. #2
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2017
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    6,246

    Default

    maximum distance from which point ?

  3. #3
    Senior Member
    Computer Details
    aaryan's Computer Details
    Operating System:
    Windows 10 x64 bit
    Using
    Mechanical 2015
    Join Date
    May 2011
    Location
    India
    Posts
    162

    Default

    Thanks Tharwat

    Maximum distance along curve from starting point of curve.
    suppose i have 3 points in a list which lies exactly on curve object, one point is at 100m and second is at 101.235m and third may be at 94.222m. Like this second point has maximum distance. Any guess

  4. #4
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2017
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    6,246

    Default

    This function is to give you the far most distance from a given point .

    Code:
    (defun foo (l p / d dis mx)
      (setq d 0.)
      (foreach pt l
        (if (> (setq dis (distance p pt)) d)
          (setq mx pt
                d  dis
          )
        )
      )
      mx
    )
    Code:
    (foo <list of points> <any point >)

  5. #5
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows 8.1
    Discipline
    Landscape
    Using
    AutoCAD 2015
    Join Date
    Apr 2010
    Posts
    3,005

  6. #6
    Senior Member
    Computer Details
    aaryan's Computer Details
    Operating System:
    Windows 10 x64 bit
    Using
    Mechanical 2015
    Join Date
    May 2011
    Location
    India
    Posts
    162

    Default

    Thanks Both..

  7. #7
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Win 7 Pro / Win 10 Pro / Linux Mint
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2018
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,593

    Default

    Registered forum members do not see this ad.

    For the straight line distance, use the distance function; for the distance along the curve, use the vlax-curve-getdistatpoint function.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

Similar Threads

  1. [Help] Sort a list point by distance
    By ketxu in forum AutoLISP, Visual LISP & DCL
    Replies: 12
    Last Post: 31st Jul 2011, 05:02 pm
  2. Replies: 10
    Last Post: 9th Jun 2011, 04:57 pm
  3. Maximum Point number
    By MARKY in forum AutoCAD General
    Replies: 0
    Last Post: 21st Apr 2010, 07:39 pm
  4. Inventor Drawing dimensions point to point, aligned, curve
    By linnmaster in forum Autodesk Inventor
    Replies: 10
    Last Post: 8th Feb 2010, 07:29 am
  5. Replies: 10
    Last Post: 14th Feb 2009, 02:16 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts