Jump to content

Recommended Posts

Posted

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:

Posted

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

Posted
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

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

Posted
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

Posted

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 ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...