Importing rcs-data from drone scan

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
thschrader
Posts: 1808
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Importing rcs-data from drone scan

Postby thschrader » Thu Jun 18, 2020 7:18 am

Hi,
a colleague asked me if I can import a 600 MB-file from a drone scan in FC.
I cant find rcs in the import-filter. Maybe converting rcs to another format before?
Thanks for help.
Thomas
example revit:
https://knowledge.autodesk.com/support/ ... C-htm.html
import_rcs_data.JPG
import_rcs_data.JPG (15.47 KiB) Viewed 565 times
jeno
Posts: 801
Joined: Sun Jun 29, 2014 10:41 am

Re: Importing rcs-data from drone scan

Postby jeno » Thu Jun 18, 2020 3:48 pm

thschrader wrote:
Thu Jun 18, 2020 7:18 am
Hi,
a colleague asked me if I can import a 600 MB-file from a drone scan in FC.
I cant find rcs in the import-filter. Maybe converting rcs to another format before?
Thanks for help.
Thomas
...
Hi Thomas,
it is not surprising that you can't find a import-filter. It is a Autodesk Recap file. Afaik it is closed source.
A way to go would be to export to XYZ (pure point data) or PTS (point data plus color data). This data could be imported into Meshlab or CloudCompare. Further processed in a triangle-mesh it can be imported in freecad.
But if I look at the filesize (600 Mbyte!) I tend to say it is necessary to downsample the data depending on your needs.

Cheers
thschrader
Posts: 1808
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Importing rcs-data from drone scan

Postby thschrader » Thu Jun 18, 2020 4:22 pm

jeno wrote:
Thu Jun 18, 2020 3:48 pm
...
Hi Thomas,
it is not surprising that you can't find a import-filter. It is a Autodesk Recap file. Afaik it is closed source.
...
Jeno thanks!
Yes, after some hours google-time looking for converters my boss decided:
We must buy Recap! :lol:
BTW: the scan was done by Deutsche Telekom. Experimental, scanning cell-phone towers
for CAD-usage. Nobody wants to climb up the tower for doing measurements ;)
Lets see if Recap has export functions for 3D to load in FC.
jeno
Posts: 801
Joined: Sun Jun 29, 2014 10:41 am

Re: Importing rcs-data from drone scan

Postby jeno » Thu Jun 18, 2020 6:03 pm

thschrader wrote:
Thu Jun 18, 2020 4:22 pm
jeno wrote:
Thu Jun 18, 2020 3:48 pm
...
Hi Thomas,
it is not surprising that you can't find a import-filter. It is a Autodesk Recap file. Afaik it is closed source.
...
Jeno thanks!
Yes, after some hours google-time looking for converters my boss decided:
We must buy Recap! :lol:
BTW: the scan was done by Deutsche Telekom. Experimental, scanning cell-phone towers
for CAD-usage. Nobody wants to climb up the tower for doing measurements ;)
Lets see if Recap has export functions for 3D to load in FC.
Your welcome.
I have my doubts ;) Beware, cause they'll try to pull you into the Autodesk universe.

cheers
User avatar
Kunda1
Posts: 7986
Joined: Thu Jan 05, 2017 9:03 pm

Re: Importing rcs-data from drone scan

Postby Kunda1 » Thu Jun 18, 2020 6:30 pm

Is there any way to get the original drone data to export in to another point cloud format? (since rcs is proprietary)
I remember something about @HakanSeven12 importing an impressively large point cloud file in to Geomatics WB (or was it Trails WB)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
HakanSeven12
Posts: 817
Joined: Wed Feb 06, 2019 10:30 pm

Re: Importing rcs-data from drone scan

Postby HakanSeven12 » Thu Jun 18, 2020 6:40 pm

If your file is a text format you can use trails. If not you need to convert it to text format.
thschrader
Posts: 1808
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Importing rcs-data from drone scan

Postby thschrader » Sat Jun 20, 2020 8:43 am

HakanSeven12 wrote:
Thu Jun 18, 2020 6:40 pm
If your file is a text format you can use trails. If not you need to convert it to text format.
The original rcs-file has a size of 615 MB because of scanning the complete forrest around the tower :lol:
In the end I could import the tower to FC.
My Workflow:
In Recap: export data as pts (simple text-file)
Rename file extension from pts to txt, open text editor.
Convert decimal-point to comma.
Open txt in Excel, get rid of line 1 and columns 4-6, save as txt.
Open text-editor, reconvert comma to decimal-point, save file as asc.
Import asc in FC.

Problems:
The text-editor needs a while to replace points/commas in such a huge file.
My Excel decimates the txt-file, I cannot load more than approx. 1 mio lines
For a technical documentation the original scan is far too rough.
FC places the point-cloud kilometers away from the origin depending on drone-GPS.
As far as I understood some Youtube posts on Recap, there is the possibility to upload the point-cloud data to the Autodesk cloud (after creating a user-account). They can produce a mesh for downloading and using in CAD.
But is that good way for sensible data? (Often there are antennas from the government/military at the towers and this is classified data…)

Installing Trails/Geodata-workbenches:
Which github-link is “valid”?
Where must I put the pivy-tracker?
(the addon-manager does not work on my company-laptop, no idea why. Maybe the virus scanner…)
https://github.com/HakanSeven12/FreeCAD ... -Workbench
https://github.com/joelgraff/freecad.trails
https://github.com/joelgraff/pivy_trackers
My system:
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20980 (Git)
Build type: Release
Branch: master
Hash: c2818d9159385d23b182dc7167af2d4bacbee94c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
files.JPG
files.JPG (81.02 KiB) Viewed 383 times
tower.JPG
tower.JPG (116.36 KiB) Viewed 383 times
User avatar
HakanSeven12
Posts: 817
Joined: Wed Feb 06, 2019 10:30 pm

Re: Importing rcs-data from drone scan

Postby HakanSeven12 » Sat Jun 20, 2020 9:07 am

You can import pts files direcly by using trails. Its support column defination and multiple delimeters(comma,space,tab).
links:
https://github.com/joelgraff/freecad.trails
https://github.com/joelgraff/pivy_trackers
https://github.com/joelgraff/freecad_python_support
thschrader wrote:
Sat Jun 20, 2020 8:43 am
Where must I put the pivy-tracker?
Must be like this

Code: Select all

Mod
  |_  Trails
           |_ freecad_python_support
           |_ pivy_trackers
But there is some bug at pivy trackers so maybe you need to wait untill this PR merged.
https://github.com/joelgraff/pivy_trackers/pull/22
jeno
Posts: 801
Joined: Sun Jun 29, 2014 10:41 am

Re: Importing rcs-data from drone scan

Postby jeno » Sat Jun 20, 2020 10:10 am

thschrader wrote:
Sat Jun 20, 2020 8:43 am
HakanSeven12 wrote:
Thu Jun 18, 2020 6:40 pm
If your file is a text format you can use trails. If not you need to convert it to text format.
The original rcs-file has a size of 615 MB because of scanning the complete forrest around the tower :lol:
In the end I could import the tower to FC.
My Workflow:
...
Problems:
The text-editor needs a while to replace points/commas in such a huge file.
My Excel decimates the txt-file, I cannot load more than approx. 1 mio lines
For a technical documentation the original scan is far too rough.
FC places the point-cloud kilometers away from the origin depending on drone-GPS.
As far as I understood some Youtube posts on Recap, there is the possibility to upload the point-cloud data to the Autodesk cloud (after creating a user-account). They can produce a mesh for downloading and using in CAD.
But is that good way for sensible data? (Often there are antennas from the government/military at the towers and this is classified data…)
As mentioned in my first post Meshlab is afaik able to open pts-files. By the way column 4 to 6 is RGB. Sometimes you can find 7 columns. Then column 4 is intensity, a value for the quality of the reflected beam compared to the sent.
In Meshlab you are able to import the point cloud, edit the points (delete and also translate) and mesh it.
Maybe you give it a try as long as trails do not work for you.

cheers
User avatar
Kunda1
Posts: 7986
Joined: Thu Jan 05, 2017 9:03 pm

Re: Importing rcs-data from drone scan

Postby Kunda1 » Sun Jun 21, 2020 10:32 am

thschrader wrote:
Sat Jun 20, 2020 8:43 am
Rename file extension from pts to txt, open text editor.
Convert decimal-point to comma.
Open txt in Excel, get rid of line 1 and columns 4-6, save as txt.
Open text-editor, reconvert comma to decimal-point, save file as asc.
Per @HakanSeven12 answer the below solutions are superfluous, but FWIW
You may just be able to automate these steps with python especially a library called pandas.
converting decimal to comma can be done with 1 line of code:

Code: Select all

df = pd.read_csv(r'data.csv', decimal=',')
source https://stackoverflow.com/a/34315381

Removing parts of excel files without opening them can also be done with Pandas:
https://www.geeksforgeeks.org/python-de ... ndas-drop/
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features