Robot based scanning system with TCP plug-in development problems

Questions related to plugins development
Pepek
Posts: 9
Joined: Thu Mar 26, 2015 9:57 am

Re: Robot based scanning system with TCP plug-in development problems

Post by Pepek »

Now, I have my system working. We need to do mechanism to export/import cloud data in our format. Is there possibility to add something like that from plugin into load/save window (some kind of importer/exporter) without recompiling all CC? Or do I need to do it as separate seve/load action in my plugin? Our system is quite complicated - it have separate binary files for xyz, colors and so on data, and you load only header file...
And one other thing, I'll probably have data about origin of each point from scanner matrix (it's row and column on scanner matrix as it was measured). Is there any way to store that data associated with each point? I guess creating some kind of container and linking it with addDependency might work? I have seen mechanisms that were build to store data in double for each point and you were able to access it by name.
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Robot based scanning system with TCP plug-in development problems

Post by daniel »

1) You can create I/O plugins (see the qCSVMatrixIO plugin as an example: https://github.com/cloudcompare/trunk/t ... SVMatrixIO). Baiscally you create a 'standard' CC I/O filter (i.e. a class that inherits the FileIOFilter interface) and then the plugin is very simple.

2) To link your data to a cloud, you can:
- either create a simple storage class inheriting the 'ccHObject' interface. This way you'll be able to add it as a 'child' of your cloud (ccHObject::addChild). And you'll be able to find it when you need it with the filterChildren method (giving the right 'CC_CLASS_ENUM ' type) or by manually looking for the child with the right name for instance).
- or you can add the data as 'meta-data' (see ccObject::setMetaData). It's based on the QVariant mechanism (which allows you to stream about any kind of data) and it's much simpler as long as your data structure is not too complicated. You'll even be able to save it in BIN files.

P.S.: if you create a custom ccHObject-derived class, be sure to assign it a 'CC_CLASS_ENUM' that doesn't exist yet and that includes the CC_CUSTOM_BIT flag (which means that you have a plugin-defined object).
Daniel, CloudCompare admin
Pepek
Posts: 9
Joined: Thu Mar 26, 2015 9:57 am

Re: Robot based scanning system with TCP plug-in development problems

Post by Pepek »

Thanks for help so far. One quick question. There is no dedicated class for infinite plane with equation and point projection utilities? Just ccPlane class?
Pepek
Posts: 9
Joined: Thu Mar 26, 2015 9:57 am

Re: Robot based scanning system with TCP plug-in development problems

Post by Pepek »

Click Help->About... in Cloud Compare. If you're Windows user CC 2.7.0 you will see message like this:
Version: 2.7.0 [Windows 64 bits]
Compiled with MSVC 1800 and Qt 5.6.0
This means that Visual Studio 2013 and QT 5.6.0 was used to compile CC. You can find it here: https://download.qt.io/archive/qt/5.6/5.6.0/. Download and install qt-opensource-windows-x86-msvc2013_64-5.6.0.exe and compile with that.
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Robot based scanning system with TCP plug-in development problems

Post by daniel »

Indeed. And you have to compile your plugin with the same Qt version by the way.
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Robot based scanning system with TCP plug-in development problems

Post by daniel »

@Pepek: nope, no 'plane' class. You can easily get the plane normal (as the 3 first values of the plane equation). And you can compute the distances to this plane with the DistanceComputationTools class.

But it would be a good idea to add one!
Daniel, CloudCompare admin
Post Reply