Page 2 of 2

Re: How to export properties such as Box center and Box dimensions

Posted: Thu Sep 13, 2018 12:13 pm
by Ph.Wo.
Hey,

i need the same feature, but my knowlege about c++ is realy bad. So if anybody has something that will work, or maybe have a nother solution to geht the bounding box for a lot Pointclouds, please let me know.

Have a nice day,

Philipp

Re: How to export properties such as Box center and Box dimensions

Posted: Thu Sep 13, 2018 7:49 pm
by daniel
Well, the code modifications are really easy.

In the current version, after the line 8454 of mainwindow.cpp (csvStream << "meanZ;";) you can add:

Code: Select all

csvStream << "minX;";
csvStream << "minY;";
csvStream << "minZ;";
csvStream << "maxX;";
csvStream << "maxY;";
csvStream << "maxZ;";
And after the line 8479 of mainwindow.cpp (csvStream << G.z << ";";) you can add:

Code: Select all

csvStream << cloud->getBB_recursive().minCorner().x << ";";
csvStream << cloud->getBB_recursive().minCorner().y << ";";
csvStream << cloud->getBB_recursive().minCorner().z << ";";
csvStream << cloud->getBB_recursive().maxCorner().x << ";";
csvStream << cloud->getBB_recursive().maxCorner().y << ";";
csvStream << cloud->getBB_recursive().maxCorner().z << ";";

Re: How to export properties such as Box center and Box dimensions

Posted: Wed Nov 01, 2023 11:34 pm
by my_cc
daniel wrote: Thu Sep 13, 2018 7:49 pm Well, the code modifications are really easy.

In the current version, after the line 8454 of mainwindow.cpp (csvStream << "meanZ;";) you can add:

Code: Select all

csvStream << "minX;";
csvStream << "minY;";
csvStream << "minZ;";
csvStream << "maxX;";
csvStream << "maxY;";
csvStream << "maxZ;";
And after the line 8479 of mainwindow.cpp (csvStream << G.z << ";";) you can add:

Code: Select all

csvStream << cloud->getBB_recursive().minCorner().x << ";";
csvStream << cloud->getBB_recursive().minCorner().y << ";";
csvStream << cloud->getBB_recursive().minCorner().z << ";";
csvStream << cloud->getBB_recursive().maxCorner().x << ";";
csvStream << cloud->getBB_recursive().maxCorner().y << ";";
csvStream << cloud->getBB_recursive().maxCorner().z << ";";
I changed code according to the instructions above, and tried the command below to install the CC.

1. mkdir build & cd build
2. cmake -DCMAKE_PREFIX_PATH=C:\Qt\5.15.2\msvc2019_64 ..
3. cmake --build . --config Release
4. cmake --install .

Then, I got the error shown below during the building step 3.

C:\Users\taoliu\CloudCompare\build\qCC\ui_graphicalTransformationDlg.h(322,29): error C2039: 'setStepType': is not a me
mber of 'QDoubleSpinBox' [C:\Users\taoliu\CloudCompare\build\qCC\CloudCompare.vcxproj]
C:\Users\taoliu\anaconda3\Library\include\qt\QtWidgets\qspinbox.h(113): message : see declaration of 'QDoubleSpinBox' [
C:\Users\taoliu\CloudCompare\build\qCC\CloudCompare.vcxproj]
C:\Users\taoliu\CloudCompare\build\qCC\ui_graphicalTransformationDlg.h(322,59): error C2039: 'AdaptiveDecimalStepType':
is not a member of 'QAbstractSpinBox' [C:\Users\taoliu\CloudCompare\build\qCC\CloudCompare.vcxproj]
C:/Users/taoliu/anaconda3/Library/include/qt\QtWidgets/qabstractspinbox.h(56): message : see declaration of 'QAbstractS
pinBox' [C:\Users\taoliu\CloudCompare\build\qCC\CloudCompare.vcxproj]
C:\Users\taoliu\CloudCompare\build\qCC\ui_graphicalTransformationDlg.h(322,1): error C2065: 'AdaptiveDecimalStepType':
undeclared identifier [C:\Users\taoliu\CloudCompare\build\qCC\CloudCompare.vcxproj]
C:\Users\taoliu\CloudCompare\build\qCC\ui_graphicalTransformationDlg.h(344,31): error C2039: 'setStepType': is not a me
mber of 'QDoubleSpinBox' [C:\Users\taoliu\CloudCompare\build\qCC\CloudCompare.vcxproj]
C:\Users\taoliu\anaconda3\Library\include\qt\QtWidgets\qspinbox.h(113): message : see declaration of 'QDoubleSpinBox' [
C:\Users\taoliu\CloudCompare\build\qCC\CloudCompare.vcxproj]
C:\Users\taoliu\CloudCompare\build\qCC\ui_graphicalTransformationDlg.h(344,61): error C2039: 'AdaptiveDecimalStepType':
is not a member of 'QAbstractSpinBox' [C:\Users\taoliu\CloudCompare\build\qCC\CloudCompare.vcxproj]
C:/Users/taoliu/anaconda3/Library/include/qt\QtWidgets/qabstractspinbox.h(56): message : see declaration of 'QAbstractS
pinBox' [C:\Users\taoliu\CloudCompare\build\qCC\CloudCompare.vcxproj]
C:\Users\taoliu\CloudCompare\build\qCC\ui_graphicalTransformationDlg.h(344,1): error C2065: 'AdaptiveDecimalStepType':
undeclared identifier [C:\Users\taoliu\CloudCompare\build\qCC\CloudCompare.vcxproj]


Step 4 gave me the error below.
C:\Users\taoliu\CloudCompare\build>cmake --install .
-- Install configuration: "Release"
-- Installing: C:/Program Files (x86)/CloudCompareProjects/CloudCompare/CCAppCommon.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/ccViewer/CCAppCommon.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/CloudCompare/CC_FBO_LIB.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/ccViewer/CC_FBO_LIB.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/CloudCompare/CCPluginAPI.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/ccViewer/CCPluginAPI.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/CloudCompare/CCCoreLib.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/ccViewer/CCCoreLib.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/CloudCompare/QCC_DB_LIB.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/ccViewer/QCC_DB_LIB.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/CloudCompare/QCC_GL_LIB.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/ccViewer/QCC_GL_LIB.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/CloudCompare/QCC_IO_LIB.dll
-- Installing: C:/Program Files (x86)/CloudCompareProjects/ccViewer/QCC_IO_LIB.dll
CMake Error at qCC/cmake_install.cmake:37 (file):
file INSTALL cannot find
"C:/Users/taoliu/CloudCompare/build/qCC/Release/CloudCompare.exe": File
exists.
Call Stack (most recent call first):
cmake_install.cmake:39 (include)

Re: How to export properties such as Box center and Box dimensions

Posted: Thu Nov 02, 2023 7:33 am
by daniel
I guess it's an issue with the version of Qt you are using as 'setStepType' has been introduced in version 5.12.

Providing the path to Qt as 'CMAKE_PREFIX_PATH' may not be sufficient to force Qt to use this particular version. You should use the GUI version of CMake and check which version is actually found by CMake.

Re: How to export properties such as Box center and Box dimensions

Posted: Sat Nov 04, 2023 12:35 am
by my_cc
Thank you, Daniel. I was able to compile it successfully following the tutorial in one YouTube video, which uses GUI CMAKE rather than the command line of CMAKE.
Helpful YouTube tutorial link https://www.youtube.com/watch?v=hjT7WQLbqqE

Re: How to export properties such as Box center and Box dimensions

Posted: Fri Apr 05, 2024 5:32 am
by virenbachani
daniel wrote: Fri Feb 23, 2018 8:51 am Yes, it basically consists in 'hacking' the code of the 'Tools > Batch export > Export cloud info' method.

You can find it in the big 'mainwindow.cpp' file, and the method is called MainWindow::doActionExportCloudInfo.

The current versions saves various pieces of info, but you should be able to comment a lot of lines. And to get the bounding-box extents, just call the 'getBoundingBox' method of each 'cloud' instance.
Hi Daniel, has there been any updates to this solution? I have not found any files with those names. If you could please help me out with this?

Re: How to export properties such as Box center and Box dimensions

Posted: Sat Apr 06, 2024 5:48 pm
by daniel

Re: How to export properties such as Box center and Box dimensions

Posted: Fri May 10, 2024 12:09 am
by kartikanur.rp
Hi, is there any updates regarding this issue?

Re: How to export properties such as Box center and Box dimensions

Posted: Sat May 11, 2024 8:11 am
by daniel
Not that I am aware of.