View Issue Details

IDProjectCategoryView StatusLast Update
0024753CommunityOCCT:Codingpublic2023-08-01 15:09
Reportermach22 Assigned Tovpozdyayev 
PrioritynormalSeverityintegration request 
Status newResolutionopen 
PlatformWindowsOSVC++ 2012 
Product Version6.7.0 
Target VersionUnscheduled 
Summary0024753: make IntPatch_HInterTool a static class
Descriptionthe class IntPatch_HInterTool has a constructor and only 2 non static methods

Standard_EXPORT Standard_Integer NbSamplePoints(const Handle(Adaptor3d_HSurface)& S) ;
  
Standard_EXPORT void SamplePoint(const Handle(Adaptor3d_HSurface)& S,const Standard_Integer Index,Standard_Real& U,Standard_Real& V) const;

and only these class variables

Standard_Real uinf;
Standard_Real vinf;
Standard_Real usup;
Standard_Real vsup;

It could be better making all the methods as static, and remove the class variables (making them locals) and the contructor as it's only a Tool class.
TagsNo tags attached.
Test case number

Activities

abv

2014-03-24 08:58

manager   ~0028435

One remark: if we make the class fields static (global) variables, this will break thread safety, as all calls to this class (methods that are now non-static) will use the same data. These fields are not necessary in fact, and can be removed if all methods made static. The values can be obtained directly from the surface.

Issue History

Date Modified Username Field Change
2014-03-23 03:27 mach22 New Issue
2014-03-23 03:27 mach22 Assigned To => kgv
2014-03-24 08:58 abv Note Added: 0028435
2014-09-12 14:37 abv Target Version => 7.1.0
2016-11-01 06:41 abv Target Version 7.1.0 => 7.2.0
2017-07-20 11:39 kgv Target Version 7.2.0 => 7.4.0
2019-07-10 19:27 abv Target Version 7.4.0 => 7.5.0
2020-08-28 14:45 kgv Target Version 7.5.0 => 7.6.0
2021-08-24 14:59 kgv Target Version 7.6.0 => 7.7.0
2022-08-17 12:01 kgv Target Version 7.7.0 => 7.8.0
2022-10-19 15:55 smoskvin Assigned To kgv => vpozdyayev
2023-08-01 15:09 dpasukhi Target Version 7.8.0 => Unscheduled