Geotechnical Work Addon

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
JellyPalm
Posts: 157
Joined: Sun Mar 29, 2020 12:22 am

Re: Geotechnical Work Addon

Post by JellyPalm »

Hiya,
So, moving on:
I was getting a "no module named Laspy" error message when I tried to load a Lidar points cloud. Grrr.

But, without hesitation I went to my new friend, GitHub and cloned the laspy/laspy.git to my User/.../Mod folder.
That made the error message dissapear in FreeCAD.

Now when I go to get Lidar, (Toolbar: DataTools/GeoDataImportTools/Import LIDAR)/ a nice little window opens asking to browse for my data file. Great

There are some sample .LAS files provided in the Laspy clone (users/.../mod/Laspy/.../test/data/)
So I grabbed one of those to practise.

Bo-Bong!

The points clouds are appearing in the tree.
I can put a surface on them (also visible in the tree) - but there is no corresponding image on the screen of either the cloud or the surface.
(I did 'view - fit selection", but still nothing)

I also tried Toolbar: DataTools/ImportPointsFile pathway but similar NuLL result.

The error message is as follows for both pathways:
13:21:27 <Exception> type must be 'Matrix' or 'Placement', not type

Thoughts?
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Geotechnical Work Addon

Post by bernd »

would you post a small example file to test with?
JellyPalm
Posts: 157
Joined: Sun Mar 29, 2020 12:22 am

Re: Geotechnical Work Addon

Post by JellyPalm »

Hi Bernd.

sure..

oops
when I go to add attachments (simple.las), I get this error message from the FC-forum-server:

"Error: Invalid File extension".

I tried snipping the message, but that isn't loading either ,(<39kb?!).
I changed the extension to txt, but it still won't load it.

Perhaps its the file, perhaps me.
I got it from the Lapsy/test/data folder, after I cloned Lapsy into my Mod folder (it should be in yours too I guess)
I gotta go just now, will investigate further in couple hours.

Cheers,
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Geotechnical Work Addon

Post by Joel_graff »

JellyPalm wrote: Fri Oct 30, 2020 1:07 am Perhaps its the file, perhaps me.
I got it from the Lapsy/test/data folder, after I cloned Lapsy into my Mod folder (it should be in yours too I guess)
I gotta go just now, will investigate further in couple hours.
Unless @bernd knows better, maybe try renaming the file to *.txt? That might pacify the forum software's filter.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Geotechnical Work Addon

Post by bernd »

Joel_graff wrote: Fri Oct 30, 2020 2:41 am Unless @bernd knows better, maybe try renaming the file to *.txt? That might pacify the forum software's filter.
just add .txt at the end of the file name means "simple.las.txt" should do the trick
JellyPalm
Posts: 157
Joined: Sun Mar 29, 2020 12:22 am

Re: Geotechnical Work Addon

Post by JellyPalm »

hi again,

Unfortunately that original small sample .las file refuses to be attached, .txt, .las, .gz - nothing works.
sorry my screen pic is so small - I seem to be having lots of issues uploading any files bigger than 50kb to the forum as well.)

anyway, I have better data. Here is picture of a .las file that works.
(I got it from openTopography.org - they have world map with drag-selectable areas. Its free. The site compiles it upon request and creates a file you can download (takes about 3 minutes)
Tip: choose a very small area (1km x 1km) - there are a lot of data points.
.
its3D -3.png
its3D -3.png (39.03 KiB) Viewed 1341 times
.
there are still some error messages to be decoded when importing the Lidar into FCAD, but only once the point cloud is loaded in the tree.

19:54:55
File "C:\Users\Daz\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\geomatics\geoimport\import_lidar.py", line 391, in run
import_lidar(fn,obj,self.root.ids['createPCL'].isChecked(),self.root.ids['useOrigin'].isChecked())
--> File "C:\Users\Daz\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\geomatics\geoimport\import_lidar.py", line 84, in import_lidar
nar[xi,yi] += p.z
--> IndexError: index 1620 is out of bounds for axis 1 with size 1606
19:56:23 Running the Python command 'Create Surface' failed:
Traceback (most recent call last):
File "C:\Users\Daz\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\geomatics\surface\CreateSurface.py", line 95, in Activated
PointGroups.Label = "Point Groups"

'list' object has no attribute 'Label'


Alternatley, if someone can name me a cloud storage place where I can drop the file then you can use this file for playing with (pictured is 425MB, also have a 17MB version)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Geotechnical Work Addon

Post by bernd »

JellyPalm wrote: Fri Oct 30, 2020 8:05 am anyway, I have better data. Here is picture of a .las file that works.
(I got it from openTopography.org - they have world map with drag-selectable areas. Its free. The site compiles it upon request and creates a file you can download (takes about 3 minutes)
Tip: choose a very small area (1km x 1km) - there are a lot of data points.
there are dozens of options to adjust. I have no idea what to put in there to get a similar file as you had problems with.
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Geotechnical Work Addon

Post by Joel_graff »

JellyPalm wrote: Fri Oct 30, 2020 8:05 am Alternatley, if someone can name me a cloud storage place where I can drop the file then you can use this file for playing with (pictured is 425MB, also have a 17MB version)
There's a number of ways. For example, you can publicly share a Google Drive folder... or start your own github repo and push the file up to that. :) Not that I'd advocate github strictly for file sharing, lol.

I've never touched the geodata side of things, so I can't offer any suggestions or take a quick look. But I can try to dig into it a bit later this week if you don't get an answer elsewhere. It's really outside my knowledge domain at the moment, though.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
JellyPalm
Posts: 157
Joined: Sun Mar 29, 2020 12:22 am

Re: Geotechnical Work Addon

Post by JellyPalm »

Joel_graff wrote: Fri Oct 30, 2020 1:34 pm or start your own github repo and push the file up to that. :)
Git Hub eh? : JellyPalm/Geodata/points.las


-43.620152, 172.754566

8-)

cheers,
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Geotechnical Work Addon

Post by Joel_graff »

JellyPalm wrote: Sat Oct 31, 2020 8:44 am Git Hub eh? : JellyPalm/Geodata/points.las
We'll make a developer out of you yet. ;)

BTW, when posting a link, paste the full path and click the link button in the message editor toolbar to enclose it in the url tags and make it an actual hyperlink:
https://github.com/JellyPalm/Geodata/b ... points.las
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Post Reply