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

Boundary of a Point Cloud data

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
1439 Views, 3 Replies

Boundary of a Point Cloud data

Good day everyone,

I am right now working with a point cloud to create a section view.

To automate the process using autolisp scripting, it is essential to know the boundary box of the point cloud. As it can be seen on the pictures, a grey box is drawn after inserting PC to modelspace.

I tried using the model tree and files manager, and other properties, but there is no way to identify boundary box of the point cloud.

I am guessing that there should be a method, since autocad automatically draws a box.

 

If not, it would be great if I can at least identify maximum and minimal x,y,z values of the box. Thank you very much!

 

Screenshot (15).pngScreenshot (23).png

3 REPLIES 3
Message 2 of 4
Ranjit_Singh1
in reply to: Anonymous

Hi cjf96cjf try the below code

(defun c:somefunc  (/ vlaobj)
 (setq vlaobj (vlax-ename->vla-object (car (entsel "\nSelect point cloud :"))))
 (and (= "AcDbPointCloud" (vla-get-objectname vlaobj)) (vla-getboundingbox vlaobj p1 p2))
 (princ (strcat "\nLower left corner :"
                (vl-princ-to-string (safearray-value p1))
                "\nUpper right corner :"
                (vl-princ-to-string (safearray-value p2))
                "\nLength :"
                (rtos (vla-get-length vlaobj) 2 4)
                "\nWidth :"
                (rtos (vla-get-width vlaobj) 2 4)
                "\nHeight :"
                (rtos (vla-get-height vlaobj) 2 4)))
 (princ))
Message 3 of 4
Anonymous
in reply to: Ranjit_Singh1

Thank you very much for help, but I seem to have resolved the issue by myself. I will upload my code soon so you can review it too.

Thanks for help!

Message 4 of 4
ratelade_petithomme
in reply to: Anonymous

Hello,

 

I want to crop my pointcloud with à lisp routine.

Il try to modify entity dxf group "13" (4 points)  and entmod, entupd, but it doesn't work.

 

Do you have an idea to help me ?

 

Thank you.

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

Post to forums  

Forma Design Contest


Autodesk Design & Make Report