View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023422 | Community | OCCT:Visualization | public | 2012-09-06 18:06 | 2014-11-11 12:57 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | A | OS | L | ||
Product Version | 6.5.3 | ||||
Target Version | 6.8.0 | Fixed in Version | 6.8.0 | ||
Summary | 0023422: Selection problems when using SetLocation. | ||||
Description | The bug was originally reported on the forum: http://www.opencascade.org/org/forum/thread_20788/?forum=3 When using SetLocation for AIS objects, the desired location is not applied to sensitive entities as expected. While the presentation moves to the desired position, it can be picked only in its previous or identity location. The bug is a result of logical mistakes and numerous references in code that deals with HasLocation() and Location() in Select3D_SensitiveEntity and SelectMgr_EntitiyOwner. As reported on the forum, it is necessary to call SetLocation(...) method with similar arguments at least twice. Moreover, after recomputing the selection for AIS object, the sensitives are located at identity. ============================================================================== Originally, the problem is produced by invalid comparison of locations in code of Select3D_SensitiveEntity: //--------------------------------------------------------------------------- void Select3D_SensitiveEntity::UpdateLocation(const TopLoc_Location& aLoc) { if(aLoc.IsIdentity() || aLoc == Location()) return; if(!HasLocation()) SetLocation(aLoc); ... The first statement is always true, as the aLoc corresponds to the updated location of AIS_InteractiveObject (and Prs3d_PresentableObject), while the Location() returns the same location by referencing it from SelectMgr_EntitiyOwner and, thereby, from AIS_InteractiveObject. The Select3D_SensitiveEntity::SetLocation() (which is never called) is redefined in Select3D_SensitiveGroup, Select3D_SensitiveTriangulation, Select3D_SensitiveWire, so the entities don't work as expected. The code above is called right after Prs3d_PresentableObject::SetLocation (inherited by AIS_InteractiveObject) is invoked, so the location for the object updated first and thus the comparison fails. =============================================================================== The location logic is very complicated, with a lot references, so corresponding code should be refactored to avoid expansion of such a mistakes. | ||||
Steps To Reproduce | ------------------------------------------------------------------------------- Handle(AIS_InteractiveContext) aContext = ...; Handle(AIS_Shape) aShape = ...; aContext->Display (aShape); gp_Trsf aTrsf1; aTrsf1.SetTranslation (gp_Vec (10.0, 10.0, 10.0)); TopLoc_Location aLoc1 (aTrsf1); aContext->SetLocation (aShape, aLoc1); aContext->Redisplay (aShape); ----------------------------------------------------------------------------- Bug: the shape can be picked in identity location, while it is displayed as translated. | ||||
Tags | No tags attached. | ||||
Test case number | bugs vis(004) bug23422 | ||||
2012-09-06 18:11 developer |
selection.png (38,679 bytes) |
|
Can you please check if this issue is resolved by the patch for 0024837? |
|
Should be fixed by the patch for 0024837, please test with branch CR24837 and close. NOTE: vsetlocation command can be used for testing instead of the C++ reproducer. |
|
Dear MKV, Please recheck and if all OK create testing case |
|
Dear duv, test case bugs vis(004) bug23422 was created and pushed to git branch CR24837 0024837 Could you please review it. |
|
Dear mkv, Test case reviewed without remarks. |
|
Waiting fix for 24837 |
|
Dear bugmaster, CR24837 is tested. |
|
Test case has been integrated with fix for 0024837 |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-09-06 18:06 |
|
New Issue | |
2012-09-06 18:06 |
|
Assigned To | => san |
2012-09-06 18:11 |
|
File Added: selection.png | |
2012-10-23 15:10 |
|
Target Version | 6.5.4 => 6.6.0 |
2013-02-26 18:33 |
|
Target Version | 6.6.0 => 6.7.0 |
2013-12-12 11:06 |
|
Target Version | 6.7.0 => 6.7.1 |
2014-02-17 15:20 | kgv | Relationship added | related to 0024623 |
2014-04-04 18:09 |
|
Target Version | 6.7.1 => 6.8.0 |
2014-08-20 13:02 |
|
Relationship added | related to 0024837 |
2014-08-20 13:04 |
|
Note Added: 0030928 | |
2014-08-20 13:04 |
|
Assigned To | san => duv |
2014-08-20 13:04 |
|
Status | new => feedback |
2014-08-21 10:03 |
|
Status | feedback => assigned |
2014-08-21 10:05 |
|
Note Added: 0030970 | |
2014-08-21 10:05 |
|
Assigned To | duv => bugmaster |
2014-08-21 10:05 |
|
Status | assigned => feedback |
2014-08-21 10:09 | bugmaster | Note Added: 0030973 | |
2014-08-21 10:09 | bugmaster | Assigned To | bugmaster => mkv |
2014-08-26 14:00 |
|
Note Added: 0031091 | |
2014-08-26 14:01 |
|
Test case number | => bugs vis(004) bug23422 |
2014-08-26 14:01 |
|
Assigned To | mkv => duv |
2014-08-26 15:05 |
|
Note Added: 0031094 | |
2014-08-26 15:05 |
|
Assigned To | duv => mkv |
2014-08-26 15:05 |
|
Status | feedback => reviewed |
2014-08-26 15:26 |
|
Assigned To | mkv => bugmaster |
2014-08-26 15:26 |
|
Status | reviewed => tested |
2014-08-28 14:36 | bugmaster | Note Added: 0031156 | |
2014-08-28 14:36 | bugmaster | Assigned To | bugmaster => duv |
2014-08-28 14:36 | bugmaster | Status | tested => assigned |
2014-08-29 12:12 |
|
Note Added: 0031181 | |
2014-08-29 12:12 |
|
Status | assigned => feedback |
2014-08-29 12:51 |
|
Assigned To | duv => bugmaster |
2014-09-02 12:08 | bugmaster | Status | feedback => tested |
2014-09-02 12:09 | bugmaster | Note Added: 0031265 | |
2014-09-02 12:09 | bugmaster | Status | tested => verified |
2014-09-02 12:09 | bugmaster | Resolution | open => fixed |
2014-09-02 12:09 | bugmaster | Note Edited: 0031265 | |
2014-11-11 12:45 |
|
Fixed in Version | => 6.8.0 |
2014-11-11 12:57 |
|
Status | verified => closed |