Page 1 of 2

Algorithm

Posted: Mon Jul 10, 2017 6:40 am
by Navyadubey
Dear Sir,
I am new to CloudCompare and I am not working on all of its features, I am working on translate/rotate, unroll and projection.
I have gone through the source code of the software but I am unable to figure out the basic Algorithm used.
It will be really helpful if you could tell me which ALGORITHMS are used in developing these features.

Thanks and Regards
Navya Dubey

Re: Algorithm

Posted: Mon Jul 10, 2017 8:33 pm
by daniel
Translate/rotate: no particular algorithm, apart the way we convert the mouse clicks to a translation and rotation matrix maybe? (for this you can look at the ccGLWindow.cpp class - especially the mouseMoveEvent and mousePressEvent methods - but I'm not sure this is what you are looking for ;).

Unroll: once again, it's fairly simple maths here, apart maybe for the cone unrolling procedure. Anyway, you can see how it is implemented in the ccPointCloud.cpp class, unrollOnCylinder and unrollOnCone methods.

Projection: can you be more specific?

Re: Algorithm

Posted: Tue Jul 11, 2017 10:11 am
by Navyadubey
Dear Sir,
Thanks a lot for your answer and in projection, I was particularly asking for RASTERISATION.
My project is to make a software with some features of CC.
Initially, I want to open a point cloud and I found a method doActionLoadFile() for the same but it requires numerous include directives some are user defined while some are inbuilt.
Could you please tell me the procedure (I know it's a bit time taking)just to open the point cloud.

Re: Algorithm

Posted: Tue Jul 11, 2017 7:46 pm
by daniel
Ah, the graphical interface of CloudCompare is not meant to be separated in various components that can be used elsewhere.

The core library (CC_CORE_LIB) is LGPL and can be used by other projects, but it only contains advanced algorithms (distance computation, etc.). The rest of the application is GPL and as I said it's not easy to integrate its components in another project.

Re: Algorithm

Posted: Fri Jul 14, 2017 5:13 am
by Navyadubey
Dear Sir,
Thanks for your reply, right now I am struggling with the source code of CC and I am not able to extract the useful part out of it because of numerous LOCs.
If I want to include some of the features (setting different types of views, unroll, rasterize, translate/rotate) of CC in my project than what should I do.
As you said that the graphical interface of CloudCompare is not meant to be separated into various components that can be used elsewhere, I even don't want to use the GUI of CC I will build my own GUI what I need is a little guidance to understand the backend part of CC.

Thanks and Regards
Navya Dubey

Re: Algorithm

Posted: Fri Jul 14, 2017 8:36 am
by daniel
I am not able to extract the useful part out of it
An open-source project is not something meant to 'extract' code from. It should be the opposite actually! People should be contributing to the project in exchange for using it for free.... When we say "free software", we speak about freedom, not free beer!

And I already don't have enough time to maintain CloudCompare, I don't see how I could spend time helping people 'harvest' it.

Re: Algorithm

Posted: Fri Jul 14, 2017 10:45 am
by Navyadubey
Dear sir,
I am so sorry if you interpreted my words in such a way that are not meant to be, I am extracting code from CC to make something fruitful to help a layman, not for any free beer, we are using the auspicious opportunity of freedom to build something.
I know you don't have enough time but I saw a beam of light in the darkness when I came across this forum, So I came here with my doubt.

Thanks a lot for your help and guidance
Navya Dubey

Re: Algorithm

Posted: Fri Jul 14, 2017 11:34 am
by daniel
What you eventually do with the code is not the problem here. You can perfectly integrate open-source code in a commercial product as long as you respect its license.

If you use the parts that are meant to be shared in an open-source project (e.g. libraries) without breaking them apart, then you may fix bugs or improve its set of functionalities at some point in time. The open-source license asks you to share your modifications with the community, so in the end the source project will be improved and everyone will be happy.

If you randomly extract code from a project, then it's impossible to improve the initial project. it's a one way relationship that only profits to you.

Re: Algorithm

Posted: Tue Jul 18, 2017 5:43 am
by Navyadubey
Dear Sir,
I had opened the CloudCompare in VS 2013 now when I am building and running CloudCompare GUI OF CC is there on the output screen.
Could you please tell me that where is ".ui" file present and in case I want to enhance something in that GUI, So can I do that?
I also want to ask that which option is more feasible to build CC in QT creator or in visual studio 2013?

Re: Algorithm

Posted: Tue Jul 18, 2017 6:36 pm
by daniel
Under Visual Studio, you should see all 'ui' files right under the 'CloudCompare' project. You can also find them in the project sources folder (qCC\ui_templates). And you can open these files in 'Qt Designer' (designer.exe, that can be found under the 'bin' folder of Qt). There are some tutorials of Qt Designer online (it's globally easy to use, but there are a few subtleties...).

I personally work only on Visual Studio, but other developers of CloudCompare use Qt Creator without any problem. The only advantage of Visual Studio is the debugger.