Cube Tool
Activate the tool, then:

Select or create two points in the xOy plane to obtain a cube with one edge defined by the two given points, and lying on the xOy plane.
or

Select two points having the same zcoordinate, z=c, to obtain a cube with one edge of the base defined by the two given points, and lying on the plane z = c. The cube can be rotated around the specified edge by dragging the free vertex of the base, created automatically.
or

Select two points having different zcoordinates to obtain a cube with the edge of one face defined by the two given points and some edges parallel to the xOy plane. The cube can be rotated around the specified edge by dragging the free vertex of the base, created automatically.
