DiscussionsIssue archiveOCCT:Visualization

Archived issue #0025265

Visualization, Select3D_Projector - wrong calculation of projection line in perspective mode

Open CASCADEOCCT:Visualizationclosed9 public notes

Search issues

Description

When trying to select front point of two (lying on Z-coordinate) in a perspective view, the back one is snapped and selected.

Steps to reproduce

vinit View1
vsetdispmode 1
#draw grid of points 7x7
set j 0
for {set x 0} {$x<7} {incr x} {
  for {set y 0} {$y<7} {incr y} {
    vpoint $j $x $y 10
    incr j
  }
}
  for {set x 0} {$x<7} {incr x} {
  for {set y 0} {$y<7} {incr y} {
    vpoint $j $x $y 0
    incr j
  }
}

#prepare view
vtop
vcamera -persp
vfit
vback
vtop


Try to select front central point -> BUG: back central point is snapped and selected.
EXPECTED: front central point should be snapped and selected.

Additional information

List of changes:

Select3D_Projector::Shoot - correct calculation of projection line.

Public activity

9 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Dear Ivan,

please use dedicated "Steps To Reproduce" field.
Attached snapshots seems to be does not correspond to the script - please provide complete script with vmoveto/vselect and camera rotation (if required).
The bug description is confusing - please try to reformulate the problem and expected behavior.
02Commenter 2
Dear Kirill,
Steps to reproduce and description are edited. Is it OK now?

03Commenter 3
Correct images provided.
04Commenter 4
This bug is a regression in perspective selection.

The similar problem is found for selecting two shapes:

> pload ALL
> vinit
> vcamera -persp
> restore .\\data\\occ\\Top.brep
> restore .\\data\\occ\\Bottom.brep
> vdisplay Top Bottom
> vsetdispmode 1
> vfit

Try to select front shape -> Not selectable.

05Commenter 3
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: apl
Date: Tue Oct 14 15:47:34 2014 +0400

    0025265: Perspective projection - selecting front point of two
06Commenter 6
Dear Kirill,

Please review branch CR25265.
07Commenter 2
Please test the patch.
08Commenter 8
Dear Commenter 1,
Branch CR25265 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]

Number of compiler warnings:

occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)
MacOS: 199 (199 on master)

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR25265-master-occt/Debian60-64/bugs/vis/bug25265.html
http://occt-tests/CR25265-master-occt/Windows-32-VC10/bugs/vis/bug25265.html
bugs vis(004) bug25265: OK

Testing on Linux:
occt component :
Total MEMORY difference: 355116464 / 355259448
Total CPU difference: 44583.07000000001 / 43106.66999999992
products component :
Total MEMORY difference: 121026332 / 121192724
Total CPU difference: 17663.939999999955 / 17664.929999999982

Testing on Windows:
occt component :
Total MEMORY difference: 273144364 / 272234148
Total CPU difference: 34446.953125 / 32857.28125
products component :
Total MEMORY difference: 71152620 / 70036372
Total CPU difference: 11471.5 / 11148.125

There are no differences in images found by testdiff.
09Commenter 3
Branch [archived branch] has been deleted by Commenter 2.

[revision removed]

Related records