Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. drawing a cuboid over a part of the image using a "mouse"
Forum Updated to NodeBB v4.3 + New Features

drawing a cuboid over a part of the image using a "mouse"

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 985 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    duddal_
    wrote on 4 Jan 2021, 10:04 last edited by
    #1

    Hello,

    I am developing a tool which requires the user to draw the cuboid over a certain part of the image by using the Mouse. I know how to draw a rectangle using the mouse using QPainter. But I am unable to figure out how to draw a 3D rectangle (Cuboid).
    I want to draw multiple cuboids in the image and save the coordinates of the cuboid as a json file.

    I would really appreciate your guidance with this.

    Thank You.

    P 1 Reply Last reply 4 Jan 2021, 14:44
    0
    • D duddal_
      4 Jan 2021, 10:04

      Hello,

      I am developing a tool which requires the user to draw the cuboid over a certain part of the image by using the Mouse. I know how to draw a rectangle using the mouse using QPainter. But I am unable to figure out how to draw a 3D rectangle (Cuboid).
      I want to draw multiple cuboids in the image and save the coordinates of the cuboid as a json file.

      I would really appreciate your guidance with this.

      Thank You.

      P Offline
      P Offline
      Pl45m4
      wrote on 4 Jan 2021, 14:44 last edited by Pl45m4 1 Apr 2021, 14:45
      #2

      @duddal_

      How do you want to draw a 3D figure on an image?! 2D images don't have z-coordinates.

      To save 3D coords, you'll need a 3D environment.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      1
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 4 Jan 2021, 15:05 last edited by
        #3

        Hi
        You mean something like this over the image ?
        alt text

        D 1 Reply Last reply 5 Jan 2021, 08:59
        0
        • M mrjj
          4 Jan 2021, 15:05

          Hi
          You mean something like this over the image ?
          alt text

          D Offline
          D Offline
          duddal_
          wrote on 5 Jan 2021, 08:59 last edited by
          #4

          @mrjj
          Yes, exactlly

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 5 Jan 2021, 09:07 last edited by
            #5

            Hi
            well you could let the user first drag draw the back of the
            cuboid and then when he releases the mouse, he can then
            adjust the depth of the box.
            You just draw it in fixed angles like this drawing.
            But it wont be true 3d. just 2d that looks 3d.

            1 Reply Last reply
            2

            3/5

            4 Jan 2021, 15:05

            • Login

            • Login or register to search.
            3 out of 5
            • First post
              3/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved