View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022683 | Open CASCADE | OCCT:Visualization | public | 2011-07-22 18:54 | 2012-03-29 17:26 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | trivial | ||
Status | closed | Resolution | fixed | ||
OS | All | ||||
Target Version | 6.5.3 | Fixed in Version | 6.5.3 | ||
Summary | 0022683: Incorrect result of Select3D_Projector::Project() in the case of perspective projection | ||||
Description | We use OCC selection algorithms in VTK viewer. We have our implementation of ViewerSelector which uses OCC Select3D_Projector. In the parallel projection mode it's working correctly but in the case of perspective projection the result is wrong. As well as we use VTK we don't set a view to the projector so myView field of the projector is null and the difference between parallel and perspective mode computations is the following: if (myPersp) { Standard_Real R = 1.-P2.Z()/myFocus; Pout.SetCoord(P2.X()/R,P2.Y()/R); } The usage of the projector in our ViewerSelector is the same for both modes except the focal distance in the case of perspective projection (see code snippet in attached prj.cxx file). See also: ViewerSelector implementation in SVN: http://svn.nnov.opencascade.com/svn/occt-products/trunk/samples/vtk/VIS/src/ IVtk/IVtk_ViewerSelector.cxx Sample project for testing in SVN: http://svn.nnov.opencascade.com/svn/occt-products/trunk/samples/vtk/importexport VIS component project used by the sample project: http://svn.nnov.opencascade.com/svn/occt-products/trunk/samples/vtk/VIS | ||||
Additional information and documentation updates | Documentation remark by SAN: Select3D_Projector class documentation and Visualization User's Guide were updated in order to make usage of the projector class easier. Few obsolete and unused methods were removed from this class in the frames of continuous code clean up activity. Modified entities: Select3D package Select3D_Projector class Removed methods: - Directions() - BoxAdd() | ||||
Tags | No tags attached. | ||||
Test case number | test case is not required | ||||
2011-07-22 16:54
|
prj.cxx (3,031 bytes) |
|
Dear APL, Please consider this issue in connection with OCCT perspective view first of all, to simplify testing. Try to debug the projection algo and provide detailed documentation about it in Select3D_Projector.cdl, paying special attention on the meaning of the projector's parameters and how to set them. Note that the level of documentation should potentially allow us to migrate the projector initialization code in StdSelect_ViewerSelector3d::UpdateProj() method to different implementation of perspective view based on cameras. As the test case, we could try to use StdSelect_ViewerSelector3d::DisplayAreas() - it displays 2D projections of sensitive areas converting them back to 3D with help of the projector's inverse transformation...But a more reliable way would be to check 2D projections without converting them back to 3D (simulating picking? this is something to think about...) As soon as you have corrected the projector class, please provide the patch to RKV to test it in VTK environment. Best regards, SAN |
|
Dear SAN, After a detailed study of principles and algorithm of Select3D_Projector, it seems that it is fully suitable for Vtk component without any modifications. The undesired behavior of it is a result of very complex algorithm of preparing matrix transformation component for projector. There were some mistakes in interpretation of input parameters for building this matrix. All of them were resolved successfully without great changes to Vtk component and with no changes to Select3D_Project at all. I suggest that we can limit solution to this bug only with good documentation update, with pointing on all important aspects of using Select3D_Projector. SAN, what do you think about this? |
|
Dear APL, I fully support your idea to provide detailed instructions how Select3D_Projector matrix should be set up in case of orthographic and perspective projection to ensure correct operation of projection logic. This should be a part of the class documentation, and matrix calculations can be illustrated in the Visualization User's Guide. Best regards, SAN |
2011-11-29 14:53 developer |
visu_updated.doc (1,153,024 bytes) |
|
Dear SAN, Could you please make a revision of updated .cdl documentation (in the branch) and attached file "visu_updated.doc" and write all your remarks? http://svn/svn/occt/branches/OCC22683 I think there might be too much information in updated visualization guide, so if you think that something can be thrown away, please comment. Best regards, APL |
|
The branch http://svn/svn/occt/branches/OCC22683 is ready to be reviewed |
|
Dear Anton, I have removed some unused methods from Select3D_Projector class: SetDirection(), Directions() and BoxAdd(). Also I have changed slightly CDL documentation. Could you please review the updated branch http://svn/svn/occt/branches/OCC22683? |
|
Dear Sergey, The modifications passed review without any remarks. |
|
Dear Bugmaster, The branch http://svn/svn/occt/branches/OCC22683 passed review without any remarks and ready to be tested |
|
Dear BugMaster, Workbench KAS:dev:aan-OCC22683-occt from SVN branch http://svn/svn/occt/branches/OCC22683 (and aan-OCC22683-products from trunk) was successfully compiled on Linux and Windows platforms, and tested on Linux and Windows platforms. There are not regressions in aan-OCC22683-products regarding to KAS:dev:products-20120127-opt See results in /QADisk/occttests/results/KAS/dev/aan-OCC22683-products_02022012/lin See reference results in /QADisk/occttests/results/KAS/dev/products-20120127-opt_28012012/lin See test cases in /QADisk/occttests/tests/ED N.B. In order to launch testing case you can make use the following instructions http://doc/doku.php?id=occt:certification |
|
Integrated into trunk of occt repository Date: 2012-02-10 13:30:38 +0400 (Fri, 10 Feb 2012) New Revision: 10403 Modified: trunk/src/Select3D/Select3D_Projector.cdl trunk/src/Select3D/Select3D_Projector.cxx trunk/src/Select3D/Select3D_Projector.lxx |
occt: master b0f0bd0c 2012-02-10 09:30:38
Committer: bugmaster Details Diff |
0022683: Incorrect result of Select3D_Projector::Project() in the case of perspective projection |
Affected Issues 0022683 |
|
mod - src/Select3D/Select3D_Projector.cdl | Diff File | ||
mod - src/Select3D/Select3D_Projector.cxx | Diff File | ||
mod - src/Select3D/Select3D_Projector.lxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-07-25 11:24 | kgv | CC | => kgv |
2011-08-02 11:24 | bugmaster | Category | OCCT:VIZ => OCCT:Visualization |
2011-08-09 11:39 |
|
Note Added: 0017929 | |
2011-08-09 11:39 |
|
Assigned To | bugmaster => apl |
2011-08-09 11:39 |
|
Status | new => assigned |
2011-08-09 11:51 |
|
Note Edited: 0017929 | |
2011-11-21 12:22 |
|
Note Added: 0018592 | |
2011-11-21 14:27 |
|
Note Added: 0018594 | |
2011-11-21 15:12 |
|
Note Edited: 0018594 | |
2011-11-29 14:53 |
|
File Added: visu_updated.doc | |
2011-11-29 14:58 |
|
Note Added: 0018654 | |
2011-11-29 15:01 |
|
Note Added: 0018655 | |
2011-11-29 15:01 |
|
Status | assigned => resolved |
2011-11-29 16:52 |
|
Assigned To | apl => san |
2011-12-26 16:11 |
|
Note Edited: 0017929 | |
2011-12-26 16:11 |
|
Note Edited: 0018592 | |
2011-12-26 16:12 |
|
Note Edited: 0018594 | |
2011-12-26 16:12 |
|
Note Edited: 0018654 | |
2011-12-26 16:12 |
|
Note Edited: 0018654 | |
2011-12-26 16:12 |
|
Note Edited: 0017929 | |
2011-12-26 16:12 |
|
Note Edited: 0018594 | |
2011-12-26 16:13 |
|
Note Edited: 0018592 | |
2012-02-01 16:52 |
|
Note Added: 0019334 | |
2012-02-01 16:52 |
|
Assigned To | san => apl |
2012-02-01 17:12 |
|
Fixed in Version | EMPTY => |
2012-02-01 17:12 |
|
Description Updated | |
2012-02-01 17:12 |
|
Additional Information Updated | |
2012-02-01 17:49 |
|
Note Added: 0019337 | |
2012-02-01 17:50 |
|
Note Added: 0019338 | |
2012-02-01 17:50 |
|
Assigned To | apl => bugmaster |
2012-02-01 17:50 |
|
Status | resolved => reviewed |
2012-02-03 17:24 |
|
Note Added: 0019390 | |
2012-02-03 17:25 |
|
Note Edited: 0019390 | |
2012-02-03 17:25 |
|
Status | reviewed => tested |
2012-02-10 13:47 | bugmaster | Target Version | => 6.5.3 |
2012-02-10 13:48 | bugmaster | Note Added: 0019502 | |
2012-02-10 13:48 | bugmaster | Status | tested => verified |
2012-02-10 13:48 | bugmaster | Resolution | open => fixed |
2012-02-10 13:48 | bugmaster | Assigned To | bugmaster => apl |
2012-02-10 15:08 |
|
Test case number | => test case is not required |
2012-03-29 17:26 | bugmaster | Changeset attached | => occt master b0f0bd0c |