Archived issue #0024753
make IntPatch_HInterTool a static class
Description
the 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.
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.
Public activity
1 archived note
Participants are labeled by their role within this record.
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.