1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

395 Commits

Author SHA1 Message Date
kgv
b8ef513c8f 0032206: Visualization, TKOpenGl - move out OpenGL ES support to dedicated library TKOpenGles
Added TKOpenGles and TKOpenGlesTest toolkits built with HAVE_GLES2 macros.
Added CSF_OpenGlesLibs as alternative to CSF_OpenGlLibs.
2021-03-21 19:15:06 +03:00
kgv
b8db9379fe 0032203: Draw Harness, ViewerTest - drop dependency from OpenGL
Added TKOpenGlTest and TKD3DHostTest Draw Harness plugins.
TKOpenGlTest is automatically loaded by ViewerTest::ViewerInit().

Commands vgldebug, vvbo, vcaps and vuserdraw have been moved to TKOpenGlTest.
New command vglshaders lists GLSL programs defined by OpenGl_GraphicDriver,
previously implemented by "vshaderprog -list".

Added new command vdriver for graphic driver selection.
Removed erroneous code from command vstereo.
2021-03-17 19:56:54 +03:00
kgv
decbff0dfd 0032161: Coding Rules - deprecate obsolete alias PrsMgr_PresentationManager3d 2021-02-26 10:56:31 +03:00
kgv
5de4b704fe 0032065: Samples - use MODULARIZE within WebGL sample
Fixed multitouch input.

Module is now exported with global functions hidden via MODULARIZE
as global object OccViewerModule created by createOccViewerModule().
Global Module setup has been moved to occt-webgl-viewer.js.

Use EMSCRIPTEN_KEEPALIVE attribute istead of listing C functions via EXTRA_EXPORTED_RUNTIME_METHODS.
WasmOcctView now exports static methods as Module functions using EMSCRIPTEN_BINDINGS.

Standard_ASSERT_DBGBREAK_() is now defined using emscripten_debugger().
2021-01-22 19:03:14 +03:00
luz paz
7b5e532f83 0031939: Coding - correction of spelling errors in comments [part 7]
Fix various typos

Fixed via codespell v2.1.dev
2021-01-20 21:27:44 +03:00
kgv
f4e7c30785 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.
2021-01-14 19:38:24 +03:00
kgv
be8c9f2bde 0032050: Configuration - define fallback Android API version within auxiliary batch files
Script now defines a minimal Android API version when %anNdkApiLevel% is set to empty value
as 16 for 32-bit targets and 21 for 64-bit targets.
Added clearing of destination folders.
Added better handling of errors.
2021-01-13 17:10:27 +03:00
kgv
85381cfaf2 0032048: Configuration - Extend batch files to build OCCT with Emscripten
Added option USE_RAPIDJSON.
Added option toPack creating a .7z archive.
Added option toBuildSample building WebGL sample.
Improved aborting on error.
2021-01-13 17:10:27 +03:00
kgv
8d8971e7b8 0032011: Configuration - add batch files to build OCCT for macOS and iOS targets
Added script adm/scripts/macos_build.sh and template macos_custom.bat.template
intended for automating building routines targeting macOS platform.

Added script adm/scripts/ios_build.sh and template ios_custom.bat.template
intended for automating building routines targeting iOS platform.
2020-12-23 19:45:32 +03:00
kgv
c22b52d60e 0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes
Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface now inherit Standard_Transient.
Interfaces Adaptor2d_HCurve2d, Adaptor3d_HCurve, Adaptor3d_HSurface and their subclasses
are now aliases to Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface.
Removed numerous unsafe reinterpret casts.

Generic classes Adaptor3d_GenHCurve, Adaptor3d_GenHSurface, Adaptor2d_GenHCurve2d have been removed.
Several redundant .lxx files have been merged into .hxx.

Removed obsolete adaptor classes with H suffix.
2020-12-11 19:12:48 +03:00
luz paz
a110c4a377 0031939: Coding - correction of spelling errors in comments [part 2]
Fix various typos

Fixed via `codespell v2.0.dev`
2020-11-30 14:04:03 +03:00
kgv
a8b9d7eb27 0031888: Configuration, qmake - linkage error due to missing .cpp file in TKMesh
OccToolkit.pri now handles also .cpp file extension.
2020-10-29 19:04:46 +03:00
kgv
16ed73bec5 0031790: Configuration, CMake - add optional OpenVR dependency 2020-10-17 18:07:29 +03:00
vsv
c4d4fceaa7 0031824: Samples - Code is not displayed in Qt OCCT Overview sample after compilation by CMake 2020-10-09 18:28:27 +03:00
asuraven
a2176e6524 0031570: Samples - add Qt samples similar to standard MFC samples
Added Qt sample OCCTOverview providing examples of use of OCCT API with relevant code and demonstration of results in the viewer.

Off-topic: some unused images are removed from dox/introduction/images/
2020-10-06 20:40:23 +03:00
kgv
9211c8ffbc 0031795: Documentation - OCCDoc_ProcessSvg uses syntax incompatible with Inkscape 1.0
Detect old/new Inkscape version and pass arguments correspondingly.
2020-09-29 18:09:40 +03:00
imn
68922bccc4 0027342: STEP - support C++ streams for import / export
- STEP low-level parser is converted to C++; required minimal version of flex is elevated to 2.5.37.
- Added possibility to import STEP from stream, see new method XSControl_Reader::ReadStream() (now implemented in STEP only).
- Parsers ported to win_flex_bison 2.5.23 (flex 2.6.4, bison 3.7.1)
- Added support of C++ flex and bison scanners in in CMake scripts
- Some code clean-up in StepFile and around (unused files and functions are eliminated)
- Option to read from stream is added in DRAW command testreadstep for testing ReadStream() function
- Added test bugs step bug27342
2020-09-28 10:46:04 +03:00
bugmaster
99178701db 0031738: Samples: Update of samples for public release 7.5.0
- Adding VS 2019 redefinition
- Update sln files for vc14,141,142
2020-09-27 12:00:05 +03:00
nds
b3bf8485a2 0031379: Configuration - using defined variable of THIRDPARTY_DIR 2020-09-23 18:49:14 +03:00
msv
7e785937b3 0025748: Parallel version of progress indicator
Progress indication mechanism is refactored to support incrementing progress within multithreaded algorithms.

The class Message_ProgressIndicator is only an interface to the user application.
It accumulates the progress provided by progress scopes.
The counter is protected by mutex for thread-safety.

The new class Message_ProgressScope replacing Message_ProgressSentry should be used to advance the progress.
The scopes are nested to each other to reflect the nested nature of operations.
The new class Message_ProgressRange should be used to pass the progress to sub-scopes.

All OCCT algorithms involving progress indication have been updated to new API.

Improvements in Draw_ProgressIndicator:
- Separate console mode has been added in order to make possible to put the progress into std::cout instead
  or in addition to the draw interpreter, instead of trigger option "-tclOutput".
- Treatment of Ctrl-Break signal has been added.
  Now any operation can be aborted by Ctrl-C or Ctrl-Break keystroke.

Added new test case 'perf fclasses progr_par' for testing of parallel work of the progress.
2020-09-12 20:42:22 +03:00
kgv
eca6e7c547 0031744: Configuration - add batch files to build OCCT for Android target
Added script adm/scripts/android_build.bat and template android_custom.bat.template
intended for automating building routines targeting Android platform.

OpenCASCADEConfig.cmake has been extended to detect "$INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade" location.
2020-09-03 19:56:25 +03:00
msv
a75f5cdd86 0031742: Configuration - Add batch files for cmake build
The scripts cmake_gen.bat and cmake_gen.sh have been added to facilitate batch building of OCCT correspondingly on Windows and Linux platforms.

The files build.bat and install.bat are copied to the build directory by cmake configure procedure to enable batch building and installation on Windows platform.
2020-09-02 19:58:07 +03:00
osa
b3da9c3ede 0031737: Configuration - Add batch files to build OCCT with Emscripten
The scripts occ_build_wasm.bat and occ_build_wasm.sh have been added
to simplify batch building of OCCT with Emscripten (Web Assembly packages) correspondingly on Windows and Linux platforms.
These scripts are configurable through calling files with custom environment wasm_custom_env.bat and wasm_custom_env.sh.
2020-09-02 19:51:56 +03:00
abv
fba34cf8ba 0031740: Configuration - recover support of Yacc and Lex generation
Scripts adm/cmake/bison.cmake and adm/cmake/flex.cmake are refactored to enable actual search for bison and flex.
Apart of standard locations, also sub-folders of 3RDPARTY_DIR whose names contain "bison" and "flex", respectively, are added to search.
Cache variables 3RDPARTY_BISON_EXECUTABLE and 3RDPARTY_FLEX_EXECUTABLE are removed to avoid confusion (they duplicated similar variables without "3RDPARTY_" prefix).

Lex and Yacc files are corrected to match changes made manually in generated files during last years:
- StepFile/step.yacc: correction missing from #22972
- StepFile/step.lex: corrected for compilation (broken by #31060)
- MSVC-specific code is synchronized between StepFile/step.lex and ExprIntrp/ExprIntrp.lex
- Old commented code and duplicate code blocks removed

Commands for execution of Flex and Bison tools in CMake scripts are tweaked to avoid embedding line numbers (with local paths) in generated files.

Scanners and parsers are regenerated from updated source files with modified options.
Note that lex.ExprIntrp.c is regenerated with multiple differences because option -f (fast scanner) was used for generation of previous version (by WOK).
2020-09-02 19:25:24 +03:00
kgv
8e16477b50 0031582: Configuration, CMake - OCCT fails to build with VTK 9.0
Handle "VTK::" prefix instead of "vtk" used by previous VTK versions for targets.
Corrected unexpected location of endif() and broken indentation.
Obsolete $VTK_USE_FILE is no more included (basing on VTK version check).

Standard_WarningsDisable.hxx/Standard_WarningsRestore.hxx pair is now used to suppress VTK warnings instead of partial disabling.
2020-08-22 12:13:11 +03:00
Benjamin Bihler
d27293d9bf 0031677: Configuration - Allow Optimization Level O3 When Compiling With G++
Removed suppression of optimization level O3 with using Mingw64.
2020-07-23 16:08:22 +03:00
kgv
d6fbb2aba4 0031632: Draw Harness - handle 3d mouse Raw HID input on Windows
WNT_HIDSpaceMouse - added auxiliary class for processing 3d mouse Raw HID input.
AIS_ViewController::Update3dMouse() - added default processor for 3d mouse input event.
ViewerTest now redirects WM_INPUT to AIS_ViewController::Update3dMouse().
Aspect_VKey enumeration has been extended by 3D view buttons.
WNT_Window::RegisterRawInputDevices() has beend added as a small wrapper
over WinAPI RegisterRawInputDevices() for common HID input devices.

AIS_ViewCube now stores animation duration within AIS_AnimationCamera instead of dedicated duplicating class property.
2020-07-03 11:03:05 +03:00
kgv
32b723d5c6 0031606: Configuration, CMake - build fails with Android NDK + CLang compiler + MinGW Makefiles
CLang is now checked before MINGW within occt_defs_flags.cmake.
Added "-Wl,-s" linker flag when using CLang for stripping symbols consistently to GCC builds.
2020-06-13 17:17:53 +03:00
kgv
b40cdc2b55 0029384: Visualization, TKOpenGl - basic integration with OpenVR
V3d_View::AutoZFit() is now called only before redraw
within methods V3d_View::Redraw() and V3d_View::Update().

Graphic3d_CView now holds Aspect_ExtendedRealitySession object.
Aspect_OpenVRSession implements new interface via optional OpenVR library.
Graphic3d_CView::ProcessInput() - added new interface method
which should be called for processing positional input (head tracking).

Graphic3d_Camera now allows setting custom stereoscopic Projection matrices.

OpenGl_Context::Camera() - context now holds Camera object
in addition to active camera matrices.

genproj.tcl has been extended to handle optional CSF_OpenVR dependency.
2020-05-06 20:45:53 +03:00
kgv
6d43db4f74 0031471: Confuguration, genproj - unable to build OCC Products
Restored parsing of src/VAS/Products.tcl.
2020-04-01 13:42:12 +03:00
kgv
7f24b768c3 0031458: Visualization - refine classes across Prs3d and StdPrs packages
Prs3d::GetDeflection() has been moved to StdPrs_ToolTriangulatedShape::GetDeflection().
Prs3d_ShapeTool has been moved to StdPrs_ShapeTool.
Code collecting free edges on Poly_Triangulation
has been moved out from StdPrs_WFShape to Prs3d::AddFreeEdges().
StdPrs_BndBox has been moved to Prs3d_BndBox.
Geom_Transformation has been replaced by TopLoc_Datum3D within visualization classes.

Select3D_SensitiveCircle constructor now takes gp_Circ instead of Geom_Circle.
StdSelect_ViewerSelector3d has been moved to SelectMgr_ViewerSelector3d.
Methods ::GetPoint3d() and ::ArrayBounds() has been moved
from subclass Select3D_SensitiveCircle to the base class Select3D_SensitiveCurve.
StdSelect_ViewerSelector3d::computeSensitivePrs() has been moved to SelectMgr::ComputeSensitivePrs().

Removed unused declarations StdSelect_Prs, StdSelect_DisplayMode,
StdSelect_SensitivityMode, StdSelect_TypeOfResult, SelectMgr_SOPtr, TColQuantity.

Package Graphic3d has been moved from TKV3d to TKService.
2020-03-27 17:58:02 +03:00
kgv
787ff2408c 0031456: Visualization - move out Dimensions and Relations from package AIS to PrsDims
The following classes and their subclasses within AIS package
have been moved to new package PrsDim and renamed:
- AIS_Relation  -> PrsDim_Relation;
- AIS_Dimension -> PrsDim_Dimension,
2020-03-27 17:58:00 +03:00
nds
f6d8ca74d5 0030749: Inspectors - compilation under tcl scripts
- '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.
2020-02-20 18:33:01 +03:00
nds
28b13b31aa 0031014: Inspectors - variables for Qt in CMake
It restores path to Qt binaries in 3RDPARTY_DLL_DIRS for correct start TInspectorEXE under VStudio.
2020-02-13 20:48:05 +03:00
sshutina
10ac040338 0031336: Modeling data - extend BRepPrimAPI_MakeBox with planar shape creation
-Create a new package BRepPreviewAPI, inherited from BRepPrimAPI to create both, valid and degenerative shapes
-Create a new class BRepPreviewAPI_MakeBox for working with a box
    Preview can be vertex, edge, rectangle or box
-BRepPrim_GWedge: in the case of non-valid data, the exception does not happen in the constructor, but at the moment of access to the shape
-BRepPrimAPI_MakeBox: myWedge is now not private, but protected, because used in  BRepPreviewAPI_MakeBox which inherits from BRepPrimAPI_MakeBox
-Add tests for checking of a creation a preview in tests/geometry/preview (vertex, edge, rectangle, box)
-Update a command "box": add new parameters
2020-02-12 18:00:37 +03:00
kgv
6a56fe9240 0031178: Configuration, genproj - fix searching for zlib on Linux platform
zlib library is called libz on Linux.
2019-11-21 17:24:12 +03:00
abv
1bd04b5a02 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
2019-11-03 21:47:59 +03:00
kgv
a6a66c3a21 0031037: Foundation Classes - add class Message_PrinterSystemLog for printing messages into system log
Added new class Message_PrinterSystemLog that can be used for logging messages into system log for debugging application in restricted environment.
2019-10-22 15:17:00 +03:00
apn
620a6baa59 0030456: Make OCCT_CHECK_AND_UNSET_GROUP more general
Modify OCCT_CHECK_AND_UNSET_GROUP function to allow unset any group of variables
2019-10-22 15:15:41 +03:00
bugmaster
d9619512e1 Update of environment files 2019-09-29 12:12:57 +03:00
kgv
27bd52b540 0030966: Configuration, genproj.tcl - look for an optional libraries e57 and xerces
Added missing HAVE_RAPIDJSON to env.sh.

genconf.tcl has been extended with new option HAVE_E57
which enables looking for E57 and xerces libraries.
Added new libraries CSF_E57 and CSF_xerces to genproj.tcl.
2019-09-24 14:04:54 +03:00
apn
05ed7ed8e0 0029308: Configuration, Inspectors - search of Qt in CMake scripts is separated from search of other 3rd-party libs
Qt for inspector and samples is searched together with all 3rd-party products
2019-09-18 19:20:10 +03:00
kgv
f4b0c77247 0030967: Configuration, genproj.tcl - generate OCCProducts solution for products
genproj procedure has been extended with new parameters -solution, set to OCCT by default.
Added missing HAVE_RAPIDJSON to env.sh.

Added implicit file path normalization for PRODUCTS_PATH variable,
to avoid genconf.tcl script malfunction on backslashed.
2019-09-16 19:41:13 +03:00
abv
3b80dc166a 0030948: Configuration, CMake - problem building with CMake 3.15.2
Minor corrections in CMake procedures and include statements
2019-09-14 11:45:35 +03:00
abv
fa68c1e116 0029979: Data Exchange - Crash by reading STEP file
Added work-around against specific problem of ORIENTED_EDGE referring to another ORIENTED_EDGE instead of EDGE_CURVE.
Added handling of edges with null EDGE_CURVE, to allow passing the translation further instead of exception.

Off-topic: text of warning message is corrected in genproj

Added test bugs step bug29979
2019-09-06 19:23:19 +03:00
abv
c8428cb3e4 0030938: Configuration, genproj - Support building with VS 2019
Commands genproj and genconf are updated to support generation of projects for VS 2019, toolset v142
2019-09-04 15:08:14 +03:00
kgv
4151c94d20 0029296: Data Exchange - implement import of mesh data from files in OBJ format
RWObj_Reader and RWObj_CafReader - added new classes reading triangulation from OBJ file.
2019-06-21 18:19:09 +03:00
kgv
0a419c51ed 0030691: Data Exchange - implement import of mesh data from files in glTF format
Added RWGltf_CafReader class implementing glTF reader.
Added readgltf Draw Harness command for reading glTF files.
2019-06-21 18:19:08 +03:00
kgv
c9983ee863 0030706: Visualization - fetch font folder list from fontconfig library on Linux
vfont command now prints fonts in alphabetical order.
2019-06-20 15:20:49 +03:00
kgv
fc552d842e 0030692: Data Exchange - introduce base framework RWMesh for importing mesh data formats into XDE document
RWMesh_CafReader - added new interface class for common workflow for reading mesh data files into XDE document.

OSD_Path - added auxiliary methods splitting path into folder+file pair
and checking relative/absolute path semantically:
OSD_Path::FolderAndFileFromPath(), ::IsRelativePath(), ::IsAbsolutePath().

V3d_TypeOfOrientation enumeration has been extended with aliases
(like front/left) for Z-up and Y-up conventions.
V3d_View::SetProj() now accepts argument for asking Y-up instead of Z-up.

Added command vviewproj defining standard camera direction.
Commands vaxo, vleft, vright, vtop, vbottom, vfront, vbottom now redirect to vviewproj.

TCollection_AsciiString::SubString() now uses Standard_OutOfRange_Always_Raise_if() to suppress GCC warning.

Eliminated gcc 4.4 compilation errors within Standard_OutOfRange_Raise_if,Standard_RangeError_Raise_if.
2019-06-07 15:02:38 +03:00