View Issue Details

IDProjectCategoryView StatusLast Update
0033514Open CASCADEOCCT:Visualizationpublic2023-11-17 02:43
Reporterdrochalo Assigned Todrochalo  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
PlatformWindowsOSVC++ 2022 
Product Version7.7.0 
Target Version7.8.0 
Summary0033514: Visualization - Scaled view twists zoom persistence objects
DescriptionObjects like manipulators with zoom persistence need to maintain its visual aspects for proper usage in a scene.
The application of a visual scale is twisting its effects (see figure zoom_scaled.png). A similar effect was observed in issue https://tracker.dev.opencascade.org/view.php?id=27832.

The proposal is to adjust the zoom persistent object scale according to the view's axial scale.
Steps To Reproducepload ALL
vinit
box b 10 10 10
vdisplay b
vfit
vsetdispmode 1
vmanipulator vm -attach b
vscale 1 3 10
vviewparams -scale 6.28866 -proj 0.57735 -0.57735 0.57735 -up -0.408248 0.408248 0.816497 -at 0 10 30
TagsNo tags attached.
Test case number

Attached Files

  • zoom_scaled.png (75,368 bytes)

Activities

drochalo

2023-10-24 14:52

developer  

zoom_scaled.png (75,368 bytes)

git

2023-10-24 17:51

administrator   ~0114416

Branch CR33514 has been created by drochalo.

SHA-1: 8e37a5f85c7fbca4045c374ba6470dafbee79dfb


Detailed log of new commits:

Author: drochalo
Date: Tue Oct 24 15:50:27 2023 +0100

     0033514: Visualization - Scaled view twists zoom persistence objects
    
    added test

Author: drochalo
Date: Tue Oct 24 14:44:14 2023 +0100

    0033514: Visualization - Scaled view twists zoom persistence objects
    
    Adjusted object scale of zoom persistent objects.
    Now takes view's axial scale into account.

drochalo

2023-10-25 18:38

developer   ~0114430

Dear Marina,

please review changes made to the behaviour of zoom persistence objects.
The tests in jenkins do not produce errors connected to these particular changes (http://jenkins-test-10.nnov.opencascade.com/view/CR33514-master-drochalo/view/COMPARE/).

mzernova

2023-11-17 02:43

developer   ~0114607

This is wrong
The scale must be applied to all objects with Graphic3d_TMF_ZoomPers except the manipulator.
      //Adjust the camera axial scale for zoom persistent objects 
      gp_XYZ anAxialScale = theCamera->AxialScale();
      Standard_Real anAxialX = anAxialScale.X();
      Standard_Real anAxialY = anAxialScale.Y();
      Standard_Real anAxialZ = anAxialScale.Z();
      if (anAxialX > 0 && anAxialY > 0 && anAxialZ > 0)
      {
        Graphic3d_TransformUtils::Scale(aWorldView, 1.0 / anAxialX, 1.0 / anAxialY, 1.0 / anAxialZ);
      }

Issue History

Date Modified Username Field Change
2023-10-24 14:52 drochalo New Issue
2023-10-24 14:52 drochalo Assigned To => drochalo
2023-10-24 14:52 drochalo File Added: zoom_scaled.png
2023-10-24 15:13 drochalo Steps to Reproduce Updated
2023-10-24 17:51 git Note Added: 0114416
2023-10-25 18:38 drochalo Status new => feedback
2023-10-25 18:38 drochalo Note Added: 0114430
2023-10-25 18:38 drochalo Assigned To drochalo => mzernova
2023-10-27 16:55 drochalo Status feedback => resolved
2023-11-17 02:43 mzernova Note Added: 0114607
2023-11-17 02:43 mzernova Assigned To mzernova => drochalo
2023-11-17 02:43 mzernova Status resolved => assigned