Understanding 2D Coordinate Systems in MIDILLI Tools

In the MIDILLI Tools, a 2D coordinate system is used for the parts and components. The box height is also specified to enable assembling the generated sides into a finished box structure.

The coordinate system with direction of increase and direction of rotation in the MIDILLI SVG Generator.

Each side of the shape has its local origin starting at the top-left corner (x = 0, y = 0). The default rotation of the added components is set to zero (0) degrees, with rotation occurring clockwise. For example, a 90-degree rotation will rotate the component 90 degrees to the right. All coordinates and locations in the JSON file are given in centimeters (cm), and the rotation is measured in degrees. This is how the final box without any components may look like if all sides are exported:

The dots represent the local origins of each side.

The two images below show how each side appears in the 2D view. Imagine pressing the 3D box above and flattening it to see this perspective:

Sizing summary if inner-sizing option is used (by default).

If the inner-sizing option is used (enabled by default), the left and right sides will have a greater height/length to cover the back and front sides. Additionally, the left, right, back, and front will be slightly taller to maintain the specified inner volume. The top and bottom will then fit in accordingly.

Sizing summary if outer-sizing option is used (can be enabled with command-line argument).

If the outer-sizing option is enabled (via --outer-sizing command-line argument), the front and back sides will be slightly shorter to align with the width of the left and right sides. Similarly, all four sides (left, right, front, and back) will be slightly adjusted to maintain the specified outer volume. The top and bottom will then fit precisely on top of and beneath the other sides. Below, both variations are shown in 3D:

Sizing with inner-sizing (default) options.

Sizing with outer-sizing options.
Tip: If you want the overall size to be exactly as you specify in the JSON file, use the --outer-sizing option. If you want the usable inner area to be the same as you define, leave it as default.