Overlapped Surface3D and Scatter3D
-
wrote on 11 Jul 2018, 11:09 last edited by Davide87 7 Nov 2018, 11:14
Hello everyone
I recently asked some questions about data visualization via different methods. Then I choose to try the QML way.
However, I got another problem. I tried looking for solutions on the web for days and I could not find anything useful even for such "simple" problem.I have got my Surface3D qml object with its Surface3DSeries and ItemModelSurfaceDataProxy and the surface is well drawn. Now I want to draw on such surface a few points like in a scatter plot (or like the selection point that appears in the qml surface examples, but more than one).
If I draw the Surface3D and then create a Scatter3D object on top of that, the Surface3D will not be visible anymore.
If I insert a Scatter3DSeries within the Surface3D object, the complier will give an error because a Scatter3DSeries cannot be used in a Surface3D .
If I try to put a ItemModelScatterDataProxy into the Surface3DSeries after the ItemModelSurfaceDataProxy, the points will not appear.In the examples I could not find any case of surface and scatter objects overlapped.
Can anyone help me on this Nth problem?
Thank you in advance. -
wrote on 12 Jul 2018, 11:09 last edited by
Anyone? :-(
Is it even possible to draw a Surface3D and a Scatter3D within the same axis? -
wrote on 22 Jul 2018, 20:00 last edited by
Last up :-(
-
Hi,
Sorry nobody can help you with your situation.
You should try to post it on the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.
-
Hello everyone
I recently asked some questions about data visualization via different methods. Then I choose to try the QML way.
However, I got another problem. I tried looking for solutions on the web for days and I could not find anything useful even for such "simple" problem.I have got my Surface3D qml object with its Surface3DSeries and ItemModelSurfaceDataProxy and the surface is well drawn. Now I want to draw on such surface a few points like in a scatter plot (or like the selection point that appears in the qml surface examples, but more than one).
If I draw the Surface3D and then create a Scatter3D object on top of that, the Surface3D will not be visible anymore.
If I insert a Scatter3DSeries within the Surface3D object, the complier will give an error because a Scatter3DSeries cannot be used in a Surface3D .
If I try to put a ItemModelScatterDataProxy into the Surface3DSeries after the ItemModelSurfaceDataProxy, the points will not appear.In the examples I could not find any case of surface and scatter objects overlapped.
Can anyone help me on this Nth problem?
Thank you in advance.wrote on 29 Jul 2018, 06:21 last edited by DiracsbracketHi @Davide87
A little bit late, but since you mention you only need to add a few scatter points to the surface, I believe you could try withQ3DSurface
instead of QML'sSurface3D
type and use the addCustomItem method to add custom mesh-objects. In the Qt example below, these custom items are an "oil rig" and "refinery".https://doc.qt.io/qt-5.9/qtdatavisualization-customitems-example.html
You could define your own mesh object to be a small sphere that you would place at your scatter point positions.
All that is not very elegant, of course, but it could help you out.
-
Hi @Davide87
A little bit late, but since you mention you only need to add a few scatter points to the surface, I believe you could try withQ3DSurface
instead of QML'sSurface3D
type and use the addCustomItem method to add custom mesh-objects. In the Qt example below, these custom items are an "oil rig" and "refinery".https://doc.qt.io/qt-5.9/qtdatavisualization-customitems-example.html
You could define your own mesh object to be a small sphere that you would place at your scatter point positions.
All that is not very elegant, of course, but it could help you out.
wrote on 30 Jul 2018, 11:19 last edited by@SGaist Thank you. I wrote to that mailing list, but unfortunately no one answered me :-(
@Diracsbracket I'll try it and let you know. Thanks.
-
wrote on 9 Aug 2018, 08:45 last edited by Davide87 8 Sept 2018, 08:48
It works good!
I took the sphere from Qt\5.11.1\Src\qtdatavis3d\src\datavisualization\engine\meshes. Then I added the custom item as in that example.
The Q3DSurface class works perfectly. Furthermore now I don't need to get crazy passing things from c++ to qml.Thank you very much guys.
ps: Maybe "QML and Qt Quick" is no more the appropriate section for this topic :-D
-
It works good!
I took the sphere from Qt\5.11.1\Src\qtdatavis3d\src\datavisualization\engine\meshes. Then I added the custom item as in that example.
The Q3DSurface class works perfectly. Furthermore now I don't need to get crazy passing things from c++ to qml.That's the result:
Thank you very much guys.
ps: Maybe "QML and Qt Quick" is no more the appropriate section for this topic :-D
wrote on 9 Aug 2018, 09:22 last edited by@Davide87 said in Overlapped Surface3D and Scatter3D:
Qt\5.11.1\Src\qtdatavis3d\src\datavisualization\engine\meshes
Great to hear, and thank you for the feedback!
Thanks to this question, I also got to learn about the awesome software used to create the meshes:
https://www.blender.org/