Description: When polygons are superimposed in Shape3DPolygonObject, both polygons become transparent, and the fill of the outer one disappears. Steps to Reproduce: 1.Open the Test or Test_1 file 2.Click the "Draw" button 3. Actual Results: The left row of the shapes that appeared were created using the Shape3DCubeObject object. They are created correctly. The right row of shapes is created using the Shape3DPolygonObject object. They are transparent. Expected Results: The right row of shapes should be the same as the right row - not transparent. Reproducible: Always User Profile Reset: Yes Additional Info: To demonstrate the problem, the Test_1 document is also attached, in which the objects created using Shape3DPolygonObject have their back and right faces removed. Scenes can be rotated and viewed from different angles using the "<" and ">" buttons (at the bottom of the scene).
Created attachment 193400 [details] Demo files To the Test.ods creates closed (complete) "cube" objects by drawing 6 polygons of the "square" type. In Test_1.ods, "cube" objects are created by drawing 4 polygons of the "square" type. The back and right sides are not drawn.
I have discussed the problem with Armin. (I hope that I describe his comments correctly here.) During the way to visualization the class SdrPolyPolygonPrimitive3D is used. There you find the comment SdrPolyPolygonPrimitive3D class This 3D primitive defines a PolyPolgon in space which may have Line- and FillStyles and extra 3D surface attributes. It is assumed that the given 3D PolyPolgon (which may contain texture and normal information) is planar in 3D. The decomposition will include all needed 3D data for visualisation, including FatLines and fill styles. https://opengrok.libreoffice.org/xref/core/include/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx?r=dcb36da2#30 The difference between the Shape3DCubeObject and your Shape3DPolygonObject is this: The cube-object itself divides its points into a vector of six basegfx::B3DPolyPolygon objects, where each of them is planar in 3D. But for the Shape3DPolygonObject such division is not implemented. Thus the methods of the SdrPolyPolygonPrimitive3D class get an object, were the points are not in a plane. I see some possible ways for a solution: (1) Changing the Shape3DPolygonObject so, that it creates a vector of plane polypolgons. I don't know how costly it is and whether it would break any internal use. (2) Add a documentation for all of the Shape3D*-objects to the SDK API Reference, especially for the Shape3DPolygonObject, as it has no corresponding shape in the UI. Such documentation then has to contain, that all points of the Shape3DPolygonObject have to be in the same plane. (3) Extend the implementation by a new kind of Shape3D-object, that will do the in (1) mentioned dividing in a vector of plane parts by itself. For now, you need to build for each face of your 3D objects a separate Shape3DPolygonObject. I set this to new, because it is really a problem. But I'm not sure whether to classify it as a bug or an enhancement request.
Thanks! A friend of Armin Legrand suggested that I use "But you can check in the C++ code what these methods do - you need to do the same thing in principle." There, I was also offered to make a 3DPolyPoligon-an object from a set of various flat objects. https://ask.libreoffice.org/t/how-to-make-colored-opaque-shape3dpolygonobject/104047/9 But all this is not quite suitable for the purposes for which I make my programs. The fact is that it is not necessary to make the 3DPolyPoligon object flat. You can make them wavy, semicircular, etc. And such objects turn out to be quite normal. The main thing is that the opposite sides do not overlap each other. Or alternatively, put another face between the opposite sides. Then something happens too. And "playing" with normals doesn't do anything.