0033370: Foundation Classes - Moving into STL and Boost functionality NCollection containers update: - NCollection_Array1 - updated functionality - NCollection_Array2 - NCollection_Array1 as a wrapper for 2array - NCollection_Vector -> NCollection_DynamicArray was renamed and reworked. TCollection: - Use static empty string to avoid allocations on empty string NCollection allocators update: - NCollection_Allocator - allocator that used Standard::Allocate - NCollection_OccAllocator - allocator-wrapper that used OCC BaseAllocator objects - NCollection_IncAllocator - rework to increase performance Standard: - Rework functionality to use different allocation libs - Implement basic of new way to wrap allocations tools - Define 4 ways to allocation (defines in configure stage) Additional changes: - Hash function uses std::hash functionality - size_t as a hash value - New HashUtils with Murmur and FVN hash algo for x32 and x64 - Deprecated _0.cxx and .gxx DE classes reorganized - Create own utility for std memory - Update Standard_Transient to be more platform-independent Math TK changes: - math_Vector -> match_BaseVector<> - Buffer decreased to cash 32 elements instead of 512
0033018: Coding - get rid of unused headers [Plugin to ShapeAnalysis]
0032056: Coding Rules - remove package MMgt and other types deprecated since OCCT 7.2.0 Removed functionality deprecated since OCCT 7.1.0: - 0027834 built-in iterator in class SelectMgr_ViewerSelector; - 0027900 obsolete constructor of V3d_Viewer class; - 0027816 obsolete clipping plane setters V3d_View/PrsMgr_PresentableObject:SetClipPlanes(); - 0027860 obsolete transformation persistence methods from class PrsMgr_PresentableObject; - 0027756 obsolete methods Prs3d_Text::Draw(); - 0024393 obsolete enum Graphic3d_ZLayerSetting; - 0025180 obsolete method Graphic3d_Structure::Transform(). Removed functionality deprecated since OCCT 7.2.0: - 0028832 obsolete class MMgt_TShared; - 0026937 obsolete property Standard_Failure::Caught(); - 0028799 obsolete types defined within Quantity package; - 0028441 obsolete nested enum Image_PixMap::ImgFormat; - 0025695 obsolete method PrsMgr_PresentationManager::Unhighlight(); - 0028205 obsolete class MeshVS_ColorHasher; - 0027958 obsolete methods from Prs3d_DatumAspect class; - 0025695 obsolete class Graphic3d_HighlightStyle; - 0027954 obsolete BRepOffsetAPI_MakeOffsetShape,BRepOffsetAPI_MakeThickSolid constructors.
0031326: Foundation Classes - Init from Json for base OCCT classes InitFromJson method implementation for some simple classes. OCCT_INIT_* defines introduction to do automatic parsing of the stream into values. Inspector is extended to visualize objects created on the dump stream if it might be created.
0031454: Visualization - perceptually uniform color scale Support of CIE Lab and Lch color spaces is introduced in Quantity_Color: - Enumeration Quantity_TypeOfColor is extended by new values representing CIE Lab and Lch color spaces (with D65 2 deg illuminant). - Conversion of RGB color to and from these color spaces is implemented in Quantity_Color class (within existing API). - Color difference calculation using CIE Delta E 200 formula is implemented in method DeltaE2000(). New methods MakeUniformColors() and SetUniformColors() are added in class AIS_ColorScale, generating and setting color scale based on colors of the same lightness in CIE Lch color model. DRAW commands vcolorconvert and vcolordiff are added to perform conversions and compute difference, respectively. A new option -uniform is added in DRAW command vcolorscale, to set uniform color scale. Added test grid v3d colors (color conversions and difference), test bugs vis bug31454 (uniform color scale)
0031313: Foundation Classes - Dump improvement for classes - Provide DumpJson for geometrical, ocaf and visualization classes; - Change depth parameter of DumpJson (constant is not obligate here) - Introduce a new macro for transient objects to be called as the first row in DumpJson: OCCT_DUMP_TRANSIENT_CLASS_BEGIN. We need not put the class name in the macro, using get_type_name of Standard_Transient for it. - change implementation of OCCT_DUMP_CLASS_BEGIN and OCCT_DUMP_TRANSIENT_CLASS_BEGIN. It is not an sentry more and it does not create a new hierarchy level. It appends a new row into the output stream: "className": <className> - OCCT_DUMP_* does not require semicolon - class header is included first in source files of TDataStd, TDocStd, TCAFDoc
0031060: Configuration - Support building with CLang compiler under VS 2019 Build tools are updated to support building with Visual Studion 2019 toolset ClangCL (LLVM clang-cl): - In CMake builds, use of unsupported option "-std=c++0x" is avoided - Tool genconf recognizes availability of ClangCL toolset and proposes it in the list - Tool genproj recognizes new compiler specification VCVER=vclang and generates VS 2019 projects for it Note that vclang configuration puts binaries to folder "vc14" as it is compatible with vc14 CRT. Code is updated to build with Clang for Windows without errors and warnings: - In BVH classes, pure virtual destructors are replaced by empty ones, to avoid bogus compiler warning - In .lex files, pragmas are added to disable warnings in parser code - In OSD, signature of function _osd_wnt_set_error() is corrected to avoid warning on incorrect use of va_args (undefined behavior) - In OSD_Host, OSD_Parallel_TBB, warnings on usage of deprecated function are disabled - In Quantity_ColorRGBA and ViewerTest_CmdParser, incorrect use of predefined macro __FUNCTION__ assuming it was a string literal is avoided - In Standard_Macro.hxx, code is reordered to handle Clang for Windows appropriately - In AdvApp2Var_SysBase.hxx, inclusion of obsolete (MSVC-specific) header file is replaced by Standard_TypeDef.hxx - In Standard_ErrorHandler.hxx, empty statements added to avoid warning on unused class fields - In IVtkDraw and ViewerTest, interface is corrected to use actual type avoiding unnecessary type casts Off-topic: corrections of some errors (uninitialized class fields) reported by VS Code Analysis in TKernel
0031070: Configuration - fix building issues when using Emscripten toolchain Handled __EMSCRIPTEN__ macros to: - Workaround atomics (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is undefined, but GCC atomics are provided). - Suppress non-standard header <sys/signal.h> warning. - Return OSD_LinuxREDHAT. - Avoid inclusion of XLib headers. - Skip fontconfig library. - Enable EGL+GLES path (translated by Emscripten into WebGL). - Skip eglCreatePbufferSurface() not implemented by Emscripten EGL. Fixed Graphic3d_Vec4.hxx usage within Quantity_ColorRGBA.hxx. OpenGl_ShaderManager::defaultGlslVersion() now prefers GLSL 300 es when WebGL 2.0 is available, as there no any OpenGL ES greater than 3.0 emulation so far. Shaders_Declarations.glsl - added workaround for GLSL compilation on WebGL 1.0 by defining Light properties accessors as macros instead of functions ('[]' : Index expression must be constant). OpenGl_FrameBuffer::Init() - added workaround for initialization of GL_DEPTH24_STENCIL8 depth-stencil attachment on WebGL 1.0 + GL_WEBGL_depth_texture extension. OpenGl_Context::Vec4FromQuantityColor() now considers myIsSRgbActive flag to handle use case, when Immediate Layer is drawn directly into window buffer, which is not sRGB-ready. Added new sample - OCCT WebGL viewer.
0029528: Visualization, TKOpenGl - allow defining sRGB textures OpenGL rendering is now done into sRGB framebuffer. OpenGl_ShaderManager::prepareStdProgramFboBlit() has been extended by programs resolving MSAA texture and applying gamma correction as fallbacks. Quantity_Color definition has been modified to store RGB components in linear color space within Quantity_TOC_RGB type. Standard colors defined by Quantity_NameOfColor enumeration has been updated accordingly. New Quantity_TOC_sRGB type has been introduced to handle RGB components in non-linear sRGB color space. OpenGl_TextureFormat class definition has been moved to dedicated files. New method OpenGl_TextureFormat::FindFormat() replaces OpenGl_Texture::GetDataFormat(). New method OpenGl_TextureFormat::FindSizedFormat() replaces OpenGl_FrameBuffer::getColorDataFormat() and OpenGl_FrameBuffer::getDepthDataFormat(). Graphic3d_TextureRoot::IsColorMap() - introduced new property defining if RGB(A)8 image formats should be loaded as sRGB(A) textures or as data RGB(A) textures. OpenGl_Texture initialization methods have been extended with new theIsColorMap argument. vreadpixel - added argument -sRGB printing color in sRGB color space. Test cases have been updated to new sRGB rendered results.
0030969: Coding Rules - refactor Quantity_Color.cxx color table definition The table of named colors has been compressed and moved out from Quantity_Color.cxx into Quantity_ColorTable.pxx. Quantity_NameOfColor - grayscale enumeration values have been re-ordered to fix discontinuity. Duplicating colors has been merged within enumeration: CHARTREUSE=CHARTREUSE1, GOLD=GOLD1, GREEN=GREEN1, ORANGE=ORANGE1, ORANGERED=ORANGERED1, RED=RED1, TOMATO=TOMATO1, YELLOW=YELLOW1. Added aliases to several other common colors: BLUE=BLUE1, CYAN=CYAN1, LIGHTCYAN=LIGHTCYAN1, MAGENTA=MAGENTA1. Quantity_Color class definition has been cleaned to follow OCCT coding style. Quantity_Color now stores NCollection_Vec3<float> as class field instead of separate components. Removed unused class Quantity_ColorDefinitionError. New methods Quantity_Color::Convert_LinearRGB_To_sRGB() and Quantity_Color::Convert_sRGB_To_LinearRGB() converting RGB components from linear to non-linear sRGB colorspace and vice versa. Image_PixMap::PixelColor() and Image_PixMap::SetPixelColor() methods have been extended with an optional argument for performing linearization/delinearization of 8-bit sRGB pixel formats. Draw Harness command AISColor has been corrected to take color name instead of enumeration index.
0030991: Draw Harness - ViewerTest::ParseColor() defines out-of-range alpha component ViewerTest::ParseColor() - fixed alpha component defined as 255 for RGB-only input. Quantity_Color::ColorToHex() now rounds-up float values to closest integer. Quantity_ColorRGBA::ColorToHex() - added method formatting color into hex with alpha component consistent to Quantity_Color::ColorToHex() for RGB. vdrawtext command now uses ViewerTest::ParseColor() for parsing color argument, so that it accepts hex. vreadpixel command now has been extended with -hex argument for printing color in hex format. Commands XSetColor, XGetColor, XGetShapeColor, XGetAllColors, XAddColor, XRemoveColor, XFindColor, XUnsetColor, XGetInstanceColor, XSetInstanceColor have been corrected to properly report syntax input errors and to accept color names and hex (by reusing ViewerTest::ParseColor()).
0030949: Foundation Classes - Dump improvement for OCCT classes 1. new file Standard_Dump to prepare and parse Dump in JSON format for OCCT objects 2. some presentations cover the proposed dump functionality. 3. 'bounding', 'vaspects' has '-dumpJson' field to see the DumpJson result 4. Bnd_Box constructor with min/max points is implemented to use Dump of this class in Dump BVH_Box 5. Limitation (some classes of Graphic3d, Prs3d has not full filling for DumpJson)
0030930: Draw Harness, ViewerTest - add commands vlistcolors and vlistmaterials listing standard Colors and Materials Introduced two new commands vlistcolors listing named colors and vlistmaterials listing standard materials. These commands also can generate HTML table listing colors/materials with their properties. vlistmaterials can generate OBJ model for comparing OCCT materials in different viewers. New test cases use these commands for generating HTML tables. Graphic3d_MaterialAspect::MaterialType() - added missing getter. Corrected name of unlit shading model within vaspects and vrenderparams commands.
0030895: Coding Rules - specify std namespace explicitly for std::cout and streams "endl" manipulator for Message_Messenger is renamed to "Message_EndLine". The following entities from std namespace are now used with std:: explicitly specified (from Standard_Stream.hxx): std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream, std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr, std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision, std::hex,std::dec.
0030550: Coding - Integer overflow in Standard_CString HashCodes 0030551: Foundation Classes - Integer overflow in NCollection_CellFilter HashCode Signed integers are not used in hash code functions now to prevent undefined behavior on left shift operations with signed integers. A possibility of negative values of hash codes is eliminated. INT_MAX → IntegerLast() in hash code functions. All found hash code functions behaves uniformly now: they return a value in the range [1, theUpperBound]. Relevant comments are added to such functions.
0030623: Draw Harness - support hex color codes within ViewerTest::ParseColor() ViewerTest::ParseColor() function is improved to be able to parse the following set of input arguments: - "Red Green Blue [Alpha]", where Red, Green, Blue, Alpha must be integers within the range [0, 255] or reals within the range [0.0, 1.0]. Note that "0 0 1" triple is parsed as "0.0 0.0 1.0" and will be interpreted as a blue color. - "ColorName [Alpha]", where ColorName is one of WHITE, BLACK, RED, GREEN, BLUE, etc. (look at Quantity_NameOfColor enumeration for all possible variants). Alpha may be integer or real, as described at the previous list item. - #HHH, [#]HHH[H], [#]HHHHHH[HH], where H is a hexadecimal digit (0 .. 9, a .. f, or A .. F). There are a short hexadecimal RGB, RGBA formats, and a usual RGB[A], respectively.