Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-133759

the Custom3DItem position is not correct when setting "axisZ.reversed: true" in QtGraphs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.1
    • Graphs: 3D
    • None
    • Windows

    Description

      The Custom3DItem position is not correct when setting "axisZ.reversed: true" in QtGraphs,it still show at original position. but nomarl data point is correct.

      code as below:

      Rectangle {
                                      id: rectangle21
                                      visible: true
                                      color: "#ffffff"
                                      border.width: 1
                                      Layout.rowSpan: 0
                                      Layout.preferredHeight: 5
                                      Layout.preferredWidth: 1
                                      Layout.fillHeight: true
                                      Layout.fillWidth: true
                                      Item {
                                          width: parent.width
                                          height: parent.height
      
                                          Scatter3D {
                                              id: scatter3dsss
                                              anchors.fill: parent
                                              axisX.title: "X"
                                              axisX.titleVisible: true
                                              axisX.segmentCount: 5
                                              axisX.subSegmentCount: 5
                                              axisX.max: 10
                                              axisX.labelFormat: "%1f"
                                              
                                              axisZ.segmentCount: 5
                                              axisZ.subSegmentCount: 5
                                              axisZ.labelFormat: "%1f"
                                              axisZ.reversed: true
                                              axisZ.max: 10
                                              axisZ.min: -10
                                              axisZ.title: "Z"
                                              axisZ.titleVisible: true
      
                                              axisY.segmentCount: 5
                                              axisY.subSegmentCount: 5
                                              axisY.labelFormat: "%1f"
                                              axisY.title: "Y"
                                              axisY.titleVisible: true
                                              axisY.max: 10
      
                                              cameraPreset: Graphs3D.CameraPreset.DirectlyBelow
                                              // horizontalAspectRatio: 1.0
                                              cameraTargetPosition: Qt.vector3d(30,
                                                                                0, 0)
                                              customItemList: [
                                                  Custom3DItem {
                                                      id: custom3DObject
                                                      scalingAbsolute: false
                                                      scaling: Qt.vector3d(1, 1, 1)
                                                      positionAbsolute: false
                                                      position: Qt.vector3d(0, 0, 10)
                                                      meshFile: "meshes/1.mesh"
                                                  }
                                              ]
                                              Scatter3DSeries {
                                                  itemLabelFormat: "Series 1: X:@xLabel Y:@yLabel Z:@zLabel"
                                                  ItemModelScatterDataProxy {
                                                      rotationRole: "45"
                                                      itemModel: dataModel
                                                      // Mapping model roles to scatter series item coordinates.
                                                      xPosRole: "xPos"
                                                      yPosRole: "yPos"
                                                      zPosRole: "zPos"
                                                  }
                                              }
                                          }
      
                                          ListModel {
                                              id: dataModel
                                              ListElement {
                                                  xPos: "0"
                                                  yPos: "0"
                                                  zPos: "0"
                                              }
                                              ListElement {
                                                  xPos: "-13.164"
                                                  yPos: "2.022"
                                                  zPos: "4.348"
                                              }
                                              ListElement {
                                                  xPos: "-24.564"
                                                  yPos: "1.865"
                                                  zPos: "1.346"
                                              }
                                              ListElement {
                                                  xPos: "1.068"
                                                  yPos: "1.224"
                                                  zPos: "2.983"
                                              }
                                              ListElement {
                                                  xPos: "2.323"
                                                  yPos: "2.502"
                                                  zPos: "3.133"
                                              }
                                          }
                                      }
                                  }
      

      for  axisZ setting  "axisZ.reversed: true" and  Custom3DItem  setting"position: Qt.vector3d(0, 0, 10)"  mesh shows on z=-10 position.

      But all ListModel points are correct Z position. 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            oulu_hillbilly Sami Varanka
            lfj liu fj
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes