Bug 143465 - 3D-models of Shape3DLatheObject cannot be positioned in a 3D-scene
Summary: 3D-models of Shape3DLatheObject cannot be positioned in a 3D-scene
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.1.4.1 rc
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-20 20:34 UTC by Kadet
Modified: 2022-10-19 10:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Creating a wireframe (19.37 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-07-20 20:37 UTC, Kadet
Details
Corrected text document (21.29 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-07-23 13:28 UTC, Kadet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kadet 2021-07-20 20:34:24 UTC
Description:
3D models of Shape3DLatheObject cannot be positioned in a 3D scene. The Shape 3D Cube Object and Shape3DSphereObject models have methods for positioning D3DPosition and D3DSize and they are easily positioned inside the 3D scene. And objects of the Polygonal type do not have these methods. Attempts to place an object of the Shape3DLatheObject type inside the scene in a certain place do not lead to success. The array of Z coordinates in the D3DPolyPolygon3D method is always 0 and does not change. And changes to the X or Y arrays make the model wider/narrower or higher/lower, but do not shift the model inside the scene. The axis of rotation is always Y and always at the origin of the scene - (0,0,0).

Steps to Reproduce:
1.Open the attached file
2.Press the button
3.

Actual Results:
A 3D scene created by a set of nested objects of the Shape 3D Cube Object type will be drawn on the page, and a gray ring will appear in the middle. The ring is an object of the Shape3DLatheObject type, which, according to the idea, should be located in the lower right corner of the scene, and have a small size. Instead, it is located in the center of the scene and is only expanded by the amount of the necessary shift in X.

Expected Results:
An object of the Shape3DLatheObject type-should look like a cylinder and be located under the right front corner pillar of the depicted structure.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
I didn't find a description or help on this issue.
Comment 1 Kadet 2021-07-20 20:37:15 UTC
Created attachment 173721 [details]
Creating a wireframe

After downloading the file, click (in the upper-left corner of the page)
Comment 2 Kadet 2021-07-20 20:40:56 UTC
In addition. After introducing an object of the Shape3DLatheObject type into the scenes, the entire scene stops turning, although it was spinning perfectly before.
Comment 3 Regina Henschel 2021-07-21 21:25:58 UTC
The 3D-Lathe object and the 3d-Rotation object are defined by a 2D-path, which may be open. This geometry is always placed on the XY coordinate plan. The 3D-Lathe object gets it third dimension by extruding in positive z-direction, 3D-Rotation object by rotating around the y-axis.

To give the objects a different position or direction, you have to use it's D3DTransformMatrix.

BTW, I find it easier to define a 3D Scene directly in the file text, then by macros. See for example https://wiki.documentfoundation.org/Documentation/HowTo/Draw/Make_a_3D_Star.

One problem with the API is, that it does not provide a method for updating the rendering without distortion.
Comment 4 Kadet 2021-07-22 17:14:38 UTC
Thank you, Regina Henschel!
Yes, of course. You can position models using the D3DTransformMatrix recalculation. You can even create these models using Shape3DPolygonObject, as well as a Cube and a Sphere too. But this also complicates the procedure for programming 3D scenes by an order of magnitude.
I think that if a simplified programming model has been created, rendered as a separate structural object, then it is desirable to offer convenient ways to work with it, as is done in the Shape3DCubeObject and Shape3DSphereObject models. That's why I brought this issue out as a bug.
And I ask the developers to further consider the possibility of providing simplified management of 3D models in 3D scenes.
I would like to have convenient methods of positioning (D3DPosition) and size control (D3Dsize) in models like Shape3DLatheObject and Shape3DExtrudeObject. And in models of the Shape3DLatheObject type, you still have a convenient tool for controlling the rotation axis. In particular, I would like to be able to rotate the Shape3DLatheObject of the model along all coordinate axes, and also with the ability to control the tilt angles. How all this is very conveniently implemented in models of the Shape3DCubeObject or Shape3DSphereObject type.
I will be very grateful to the developers for this. And I think it's not just me.
Comment 5 Regina Henschel 2021-07-22 20:06:50 UTC
This is not a bug report but an enhancement request. Please change the second 'Importance' field and the 'Summary' accordingly.

Unless someone pays a developer or there is a new volunteer developer interested in 3D, it is very unlikely, that development on 3D happens in the foreseeable future. If you have some knowledge in C++, you are invited to help us improving the 3D feature.

If you want to work frequently with macros on 3D-objects, then I recommend to generate your own 3D macro library (and hopefully share it). You can get help in that on mailing list or forum.

This might sound harsh, but it is a realistic view on the 3D feature.
Comment 6 Kadet 2021-07-22 20:53:33 UTC
Unfortunately, I have been working in c++ for a very long time and now I do not have the proper skills to participate in the development of LO.
Some part of the macro library for 3D is already in the attached file, but I'm not sure if it can be useful to anyone.
Comment 7 Kadet 2021-07-23 13:28:05 UTC
Created attachment 173806 [details]
Corrected text document

I apologize. I was informed that an error was made in the example with connecting to an external library.
Fixed the error. Added the ability to rotate the scene. The rotation also behaves inadequately. After turning by + / -70 degrees, the figure turns inside out and turns upside down. After +/-290 degrees, everything is restored.
The 3D transformation matrix is set to offset by default (units along the diagonal of the matrix). I tried to convert it to the form for rotation on the Y axis. This did not lead to success.
Comment 8 Alec Clark 2021-10-15 05:13:14 UTC
(In reply to Kadet from comment #0)
> Description:
> 3D models of Shape3DLatheObject cannot be positioned in a 3D scene. The
> Shape 3D Cube Object and Shape3DSphereObject models have methods for
> positioning D3DPosition and D3DSize and they are easily positioned inside
> the 3D scene. And objects of the Polygonal type do not have these methods.
> Attempts to place an object of the Shape3DLatheObject type inside the scene
> in a certain place do not lead to success. The array of Z coordinates in the
> D3DPolyPolygon3D method is always 0 and does not change. And changes to the
> X or Y arrays make the model wider/narrower or higher/lower, but do not
> shift the model inside the scene. The axis of rotation is always Y and
> always at the origin of the scene - (0,0,0).
> 
> Steps to Reproduce:
> 1.Open the attached file
> 2.Press the button
> 3.
> 
> Actual Results:
> A 3D scene created by a set of nested objects of the Shape 3D Cube Object
> type will be drawn on the page, and a gray ring will appear in the middle.
> The ring is an object of the Shape3DLatheObject type, woodworking check https://woodymanreviews.com/ which, according to
> the idea, should be located in the lower right corner of the scene, and have
> a small size. Instead, it is located in the center of the scene and is only
> expanded by the amount of the necessary shift in X.
> 
> Expected Results:
> An object of the Shape3DLatheObject type-should look like a cylinder and be
> located under the right front corner pillar of the depicted structure.
> 
> 
> Reproducible: Always
> 
> 
> User Profile Reset: Yes
> 
> 
> OpenGL enabled: Yes
> 
> Additional Info:
> I didn't find a description or help on this issue.

Had the same issue. Thanks for the thread.