User:Regina/How to Make a 3D-star

This article describes how to make a three-dimensional star. Because the UI of LibreOffice is not powerful enough, some steps are done on the file source. So you should now, how the manually change it. Find a start in User:Regina/Manipulate_Markup_of_an_ODF_File.

Step 1. Generate a 3D-Scene
Start LibreOffice Draw and insert a Cube from section "3D Objects". The draw:name attribute is not yet supported for 3D-objects by ODF, but will be available in ODF 1.4. LibreOffice supports it already and needs it to make objects selectable via Navigator. So you might want to name the objects. Click on the object. Look at the status bar. It should show "3D scene selected". From menu Format select item Name and enter a meaningful name, e.g. "myScene". The status bar changes to "3D scene 'myScene' selected". Press F3 to enter the scene. The status bar should change to "3D cube selected". Enter a name too, e.g. "myCube". Press Ctrl+F3 to leave the scene. Open Navigator and verify that the objects are listed.

We use the cube to have a frame into which the star will be placed. Having such frame prevents LibreOffice from resizing our drawing while working on it. To serve as a frame, set the line style to "solid" and set the color to "none".

LibreOffice automatically recalculates the size of the rendered scene. That makes it difficult to work inside the scene and to examine, whether the objects are placed correctly. To get a stable environment we set the projection method to "parallel", remove any transformation of the scene and set the cube to a fixed size.

Mark the scene and open dialog "3D Effects" from its context menu. Click on "Perspective on/off" (bottom right) to switch to "parallel", then click on "Assign" (top right). Save the file and close it.

Open file content.xml of the saved file in an editor. Find the element . Remove its attribute dr3d:transform. Change width and height to svg:width="10cm" and svg:height="10cm". Find child element . Add attributes dr3d:min-edge="(-5000 -5000 -5000)" and dr3d:max-edge="(5000 5000 5000)". Position and size values inside a 3D-scene are always in 1/100th mm. Save the file, close editor and update the zip-container.

You might want to look at it in LibreOffice. You should see an empty square of 10cm width.