Jump to content
daveacad

Automatic Polyline from Points LISP (need)

Recommended Posts

daveacad

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:acad:

Share this post


Link to post
Share on other sites
Tharwat

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

Share this post


Link to post
Share on other sites
daveacad
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:acad:

Automatic Polyline from Points LISP (A).jpg

Automatic Polyline from Points LISP (B).jpg

Share this post


Link to post
Share on other sites
daveacad
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 :cry:.

 

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:acad:

Share this post


Link to post
Share on other sites
Lee Mac
As I wrote, I'm not able to use Convex Hull. I'm not so good with lisp :cry:.

 

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

Share this post


Link to post
Share on other sites
BIGAL

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 ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×