View Issue Details

IDProjectCategoryView StatusLast Update
0022857Open CASCADEOCCT:VISpublic2014-11-11 12:58
ReportersanAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Target Version6.8.0Fixed in Version6.8.0 
Summary0022857: Method to activate selection mode for a given IVtk_IShape
DescriptionMethod to (de-)activate selection mode for a given IVtk_IShape is missing in IVtkTools_ShapePicker class. Maybe it makes sense to "duplicate" IVtk_IShapePickerAlgo API in this regard.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0024904 closedbugmaster Visualization - Integration of VIS component 

Activities

rkv

2011-12-19 11:15

developer   ~0018900

I'd suggest the following signature with vtkActor as a shape representation parameter:
  //! Turn on/off a selection mode for a shape actor.
  //! @param [in] shapeActor shape presentation actor to set a selection mode for
  //! @param [in] mode selection mode to be activated
  //! @param [in] turnOn Flag to turn on/off the selection mode
  void setSelectionMode (vtkActor* shapeActor,
                         const IVtk_SelectionMode mode,
                         const bool turnOn = true);

san

2011-12-19 14:30

developer   ~0018908

Roman,

Your proposal looks good.
I would recommend adding a second overloaded setSelectionMode() that would accept IVtk_IShape instance, to let application developers choose whether to work with VTK classes (actors) or VIS classes (IShape interface).

rkv

2011-12-19 15:18

developer   ~0018910

Following methods has been added for IVtkTools_ShapePicker:

  //! Turn on/off a selection mode for a shape actor.
  //! @param [in] shapeActor shape presentation actor to set a selection mode for
  //! @param [in] mode selection mode to be activated
  //! @param [in] turnOn Flag to turn on/off the selection mode
  void SetSelectionMode (IVtk_IShape::Handle& shape,
                         const IVtk_SelectionMode mode,
                         const bool turnOn = true) const;

  //! Turn on/off a selection mode for a shape actor.
  //! @param [in] shapeActor shape presentation actor to set a selection mode for
  //! @param [in] mode selection mode to be activated
  //! @param [in] turnOn Flag to turn on/off the selection mode
  void SetSelectionMode (vtkActor* shapeActor,
                         const IVtk_SelectionMode mode,
                         const bool turnOn = true) const;

san

2011-12-19 15:35

developer   ~0018911

void SetSelectionMode (IVtk_IShape::Handle& shape,
                         const IVtk_SelectionMode mode,
                         const bool turnOn = true) const;

Normally, if an input argument is passed by reference, a const reference should be used. Thus const IVtk_IShape::Handle& shape should appear above.

san

2011-12-19 15:46

developer   ~0018913

Non-const references should be used for output arguments only.

rkv

2011-12-19 15:46

developer   ~0018914

Last edited: 2011-12-19 15:47

Fixed for shape parameter.

san

2012-08-18 14:41

developer   ~0021269

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.

Issue History

Date Modified Username Field Change
2011-12-16 16:48 san New Issue
2011-12-16 16:48 san Assigned To => rkv
2011-12-16 16:48 san Status new => assigned
2011-12-19 11:15 rkv Note Added: 0018900
2011-12-19 11:15 rkv Assigned To rkv => san
2011-12-19 11:15 rkv Status assigned => feedback
2011-12-19 14:30 san Note Added: 0018908
2011-12-19 14:30 san Status feedback => assigned
2011-12-19 14:30 san Assigned To san => rkv
2011-12-19 15:18 rkv Note Added: 0018910
2011-12-19 15:18 rkv Status assigned => resolved
2011-12-19 15:35 san Note Added: 0018911
2011-12-19 15:36 san Status resolved => assigned
2011-12-19 15:46 san Note Added: 0018913
2011-12-19 15:46 rkv Note Added: 0018914
2011-12-19 15:46 rkv Status assigned => resolved
2011-12-19 15:47 rkv Note Edited: 0018914
2011-12-26 07:39 abv Project Open CASCADE => Internal
2012-05-12 17:34 mkv Assigned To rkv => san
2012-08-18 14:41 san Note Added: 0021269
2012-08-18 14:41 san Assigned To san => bugmaster
2012-08-18 14:41 san Status resolved => reviewed
2014-09-18 09:50 abv Target Version => 6.8.0
2014-09-18 09:58 abv Category PRODUCTS:VIS => OCCT:VIS
2014-09-18 10:39 bugmaster Project Internal => Open CASCADE
2014-09-22 11:38 apn Test case number => Not needed
2014-09-22 11:38 apn Assigned To bugmaster => san
2014-09-22 11:38 apn Status reviewed => closed
2014-09-22 11:38 apn Resolution open => fixed
2014-09-22 13:15 apn Assigned To san => bugmaster
2014-09-22 13:15 apn Status closed => feedback
2014-09-22 13:15 apn Status feedback => tested
2014-09-22 13:15 apn Status tested => verified
2014-09-22 13:15 apn Relationship added related to 0024904
2014-11-11 12:45 aiv Fixed in Version => 6.8.0
2014-11-11 12:58 aiv Status verified => closed