MoI discussion forum
MoI discussion forum

Full Version: Import cloud points options?

From: Matadem
24 Mar   [#1]
Good day.
I have finally got my cnc probe working.
the issue I have now is that it outputs the file like this.
X1.7116 Y0.0000 Z0.0000
X1.7138 Y0.0203 Z0.0000
X1.7149 Y0.0406 Z0.0000
X1.7166 Y0.0610 Z0.0000

and If I am not mistaken Moi can import it only like this?
1.7116, 0.0000 ,0.0000

Anyone might know a quick way to change it from what Moi can read or that can Moi read it as is?
the main export is as the attached pic....so is there way for Moi to read it as is it will save me allot of time.

Thanks!

Image Attachments:
digtocad.JPG 


From: BurrMan
24 Mar   [#2] In reply to [#1]

I’ve done it before with Notepads “find and replace”

I think i resorted to excel once also. More powerful options for tuples..

I didn't ask Michael about it though. Maybe he has a more eloquent way…


From: Frenchy Pilou (PILOU)
24 Mar   [#3]
A cool free prog about cloud points! ;)
http://cloudcompare.org
From: Michael Gibson
24 Mar   [#4] In reply to [#1]
Hi Matadem, here's a modified version of the ImportPointFile script which should handle your CAM program's point output.

This one should skip the G1 at the start of a line and will remove any X or Y label on the coordinates.

Instructions for installing a plugin here.

Hope this helps,
- Michael

Attachments:
ImportPointFileMatadem.zip


From: Matadem
24 Mar   [#5]
Michael can it do z as well?
I tried the script and it works fast and efficient as always.
Tnx!
From: Michael Gibson
24 Mar   [#6] In reply to [#5]
Hi Matadem,

re:
> Michael can it do z as well?

I didn't see any z coordinates in your example, but it if it has a 'Z' label on it like it does for X and Y you can update the script to handle that.

Open the ImportPointFilematadem.js file in a text editor and on line 112 which currently has this:
code:
			if ( val[0].toUpperCase() == 'X' || val[0].toUpperCase() == 'Y' )


Change it to this instead:
code:
			if ( val[0].toUpperCase() == 'X' || val[0].toUpperCase() == 'Y' || val[0].toUpperCase() == 'Z' )


- Michael
From: Matadem
24 Mar   [#7]
Works good!

Tnx!
From: KENMO
29 Mar   [#8] In reply to [#7]
Sorry if I am interrupting this thread, but can this script import point clouds created via photogrammeyry. I use Zephyr3D for my photscans.

Cheers

Ken
From: Michael Gibson
29 Mar   [#9] In reply to [#8]
Hi Ken,

re:
> Sorry if I am interrupting this thread, but can this script import point clouds created via
> photogrammeyry. I use Zephyr3D for my photscans.

The script can import points that are listed in .csv file.

It should be a text file with the x,y,z coordinates for one point on each line of the file.

- Michael