View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025785 | Open CASCADE | OCCT:Visualization | public | 2015-02-03 09:51 | 2016-04-20 15:49 |
Reporter | Assigned To | ||||
Priority | normal | Severity | integration request | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
Summary | 0025785: Visualization - introduce AIS_ColorScale presentation for Color Scale | ||||
Description | As far as z-layers can now draw 2d objects, color scale must be implemented as AIS interactive object. | ||||
Steps To Reproduce | tests/bugs/vis/bug25136 | ||||
Additional information and documentation updates | ColorScale as global property of V3d_View has been removed with associated methods V3d_View::ColorScaleDisplay(), V3d_View::ColorScaleErase(), V3d_View::ColorScaleIsDisplayed(), V3d_View::ColorScale() and classes V3d_ColorScale, V3d_ColorScaleLayerItem, Aspect_ColorScale. New interactive object AIS_ColorScale (provides the same configuration API as previously Aspect_ColorScale and V3d_ColorScale) should be used instead and displayed as 2D presentation: Handle(AIS_ColorScale) aCS = new AIS_ColorScale(); // configuring aCS->SetHeight (0.95); aCS->SetRange (0.0, 10.0); aCS->SetNumberOfIntervals (10); // displaying aCS->SetZLayer (Graphic3d_ZLayerId_TopOSD); aCS->SetTransformPersistence (Graphic3d_TMF_2d, gp_Pnt (-1,-1,0)); aCS->SetToUpdate(); theContextAIS->Display (aCS); | ||||
Tags | No tags attached. | ||||
Test case number | bugs vis bug25136 | ||||
related to | 0025508 | closed | bugmaster | Open CASCADE | Visualization - redesign of 2d layers in TKV3d |
parent of | 0027058 | closed | Open CASCADE | AIS_ColorScale defines methods SetColor and SetWidth hiding inherited methods | |
related to | 0026312 | closed | bugmaster | Community | ColorScale doesn't work as expected. |
child of | 0025783 | closed | bugmaster | Open CASCADE | Visualization - allow Z-layer to draw 2D objects and to make it alternative to Overlay and Underlay |
|
Branch CR25785 has been created by isz. SHA-1: 31135a9508ad60cd4aa7deb295ae5ca06a617572 Detailed log of new commits: Author: isz Date: Tue Feb 3 12:06:37 2015 +0300 0025785: Redesign of color scale on AIS Color scale is implemented on AIS. Draw command vcolorscale now works with AIS_ColorScale. |
|
Dear Kirill, Please review branch CR25785. |
|
The patch is messed up with #0025136. |
|
Branch CR25785_1 has been created by isz. SHA-1: 55ba80ad21f9211bcd16eff290abac6d3849488a Detailed log of new commits: Author: isz Date: Wed Feb 11 13:54:24 2015 +0300 0025785: Visualization - introduce AIS_ColorScale presentation for Color Scale Color scale is implemented on AIS. Draw command vcolorscale now works with AIS_ColorScale. Author: isz Date: Mon Feb 9 13:49:08 2015 +0300 Flags' values for TPF_2D and Graphic3d_TMF_2d were changed to 0x40. Author: isz Date: Mon Feb 9 11:36:58 2015 +0300 Flag TPF_2D is added to transform persistence flags. Matrix settings for drawing 2d objects were moved into BeginTransformPersistence() method. Vdisplay command is modified: options -overlay and -underlay were added to be able to display objects in overlay and underlay; options -select and -noselect were added to control selection; selection for 2d objects is turned off by default. Test case bug25783 was added to check the new options of vdisplay command. Author: kgv Date: Tue Feb 3 16:06:39 2015 +0300 cosmetics Author: isz Date: Tue Feb 3 10:51:19 2015 +0300 0025783: Designing 2d layers with z-layers Displaying objects in 2d now works through zlayers. Is2d flag is added to ZlayerSettings. Graphic3d_ZLayerId_BotOSD with id -5 is added to draw underlay. |
|
Dear Kirill, Please review branch CR25785_1. |
|
Branch CR25785_1 has been updated forcibly by isz. SHA-1: a360f319d64eed8a1f3740ce96b4349c8c591941 |
|
Branch CR25785_1 has been updated by isz. SHA-1: ea1415bb9f4c516c6a4806d6694132e0bcc66f6e Detailed log of new commits: Author: isz Date: Thu Feb 19 14:48:09 2015 +0300 Draw command OCC12584 updated. |
|
Branch CR25785_1 has been updated forcibly by isz. SHA-1: 393ab004aebc6720040d58e2ebace6f97427b76a |
|
Branch CR25785_1 has been updated forcibly by isz. SHA-1: c84a52bbd8937a26f054806477ab91545c27dbfb |
|
Branch CR25785_2 has been created by isz. SHA-1: bf2df53ff45c46bb1bac4922b8d88f744f36f62c Detailed log of new commits: Author: isz Date: Fri Apr 17 15:34:29 2015 +0300 0025785: Visualization - introduce AIS_ColorScale presentation for Color Scale Color scale is implemented on AIS. Draw command vcolorscale now works with AIS_ColorScale. |
|
AIS_ColorScale should replace old color scale, not provide extra one. |
|
Branch CR25785_2 has been updated forcibly by isz. SHA-1: 0745155b95049580aa0957a01376d9666237d299 |
|
Dear Kirill, Please review branch CR25785_2. |
|
Branch CR25785_2 has been updated forcibly by isz. SHA-1: 48ecff5618609fc26c4e0153a373d0b2d98696fe |
|
+ for (Standard_Integer ci = 1; ci <= colors.Length() && step > 0; ci++) { + Standard_Integer y = (Standard_Integer)( myYPos + ( ci - 1 )* step + offset ); + Standard_Integer h = (Standard_Integer)( myYPos + ( ci ) * step + offset ) - y; + DrawRectangle (thePresentation, x, y, colorWidth, h, colors.Value( ci ), Standard_True); + } this code should be replaced by generation of single colored triangles array. --- /dev/null +++ b/src/AIS/AIS_ColorScale.cxx @@ -0,0 +1,759 @@ +#include <AIS_ColorScale.hxx> ... --- /dev/null +++ b/src/AIS/AIS_ColorScale.hxx @@ -0,0 +1,257 @@ +#ifndef _AIS_ColorScale_HeaderFile +#define _AIS_ColorScale_HeaderFile + +#include <AIS_InteractiveObject.hxx> file headers are missing for new files. +class AIS_ColorScale : public AIS_InteractiveObject { class should be documented. + //! Returns minimal value of color scale; + Standard_EXPORT Standard_Real GetMin() const { return myMin; } here and in other places - please re-format the code in new files in accordance with OCCT code rules. + void DrawRectangle ( const Handle(Prs3d_Presentation)& thePresentation, + const Standard_Integer theX, const Standard_Integer theY, + const Standard_Integer theWidth, const Standard_Integer theHeight, + const Quantity_Color& theColor, const Standard_Boolean theFilled = Standard_False); + + //! Draws a text. + //! @param theText [in] the text to draw. + //! @param theX [in] the X coordinate of text position. + //! @param theY [in] the Y coordinate of text position. + //! @param theColor [in] the color of text. + void DrawText ( const Handle(Prs3d_Presentation)& thePresentation, + const TCollection_ExtendedString& theText, + const Standard_Integer theX, const Standard_Integer theY, + const Quantity_Color& theColor ); it seems to be that these methods should not be declared as public. Please make them protected and add missing Standard_EXPORT. + Standard_EXPORT void SizeHint (Standard_Integer& theWidth, Standard_Integer& theHeight) const; + //! Returns the format of text. + Standard_EXPORT TCollection_AsciiString Format() const; + + //! Returns the value of given interval. + Standard_EXPORT Standard_Real GetNumber (const Standard_Integer anIndex) const; + + //! Returns the color's hue for the given value in the given interval. + //! @param theValue [in] the current value of interval. + //! @param theMin [in] the min value of interval. + //! @param theMax [in] the max value of interval. + Standard_EXPORT static Standard_Integer HueFromValue (const Standard_Integer aValue, const Standard_Integer aMin, const Standard_Integer aMax); + there no point in exporting private methods. + Standard_EXPORT static Standard_Integer HueFromValue (const Standard_Integer aValue, const Standard_Integer aMin, const Standard_Integer aMax); + + Standard_Real myMin; + Standard_Real myMax; methods and fields should be separated. |
|
Branch CR25785_3 has been created by isz. SHA-1: c1d7b91924e77c5a10e2e78ba77e8f745fa663c6 Detailed log of new commits: Author: isz Date: Thu Jul 16 13:29:31 2015 +0300 Drawing colors with DrawRectangle method was replaced by generation of single colored triangles array. Added fixes to correspond coding rules. Author: isz Date: Thu Apr 23 18:02:21 2015 +0300 0025785: Visualization - introduce AIS_ColorScale presentation for Color Scale Color scale is implemented on AIS. Draw command vcolorscale now works with AIS_ColorScale. |
|
Dear Kirill, Please review branch CR25785_3. |
|
Please squash and rebase to current master. |
|
Branch CR25785_4 has been created by isz. SHA-1: 8d83d198605b1e33a1d6fa96b6231a436d1dabe8 Detailed log of new commits: Author: isz Date: Thu Jul 23 09:23:00 2015 +0300 0025785: Visualization - introduce AIS_ColorScale presentation for Color Scale Color scale is implemented on AIS. Draw command vcolorscale now works with AIS_ColorScale. |
|
Dear Kirill, Please review branch CR25785_4. |
|
Branch CR25785_4 has been updated forcibly by isz. SHA-1: f75f5081f510751c0b2ac7cae9c04e15ebd1a8b6 |
|
Branch CR25785_4 has been updated forcibly by isz. SHA-1: 94430f772d360087ff4274023987bad91f0b7431 |
|
Please make sure that all samples have been updated. |
|
Branch CR25785_5 has been created by isz. SHA-1: 7f7d590f11fed2f6f898c4257064c5fb8126d29f Detailed log of new commits: Author: isz Date: Fri Jul 31 12:19:06 2015 +0300 0025785: Visualization - introduce AIS_ColorScale presentation for Color Scale Color scale is implemented on AIS. Draw command vcolorscale now works with AIS_ColorScale. In a qt sample VoxelDemo there was added a field AIS_ColorScale myColorsScale to control a color scale. Method displayColorScale and other methods were changed in order to work with this field. |
|
In Products repository there was created branch CR25785. |
|
Dear Kirill, Please review occt branch CR25785_5 and Products branch CR25785. |
|
Branch CR25785_5 has been updated forcibly by isz. SHA-1: 76c4a012825115a7a057825c8aecfc2eef5db20a |
|
Please test the patch. |
|
Dear BugMaster, Branch CR25785_5 from occt git-repository (and CR25785 from products git-repository) was compiled on Linux and Windows platforms and tested. SHA-1: 76c4a012825115a7a057825c8aecfc2eef5db20a SHA-1: a280e461b93124c6dc3b8224c7eb90830bdffd71 Number of compiler warnings: occt component: Linux: 15 (15 on master) Windows: 0 (0 on master) products component: Linux: 39 (39 on master) Windows: 0 (0 on master) Regressions/Differences: http://occt-tests/CR25785-5-CR25785-occt-64/Debian70-64/summary.html http://occt-tests/CR25785-5-CR25785-occt-64/Windows-64-VC10/summary.html 3rdparty fonts A1 bugs vis bug21091_1, bug25027 Testing on Linux: Total MEMORY difference: 91807899 / 91580356 [+0.25%] Total CPU difference: 17901.069999998996 / 18130.909999999098 [-1.27%] Testing on Windows: Total MEMORY difference: 57602948 / 57626727 [-0.04%] Total CPU difference: 16356.03404569925 / 16351.588017199178 [+0.03%] There are differences in images found by testdiff: http://occt-tests/CR25785-5-CR25785-occt-64/Debian70-64/diff-Debian70-64.html http://occt-tests/CR25785-5-CR25785-occt-64/Windows-64-VC10/diff-Windows-64-VC10.html bugs vis bug22819 bugs vis bug12584 bugs vis bug25136 |
|
Branch CR25785_5 has been updated forcibly by isz. SHA-1: 8d1ae7a67ef20aad4edd90100e8f00c794b2428e |
|
Dear Anton, Please review branch CR25785_5 (There were changes in: src/QABugs/QABugs_11.cxx 3rdparty fonts A1 bugs vis bug21091_1, bug25027 bugs vis bug22819 bugs vis bug12584). |
|
Branch CR25785_5 has been updated forcibly by isz. SHA-1: 3cc460466a7e78f9a6bab5c4891a0a473dcac353 |
|
Reviewed, please test. |
|
Branch CR25785_5 has been updated forcibly by mkv. SHA-1: ddb5a374f60a97508e8475444e9b6a56966cc16d |
|
Dear BugMaster, Branch CR25785_5 was rebased on IR-2015-08-06 of occt git-repository. SHA-1: ddb5a374f60a97508e8475444e9b6a56966cc16d Branch CR25785 was rebased on IR-2015-08-06 of products git-repository. SHA-1: a280e461b93124c6dc3b8224c7eb90830bdffd71 |
|
Dear BugMaster, Branch CR25785_5 from occt git-repository (and CR25785from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode. SHA-1: ddb5a374f60a97508e8475444e9b6a56966cc16d SHA-1: a280e461b93124c6dc3b8224c7eb90830bdffd71 Number of compiler warnings: occt component : Linux: 15 (15 on master) Windows: 0 (0 on master) products component : Linux: 39 (39 on master) Windows: 0 (0 on master) Regressions/Differences/Improvements: No regressions/differences Testing cases: http://occt-tests/CR25785-5-CR25785-occt-64/Debian70-64/bugs/vis/bug25136.html http://occt-tests/CR25785-5-CR25785-occt-64/Windows-64-VC10/bugs/vis/bug25136.html bugs vis bug25136: OK Testing on Linux: occt component : Total MEMORY difference: 90886819 / 91021141 [-0.15%] Total CPU difference: 17952.419999998918 / 17854.169999998892 [+0.55%] products component : Total MEMORY difference: 24876493 / 24836344 [+0.16%] Total CPU difference: 6958.550000000001 / 7006.110000000006 [-0.68%] Testing on Windows: occt component : Total MEMORY difference: 56905357 / 56927651 [-0.04%] Total CPU difference: 16544.857656099055 / 16683.792146699026 [-0.83%] products component : Total MEMORY difference: 16011380 / 16018363 [-0.04%] Total CPU difference: 5126.957264899962 / 5276.780625299962 [-2.84%] There are no differences in images found by testdiff. |
|
Branch CR25785_5 has been deleted by inv. SHA-1: ddb5a374f60a97508e8475444e9b6a56966cc16d |
|
Branch CR25785_4 has been deleted by inv. SHA-1: 94430f772d360087ff4274023987bad91f0b7431 |
|
Branch CR25785_3 has been deleted by inv. SHA-1: c1d7b91924e77c5a10e2e78ba77e8f745fa663c6 |
|
Branch CR25785_2 has been deleted by inv. SHA-1: 48ecff5618609fc26c4e0153a373d0b2d98696fe |
|
Branch CR25785_1 has been deleted by inv. SHA-1: c84a52bbd8937a26f054806477ab91545c27dbfb |
|
Branch CR25785 has been deleted by inv. SHA-1: 31135a9508ad60cd4aa7deb295ae5ca06a617572 |
occt: master 7a324550 2015-08-04 10:00:49
Committer: |
0025785: Visualization - introduce AIS_ColorScale presentation for Color Scale Color scale is implemented on AIS. Draw command vcolorscale now works with AIS_ColorScale. In a qt sample VoxelDemo there was added a field AIS_ColorScale myColorsScale to control a color scale. Method displayColorScale and other methods were changed in order to work with this field. |
Affected Issues 0025785 |
|
mod - samples/qt/VoxelDemo/inc/Application.h | Diff File | ||
mod - samples/qt/VoxelDemo/src/Application.cpp | Diff File | ||
add - src/AIS/AIS_ColorScale.cxx | Diff File | ||
rm - src/Aspect/Aspect_ColorScale.cxx | Diff File | ||
mod - src/Aspect/FILES | Diff File | ||
mod - src/QABugs/QABugs_11.cxx | Diff File | ||
mod - src/V3d/FILES | Diff File | ||
rm - src/V3d/V3d_ColorScale.cxx | Diff File | ||
rm - src/V3d/V3d_ColorScale.hxx | Diff File | ||
rm - src/V3d/V3d_ColorScaleLayerItem.cxx | Diff File | ||
rm - src/V3d/V3d_ColorScaleLayerItem.hxx | Diff File | ||
mod - src/V3d/V3d_LayerMgr.cxx | Diff File | ||
mod - src/V3d/V3d_LayerMgr.hxx | Diff File | ||
mod - src/V3d/V3d_View.cxx | Diff File | ||
mod - src/V3d/V3d_View.hxx | Diff File | ||
mod - src/V3d/V3d_View_1.cxx | Diff File | ||
mod - src/V3d/V3d_View_2.cxx | Diff File | ||
mod - src/V3d/V3d_View_3.cxx | Diff File | ||
mod - src/V3d/V3d_View_4.cxx | Diff File | ||
mod - src/V3d/V3d_View_5.cxx | Diff File | ||
mod - src/V3d/V3d_View_Print.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx | Diff File | ||
mod - tests/3rdparty/fonts/A1 | Diff File | ||
mod - tests/bugs/vis/bug21091_1 | Diff File | ||
mod - tests/bugs/vis/bug22819 | Diff File | ||
mod - tests/bugs/vis/bug25027 | Diff File | ||
mod - tests/bugs/vis/bug25136 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-02-03 09:51 |
|
New Issue | |
2015-02-03 09:51 |
|
Assigned To | => isz |
2015-02-03 09:52 |
|
Relationship added | child of 0025783 |
2015-02-03 09:52 |
|
Relationship added | related to 0025508 |
2015-02-03 13:04 | git | Note Added: 0037010 | |
2015-02-03 13:06 |
|
Note Added: 0037011 | |
2015-02-03 13:06 |
|
Assigned To | isz => kgv |
2015-02-03 13:06 |
|
Status | new => resolved |
2015-02-03 13:06 |
|
Steps to Reproduce Updated | |
2015-02-03 13:06 |
|
Steps to Reproduce Updated | |
2015-02-03 14:42 | kgv | Summary | Redesign of color scale on AIS => Visualization - introduce AIS_ColorScale presentation for Color Scale |
2015-02-03 14:43 | kgv | Note Added: 0037023 | |
2015-02-03 14:43 | kgv | Assigned To | kgv => isz |
2015-02-03 14:43 | kgv | Status | resolved => assigned |
2015-02-11 13:54 | git | Note Added: 0037352 | |
2015-02-11 14:18 |
|
Note Added: 0037354 | |
2015-02-11 14:18 |
|
Assigned To | isz => kgv |
2015-02-11 14:18 |
|
Status | assigned => resolved |
2015-02-17 12:34 | git | Note Added: 0037618 | |
2015-02-19 14:48 | git | Note Added: 0037693 | |
2015-02-25 15:10 | git | Note Added: 0037865 | |
2015-03-04 10:26 | git | Note Added: 0038065 | |
2015-04-06 12:48 | kgv | Target Version | 6.9.0 => 7.1.0 |
2015-04-17 15:34 | git | Note Added: 0039964 | |
2015-04-17 20:01 | kgv | Note Added: 0040013 | |
2015-04-17 20:01 | kgv | Assigned To | kgv => isz |
2015-04-17 20:01 | kgv | Status | resolved => assigned |
2015-04-22 11:32 | git | Note Added: 0040092 | |
2015-04-22 11:33 |
|
Note Added: 0040093 | |
2015-04-22 11:33 |
|
Assigned To | isz => kgv |
2015-04-22 11:33 |
|
Status | assigned => resolved |
2015-04-23 18:02 | git | Note Added: 0040174 | |
2015-06-04 10:29 | kgv | Relationship added | related to 0026312 |
2015-06-08 21:26 | kgv | Note Added: 0042040 | |
2015-06-08 21:26 | kgv | Assigned To | kgv => isz |
2015-06-08 21:26 | kgv | Severity | feature => integration request |
2015-06-08 21:26 | kgv | Status | resolved => assigned |
2015-06-08 21:26 | kgv | Target Version | 7.1.0 => 7.0.0 |
2015-07-16 14:28 | git | Note Added: 0043127 | |
2015-07-16 14:29 |
|
Note Added: 0043128 | |
2015-07-16 14:29 |
|
Assigned To | isz => kgv |
2015-07-16 14:29 |
|
Status | assigned => resolved |
2015-07-17 13:50 | kgv | Note Added: 0043154 | |
2015-07-17 13:50 | kgv | Assigned To | kgv => isz |
2015-07-17 13:50 | kgv | Status | resolved => assigned |
2015-07-23 09:23 | git | Note Added: 0043322 | |
2015-07-23 09:24 |
|
Note Added: 0043323 | |
2015-07-23 09:24 |
|
Assigned To | isz => kgv |
2015-07-23 09:24 |
|
Status | assigned => resolved |
2015-07-23 12:32 | git | Note Added: 0043335 | |
2015-07-28 11:13 | git | Note Added: 0043613 | |
2015-07-29 18:36 | kgv | Note Added: 0043686 | |
2015-07-29 18:36 | kgv | Assigned To | kgv => isz |
2015-07-29 18:36 | kgv | Status | resolved => assigned |
2015-07-31 12:19 | git | Note Added: 0043734 | |
2015-07-31 12:20 |
|
Note Added: 0043735 | |
2015-07-31 12:21 |
|
Note Added: 0043736 | |
2015-07-31 12:21 |
|
Assigned To | isz => kgv |
2015-07-31 12:21 |
|
Status | assigned => resolved |
2015-07-31 12:50 | git | Note Added: 0043742 | |
2015-07-31 12:57 | kgv | Note Added: 0043743 | |
2015-07-31 12:57 | kgv | Assigned To | kgv => bugmaster |
2015-07-31 12:57 | kgv | Status | resolved => reviewed |
2015-07-31 15:50 |
|
Assigned To | bugmaster => apv |
2015-08-03 11:03 |
|
Note Added: 0043778 | |
2015-08-03 11:03 |
|
Assigned To | apv => isz |
2015-08-03 11:03 |
|
Status | reviewed => assigned |
2015-08-03 11:04 |
|
Note Edited: 0043778 | |
2015-08-03 12:25 | git | Note Added: 0043785 | |
2015-08-03 12:27 |
|
Note Added: 0043786 | |
2015-08-03 12:27 |
|
Assigned To | isz => apl |
2015-08-03 12:27 |
|
Status | assigned => resolved |
2015-08-04 13:01 | git | Note Added: 0043804 | |
2015-08-04 13:03 |
|
Note Edited: 0043786 | |
2015-08-06 12:52 |
|
Note Added: 0043872 | |
2015-08-06 12:52 |
|
Assigned To | apl => bugmaster |
2015-08-06 12:52 |
|
Status | resolved => reviewed |
2015-08-06 15:16 | git | Note Added: 0043886 | |
2015-08-06 15:24 |
|
Assigned To | bugmaster => mkv |
2015-08-07 13:57 |
|
Note Added: 0043910 | |
2015-08-07 13:58 |
|
Note Added: 0043911 | |
2015-08-07 13:58 |
|
Assigned To | mkv => bugmaster |
2015-08-07 13:58 |
|
Status | reviewed => tested |
2015-08-07 13:59 |
|
Test case number | => bugs vis bug25136 |
2015-08-14 10:26 |
|
Changeset attached | => occt master 7a324550 |
2015-08-14 10:26 |
|
Assigned To | bugmaster => ski |
2015-08-14 10:26 |
|
Status | tested => verified |
2015-08-14 10:26 |
|
Resolution | open => fixed |
2015-08-14 10:51 | git | Note Added: 0044123 | |
2015-08-14 10:53 | git | Note Added: 0044147 | |
2015-08-14 10:55 | git | Note Added: 0044182 | |
2015-08-14 11:01 | git | Note Added: 0044288 | |
2015-08-14 11:02 | git | Note Added: 0044294 | |
2015-08-14 11:02 | git | Note Added: 0044295 | |
2015-08-19 11:34 | kgv | Additional Information Updated | |
2016-01-09 20:49 | kgv | Relationship added | parent of 0027058 |
2016-04-20 15:43 |
|
Fixed in Version | => 7.0.0 |
2016-04-20 15:49 |
|
Status | verified => closed |