MantisBT - Open CASCADE
View Issue Details
0022855Open CASCADE[OCCT] OCCT:VISpublic2011-12-16 16:342014-11-11 12:58
san 
bugmaster 
normaljust a question 
closedfixed 
ALL
 
[OCCT] 6.8.0[OCCT] 6.8.0 
Not needed
0022855: Strange result type of IVtkTools_ShapePicker method
The following method of IVtkTools_ShapePicker has strange return type:

  NCollection_Set<vtkIdType> GetPickedSubShapesIds (const IVtk_IdType id, bool all = false) const;

Internally, IVtk_ShapeIdList is used but the picker converts it to NCollection_Set - for what reason?

I would use IVtk_ShapeIdList where a collection of (sub-)shapes is expected, unless some specific condition is applied.
No tags attached.
related to 0024904closed bugmaster Visualization - Integration of VIS component 
Issue History
2011-12-16 16:34sanNew Issue
2011-12-16 16:34sanAssigned To => rkv
2011-12-16 16:34sanStatusnew => assigned
2011-12-16 16:42rkvNote Added: 0018891
2011-12-16 16:42rkvAssigned Torkv => san
2011-12-16 16:42rkvStatusassigned => feedback
2011-12-16 17:11sanNote Added: 0018894
2011-12-16 17:11sanStatusfeedback => assigned
2011-12-16 17:11sanStatusassigned => feedback
2011-12-16 17:11sanAssigned Tosan => rkv
2011-12-16 17:11sanStatusfeedback => assigned
2011-12-19 12:18rkvNote Added: 0018905
2011-12-19 12:18rkvStatusassigned => resolved
2011-12-26 07:39abvProjectOpen CASCADE => Internal
2012-05-12 17:36mkvAssigned Torkv => san
2012-08-18 14:39sanNote Added: 0021266
2012-08-18 14:39sanAssigned Tosan => bugmaster
2012-08-18 14:39sanStatusresolved => reviewed
2014-09-18 09:50abvTarget Version => 6.8.0
2014-09-18 09:58abvCategoryPRODUCTS:VIS => OCCT:VIS
2014-09-18 10:39bugmasterProjectInternal => Open CASCADE
2014-09-22 11:36apnTest case number => Not needed
2014-09-22 11:36apnAssigned Tobugmaster => san
2014-09-22 11:36apnStatusreviewed => closed
2014-09-22 11:36apnResolutionopen => fixed
2014-09-22 13:13apnAssigned Tosan => bugmaster
2014-09-22 13:13apnStatusclosed => feedback
2014-09-22 13:13apnStatusfeedback => tested
2014-09-22 13:13apnStatustested => verified
2014-09-22 13:13apnRelationship addedrelated to 0024904
2014-11-11 12:45aivFixed in Version => 6.8.0
2014-11-11 12:58aivStatusverified => closed

Notes
(0018891)
rkv   
2011-12-16 16:42   
The set is returned for usage with SubPolyDataFilter.Add() method for multiselection. Union operation of sets of ids is applied for that.
(0018894)
san   
2011-12-16 17:11   
In any case the returned set is copied, so there is no advantage in returning a set and copying it with respect to returning a list and converting it to a set where necessary.

But the public API looks more consistent if all its related methods have similar return types.

And usage of a set in one particular internal case should not be reflected by public API, unless there are some strong technical reasons for that.
(0018905)
rkv   
2011-12-19 12:18   
The result type of selected subshapes ids has been changed to IVtk_ShapeIdList.
New overloaded methods SetData and AddData are added to IVtkTools_SubPolyDataFilter to send IVtk_ShapeIdList as a parameter.
(0021266)
san   
2012-08-18 14:39   
The issues was created during development of VIS component for development needs only.
The issue has been corrected and should be closed, no testing is required.