View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033114 | Open CASCADE | OCCT:Visualization | public | 2022-08-27 16:43 | 2023-03-19 20:23 |
Reporter | kgv | Assigned To | mzernova | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2015 | ||
Product Version | 7.6.0 | ||||
Target Version | 7.7.0 | Fixed in Version | 7.7.0 | ||
Summary | 0033114: Visualization - AIS_Animation returns 0 elapsed time after finishing playback | ||||
Description | After complication of playback AIS_Animation implicitly stops timer and resets it's value to 0.0. This behavior is misleading as reported elapsed time becomes inconsistent to what user actually sees - it would be better setting timer exactly to animation's duration. | ||||
Steps To Reproduce | pload MODELING VISUALIZATION vinit View1 vaxo psphere s 50 box b1 -50 -50 0 100 100 100 vdisplay -dispMode 1 b1 s vviewparams -scale 2.499 -proj 0.546611 -0.600024 -0.584114 -up -0.411832 0.414728 -0.811415 -at -5.3425 -2.983 49.216 vanimation anim -clear vanimation anim/obj1 -objectTrsf b1 -loc1 0 0 0 -loc2 -100 0 -100 -start 0 -duration 2 vanimation anim/obj2 -objectTrsf s -loc1 0 0 0 -loc2 100 0 100 -start 1 -duration 2 vanimation anim -play vanimation anim -elapsedTime | ||||
Tags | No tags attached. | ||||
Test case number | Not required | ||||
|
Random image deviations on v3d anim videorecorder (videorecorder_10.png) might be related to this issue. image.png (62,280 bytes) |
|
Branch CR33114 has been created by mzernova. SHA-1: 51cb1f35af8475a327b201b603405ceae18f0009 Detailed log of new commits: Author: mzernova Date: Fri Sep 2 18:08:46 2022 +0300 0033114: Visualization - AIS_Animation returns 0 elapsed time after finishing playback |
|
Branch CR33114 has been updated forcibly by mzernova. SHA-1: 595b92ac24084cab5982fb1b7132c84db51b5c64 |
|
Branch CR33114 has been updated forcibly by mzernova. SHA-1: 912d681cf6233fc4d57a113f09e262bcc6ea5da5 |
|
http://jenkins-test-occt.nnov.opencascade.com/view/CR33114-master-mzernova/ |
|
The patch CR33114 is ready to review |
|
@@ -220,6 +220,7 @@ void AIS_Animation::Start (const Standard_Boolean theToUpdate) if (!myTimer.IsNull()) { + myTimer->Seek (0.0); myTimer->Start(); It is better to keep old behavior of AIS_Animation::Start() to avoid disruption of existing applications relying on it. + theAnimationNew->SetTimer (theAnimation->Timer()); theAnimation = theAnimationNew; Please bring some comment here (in the bugtracker or commit message) to clarify a reason for this change. + Standard_Boolean isShowElapsedTime = Standard_False; `toPrintElapsedTime` + if (isShowElapsedTime && !anAnimation->Timer().IsNull()) + { + theDI << "Elapsed Time, sec: " << anAnimation->ElapsedTime() << "\n"; + } If timer is NULL, then elapsed time is `0`. @@ -252,6 +253,7 @@ void AIS_Animation::Stop() if (!myTimer.IsNull()) { myTimer->Stop(); + myTimer->Seek (Duration()); This looks like a wrong place to forcefully set Duration() here - user may call Stop() in the middle of animation as well. But in this place you may put something like clamping - e.g. if Duration() > 0.0 then Seek(Min (Duration(), Elapsed)). |
|
Branch CR33114 has been updated forcibly by mzernova. SHA-1: b2f688dd21756774f646b0fb693548156bd5a226 |
|
Branch CR33114_1 has been created by mzernova. SHA-1: 9207365538bd2bf8ba136f3badeae4cf716272ae Detailed log of new commits: Author: mzernova Date: Fri Sep 2 18:08:46 2022 +0300 0033114: Visualization - AIS_Animation returns 0 elapsed time after finishing playback Added -elapsedTime option to DRAW vanim command |
|
+ theDI << "Elapsed Time, sec: " << anAnimation->ElapsedTime() << "\n"; theDI << "Elapsed Time: " << anAnimation->ElapsedTime() << " s\n"; - ViewerTest::CurrentEventManager()->AbortViewAnimation(); - ViewerTest::CurrentEventManager()->SetObjectsAnimation (Handle(AIS_Animation)()); if (!toPlay && aRecFile.IsEmpty()) { + if (toPrintElapsedTime) + { + theDI << "Elapsed Time, sec: " << anAnimation->ElapsedTime() << "\n"; + } return 0; } + ViewerTest::CurrentEventManager()->AbortViewAnimation(); + ViewerTest::CurrentEventManager()->SetObjectsAnimation (Handle(AIS_Animation)()); Please restore logic with stopping playback and move `if (toPrintElapsedTime)` block outside of `toPlay` checks. +Standard_Real AIS_Animation::ElapsedTime() const I'm not sure it worth putting this logic into this method, as it would lead to different values with the timer. Is there a reason why we cannot Seek() timer instead? |
|
Branch CR33114 has been updated forcibly by mzernova. SHA-1: c64ac693b9a9fc1809da247b0e6cd02f2a275021 |
|
Branch CR33114_1 has been updated forcibly by mzernova. SHA-1: b9f787f180253cafe326c4cecef69d296b161924 |
|
Combination - OCCT branch : IR-2022-09-23 master SHA - changes and them, and you can discard any commits you make in this b3284f3ba911e4d18477ff1788ace3d7201a8827 changes and them, and you can discard any commits you make in this e0ceb716c70188b98130b1550914140d0502a6f9 Products branch : IR-2022-09-23 SHA - f1708bcb12b969ae6e6578ab6d46bb65e135a733 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: 18666.730000000585 / 18776.180000000597 [-0.58%] Products Total CPU difference: 11867.75000000012 / 11959.870000000119 [-0.77%] Windows-64-VC14: OCCT Total CPU difference: 20851.8125 / 20857.796875 [-0.03%] Products Total CPU difference: 14092.984375 / 14084.640625 [+0.06%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR33114 has been deleted by mnt. SHA-1: c64ac693b9a9fc1809da247b0e6cd02f2a275021 |
|
Branch CR33114_1 has been deleted by mnt. SHA-1: b9f787f180253cafe326c4cecef69d296b161924 |
occt: master b9f787f1 2022-09-02 18:08:46 Details Diff |
0033114: Visualization - AIS_Animation returns 0 elapsed time after finishing playback Added -elapsedTime option to DRAW vanim command |
Affected Issues 0033114 |
|
mod - src/AIS/AIS_Animation.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-08-27 16:43 | kgv | New Issue | |
2022-08-27 16:43 | kgv | Assigned To | => kgv |
2022-08-27 16:43 | kgv | Assigned To | kgv => mzernova |
2022-08-27 16:43 | kgv | Status | new => assigned |
2022-08-31 11:05 | kgv | Note Added: 0110466 | |
2022-08-31 11:05 | kgv | File Added: image.png | |
2022-09-02 18:09 | git | Note Added: 0110581 | |
2022-09-05 11:30 | git | Note Added: 0110624 | |
2022-09-05 18:22 | git | Note Added: 0110679 | |
2022-09-06 11:04 | mzernova | Note Added: 0110703 | |
2022-09-06 11:06 | mzernova | Assigned To | mzernova => kgv |
2022-09-06 11:06 | mzernova | Status | assigned => resolved |
2022-09-06 11:06 | mzernova | Steps to Reproduce Updated | |
2022-09-06 11:06 | mzernova | Note Added: 0110705 | |
2022-09-06 11:17 | kgv | Note Added: 0110708 | |
2022-09-06 11:17 | kgv | Assigned To | kgv => mzernova |
2022-09-06 11:17 | kgv | Status | resolved => assigned |
2022-09-06 11:18 | kgv | Steps to Reproduce Updated | |
2022-09-19 13:46 | git | Note Added: 0111144 | |
2022-09-19 13:46 | git | Note Added: 0111145 | |
2022-09-19 13:49 | mzernova | Assigned To | mzernova => kgv |
2022-09-19 13:49 | mzernova | Status | assigned => resolved |
2022-09-19 14:00 | kgv | Note Added: 0111146 | |
2022-09-19 14:00 | kgv | Assigned To | kgv => mzernova |
2022-09-19 14:00 | kgv | Status | resolved => assigned |
2022-09-20 12:03 | git | Note Added: 0111155 | |
2022-09-20 12:04 | git | Note Added: 0111156 | |
2022-09-20 12:05 | mzernova | Assigned To | mzernova => kgv |
2022-09-20 12:05 | mzernova | Status | assigned => resolved |
2022-09-20 12:23 | kgv | Assigned To | kgv => bugmaster |
2022-09-20 12:23 | kgv | Status | resolved => reviewed |
2022-09-25 13:31 |
|
Status | reviewed => tested |
2022-09-25 13:31 |
|
Note Added: 0111243 | |
2022-09-25 13:37 |
|
Test case number | => Not required |
2022-09-25 13:38 | mzernova | Changeset attached | => occt master b9f787f1 |
2022-09-25 13:38 | mzernova | Assigned To | bugmaster => mzernova |
2022-09-25 13:38 | mzernova | Status | tested => verified |
2022-09-25 13:38 | mzernova | Resolution | open => fixed |
2022-09-25 13:40 | git | Note Added: 0111253 | |
2022-09-25 13:40 | git | Note Added: 0111254 | |
2023-03-19 20:23 | vglukhik | Status | verified => closed |
2023-03-19 20:23 | vglukhik | Fixed in Version | => 7.7.0 |