I would like to get some help in reproducing the figure attached as a photo using inkscapce.

I have started by creating a 3d box using the procedure of extrusion and then I found my self stuck in trying to make the strokes appear like in the figure where we should have three sides of the bottom face dashed and all the others should be with line strokes (there is a mistake in the figure in the far edge where a dashed line should have been used entirely from the top left node towards the bottom left node).

Do you know if there is a way to do that ? of course then I also would like to draw the red rectangle which shares one side with the black box. Attached you may find the photo. Thank you very much for your help.

The figure to be reproduced using inkscape

2 Answers 2


I wouldn't use the Extrude extension for this TBH. It's more trouble than it's worth for a simple shape like this. The whole thing can be made with simple rectangles, skew transforms, a couple of lines, and breaking paths apart, and changing the stroke attributes.

Here are the basic steps .

  1. Draw two rectangles, a long one, and a narrower one to the right of it

  2. With the Select Tool, click again until the skew and rotate handles show, then skew the right side rectangle

  3. Move it, and snap it back into position, then right click and Duplicate it

  4. Move the duplicate over to the other side

  5. Draw the top and bottom lines with the Pen Tool. Pressing Enter finishes the path.

  6. Switch to the Edit Paths by Nodes tool

  7. Select the left side skewed rectangle and do Path > Object to Path. This converts the rectangle into an editable vector object with nodes.

  8. Select the two nodes where you want to cut the path. Holding down Shift as you click allows you to select more than one node, then hit the Break Apart Selected Nodes button.

  9. Do Path > Break apart

  10. Select the line you broke apart, and the bottom rear line. Holding Shift as you click allows you to select both, then apply a dashed stroke in the Fill and Stroke panel's Stroke Style tab.

enter image description here

Note: In the example above I have most of the default snapping options enabled plus the Alignment snapping option. These should help you to get everything to snap together easily.

  • Thank you very much for your help and explanation, actually I was not aware of this snapping options as a beginner in Inkscape. Thank you. Jan 21 at 21:10

Not much to add, but it might be useful to get the image of the rotated plane, its numeric rotation angle (if known) and the drawn direction of axis X2 consistent with the skewed sides of the box. That's what I'm going to add.

As you obviously have noticed, you can skew & squeeze vertically the bottom rectangle of the box as much as you like and it still can be a perfect looking image of the bottom surface of a rectangular 3D box. Your skewing and squeezing only changes the proportions and viewing direction of the box and the actual mathematical projection can become quite obscure, but it still looks like it is a rectangular box, if it's drawn as shown in the older answer.

Start from the top view of the box and the rotated plane:

enter image description here

The bottom rectangle of the box is made by drawing a horizontal and a vertical line. They are both duplicated and snapped together. It's useful to define for all lines rounded ends and corners for good looking joints.

The red plane is in this case rotated 60 degrees from horizontal. The corresponding X2 is drawn as a short line which is got by rotating the red line 90 degrees and by shortening proportionally (=hold Ctrl). Remove or move aside text X2. It's not needed here.

This is now a bunch of separate line segments. Make them temporarily one by selecting all and applying Path > Combine. Path effects do not work with separate nor grouped paths, so combine them! Individual colors vanish, but that can be fixed later.

Insert a horizontal line which presents the width of the whole shape in its current form. It's blue in the next image. It should snap between the line end in the left and the vertical line in the right:

enter image description here

The green line in the next image is the wanted image of the shorted side of the bottom rectangle of the box. It's selected only for good look.

enter image description here

Move (and let snap) the blue line to end to the endpoint of the green line:

enter image description here

Select the black combined path and insert path effect Perspective Envelope. Move with the node tool the upper corners of the perspective envelope to the endpoints of the blue line:

enter image description here

Freeze the path effect and release the line segments by applying Path > Object to path and Path > Break apart. Draw the vertical height line of the box image. It can be as long as you like. It's orange in the next image.

enter image description here

Duplicate the lines, move (and let snap) them to their final places, select the colors and line types:

enter image description here

Draw with the pen some solid, but shorter lines on the dashed ones, if needed:

enter image description here

The box is ready. It can look distorted if one has used to see perspective projections. Making a perspective image with consistent angles and proportions is possible, but it's a tough job in a 2D drawing program, far beyond the scope of this answer. But making it in a 3D program is trivial. These lines and surfaces take only few minutes

enter image description here

The viewing direction can be changed as needed. Inserting all texts, arrowheads, decorative line types & colors and other annotations is not easier in a 3D program. It's easiest to insert them afterwards in Inkscape or Illustrator.

  • Thank you very much for you detailed answer. I am still not understanding the step involving the path effect procedure. In particular how I should move the three nodes on the upper line. Could you make please a further clarification of how to do that ? Thanks. Jan 21 at 21:22
  • @SaddamNYHijazi After inserting the effect to the combined path (=all black in my image, nothing blue nor green!) you should select it with the normal selection tool, activate the node tool and move one by one the 2 upper nodes of the perspective envelope to the endpoints of the blue line. Let the 2 lower nodes of the total 4 stay as they are. Do NOT move the nodes of the paths, adjust only the effect. The effect moves the nodes of the paths. You see how the coordinates of the envelope nodes get changed as you move them and how the black paths get deformed at the same time. Jan 21 at 21:59
  • I try to insert the links of the screenshots for what I have done !(ibb.co/4YdhD9J), !(ibb.co/jh5JQs7) !(ibb.co/JdngPS0) !(ibb.co/1ndXpnc), I think I am getting something wrong but not sure what it is Jan 21 at 22:19
  • @SaddamNYHijazi 2 first images look right. The rest 2 are wrong . What' done between the 2nd and 3rd image? Moved something else than the envelope corner, because it's still in the original place? Jan 21 at 22:41
  • I am not sure what is going on, I attach the svg file if you would like to have a look file.io/QPkVMxjOnPkN Jan 21 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.