+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Junior Member
    Using
    AutoCAD 2000
    Join Date
    Dec 2008
    Posts
    11

    Default Automatic Polyline from Points LISP (need)

    Registered forum members do not see this ad.

    Hi everybody,
    this is my first post.

    I need a Lisp to generate a polyline from existing points.
    The polyline should be created from all the points at the edge of the cloud of points generated by a 3d scanner.
    The points are in 3 dimensions, but they could be flatted to zero.

    The polyline can be close or open: it does not matter.

    Any idea?

    Thank you folks in advance.
    dave

  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 2015
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    6,050

    Default

    What is the order of points that the program should follow ?

  3. #3
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,322

    Default

    This will get you started: Convex Hull
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

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

  4. #4
    Junior Member
    Using
    AutoCAD 2000
    Join Date
    Dec 2008
    Posts
    11

    Default Re: Automatic Polyline from Points LISP (need)

    Quote Originally Posted by Tharwat View Post
    What is the order of points that the program should follow ?
    Hi Tharwat,
    if I understand your question, the order is not important: clockwise or counter-clockwise does not matter.
    If there are many points on the space, I need to connect only the ones on the edge of the cloud. The points inside the cloud are not to be connected.

    I've read the suggestion of Lee Mac. This image from the page of Lee Mac is what I need to do:
    http://www.lee-mac.com/lisp/gifs/convexhull1.gif
    (hope is not a problem to point to an external link!)
    but I was not able to let the routine work properly.

    Please see attached images.

    Please take a look of attached image:
    Automatic Polyline from Points LISP (A).jpg show the "cloud" of points.
    Automatic Polyline from Points LISP (B).jpg is the "cloud" connected with a polyline.

    Now the second problem: the points are not on the same Z position! Maybe first I've to move points on an average Z position, if I want to use polylines (otherwise I must to use 3dpolyline, of course).

    Hope the answer match your question.
    Dave

  5. #5
    Junior Member
    Using
    AutoCAD 2000
    Join Date
    Dec 2008
    Posts
    11

    Default Re: Automatic Polyline from Points LISP (need)

    Quote Originally Posted by Lee Mac View Post
    This will get you started: Convex Hull
    Hi Lee Mac,
    thank you for the tip.
    You can read my answer to Tharwat above.

    As I wrote, I'm not able to use Convex Hull. I'm not so good with lisp .

    I've tried to copy and paste the code in your page, with the usually "nil" at the command line...

    How to use it?

    Dave

  6. #6
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,322

    Default

    Quote Originally Posted by daveacad View Post
    As I wrote, I'm not able to use Convex Hull. I'm not so good with lisp .

    I've tried to copy and paste the code in your page, with the usually "nil" at the command line...

    How to use it?
    You would first need to download & load (e.g. via AppLoad) the Convex Hull function from the download link at the top of the page; and then copy the code for Example Program 1 either to a .lsp file, or to the AutoCAD command-line. The command for the example program is then 'test1'.

    However, given that your example images show the desired result is not entirely convex, this function will only get you part of the way there.

    Lee
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

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

  7. #7
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,725

    Default

    Registered forum members do not see this ad.

    You need some form of a Boundary lisp I am struggling a bit at the image scale but it looks like you want two parallel lines formed from the strip of points.

    Is there not cloud tools to do this ?
    A man who never made mistakes never made anything

Similar Threads

  1. HELP: Any LISP to remove all the points/vertices of a polyline
    By vernonlee in forum AutoLISP, Visual LISP & DCL
    Replies: 8
    Last Post: 16th Mar 2015, 09:39 am
  2. Looking for a LISP routine that places points on all vertices of a polyline?
    By tzframpton in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 16th Jul 2013, 11:15 pm
  3. Automatic Join Polyline onto existing Polyline ??
    By Leave Me Here in forum AutoCAD Beginners' Area
    Replies: 7
    Last Post: 19th Sep 2011, 12:13 am
  4. points of a polyline lisp routine
    By Emily_83 in forum AutoLISP, Visual LISP & DCL
    Replies: 10
    Last Post: 10th Nov 2010, 02:23 pm
  5. Automatic Extraction of Elevation Properties of Points on a Line
    By skipo4us in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 15th Mar 2008, 05:46 am

Tags for this Thread

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