New repository for Inspector: https://github.com/Open-Cascade-SAS/Inspector
Documentation and all build process are fully migrated.
"tools" folder keep to share information for some time.
Keep building inspector as before to keep control of API changes via GitHub actions.
Found via `codespell -q 3 -S "*.fr" -L aadd,abnd,abord,acces,acount,adn,afile,aline,alo,alocation,alog,als,anc,ane,anid,anormal,anout,ans,anumber,aother,aparent,apoints,aprogram,asender,asign,asnd,ba,bbuild,bloc,bord,bu,caf,cas,childrens,childs,classe,clen,commun,cylindre,discret,don,dout,dum,ede,enew,entite,entites,extrem,fo,fonction,geometrie,guid,hilight,hilights,hist,identic,ii,indx,inout,invalide,ist,iterm,llength,lod,maked,mape,mke,modeling,methode,mye,myu,nam,nd,nin,normale,normales,ons,parametre,parametres,periode,pinter,pres,projet,remplace,reste,resul,secont,serie,siz,shs,slin,som,somme,syntaxe,sur,te,thei,theis,ther,theres,thes,thev,thex,thet,tol,transfert,unhilight,unhilights,va,vas,verifie,vertexes,weight`
Found via `codespell -q 3 -S "*.fr" -L aadd,abnd,abord,acount,adn,afile,aline,alo,alocation,alog,als,anc,ane,anid,anormal,anout,ans,anumber,aother,aparent,apoints,aprogram,asender,asign,asnd,ba,bbuild,bloc,bord,bu,caf,cas,childrens,childs,classe,clen,commun,cylindre,don,dout,dum,ede,entites,fo,fonction,guid,hist,identic,ii,indx,inout,invalide,ist,iterm,llength,lod,mape,modeling,methode,mye,myu,nam,nd,nin,normale,normales,ons,parametre,parametres,periode,pres,reste,resul,secont,serie,shs,slin,som,somme,syntaxe,sur,te,thei,theis,ther,theres,thes,thev,thex,thet,tol,transfert,va,vas,verifie,vertexes,weight`
Add GitHub Actions for TInspector build and clang-format check
Reorganize QT search to work with native Linux packages
Reorganize build-and-test workflow to have actions
Update empty method guards to new style with regex (see PR).
Used clang-format 18.1.8.
New actions to validate code formatting is added.
Update .clang-format with disabling of include sorting.
It is temporary changes, then include will be sorted.
Apply formatting for /src and /tools folder.
The files with .hxx,.cxx,.lxx,.h,.pxx,.hpp,*.cpp extensions.
Reorganized style for param to the next templates:
- "@param theParameter description ..."
- "@param[in] theParameter description ..."
- "@param[out] theParameter description ..."
- "@param[in][out] theParameter description ..."
The replacement was with keeping spacing, no removing of extra spaces.
In some files '/' was used instead of '@', that was not updated yet.
Removed cotire PCH
Integrated native PCH by CMake with the same BUILD_USE_PCH flag
Added new option to avoid extra files in 'build/include' folder and replace it by symlink
Symlink creates link to the origin file, it has some benefits from debug and build side.
The CMake parameter for symlink is 'BUILD_INCLUDE_SYMLINK'
Integrated DE plugin functionality.
Reworked DE components:
- TKDESTEP: Handling STEP file format.
- TKDEOBJ: Handling OBJ file format.
- TKDEIGES: Handling IGES file format.
- TKDEGLTF: Handling GLTF file format.
- TKDEVRML: Handling VRML file format.
- TKDEPLY: Handling PLY file format.
- TKDESTL: Handling STL file format.
Reworked DE DRAW components:
TKXSDRAWSTEP: Container for DE command to work with STEP.
TKXSDRAWOBJ: Container for DE command to work with OBJ.
TKXSDRAWIGES: Container for DE command to work with IGES.
TKXSDRAWGLTF: Container for DE command to work with GLTF.
TKXSDRAWVRML: Container for DE command to work with VRML.
TKXSDRAWPLY: Container for DE command to work with PLY.
TKXSDRAWSTL: Container for DE command to work with STL.
TKXSDRAW rework to be base DRAW plugin to keep DE session and utils.
Updated documentation
Updated samples
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
With enabled flag BUILD_USE_PCH we get an error of compilation of TKService:
1>Image_VideoRecorder.obj :
error LNK2019:
unresolved external symbol
"int __cdecl av_strerror(int,char *,unsigned __int64)"
(?av_strerror@@YAHHPEAD_K@Z) referenced in function
"protected: class TCollection_AsciiString __cdecl Image_VideoRecorder::formatAvError(int)const "
(?formatAvError@Image_VideoRecorder@@IEBA?AVTCollection_AsciiString@@H@Z)
1>Media_FormatContext.obj :
error LNK2001:
unresolved external symbol
"int __cdecl av_strerror(int,char *,unsigned __int64)" (?av_strerror@@YAHHPEAD_K@Z)
And many other similar errors. Similar errors occures in some other projects too:
TKService
TKOpenGl
TKOpenGles
TKXCAF
TKXDEDRAW
TKDFBrowser
TKMessageModel
TKMessageView
TKShapeView
TKTInspector
TKTreeModel
TKVInspector
TKView
Proposed solution: turn off cotire from targets, whose compilation cause error while applying cotire tool.
In this ticket migration to cotire 1.8.1 (from 1.7.9) is done.
COTIRE_PREFIX_HEADER_IGNORE_PATH does not apply here, because its employing
causes some errors in 3rdparty libraries (for example, in TKService project).
Projects (TKDFBrowser TKMessageModel TKMessageView TKShapeView TKTInspector TKTreeModel TKVInspector TKView)
which use Qt may be proceeded by cotire tool, but after fixing a bug of cotire:
https://gitlab.kitware.com/cmake/cmake/-/issues/18353
0033153: Fix cotire bug, causing impossibility of compilation targets depending from Qt.
Solution is proposed in:
https://gitlab.kitware.com/cmake/cmake/-/issues/18353
Make C++ standard to be enable from cmake settings:
User will be able choosing C++ language standard by selecting cmake variable BUILD_CPP_STANDARD.
For correct working, CMAKE_CXX_STANDARD cmake built-in variable should be available.
To enable CMAKE_CXX_STANDARD, minimum CMAKE version has been updated to 3.1.
Available next standard items:
C++11
C++14
C++17
C++20
C++23
This issue consists from several steps to achive main goal:
1) Configuratiuon, CMake - allow selecting C++ standard.
2) Require minimum CMAKE version 3.1 (for enabling CMAKE_CXX_STANDARD).
3) More flexible CMAKE_CXX_COMPILER_ID identification (fixups previous commit!)
4) Add description of new CMAKE variable `BUILD_CPP_STANDARD` into documentation.
5) Update CMAKE requirements in documentation.
6) Set C++11 standard for several projects.
- append new MessageView plugin to display content of Message_Report;
- correct DumpJson of TDataStd array attributes to print Lower/Upper values;
- correct remove level of Message_Report to store stop time during removing all levels;
- append DumpJson for TFunction, TPrsStd attributes;
- correct DumpJson of XCAFDoc tools due to simplify performance of it;
- move AttributeInfo functionality from XDEDRAW into a static public method of XCAFDoc to call it outside;
- remove obsolete pane classes in DFBrowser plugin, now we may use DumpJSon panel to visualize this content of attributes;
- add new property panel in DFBrowser (synchronized with the same in other plugins);
- add button to switch ON DumpJson in DFBrowser(OFF by default, for better performance), also there is a context menu item in tree view;
- rename in DFBrowser "Property Panel" into "Property Panel (custom)";
- implement ViewControl_ColorSeletor and setting color in TreeModel_ItemProperties. Use only for light in VInspector now;
- implement setting false for all created AIS_Shape presentation to don't modify source TopoDS_Shape;
- remove not use VInspector_CallBack. It's possible using Message_Report/MessageView to track commands way;
- remove History panel in VInspector as not used, MessageView will be better solution for this;
- implement item and actions in VInspector for setting Lights in the view.
MACOSX_USE_GLX has been renamed to HAVE_XLIB and now configurable on Linux target.
Xw_Window.hxx now export class on non-Linux platforms.
OpenGl_Window now creates an off-screen EGL surface also in case of
window-less desktop setup (e.g. with disabled Xlib on Linux).
Draw_Window - code has been cleaned up.
Class definition has been unified across platforms when possible.
Unusued constructors have been removed.
Internal header files (MainWindow.h, init.h, etc.) have been renamed to .pxx
to avoid their unexpected distribution in "inc".
Class CDF_Session is removed.
Integrated previously but not described:
0029195: OCAF - ensure thread safety for different documents.
Static local variables are eliminated in PCDM package.
Global documents metadata look-up table and directory of opened documents are removed.
Look-up table is maintained now as field in instances of the CDM_Application class.
Methods providing iteration by components are removed from class CDF_Store; signature of methods returned Standard_ExtString is changed to return Handle(TCollection_HExtendedString).
Support of different "Presentations" of documents is eliminated.
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.
- 'Search Qt4' is renamed into 'Search Qt'. Configuration uses Qt5 from now. For Qt4 use CMake configuration.
- 'Build Inspector' check box is added. It causes 'tools' toolkits compilation. Activates automatically 'Search Qt' control.
- Many Tcl procedures are extended with additional parameter to giving a directory of processed toolkits. The default directory is 'src', inspector directory is 'tools'. This way is similar Inspector compilation implemented in Cmake build procedure.
- Dependency libraries in DEBUG are stored in __TKDEP_DEBUG__. Qt requires it as names of debug and release libraries are different.
- Convert package creation. It is used to prepare some auxiliary presentations/methods to prepare variables for inspector based on occt classes.
- ViewControl package improvement:
Classes for property view, table, table model are implemented to visualize view of properties.
This view is filled by selection in tree if the selected object has implemented DumpJson functionality.
- TreeModel package improvements:
Method InitColumn is implemented in TreeModel_TreeModel to fill default columns in base model. The default columns are:
Name, Visibility, Rows. Additional columns should be added in successors.
Container of root items is moved into the base class
- View package imrovements:
Store preferences: display mode, fit all checked state and type of external context
View_DisplayPreview is added to process preview for selected in tree view objects
hide actions Clear, Multi, Single by default (as selection in tree view or Visibility state of item define which presentations should be displayed or erased)
- ShapeView plugin improvements:
Property View content based on DumpJson (columns in tree view for properties are removed),
Properties for TopoDS_Shape are displayed
Explode shape action in tree view to see content of shape by selected shape type. Type of displayed shapes is only preview, it is not used in export action.
Export shape into BREP. The previous implementation about BREP files in some directory and default view is removed.
- VInspector plugin imrovements:
Property View content based on DumpJson (columns in tree view for properties are removed),
Properties for AIS_InteractiveContext and AIS_InteractiveObject are displayed
obsolete classes to provide properties are removed.
- DFBrowser plugin improvements:
Property View content based on DumpJson is not used yet. But there is the USE_DUMPJSON macro. It's switch off by default.
If switch ON, it creates a Property View filled with DumpJson. It's a way of DFBrowser moving on this property view.
Init uses static variable CDF_Session::CurrentSession()->CurrentApplication to fill plugin if application in plugin is not set but OCAF application exists
- OCC_VERSION_HEX variable used for previous OCCT versions support (before 6.9.0 or 7.2.0) is removed
The interface of V3d_View and V3d_Viewer has been simplified.
For the fields myDefinedViews, myActiveViews, myDefinedLights, myActiveLights were added appropriate methods returning the internal raw data.
Make the next methods deprecated:
IfMoreLights(), InitActiveLights(), MoreActiveLights(), NextActiveLights(), ActiveLight() and
InitActiveViews(), MoreActiveViews(), NextActiveViews(), ActiveView(), InitDefinedViews(), MoreDefinedViews(), NextDefinedViews(), DefinedView(),
InitActiveLights(), MoreActiveLights(), NextActiveLights(), ActiveLight(), InitDefinedLights(), MoreDefinedLights(), NextDefinedLights(), DefinedLight().
Remove deprecated methods added in scope of tasks 0029290 and 0028987 (Target Version 7.3.0):
SelectMgr_SelectableObject: Init(), More(), Next(), CurrentSelection().
SelectMgr_Selection: Init(), More(), Next(), Sensitive().
V3d_AmbientLight: one constructor.
V3d_DirectionalLight: two constructors.
V3d_PositionalLight: one constructor.
V3d_SpotLight: two constructors.
"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.
SelectBasics_EntityOwner has been merged into SelectMgr_EntityOwner.
Unused property SelectMgr_EntityOwner::ResetLocation() has been removed.
SelectBasics package has been moved from TKService to TKV3d.
SelectBasics_SensitiveEntity has been merged into Select3D_SensitiveEntity.
Removed unused SelectMgr_SOS_Sleeping enumeration value.
SelectMgr_ViewerSelector::Deactivate() now checks activation status before updating tolerance map.
NCollecton_DoubleMap has been extended with two new methods Find1() and Find2()
performing lookup and returning found key withoout throwing an exception
(similar to NCollection_DataMap::Find()).
ViewerTest_DoubleMapOfInteractiveAndName has been redeclared to define
Handle(AIS_InteractiveObject) key instead of Handle(Standard_Transient).
Deprecated functionality related to Local Context has been removed.
The following classes and types have been removed:
AIS_LocalContext, AIS_DataMapOfILC, AIS_LocalStatus, SelectMgr_SequenceOfSelector, SelectMgr_DataMapOfObjectSelectors.
Value AIS_DS_Temporary has been removed from enumeration AIS_DisplayStatus.
The following methods related to Local Context have been removed from AIS_InteractiveContext:
::HasOpenedContext(), ::HighestIndex(), ::LocalContext(),
::LocalSelector(), ::OpenLocalContext(), ::CloseLocalContext(),
::IndexOfCurrentLocal(), ::CloseAllContexts(), ::ResetOriginalState(),
::ClearLocalContext(), ::UseDisplayedObjects(), ::NotUseDisplayedObjects(),
::SetShapeDecomposition(), ::SetTemporaryAttributes(),
::ActivateStandardMode(), ::DeactivateStandardMode(), ::KeepTemporary(),
::SubIntensityOn(), ::SubIntensityOff(),
::ActivatedStandardModes(), ::IsInLocal()
and ::AddOrRemoveSelected() taking TopoDS_Shape.
The methods AIS_InteractiveContext::Display() and ::Load()
taking argument theToAllowDecomposition have been marked as deprecated;
the new methods without this unused argument should be used instead.
AIS_InteractiveContext::DisplayedObjects() - removed argument theOnlyFromNeutral.
SelectMgr_SelectionManager has been simplified so that now it support only single Viewer Selector.
The argument -local has been removed from Draw Harness commands vselmode, vremove, vdisplay, vdisplayall, verase.
- TNaming_UsedShapes is corrected to do not call methods of empty TopoDS_Shape
- TNaming_NamedShape is corrected to have not NULL TNaming_RefShape even if TopoDS_Shape is NULL(TNaming_Builder::Delete).
- DFBrowserPane presentation tree item for this is corrected in the same way and obsolete methods of processing SortedReferences are removed.
- AIS_InteractiveContex and VInspector_ViewModelHistory are set into VInspector_CallBack
- minor correction of displaySelectedPresentations () to Hide/Show(by popup menu) any AIS_InteractiveObject, not only AIS_Shape (e.g. AIS_Trihedron)
- samples/tools/TStandalone is removed, to build Inspector out of OCCT, CMake should use tools/CMakeLists.txt fileName
- samples/tools/TInspectorEXE is moved to tools/TInspectorEXE
- TInspectorAPI_Version.hxx provides compilation inspector with earlier version of OCCT.
- preferences for dock windows geometry, tree view columns and current view projection;
- ViewControl package for common functionality between plugins;
- processing Location and Orientation for external TopoDS_Shape object
- 'F5' key to update content of each plugin
- visibility column in tree view (used now only in ShapeView)
- properties child item for context (presents tree of current Filters of context)
Extending CMake procedure by 'BUILD_MODULE_QtSamples' variable to switch on qt samples build.
Implementation required:
- union of occt_toolkit_tool.cmake and occt_toolkit.cmake files;
- correction of qt samples sources by adding path to Qt 'plugins' folder. It helps to avoid definition of additional variable (QT_QPA_PLATFORM_PLUGIN_PATH) when staring sample.bat for qt samples;
- executable processing is extended in cmake procedure by providing 'EXECUTABLE_PROJECT' variable. Now we need not specify custom processing for DRAWEXE in occt_toolkit.cmake
1. Added specific header files to disable and restore compiler warnings: Standard_WarningsDisable.hxx, Standard_WarningsRestore.hxx.
(Currently only MSVC compiler is handled.)
2. Inspector: compiler warnings are disabled for all includes of Qt headers.
3. Inspector: minor code correction to avoid warning due to use of floating point values in integer calculations.
AIS_InteractiveContext::MoveTo(), ::Select(), ::ShiftSelect() now throw
an exception on invalid V3d_View argument instead of returning empty results.
AIS_InteractiveContext::DetectedShape() and ::BeginImmediateDraw() now can
be called without opened Local Context.
Draw Harness - removed unused commands vsetam, vunsetam.
Removed unused methods ViewerTest::StandardModeActivation(), ::PickObject(), PickObjects().
Interactive input of Selection modes 0..7 now redirects to vselmode
instead of removed ViewerTest::StandardModeActivation().
Added method SelectMgr_SelectableObject::Selections() and depreacted methods
Init(), More(), Next() and CurrentSelection().
Added method SelectMgr_Selection::Entities() and depreacted methods
Init(), More(), Next() and Sensitivity().
SelectMgr_SelectableObject::myAssemblyOwner has been moved to AIS_MultipleConnectedInteractive.
SelectMgr_SelectableObject::Selection() now returns NULL handle for not found selection.
SelectMgr_SelectableObject::HasSelection() is no more virtual and just retuns !Selection().IsNull().
SelectMgr_SelectionManager::mySelectors map is now declared using proper
key type Handle(SelectMgr_ViewerSelector) instead of Handle(Standard_Transient).