MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029993Open CASCADE[OCCT] OCCT:Visualizationpublic2018-07-27 12:272020-07-11 12:31
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityfeature 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0*Fixed in Version 
Summary0029993: Visualization - AIS_TextLabel computes selection primitive only for attachment point
DescriptionAIS_TextLabel::ComputeSelection() adds only one sensitive entity - Select3D_SensitivePoint.

It is desired improving this functionality to select text label as whole (as rectangle).
Steps To ReproduceNot required
TagsNo tags attached.
Test case numberbugs/vis/bug29993
Attached Filespng file icon bug29993_KO.png (19,647 bytes) 2020-07-04 16:41
png file icon bug29993_OK.png (22,361 bytes) 2020-07-04 16:41

- Relationships

-  Notes
(0092987)
git (administrator)
2020-07-04 14:41

Branch CR29993 has been created by mzernova.

SHA-1: 4e227abd93c72034f64db98251af8b9379b56235


Detailed log of new commits:

Author: mzernova
Date: Tue Dec 3 12:32:39 2019 +0300

    0029993: Visualization - AIS_TextLabel computes selection primitive only for attachment point
    
    The text label is selected as a rectangle (adds a sensitive object - Select3D_SensitiveFace).
    The bounding box has been resized to fit the sensitive rectangle.
    Transform persistent has been added to AIS_TextLabel to correctly position the sensitive rectangle.
    The vconnect command was also changed to correctly connect objects with transform persistence.
    
    bugs/vis/bug29993: test case added
(0092990)
git (administrator)
2020-07-04 22:58

Branch CR29993 has been updated forcibly by mzernova.

SHA-1: 55548d1e1608c0fb8dfbe4cc646a675348c1416a
(0092993)
mzernova (developer)
2020-07-05 09:32

http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR29993-master-mzernova/ [^]
(0092994)
mzernova (developer)
2020-07-05 09:41

The patch CR29993 is ready to review
(0092995)
kgv (developer)
2020-07-05 09:52

+ tests/bugs/vis/bug29993
It would be better makes an extra screenshot with vsensdis to existing test case rather than creating a new one.

--- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx
+++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx
@@ -4254,6 +4254,10 @@ static Handle(AIS_InteractiveObject) findConnectedObject (const TCollection_Asci
     
aConnected->SetDisplayMode (aPrs->DisplayMode());
   }
   aConnected->Connect (aPrs, aPrs->LocalTransformationGeom());
+  if (!aPrs->TransformPersistence().IsNull())
+  {
+    aConnected->SetTransformPersistence (aPrs->TransformPersistence());
+  }

This looks unrelated to bug.
Do you have a test case for this issue?

--- a/src/AIS/AIS_TextLabel.hxx
+++ b/src/AIS/AIS_TextLabel.hxx
@@ -132,6 +132,16 @@ private:
   Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
                                                  
const Standard_Integer             theMode) Standard_OVERRIDE;
 
+  //! Calculate label center, width and height
+  Standard_EXPORT Standard_Boolean calculateLabelParams

Please change section private -> protected for all these methods.

+  aLabelPlane.SetTranslationPart (theCenterOfLabel.Coord());

theCenterOfLabel.XYZ() is more common.

+    isInit = Standard_True;

This temporary variable looks redundant in new method.

+  if (Handle(Font_FTFont) aFont = Font_FTFont::FindAndCreate (anAsp->Aspect()->Font(), anAsp->Aspect()->GetTextFontAspect(), 
aFontParams))

Handle(Font_FTFont) aFont = ...;
if (aFont.IsNull()) { return false; }

+      Handle(Select3D_SensitiveEntity) aTextSensitive;
...
+        aTextSensitive = new Select3D_SensitivePoint (anEntityOwner, aPosition);
+        theSelection->Add (aTextSensitive);
+        break;

Defining variable in advance looks redundant.

+        aBox.Add (NCollection_Vec4<float> ((float) aMinPnt.X(), (float) aMinPnt.Y(), (float) aMinPnt.Z(), 
1.0));

Graphic3d_Vec4
(0092996)
mzernova (developer)
2020-07-05 10:07
edited on: 2020-07-05 10:07

>This looks unrelated to bug.
>Do you have a test case for this issue?


This problem can be reproduced in test bugs/vis/bug24837_2

test bugs vis bug24837_2 1
vsensdis

For text labels, transform persistent is not set

(0092998)
kgv (developer)
2020-07-05 11:44

> This problem can be reproduced in test bugs/vis/bug24837_2
Please extend this test case with an extra screenshot.
(0092999)
git (administrator)
2020-07-05 19:53

Branch CR29993 has been updated by mzernova.

SHA-1: 3e33f4a27d3d74035149223f35d534e555015379


Detailed log of new commits:

Author: mzernova
Date: Sun Jul 5 19:31:44 2020 +0300

    remarks from kgv

(0093000)
git (administrator)
2020-07-05 19:53

Branch CR29993_1 has been created by mzernova.

SHA-1: 2dff41379e16e36fce42a223200bba7b7c89567f


Detailed log of new commits:

Author: mzernova
Date: Tue Dec 3 12:32:39 2019 +0300

    0029993: Visualization - AIS_TextLabel computes selection primitive only for attachment point
    
    The text label is selected as a rectangle (adds a sensitive object - Select3D_SensitiveFace).
    The bounding box has been resized to fit the sensitive rectangle.
    Transform persistent has been added to AIS_TextLabel to correctly position the sensitive rectangle.
    The findConnectedObject function has also been changed to correctly set transform persistence.
(0093001)
mzernova (developer)
2020-07-05 19:54

The patch CR29993_1 is ready to review
(0093002)
git (administrator)
2020-07-05 20:16

Branch CR29993 has been updated by mzernova.

SHA-1: 7a18963cd6118485c79bb7defb4732a7b9f60946


Detailed log of new commits:

Author: mzernova
Date: Sun Jul 5 20:15:05 2020 +0300

    remarks from kgv

(0093003)
git (administrator)
2020-07-05 20:16

Branch CR29993_1 has been updated forcibly by mzernova.

SHA-1: a6f6b69ed46547a8ad5bd596f78edc4020b4992d
(0093004)
kgv (developer)
2020-07-05 20:34

Please raise the patch in OCCT branch CR29993_1.
(0093097)
bugmaster (administrator)
2020-07-11 12:12

Combination -
OCCT branch : IR-2020-07-10
master SHA - 74440d215bf268902458b25e36a61c791f21fc38
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-07-10 SHA - 6e90d3ea8d7f26e39ec8b263c708ad6ecf5dfaaa
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17210.790000000085 / 17175.910000000105 [+0.20%]
Products
Total CPU difference: 11229.020000000071 / 11228.490000000076 [+0.00%]
Windows-64-VC14:
OCCT
Total CPU difference: 18725.6875 / 18705.46875 [+0.11%]
Products
Total CPU difference: 11144.125 / 13046.140625 [-14.58%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0093122)
git (administrator)
2020-07-11 12:31

Branch CR29993 has been deleted by inv.

SHA-1: 7a18963cd6118485c79bb7defb4732a7b9f60946
(0093123)
git (administrator)
2020-07-11 12:31

Branch CR29993_1 has been deleted by inv.

SHA-1: a6f6b69ed46547a8ad5bd596f78edc4020b4992d

- Related Changesets
occt: master 3e9c1d1e
Timestamp: 2019-12-03 09:32:39
Author: mzernova
Committer: bugmaster
Details ] Diff ]
0029993: Visualization - AIS_TextLabel computes selection primitive only for attachment point

The text label is selected as a rectangle (adds a sensitive object - Select3D_SensitiveFace).
The bounding box has been resized to fit the sensitive rectangle.
Transform persistent has been added to AIS_TextLabel to correctly position the sensitive rectangle.
The findConnectedObject function has also been changed to correctly set transform persistence.
mod - src/AIS/AIS_TextLabel.cxx Diff ] File ]
mod - src/AIS/AIS_TextLabel.hxx Diff ] File ]
mod - src/SelectMgr/SelectMgr_ViewerSelector3d.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff ] File ]
mod - tests/3rdparty/fonts/A2 Diff ] File ]
mod - tests/3rdparty/fonts/A7 Diff ] File ]
mod - tests/bugs/vis/bug24837_2 Diff ] File ]

- Issue History
Date Modified Username Field Change
2018-07-27 12:27 kgv New Issue
2018-07-27 12:27 kgv Assigned To => kgv
2019-09-04 15:36 abv Target Version 7.4.0 => 7.5.0*
2019-11-18 17:26 kgv Assigned To kgv => mzernova
2019-11-18 17:26 kgv Status new => assigned
2020-07-04 14:41 git Note Added: 0092987
2020-07-04 16:41 mzernova File Added: bug29993_KO.png
2020-07-04 16:41 mzernova File Added: bug29993_OK.png
2020-07-04 22:58 git Note Added: 0092990
2020-07-05 09:32 mzernova Note Added: 0092993
2020-07-05 09:41 mzernova Note Added: 0092994
2020-07-05 09:41 mzernova Assigned To mzernova => kgv
2020-07-05 09:41 mzernova Status assigned => resolved
2020-07-05 09:41 mzernova Steps to Reproduce Updated View Revisions
2020-07-05 09:52 kgv Note Added: 0092995
2020-07-05 09:53 kgv Assigned To kgv => mzernova
2020-07-05 09:53 kgv Status resolved => assigned
2020-07-05 10:07 mzernova Note Added: 0092996
2020-07-05 10:07 mzernova Note Edited: 0092996 View Revisions
2020-07-05 11:44 kgv Note Added: 0092998
2020-07-05 19:53 git Note Added: 0092999
2020-07-05 19:53 git Note Added: 0093000
2020-07-05 19:54 mzernova Note Added: 0093001
2020-07-05 19:54 mzernova Assigned To mzernova => kgv
2020-07-05 19:54 mzernova Status assigned => resolved
2020-07-05 19:54 mzernova Steps to Reproduce Updated View Revisions
2020-07-05 20:16 git Note Added: 0093002
2020-07-05 20:16 git Note Added: 0093003
2020-07-05 20:34 kgv Note Added: 0093004
2020-07-05 20:34 kgv Assigned To kgv => bugmaster
2020-07-05 20:34 kgv Status resolved => reviewed
2020-07-11 12:12 bugmaster Note Added: 0093097
2020-07-11 12:12 bugmaster Status reviewed => tested
2020-07-11 12:14 bugmaster Test case number => bugs/vis/bug29993
2020-07-11 12:22 bugmaster Changeset attached => occt master 3e9c1d1e
2020-07-11 12:22 bugmaster Status tested => verified
2020-07-11 12:22 bugmaster Resolution open => fixed
2020-07-11 12:31 git Note Added: 0093122
2020-07-11 12:31 git Note Added: 0093123


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker