Automation of Point Cloud Processing

Automation of Point Cloud Processing

Anonymous
Not applicable
1,156 Views
2 Replies
Message 1 of 3

Automation of Point Cloud Processing

Anonymous
Not applicable

Firstly, thank you very much for reading this post.

 

I have a question, which I need your help.

I wish to automate the process, since it is just a repetitive work. I wish to:

Import Point Cloud -> Attach -> rotate it so I can take appropriate cross section -> take multiple cross sections -> export to a new paperspace -> save file

 

Problem is that I still need to put in manual work to complete the task. For example, when inserting point cloud, I have to press enter after importing point cloud to set parameters. I am doing the task to multiple objects so automation is crucial, on every single bit.

 

Using scr file format, I have managed to Import PC and attached it, but my goal is to run the script which does the whole thing without my interaction at all.

Unfortunately, I have no experience with lisp so using it was proven difficult.

I need to know a couple things at least to start with, and I need to do them just by using command line and keyboard, which can be fully executed.

Firstly, how do I select a specific object using command lines? Like, if I wish to select PC with pre written command lines, what should I do?

Secondly, how do I set a variable so I can use the variable as a number? I wish to set z values of PC onto variables and conduct repetitive work.

And lastly, how do I perform 3d rotation without manually selecting axis? (So far, you have to manually select axis to rotate onto)

 

If these questions could be answered, that would be fantastic. Thank you!

 

0 Likes
1,157 Views
2 Replies
Replies (2)
Message 2 of 3

Ranjit_Singh
Advisor
Advisor

If you already have a point cloud in the drawing then you need to either have the user interactively select the file or build a selectionset to automate the selection. Try below routine to start off. The user is asked to select rcp file. See here for selectionsets. Note that I tried with a sample rcs file and it works. I am assuming it should work for rcp file.

 

(defun c:somefunc ()
(command-s "._-pointcloudattach" (getfiled "Select rcp file" "" "rcp" 0) '(0 0) 1 0)
(command-s "._rotate3d" (entlast) "" "_y" '(0 0 0) 40) ;rotate 40 degrees about y axis
(princ)
)

 

Message 3 of 3

Anonymous
Not applicable

Thank you very much for help, however I realised that I'm no good with lisp, so I just used simple command lines for now.

Do you know any way to implement Python into this like here?

 

0 Likes