View Issue Details

IDProjectCategoryView StatusLast Update
0023596CommunityOCCT:Data Exchangepublic2018-05-25 19:18
ReporterRoman Lygin Assigned ToRoman Lygin  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.5.4 
Target Version6.6.0Fixed in Version6.6.0 
Summary0023596: Extending XCAFPrs_AISObject to enable customization of default color
DescriptionAdded a virtual method DefaultStyle() which can be redefined in subclasses to provide a custom default style.
The default style object has not been made a data member of a base class (XCAFPrs_AISObject) to avoid memory consumption, it is returned via an output parameter.

For easier subclassing the Compute() method has been made protected.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Relationships

has duplicate 0022570 closedbugmaster Community Extending XCAFPrs_AISObject to enable customization of default color 

Activities

Roman Lygin

2012-11-28 13:51

developer   ~0022408

Pushed branch CR23596 into the git repository

gka

2012-11-28 17:24

developer   ~0022417

Branch CR23596 is ready to be tested

abv

2012-11-29 06:25

manager   ~0022427

In my opinion, it would be more convenient to have default color a member of the class, i.e. customizeable without subclassing. Does minor memory saving take sense in this case?

Roman Lygin

2012-11-29 10:49

developer   ~0022432

Default style is per-application, not per-object. For setting the object's style one has to use XDE attributes, otherwise availability of member field to achieve the same creates ambiguity and hence confusion on when to use what.

In 90%+ cases developers will unlikely redefine the defaults, so wasting memory for *every* object (which can be numerous, of course limited by OpenGL performance) does not look reasonable. Hence the subclassing approach makes most sense, imho.

abv

2012-11-29 11:00

manager   ~0022433

Ok, I see your point; why not static field then? Not a big problem anyway...

Roman Lygin

2012-11-29 11:24

developer   ~0022435

The point against a static object would be for instance a lost possibility to have several kinds of 'default' styles in one application (e.g. solids would have one default style, sheets/shells - the other, wireframes - third and so on). Of course, a corner case but still a valid point which can be easily addressed by subclassing, without any extra global data.

mkv

2012-12-03 14:49

tester   ~0022517

Dear BugMaster,
Branch CR23596 (and products from GIT master) was compiled on Linux and Windows platforms and tested.

Regressions:
Not detected

Improvements:
Not detected

Testing cases:
Not needed

Related Changesets

occt: master 576ab394

2012-11-28 09:50:28

Roman Lygin

Details Diff
0023596: Extending XCAFPrs_AISObject to enable customization of default color Affected Issues
0022570, 0023596
mod - src/XCAFPrs/XCAFPrs_AISObject.cdl Diff File
mod - src/XCAFPrs/XCAFPrs_AISObject.cxx Diff File

Issue History

Date Modified Username Field Change
2012-11-28 13:49 Roman Lygin New Issue
2012-11-28 13:49 Roman Lygin Assigned To => gka
2012-11-28 13:51 Roman Lygin Note Added: 0022408
2012-11-28 13:51 Roman Lygin Status new => resolved
2012-11-28 17:24 gka Note Added: 0022417
2012-11-28 17:24 gka Status resolved => reviewed
2012-11-28 18:27 mkv Assigned To gka => mkv
2012-11-29 06:25 abv Note Added: 0022427
2012-11-29 10:49 Roman Lygin Note Added: 0022432
2012-11-29 11:00 abv Note Added: 0022433
2012-11-29 11:24 Roman Lygin Note Added: 0022435
2012-12-03 14:49 mkv Note Added: 0022517
2012-12-03 14:49 mkv Test case number => Not needed
2012-12-03 14:49 mkv Assigned To mkv => bugmaster
2012-12-03 14:49 mkv Status reviewed => tested
2012-12-10 17:16 Roman Lygin Changeset attached => occt master 576ab394
2012-12-10 17:16 Roman Lygin Assigned To bugmaster => Roman Lygin
2012-12-10 17:16 Roman Lygin Status tested => verified
2012-12-10 17:16 Roman Lygin Resolution open => fixed
2012-12-10 17:47 bugmaster Target Version => 6.6.0
2013-03-01 21:39 abv Relationship added has duplicate 0022570
2013-04-23 13:35 aiv Status verified => closed
2013-04-29 15:23 aiv Fixed in Version => 6.6.0