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

408 Commits

Author SHA1 Message Date
luzpaz
db58517016
Documentation - Fix various typos found in codebase #414
Found via codespell
2025-03-07 15:34:32 +00:00
Pasukhin Dmitry
a5aa7bcd91
Testing - Samples build on GH #331
Add GitHub Action to build CSharp sample on Windows
Add MFC and Qt sample build actions
Improve CASROOT assignment logic in env.build.sh and env.install.sh for better compatibility with binary directories
2025-02-09 23:00:37 +00:00
dpasukhi
fae5678dc7 0033750: Configuration - make file configuration failed in mfc example
Updated MFC sample to build together with OCCT
2024-09-05 17:55:01 +00:00
luzpaz
099e0d2524
0033807: Documentation - Fix various typos found in codebase 2024-08-31 14:26:15 +01:00
luzpaz
76df27830b
0033762: Documentation - Fix various typos found in codebase 2024-07-14 15:19:44 +01:00
dpasukhi
bd651bbbd9 0033531: Configuration - Rework DataExchange ToolKits organization
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
2023-12-04 15:52:47 +00:00
dpasukhi
1103eb60af 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
2023-12-04 13:37:09 +00:00
azv
aaacd83510 0033032: Samples - Warning on Ubuntu 20.04
Fix warnings:
* catching polymorphic type 'class Standard_Failure' by value [-Wcatch-value=]
* this 'if' clause does not guard... [-Wmisleading-indentation]
2022-10-31 19:18:08 +03:00
ddzama
e92d322d40 0032921: Configuration, CMake - allow selecting C++ standard.
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.
2022-09-06 20:06:54 +03:00
ddzama
d7eefb11bf 0032986: Samples - csharp sample is crashed on compilation with VC++ 2022
While demanding c++ language standard c++20, the error of OCCTProxy compilation is occured:

warning C4857: C++/CLI mode does not support C++ versions newer than C++17; setting language to /std:c++17
error C7681: two-phase name lookup is not supported for C++/CLI or C++/CX; use /Zc:twoPhase-

Officially, C++/CLI mode does not support C++ version newer than C++17, so we should not demand C++20 to compile csharp samples.
Alternative solution - using /permissive (ConformanceMode = false), rather than default value /permissive- (ConformanceMode = true)
option to compile OCCTProxy. But alternative solution has been denied.
So, here is nothing to do to fix compilation of OCCTProxy project.

Nevertheless, error occures in IE_WPF_WinForms and IE_WinForms - if we trying to compile with VC++ 2022 (not demanding c++20):

warning MSB3274: The primary reference "*\OCCTProxy.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework.
This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

To solve the problem it is proposed to demand by default the highest version of NETFramework - 4.8.
So, demanding NETFramework v4.8 does not crashing compilation of csharp samples with VC++ 2015.
2022-09-06 19:57:24 +03:00
afokin
23c56fc66a 0032974: Configuration - update environment for VS2022
removing a repeating condition in install.bat

add vc143 in .md files
2022-05-27 19:05:24 +03:00
aml
82598ec0f2 0032951: Coding - get rid of unused headers [GeomConvert to IGESBasic] 2022-04-29 18:09:58 +03:00
kgv
633084b809 0032862: Visualization, Graphic3d_TextureMap - add 3D texture definition
Image_PixMap has been extended to support definition of 3D bitmap (as an array of 2D slices).

Graphic3d_TypeOfTexture enumeration values have been renamed to include full enum prefix.
Added Graphic3d_TypeOfTexture_3D redirecting to GL_TEXTURE_3D.
OpenGl_Texture::Init() has been extended to allow initialization of 3D texture.

Graphic3d_Texture2Dmanual merged into Graphic3d_Texture2D and marked as deprecated alias.
Graphic3d_TOT_2D_MIPMAP has been deprecated in favor of dedicated Graphic3d_TextureRoot::SetMipMaps().

Added Graphic3d_Texture3D class.
vtexture - added argument -3d for uploading 3D texture.
2022-03-05 17:31:39 +03:00
kgv
e3dae4a9f3 0032723: Draw Harness, ViewerTest - sloppy animation in WebGL
Fixed emscripten_async_call() calls to use requestAnimationFrame() instead of setTimeout().
ViewerTest_EventManager::handleViewRedraw() - fixed queuing new onWasmRedrawView()
before previous one has been processed (leading to multiplying of pending redraws executed at the same time).
RWGltf_TriangulationReader::readDracoBuffer - suppressed CLang compilation warnings.
2021-12-10 01:23:40 +03:00
kgv
03eb96038e 0032709: Samples, MFC - remove samples Viewer2d, Viewer3d, Ocaf, Triangulation, Animation, Convert 2021-12-03 18:00:22 +03:00
kgv
4f5e934445 0032704: Visualization, Prs3d_Drawer - do not implicitly create aspects within getters
Prs3d_Drawer getters now return NULL instead of implicitly creating "default" aspects.
Added missing initialization of default properties in AIS_InteractiveContext.
AIS_InteractiveContext::setContextToObject() - added missing propagation of Context to child presentations.
2021-12-03 17:56:37 +03:00
dipts
45143b7a24 0032662: Coding - Missing header file in AIS_DataMapOfSelStat.hxx
Removed obsolete header files AIS_DataMapOfSelStat.hxx and AIS_DataMapIteratorOfDataMapOfSelStat.hxx.
Removed obsolete types AIS_DataMapofIntegerListOfinteractive, AIS_ClearMode, AIS_ConnectStatus,
AIS_IndexedDataMapOfOwnerPrs, AIS_MapOfInteractive.
2021-11-21 12:42:09 +03:00
kgv
6eddc28410 0032658: Documentation - add missing GLFW sample to dox/samples/samples.md 2021-11-21 12:42:09 +03:00
btokarev
3ea347e562 0032551: Documentation - Novice user guide for OCCT Documentation
Added novice guide.
Improved structure of Tutorials & Samples.
2021-10-29 17:08:16 +03:00
asuraven
209ae313a5 0032031: Analyze Precise HLR behaviour in Draw/AIS
- Set "Algo" as default HLR algorithm in MFC HLR sample
2021-10-26 23:12:30 +03:00
kgv
5f69cfa70c 0032638: Draw Harness, ViewerTest - HTML input range misbehavior in WebAssembly
ViewerTest_EventManager - added tracking of EMSCRIPTEN_EVENT_FOCUSOUT event.
onWasmMouseCallback() has been adjusted to return FALSE for EMSCRIPTEN_EVENT_TARGET_WINDOW
target to avoid misbehavior of other HTML controls.

WNT_Window::ProcessMessage() now handles WM_SETFOCUS/WM_KILLFOCUS instead of WM_ACTIVATE to track focus changes.

AIS_ViewController::ProcessFocus() now redirects to AIS_ViewController::ResetViewInput() on focus loss.
This fixes issues when key action (like WASD navigation) keep working even after releasing key if window has been switched.
2021-10-22 19:58:16 +03:00
kgv
2c8c4b8086 0032629: Configuration, scripts - add USE_PTHREADS building option to wasm_build.bat 2021-10-22 19:58:15 +03:00
kgv
4e61131a1c 0032626: Samples - add Qt::WA_NativeWindow attribute to Qt IESample 2021-10-18 20:14:35 +03:00
kgv
34043fc845 0032613: Samples - glfw compilation error on Linux
GlfwOcctWindow - added cast to Aspect_XDisplay*.
Added auxiliary OCCT searching script as alternative to CMake config files.
2021-10-12 09:37:23 +03:00
kgv
f1c209dc77 0032609: Visualization, Wasm_Window - handle mouse movements outside canvas element
Wasm_Window::ProcessMouseEvent() - removed redundant check on EMSCRIPTEN_EVENT_MOUSEUP event.
ViewerTest and WebGL sample - mouse movements are now tracked on window element
to allow tracking updates when mouse with clicked button is moved outside canvas element.
2021-10-08 20:26:22 +03:00
btokarev
5c38397303 0032550: Documentation - Proofreading for "Tutorials and Samples -> Tutorial"
New images added for better representation of solid model;
Minor fixes for misprints and old classes;
Proofreading done.
2021-10-01 19:06:33 +03:00
kgv
13b36bb14f 0032567: Coding Rules - rename Graphic3d_TypeOfShadingModel values to include full enumeration name 2021-09-15 20:07:06 +03:00
emv
efac173377 0030151: Modeling Algorithms - Removal of the API level of old Boolean operations algorithm (BRepAlgo_BooleanOperation)
The following classes have been removed as obsolete:
- BRepAlgo_BooleanOperation
- BRepAlgo_Fuse
- BRepAlgo_Cut
- BRepAlgo_Common
- BRepAlgo_Section

The corresponding classes from BRepAlgoAPI package have to be used instead.

Draw commands:
- fuse
- cut
- common
- section/psection
have also been removed as obsolete.

The corresponding commands for modern Boolean operations algorithm (bfuse/bcut/bcommon/bsection) have to be used instead.

Adjustment of the test cases to use the commands for modern algorithm.
2021-09-10 20:24:50 +03:00
kgv
06d40093b7 0032121: Draw Harness, ViewerTest - implement -reset option for vlight command
vlight command has been revised to provide more friendly syntax.
Command now accepts light index or name as first argument.
Added arguments -enable/-disable for managing enabled state.
Added argument -reset to reset light parameters to default values.

V3d_Viewer::SetDefaultLights() now sets names "headlight" and "ambient" to created lights.
Graphic3d_TypeOfLightSource enumeration values have been renamed to avoid shortcuts.
Draw::Atof(), applied corrections to avoid explicit new/delete calls.
2021-07-12 20:50:25 +03:00
kgv
16222b8cd2 0032463: Visualization - implement Image_AlienPixMap::Load() via emscripten_get_preloaded_image_data() 2021-06-27 17:32:27 +03:00
kgv
73dee81133 0032460: Coding Rules - eliminate CLang warning -Wunused-but-set-variable
Code has been adjusted to suppress -Wunused-but-set-variable warnings.

DRAWEXE.wasm, compiler flags have been moved to linker flags
to eliminiate -Wunused-command-line-argument warnings.
2021-06-24 23:47:45 +03:00
kgv
f9ab9f7f1c 0032433: Visualization, TKService - introduce Wasm_Window implementing Aspect_Window interface using Emscripten SDK
Introduced Wasm_Window implementing Aspect_Window interface.

Aspect_WindowInputListener has been extended by touch input callbacks (moved from AIS_ViewController),
which now implements redirection of single taps to UpdateMouseClick().

AIS_ViewController::FetchNavigationKeys() now requests more frames even if Delta is zero,
but navigation keys are pressed - indicated by a new flag AIS_WalkDelta::IsDefined().

Fixed missing implementation of Xw_Window::DisplayConnection() getter.
The property has been moved to the base class Aspect_Window.

Removed unused Aspect_Convert.hxx.

DRAWEXE targeting Wasm:
- added exposing of FS interface so that it is possible uploading/downloading files to/from emulated file system on JavaScript level;
- added printer redirecting messages to Module.printMessage callback accepting message gravity;
- Run_Appli() now skips std::cin when Module.noExitRuntime is set.
2021-06-12 12:36:24 +03:00
luz paz
2641792e45 0031939: Coding - correction of spelling errors in comments [part 11]
Fix various typos via codespell.
2021-05-10 14:29:40 +03:00
kgv
a34bddcfd6 0032315: Configuration, CMake - fix building Draw Harness plugins as static libraries
DPLUGIN() macros no more defines exported function PLUGINFACTORY when building static libraries.
DRAWEXE executable now pre-loads a set of plugins when building static libraries.
dversion - added WebAssembly info.
2021-04-23 18:46:13 +03:00
luz paz
316ea29318 0031939: Coding - correction of spelling errors in comments [part 10]
Fix various typos via codespell.
2021-04-22 14:50:47 +03:00
luz paz
5e6e59146f 0031939: Coding - correction of spelling errors in comments [part 9]
Fix various typos via codespell.
2021-04-02 20:01:34 +03:00
kgv
20085dac44 0032262: Samples - JNIViewer sample compilation failure due to usage of removed aliases to Image_Format 2021-03-31 20:44:33 +03:00
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
vro
a8b605eb5e 0032133: Modeling Data - Restriction of access to internal arrays for Poly_Triangulation, revision of API
Removed methods from Poly_Triangulation/Poly_PolygonOnTriangulation giving access to internal arrays of 2d and 3d nodes, triangles and normals.
2021-02-18 18:55:21 +03:00
kgv
e03a03fdc2 0032122: Samples - handle WASD keys in WebGL sample 2021-02-10 20:44:31 +03:00
kgv
a0073def2d 0032081: Visualization - WebGL sample errors when run in Safari browser with WebGL 1.0
"MAX_WEBGL_VERSION=2" Emscripten option is now used for building sample instead of deprecated "USE_WEBGL2=1".
2021-01-29 19:51:18 +03:00
mkrylova
5634c81a9b 0031547: Visualization - V3d_View creates V3d_Trihedron instance
- moved creating of V3d_View::myTrihedron from constructor to first attempt of displaying or calling it;
- moved creating of V3d_Viewer::myRGrid and V3d_Viewer::myCGrid to to first attempt of displaying or calling them;
- renamed V3d_Viewer::IsActive() to V3d_Viewer::IsGridActive();
- redefined V3d_View::Trihedron() and V3d_Viewer::Grid() by adding new argument toCreate
for opportunity to check the existence of the objects without their recreating.
2021-01-22 19:04:25 +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
vro
894133a5ad 0029750: Samples - function arrows are not updated by moving a node in FuncDemo qt sample
The visual links between functions are recovered.
The demo is synchronized with a corresponding demo from Qt (qt486-vc10-32\examples\graphicsview\elasticnodes). It may be successfully compiled by any further versions of Qt including 5.10.1
Also, because Open CASCADE (and OCAF in particular) is improved for usage in multi-threading mode, usage of mutexes is added in this sample (for access to the sharing TNaming_UsedShapes attribute, for example).
2020-12-25 17:08:25 +03:00
kgv
b2a63f9b6f 0032013: Samples - iOS sample compilation errors
Added missing includes.
Fixed usage of obsolete Standard_Failure interface.
Fixed file headers.
2020-12-23 19:45:33 +03:00
kgv
ba562b2b7a 0031999: Tests - request Core Profile on macOS for Ray-Tracing tests 2020-12-23 19:45:32 +03:00