Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Finding closest snapping point

10 REPLIES 10
Reply
Message 1 of 11
denys_gorkovchuk
589 Views, 10 Replies

Finding closest snapping point

Is there a way to find the closest snapping point according to the enabled Snap mode?

I have the following task:
I have a point cloud in the drawing and 3d polyline, which outlines some object in the point cloud.

I need to adjust the height of polyline vertexes to height of points in the point cloud. I can crop the point cloud to only interested object.

In theory, I could take a vertex and find the nearest point from the cloud to get it's height, but I can't access the points from the point cloud with LISP (it is possible only with ObjectARX, which I am not good in).

Another approach is to enable "point cloud 3D snapping" and move vertex into the direction of the point cloud. As soon as snapping point appears - stop moving the vertex. I can do that manually. But I don't know if it is possible to simulate that kind of movement and implement that in LISP.

 
 

 

 

10 REPLIES 10
Message 2 of 11


@denys_gorkovchuk wrote:

... I could take a vertex and find the nearest point from the cloud to get it's height, but I can't access the points from the point cloud with LISP ....


Does the AutoLisp (osnap) funtion not give you the closest Point in the point cloud?

 

(osnap YourVertexLocation "_node")

 

from which you can easily extract the Z coordinate.

Kent Cooper, AIA
Message 3 of 11

Thanks for you suggestions.
Unfortunately "osnap" works only with native CAD geometries and mode "_node" snaps only to "vector points" and not point clouds.
Message 4 of 11

Post a dwg only need a few point cloud POINTS and a pline. The issue is what is your "Point cloud"

Message 5 of 11


@denys_gorkovchuk wrote:
... "osnap" works only with native CAD geometries and mode "_node" snaps only to "vector points" and not point clouds.

So a Point Cloud is not a cloud of Points?  [I have no experience with them.]  Surely overlay programs that work with them must have some way of latching on to the points, whatever they are.  How does one make use of them?

Kent Cooper, AIA
Message 6 of 11

If you are using CIV3D which I suspect you are then you can make a surface of cloud points and drape a pline onto that surface getting 3d points.

Message 7 of 11

"Point cloud" is a massive of points (millions, billions). AutoCAD and much other software are not able to handle such amount as individual points, that's why they use some special data storage format for that. In case AutoCAD this format is RCP. It is created by Autodesk ReCap software. RCP-filecan be inserted into AutoCAD as xREF.

ReCap as external software is used mostly to convert point cloud to RCP-format, so pointclouds can be used in AutoCAD. But it is not able to do any processing in terms of object detection or modelling.

 

3DSNAP is able to snap to individual points from the pointcloud, and probably it might help, but I can't find a way to use it from LISP, as osnap works only with "2D geometry".

Message 8 of 11

Unfortunately, this approach is not an option. I don't use Civil. But even in Civil this would work only with some very simple surfaces, like plain ground. Even a curbstone is enough to make "surface from point cloud" terrible.
Message 9 of 11

Curbstone problems, that is why we still had 2 surveyors for true road work surveys, yes we also had a drone making clouds it was very impressive for back ground or decision about true field survey required.

 

So that's where I stop the miracle of drones can not replace a man or woman with a stick.

Message 10 of 11
john.uhden
in reply to: Sea-Haven

Alan,

Sure you can.

Just hit them over the head with a big stick, carry off the bodies and leave the sticks in their place.  I'm sure Crocodile Dundee could do it. 😆

John F. Uhden

Message 11 of 11
Sea-Haven
in reply to: john.uhden

Leave the bodies and the drone cloud would find them.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report