Thank you for the detailed response, for the "best fit" function, I'll look into how it could assist with edge detection.
Best regards,
Original Message:
Sent: 10-26-2024 04:52
From: Fernando Calvo
Subject: Assistance with Point Cloud Edge Detection and Clicking in TBC Macro Development
Hi Nayef,
as Ronny pointed, a simple coordinate picker will give you back the coordinates, however you need to pay attention to the object snap or leave it up to the user to have selected previously the correct object snap (point, if you want to pick points from the point cloud).
Regarding edge detection, it´s pretty tricky and I personally don´t like it, as I have tried and used many different software packages promising automatic detection etc, however a big percentage of false recognition happen with each single solution, so I needed much more to check all and correct the false recognition, than picking myself the correct points (i.e. the wall itself and not a furniture or a picture before the wall itself).
Having said that, I guess the "best fit" function included in TBC could help, however I didn´t try it yet from the programming side. Again, in my opinion, this is always very dangerous and also in the time that TBC needs to calculate the best fit for a selected point cloud rectangle, you can create several walls.
I use it i.e. for detecting lowest and highest points of a very small selected region of a room, i.e. 0.50 x 0.50 m, and even though it takes many seconds to give me back the lowest and highest points, so in that time, I can pick them from the cutting plane view, and I´m sure that the correct points were selected.
I hope this helps.
Regards,
Fernando
------------------------------
Fernando Calvo
calvo@calvo-geospatial.com
------------------------------
Original Message:
Sent: 10-25-2024 16:01
From: Ronny Schneider
Subject: Assistance with Point Cloud Edge Detection and Clicking in TBC Macro Development
1.
Assuming you have the appropriate snap mode enabled then a normal coordinate picker will give you the coordinate of the cloud point.
# in the XAML <Wpf:CoordinateEdit x:Name="coordCtl1" ShowElevationIf3D="True" AutoTab="True"/># in pythonp1_sel = self.coordCtl1.Coordinate
2.
can't help you with that, haven't looked into that yet
maybe @Fernando Calvo can, I believe he works quite a bit with point clouds
With my current knowledge I'd have to the user select/click points on either side of the edge.
Then retrieve cloud points from the database in the vicinity of those.
Use something like this https://community.trimble.com/discussion/whats-the-general-purpose-of-the-new-namespace-trimblerwcore-in-202400 to compute different planes and intersect those.
3.
Yes, there is, through the Visual Studio object browser. Check out my video in Post 2 here https://community.trimble.com/communities/community-homepage/digestviewer/viewthread?GroupId=415&MessageKey=4fa77769-d955-4525-80ff-daca0707c274&CommunityKey=8a262af4-a35e-4e9a-9dd3-191cc785899a
And that's basically all we have in terms of documentation. In meanwhile 6 years Trimble hasn't bothered to provide an SDK documentation as they have for the Access SDK for instance or other CAD programs do.
At the beginning we had Gary Lantaff, who wrote the TBC sample macros, to give us some advice here on the forum. But he retired a while back. Currently we have Bryce who occasionally posts something here and tries to help. Not sure what his position within Trimble is, but I had to work out quite a bit through trial and fail on own.
------------------------------
Ronny Schneider