Current implementation of HLR algorithms is ugly and undebuggable, due to extensive usage of low-level types (Standard_Address) and macros involving low-level casts to access particular data elements, instead of using typed data structures and accessing them using names. As result, no static type checking is performed, and debugger cannot be used normally to view content of "variables" (actually macros) used throughout the code.

See e.g. HLRAlgo_PolyData.cxx. For instance, method HLRAlgo_PolyData::UpdateGlobalMinMax() should take Bnd_Box or equivalent structure, or at least double[2][3] as its argument, and not Standard_Address!

2. In declaration of HLRAlgo::UpdateMinMax(), it is better to specify dimension of arrays: Standard_Real Min[16]. Casts of Min to Standard_Real* are not needed.

3. In HLRAlgo_BiPoint.hxx: (a) when defining a structure, it is better to define each field on its own line, (b) when defining single-line inline method, keep "{" and "}" on separate lines (unless whole method fits single line).

4. HLRAlgo_PolyData.hxx: why enum HLR_PolyMask is defined here? It is not used in this header at all! Please define it where it is used, as locally as possible.

2. HLRAlgo_PolyInternalData.cxx lines 698, 739;
HLRBRep_PolyAlgo.cxx lines 2471, 2942, 3125, 3135 :
there is a risk of usage of null pointer, it is better to avoid it like it is done in fix to OCC25214.