MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025010Open CASCADE[OCCT] OCCT:Data Exchangepublic2014-06-16 10:562014-11-14 19:51
Reporterabv 
Assigned Toapn 
PrioritynormalSeverityfeature 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.7.1 
Target Version[OCCT] 6.8.0Fixed in Version[OCCT] 6.8.0 
Summary0025010: Use AIS_ColoredShape for display of XCAF documents
DescriptionHistorically XCAF defined its own interactive object for display of colored shapes in 3D viewer, see package XCAFPrs. Recently new class AIS_ColoredShape has been added in AIS package, providing this functionality (with many additional features implemented over time) on more basic level. Thus it should be possible now to use this class for display of XDE documents. The package XCAFPrs, DRAW command XShow, and perhaps some other code can then be removed.
TagsNo tags attached.
Test case numberNot needed
Attached Filespng file icon 6.7.1.png (189,121 bytes) 2014-10-02 18:07
png file icon pre-6.8.0(master 01.10.14).png (196,191 bytes) 2014-10-02 18:08
png file icon 6.7.1-3D.png (188,900 bytes) 2014-10-02 18:10
png file icon pre-6.8.0(master 01.10.14)-3D.png (176,789 bytes) 2014-10-02 18:11

- Relationships
related to 0025381closedbugmaster Community Visualization - XCAFPrs_AISObject ignores visibility flag for sub-shapes 
related to 0025399closedbugmaster Open CASCADE Visualization - XCAFPrs_AISObject ignores global aspect settings 
related to 0025484closedbugmaster Open CASCADE Visualization - group sub-shapes with the same style in XCAFPrs_AISObject::Compute() 

-  Notes
(0029951)
dbv (developer)
2014-07-03 13:46

Added methods HasUIsoAspect and HasVIsoAspect to AIS_Drawer
XCAFPrs_AISObject has been converted to non-cdl class
XCAFPrs_AISObject now inherits from AIS_ColoredShape
XCAFPrs_AISObject::Compute method has been rewritten in accordance with the new inheritance.

Dear kgv, patch is ready to be reviewed in branch CR25010.
(0029962)
kgv (developer)
2014-07-04 11:29

Please test the patch.
(0029980)
mkv (tester)
2014-07-07 12:05
edited on: 2014-07-07 12:09

Dear BugMaster,

Branch CR25010 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 7c7579bd199b7d6acc255aa3df056384a5c34433

Number of compiler warnings:

occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)
MacOS: 199 (199 on master)

products component :
Linux: 11 (11 on master)
Windows: 2 (2 on master)

Regressions/Differences:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR25010/job/mnt-CR25010-master_products_tests_linux_start/label=Debian60-64,tests_group=dxf,tests_subgroup=004/4/HTML_Report/ [^]
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR25010/job/mnt-CR25010-master_products_tests_windows_start/label=windows_test,tests_group=dxf,tests_subgroup=004/3/HTML_Report/ [^]
dxf read(004) bug22396: FAILED

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 347025500 / 347079528
Total CPU difference: 58887.919999999955 / 51989.150000000045

Testing on Windows:
Total MEMORY difference: 376239044 / 376969200
Total CPU difference: 44391.5 / 39495.015625

There are following differences in images found by testdiff.
http://occt-tests/CR25010-master-occt/Debian60-64/diff-Debian60-64.html [^]
http://occt-tests/CR25010-master-occt/Windows-32-VC9/diff-Windows-32-VC9.html [^]
IMAGE bugs xde bug24430: bug24430_Driver1_Document_D_View1.png differs
IMAGE bugs xde bug2: bug24430_Driver1_Document_D_View1.png differs
IMAGE bugs vis bug23123: bug23123_Driver1_Document_D_View1.png differs
IMAGE bugs vis bug23407_1: bug23407_1_Driver1_Document_Doc1_View1.png differs

(0029996)
dbv (developer)
2014-07-08 11:58

Regression has been fixed.

Dear kgv, please review fix in branch CR25010.
(0030002)
kgv (developer)
2014-07-08 14:18

Please test updated patch.
(0030037)
mkv (tester)
2014-07-09 15:35

Dear BugMaster,

Branch CR25010 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 258fdf721a7417d127f9c9222e28b59150520a08

Number of compiler warnings:

occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)
MacOS: 199 (199 on master)

products component :
Linux: 11 (11 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 349968468 / 349968948
Total CPU difference: 53005.57999999995 / 52504.370000000075

Testing on Windows:
Total MEMORY difference: 376879936 / 377481972
Total CPU difference: 36957.75 / 39673.921875

There are no differences in images found by testdiff.
(0030331)
git (administrator)
2014-07-22 16:08

Branch CR25010 has been deleted by inv.

SHA-1: 258fdf721a7417d127f9c9222e28b59150520a08
(0032609)
Roman Lygin (updater)
2014-10-02 18:06

6.8.0 (apparently due to 0025010) significantly changes user app behavior which relies on setting Prs3d_Draw in AIS_InteractiveContext shared by all _InteractiveObjects,
and avoiding setting any explicit attributes in individual AIS_Drawers owned by _IO's.

XCAFPrs_AISObject::Compute() now enforces a call to SetColors() which explicitly creates some hard-coded aspects (e.g. UIsoAspect) in the AIS_Drawer. This leads to:
a). memory growth - each IO has own aspects
b). impossibility to use shared Prs3d_Drawer residing in the IContext which was preset.

Compare 2 screenshots enclosed for 6.7.1 and 6.8.0.
Apparently the enforced aspects in SetColors() also change default materials aspects.

Excerpts from CAD Exchanger:

void QOOcc_AISShape /*subclass of XCAFPrs_AISObject*/::Setup (const Handle(AIS_InteractiveContext)& theAISContext)
{
    static Quantity_Color aDefColor (Quantity_NOC_GRAY75); //wires color
    static Quantity_Color aDefBoundaryColor (Quantity_NOC_BLACK); //face boundary

    const Handle(Prs3d_Drawer)& aDrawer = theAISContext->DefaultDrawer();
    aDrawer->FreeBoundaryAspect()->Aspect()->SetColor (aDefBoundaryColor);
    aDrawer->UnFreeBoundaryAspect()->Aspect()->SetColor (aDefBoundaryColor);
    aDrawer->WireAspect()->Aspect()->SetColor (aDefColor);
    aDrawer->UIsoAspect()->SetNumber (0);
    aDrawer->VIsoAspect()->SetNumber (0);
}

void QOOcc_AISShape::Compute (...)
{
   ...
   XCAFPrs_AISObject::Compute(); //in 6.8.0 explicitly creates aspects in SetColors() thereby changing a look
   ...
}

I don't have immediate suggestion on possible alternative design but definitively current implementation breaks the user app :-(

- Related Changesets
occt: master 74618acf
Timestamp: 2014-07-10 10:43:56
Author: dbv
Committer: apn
Details ] Diff ]
0025010: Use AIS_ColoredShape for display of XCAF documents

Added methods HasUIsoAspect and HasVIsoAspect to AIS_Drawer
XCAFPrs_AISObject has been converted to non-cdl class
XCAFPrs_AISObject now inherits from AIS_ColoredShape
XCAFPrs_AISObject::Compute method has been rewritten in accordance with the new inheritance.
Regression fix
mod - src/AIS/AIS_Drawer.cdl Diff ] File ]
mod - src/AIS/AIS_Drawer.lxx Diff ] File ]
add - src/XCAFPrs/FILES Diff ] File ]
mod - src/XCAFPrs/XCAFPrs.cdl Diff ] File ]
rm - src/XCAFPrs/XCAFPrs_AISObject.cdl Diff ] File ]
mod - src/XCAFPrs/XCAFPrs_AISObject.cxx Diff ] File ]
add - src/XCAFPrs/XCAFPrs_AISObject.hxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2014-06-16 10:56 abv New Issue
2014-06-16 10:56 abv Assigned To => gka
2014-06-16 10:57 abv Relationship added related to 0024762
2014-06-16 10:57 abv Assigned To gka => dbv
2014-06-16 10:57 abv Status new => assigned
2014-06-17 19:30 kgv Relationship added related to 0025018
2014-06-17 19:30 kgv Relationship deleted related to 0025018
2014-07-03 13:46 dbv Note Added: 0029951
2014-07-03 13:46 dbv Assigned To dbv => kgv
2014-07-03 13:46 dbv Status assigned => resolved
2014-07-04 11:29 kgv Note Added: 0029962
2014-07-04 11:29 kgv Assigned To kgv => bugmaster
2014-07-04 11:29 kgv Status resolved => reviewed
2014-07-04 14:21 mkv Assigned To bugmaster => mkv
2014-07-07 12:05 mkv Note Added: 0029980
2014-07-07 12:06 mkv Test case number => Not needed
2014-07-07 12:06 mkv Assigned To mkv => dbv
2014-07-07 12:06 mkv Status reviewed => assigned
2014-07-07 12:09 mkv Note Edited: 0029980 View Revisions
2014-07-08 11:58 dbv Note Added: 0029996
2014-07-08 11:58 dbv Assigned To dbv => kgv
2014-07-08 11:58 dbv Status assigned => resolved
2014-07-08 14:18 kgv Note Added: 0030002
2014-07-08 14:18 kgv Assigned To kgv => bugmaster
2014-07-08 14:18 kgv Status resolved => reviewed
2014-07-08 14:42 mkv Assigned To bugmaster => mkv
2014-07-09 15:35 mkv Note Added: 0030037
2014-07-09 15:35 mkv Assigned To mkv => bugmaster
2014-07-09 15:35 mkv Status reviewed => tested
2014-07-11 14:22 apn Changeset attached => occt master 74618acf
2014-07-11 14:22 apn Assigned To bugmaster => apn
2014-07-11 14:22 apn Status tested => verified
2014-07-11 14:22 apn Resolution open => fixed
2014-07-22 16:08 git Note Added: 0030331
2014-10-02 18:06 Roman Lygin Note Added: 0032609
2014-10-02 18:07 Roman Lygin File Added: 6.7.1.png
2014-10-02 18:08 Roman Lygin File Added: pre-6.8.0(master 01.10.14).png
2014-10-02 18:10 Roman Lygin File Added: 6.7.1-3D.png
2014-10-02 18:11 Roman Lygin File Added: pre-6.8.0(master 01.10.14)-3D.png
2014-10-15 17:05 kgv Relationship added related to 0025381
2014-10-20 17:52 kgv Relationship added related to 0025399
2014-11-11 12:44 aiv Fixed in Version => 6.8.0
2014-11-11 13:01 aiv Status verified => closed
2014-11-14 19:51 kgv Relationship added related to 0025484


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker