Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023596Community[OCCT] OCCT:Data Exchangepublic2012-11-28 13:492018-05-25 19:18
ReporterRoman Lygin 
Assigned ToRoman Lygin 
PrioritynormalSeverityintegration request 
PlatformAOSLOS VersionL
Product Version[OCCT] 6.5.4 
Target Version[OCCT] 6.6.0Fixed in Version[OCCT] 6.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
Attached Files

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

-  Notes
Roman Lygin (developer)
2012-11-28 13:51

Pushed branch CR23596 into the git repository
gka (developer)
2012-11-28 17:24

Branch CR23596 is ready to be tested
abv (manager)
2012-11-29 06:25

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 (developer)
2012-11-29 10:49

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 (manager)
2012-11-29 11:00

Ok, I see your point; why not static field then? Not a big problem anyway...
Roman Lygin (developer)
2012-11-29 11:24

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 (tester)
2012-12-03 14:49

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

Not detected

Not detected

Testing cases:
Not needed

- Related Changesets
occt: master 576ab394
Timestamp: 2012-11-28 09:50:28
Author: Roman Lygin
Details ] Diff ]
0023596: Extending XCAFPrs_AISObject to enable customization of default color
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
2018-05-25 19:18 kgv Relationship added related to 0029788

Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker