Algorithm

Feel free to ask any question here
Navyadubey
Posts: 7
Joined: Thu Jul 06, 2017 6:58 am

Algorithm

Post 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
daniel
Site Admin
Posts: 7332
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Algorithm

Post 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?
Daniel, CloudCompare admin
Navyadubey
Posts: 7
Joined: Thu Jul 06, 2017 6:58 am

Re: Algorithm

Post 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.
daniel
Site Admin
Posts: 7332
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Algorithm

Post 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.
Daniel, CloudCompare admin
Navyadubey
Posts: 7
Joined: Thu Jul 06, 2017 6:58 am

Re: Algorithm

Post 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
daniel
Site Admin
Posts: 7332
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Algorithm

Post 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.
Daniel, CloudCompare admin
Navyadubey
Posts: 7
Joined: Thu Jul 06, 2017 6:58 am

Re: Algorithm

Post 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
daniel
Site Admin
Posts: 7332
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Algorithm

Post 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.
Daniel, CloudCompare admin
Navyadubey
Posts: 7
Joined: Thu Jul 06, 2017 6:58 am

Re: Algorithm

Post 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?
Last edited by Navyadubey on Tue Jul 18, 2017 6:49 am, edited 1 time in total.
daniel
Site Admin
Posts: 7332
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Algorithm

Post 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.
Daniel, CloudCompare admin
Post Reply