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

Compare commits

...

75 Commits

Author SHA1 Message Date
Pasukhin Dmitry
70ba51d3a8
Modeling - ElCLib Optimization and testing #471
- Created a new test file ElCLib_Test.cxx to implement unit tests for various functions in the ElCLib class.
- Added tests for InPeriod, AdjustPeriodic, Line3D, Circle3D, Ellipse3D, Hyperbola3D, Parabola3D, and To3dConversion methods.
- Improved performance for the ElCLib methods
2025-03-31 12:55:04 +01:00
Pasukhin Dmitry
ea34d5b2b7
Modeling - Bounding BSpline periodic tolerance issue #468
Update BndLib_Add3dCurve to check the periodic case u1-u2 matching with period
2025-03-31 11:29:38 +01:00
Pasukhin Dmitry
52a93a3bdd
Modeling - Handle void bounding box case in BRepBndLib::AddOptimal #470
In some cases face without natural bound can be not have edges on curve
2025-03-31 10:01:23 +01:00
Pasukhin Dmitry
25b12541d7
Configuration - Re-Configuration time optimization #467
Refactor CMake files to hide redundant variables using mark_as_advanced.
The result - no re-find will be performed.
From 30s to 5s for second time reconfiguration stage.
2025-03-30 15:26:05 +01:00
Pasukhin Dmitry
496ffd4005 Configuration - Issue to start Draw debugging in VS #465
Fixed path for DRAWEXE project configuration in CMakeLists.txt
Updated plugin file search path to use CSF_OCCTResourcePath
2025-03-27 17:42:57 +00:00
Pasukhin Dmitry
fd7a989826
Configure - Fixed issue with static build of DRAWEXE #462
Replace EXTERNLIB_STATIC file with inline CMake variable definition.
2025-03-24 19:18:58 +00:00
Pasukhin Dmitry
43b1e47118
Testing - Remove PLib_JacobiPolynomial_Test.cxx from GTests #463 2025-03-24 17:35:21 +00:00
Pasukhin Dmitry
876ccbe977
Configuration - Add support for Google Test framework in CMake #443
Enhance Google Test integration and add support for test projects.
Each Toolkit have GTests folder with place for new tests.
For adding new tests needs to extend FILES.cmake files in each GTests folder.
The single executable is created for each toolkit with all tests.
The tests grouped by module and toolkit with :: as separator.
Added option to download GTest by Cmake if not found.
Add GTest for PLib_JacobiPolynomial with comprehensive test cases
Add GTest for TCollection_AsciiString and TCollection_ExtendedString
Set C++ standard to C++14 for GTest compatibility if required
2025-03-24 08:58:02 +00:00
Pasukhin Dmitry
986af180e6
Foundation Classes - Checking for MallInfo version #459
Fix memory usage reporting for GLIBC compatibility in OSD_MemInfo
2025-03-23 20:26:14 +00:00
Pasukhin Dmitry
893747b46e
Foundation Classes - Update signal handling for GLIBC compatibility on Linux #458
Simply disabling the code which enables floating point exceptions
  is probably wrong, but I don't have a replacement for the
    non-posix functions fegetexcept(3) and feenableexcept(3).
2025-03-23 18:57:11 +00:00
Pasukhin Dmitry
233fd2a31f
Documentation - Convert module and toolkit names to lowercase for URL generation #460 2025-03-23 17:37:58 +00:00
Pasukhin Dmitry
2912b4dadb
Foundation Classes - Host resolving by itself #457
Fixed issue  when gethostbyname returns a nullptr, because the host can't resolve itself
2025-03-23 15:52:48 +00:00
Pasukhin Dmitry
e1528a3657
Configuration - Update resource path references in build scripts #454
Fixed issue when the path to resources in build folder is not valid.
2025-03-20 18:44:30 +00:00
Pasukhin Dmitry
c291a33d6d
Documentation - Generation schema fixing #452
Enhance documentation generation by tracking unique module connections
Ensuring lowercase page IDs for toolkits and packages
2025-03-20 14:47:17 +00:00
Pasukhin Dmitry
9cd174509c
Configuration - Resource generation source path fix #453
Fix header file path generation in OCCT resource macro.
Regression after reorganizing repository.
2025-03-20 13:09:23 +00:00
Pasukhin Dmitry
5647b46a34
Configuration - Reorganize repository structure #450
Reorganizing structure to have Module/TK/Package/FILES structure.
New structure reflect the structure inside IDE.
Migrate FILES, PACKAGES, EXTRLIB to CMake version to handle changes on updates.
No changes were done to installation layout, all installation result keep as before.
The migration was done using python script, see PR, which refactor automatically the structure.
Updated doc generation to have valid path to modules, toolkits and packages.
In case of PR into new version, IR-790 can be used as a target for the previous version.
2025-03-20 00:39:26 +00:00
Pasukhin Dmitry
606d652b41
Documentation - Migration to CMake from TCL #441
Remove OS folder with structure for refman generation.
Remove tcl scripts from adm folder which used only for doc generation
Migrate all the processes of doc generation to cmake (adm/cmake/occt_doc.cmake)
RefMan and Overview build from CMake as a new utility option, no TCL is needed.
2025-03-19 09:58:55 +00:00
Pasukhin Dmitry
df4b931988
Configuration - Resource structure reorganization #429
Reorganized resources to keep source part in src and real-time scripts in resource folder.
For the installation result no changes, still installed to src for windows.
2025-03-18 22:54:43 +00:00
Pasukhin Dmitry
99c7ce57c1
Coding - Migration of ExpToCas to own repository #442
New repository for ExpToCas: https://github.com/Open-Cascade-SAS/ExpToCas
Documentation and all build process are fully migrated.
2025-03-18 20:41:12 +00:00
Pasukhin Dmitry
c29c19bb0a
Coding - Migration of Inspector to own repository #438
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.
2025-03-18 19:25:03 +00:00
Pasukhin Dmitry
de831d2935
Data Exchange, Step - AP242 SchemaName Remove dot #448
Fix schema format for AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF in StepAP214_Protocol.cxx
2025-03-18 17:24:07 +00:00
Pasukhin Dmitry
d9d62b4c3c
Configuration - Adding resource packages to toolkit #427
Adding resources with some source code to the packages.
The source code mostly are pxx searched by relative path.
2025-03-14 10:48:50 +00:00
Pasukhin Dmitry
ddf81f2b93
Configuration - Remove -symbolic linker flag (#432)
Updated VCPKG workflow to follow the type of linking with the triplet.
Removed symbolic linker flag. As a result downgrade of performance.
The symbolic flag has high risk of instability, better to disable.
2025-03-12 22:18:44 +00:00
Pasukhin Dmitry
3840d19d7b
Configuration - Enhance Qt5 directory detection for Windows #419
Update the detection Qt5 folder to search for bin folder.
That will affected for the starting DRAW or samples as a part of env.
2025-03-09 18:04:44 +00:00
Pasukhin Dmitry
94637ac370
Coding - Include gxx files from global path #423
Refactor includes to use angle brackets for gxx files back [as for before 7.9]
2025-03-09 09:48:53 +00:00
Pasukhin Dmitry
c0c9f04c04
Visualization - AIS_Shape bounding box re-computation is not working properly #422
Fixed issue with bounding box cleaning algorithm that was causing the bounding box to be only increased.
Now the bounding box is increased and decreased to fit the shape.
2025-03-09 00:07:17 +00:00
Pasukhin Dmitry
478afa4eea
Configuration - Checking for FILES content #424
Added checking for file in package or toolkit.
Removed not-existed files from the list
2025-03-08 22:48:09 +00:00
Pasukhin Dmitry
efc388a211
Configuration - Remove BUILD_PATCH option in CMake #418
Refactor CMake configuration to remove patch handling and simplify includes
2025-03-07 21:07:09 +00:00
sshutina
c4911b9652
Visualization, Selection - allow HandleMouseClick for schemes, allowing to select an object #416 2025-03-07 19:05:37 +00:00
luzpaz
db58517016
Documentation - Fix various typos found in codebase #414
Found via codespell
2025-03-07 15:34:32 +00:00
luzpaz
dbdff3b004
Documentation - Fix various typos found in codebase (#413)
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`
2025-03-06 13:10:51 +00:00
Pasukhin Dmitry
896b6aa69f
Testing - Repeating failed tests in GH Action (#412) 2025-03-06 10:28:46 +00:00
Pasukhin Dmitry
8cb6ea8b0e
Modeling - Improve handling of polygon parameters in NURBS conversion (#410) 2025-03-05 15:48:41 +00:00
Pasukhin Dmitry
811e6c7f0d
Configuration - Update VTK optional components (#403)
Updated missed components leaded to the issue with VCPKG
2025-03-05 14:23:05 +00:00
Pasukhin Dmitry
55f8c6d1bf
Data Exchange - Datum Axis extraction issue (#407)
Refactor axis handling with correct positioning and handling exceptions.
2025-03-05 10:45:18 +00:00
Pasukhin Dmitry
72960352ed
Configuration - Modify VTK 9x handling (#401) 2025-03-03 10:29:42 +00:00
Pasukhin Dmitry
de5406aabd
Configuration - Extend CMake file filter regex (#400)
Fixed issue when folder name contains .c or .h as a part of the name.
2025-03-03 08:42:35 +00:00
Pasukhin Dmitry
2edfe536aa
Configuration - Update file globbing and condition checks for installation paths (#399) 2025-03-02 23:57:42 +00:00
Pasukhin Dmitry
84334d8019
Configuration - Update VTK configuration and enable optional components (#395) 2025-03-02 20:41:56 +00:00
Markus Freilinger
df546f5aca
Modeling - Degenerated curves were not handled by Arrange function (#396) 2025-03-02 16:47:06 +00:00
jboissy-mediasofts
4556423a04
Visualization - Refactor mouse click handling logic for improved double-click detection (#385) 2025-02-27 11:39:32 +00:00
Pasukhin Dmitry
79198f7297
Data Exchange - DE Wrapper invalidating parameters after 'Load' (#393)
Fix configuration loading to correctly use FileCS parameter
Add stability test for configuration changes
Update documentation's de wrapping names
2025-02-27 11:38:43 +00:00
sshutina
aa630b33b7
Visualization - Add flag for font mgr to avoid error message (#392) 2025-02-27 11:38:09 +00:00
Pasukhin Dmitry
95d8c85c2b
Coding - Bump version to 8.0.0.dev (#394)
New maintaining schema will be applied:
 maintenance stable release on top of minor (3 times per year).
   with binary compatible changes
   name - 7.9.1, 7.9.2, 7.9.3
 development fully-tested release based on master (every 5+- weeks)
    no binary compatible changes
    the latest features available the same as in master
    name - 8.0.0.rc1, 8.0.0.rc2, 8.0.0.rc3,...
the weekly branch IR still will be weekly and usually type of release will be "dev"
  of the next minor release. In current case "8.0.0".
2025-02-27 11:37:20 +00:00
Pasukhin Dmitry
858dd02fed
Coding - Bump version to 7.9.0 stable release #380 2025-02-17 22:00:23 +00:00
Pasukhin Dmitry
7f7e7df782
Documentation - Update coding rules and formatting guidelines #379 2025-02-17 22:00:07 +00:00
dpasukhi
20c7202089 Testing - Remove unstable test cases 2025-02-17 18:15:58 +00:00
Zernova Marina
8fb662b0aa
Visualization - NCollection_DataMap::Find() exception from AIS_Selection::Select() #375
Problem with NCollection_DataMap::Find() exception during multiple selection in OCC viewer.
Incorrect call is made from AIS_Selection::Select() method at line:
AIS_NListOfEntityOwner::Iterator aListIter = myResultMap.Find (theOwner);
Original issue: 0033742
2025-02-17 15:52:24 +00:00
jfa
e375bd7c3e Modeling Algorithms - UnifySameDomain improvement #371
Extend ShapeUpgrade_UnifySameDomain algorithm working on cases,
  where SurfaceOfRevolution or SurfaceOfLinearExtrusion was made on basis of TrimmedCurve.
Original issue: 0033328
2025-02-17 14:12:49 +00:00
astromko
4c5f9c77cb Modeling - Removing surface after transformation #374
Old surface is not removed after translation or rotation with geometry copying
Removed unnecessary condition that was added by an earlier fix.
Added a test case.
Original issue: 0033591
2025-02-17 14:12:43 +00:00
Pasukhin Dmitry
ed6005b75a
Testing - Summarize only with success reference #377
Fix GitHub Actions workflow to filter completed runs by success status
2025-02-17 14:11:03 +00:00
Pasukhin Dmitry
04a15e36f7
Testing - Remove installation of Visual C++ 2010 #376 2025-02-17 14:10:48 +00:00
jfa
0a73cac759 Configuration - CMake symbol isolation issue on Windows #373
Fixed Salome compilation problem on Windows by M.Bernhard
2025-02-17 12:52:41 +00:00
jfa
6f42ada2e6 Modeling - SIGSEGV BRepAdaptor_Curve2d and UnifySameDomain #372
SIGSEGV with MakeVertexInsideFace.
Fixed exceptions with loading null curve and using out of range index.
By K.Leontev. [bos #37951]
2025-02-17 11:12:21 +00:00
Pasukhin Dmitry
5b574af01f
Testing - WebAssembly build validation #256
Add WebAssembly build workflow for Ubuntu and update CMake warnings for OpenGL usage
Add workaround for platform-specific macros setup before project command
Update CMake configuration for Emscripten and Android toolchains;
Disable default features for vcpkg manifest
Update GitHub workflows to support multiple build types and improve compiler flag handling
Disabled DETools module for Emscripten support in CMake configuration
2025-02-14 16:08:45 +00:00
Pasukhin Dmitry
67bd61d4d3
Data Exchange - IGES Import Degenerated BSpline crash #368
Degenerated bspline leads to null dereference
Fix BSpline curve check and improve exception handling in TransferBSplineCurve
2025-02-14 13:13:53 +00:00
Pasukhin Dmitry
425f88e63a
CMake - Disable building Overview by default #369
Updated default behavior to not build documentation
  when find doxygen (in case of windows it ofter exist in env variables).
Fixed issue when not defined BUILD_DOC_Overview, but found doxygen cmake issue.
2025-02-14 10:47:45 +00:00
Pasukhin Dmitry
5a186c7b1a
Testing - Update GH testing to filter completed reference branch testing #365 2025-02-13 10:24:12 +00:00
Pasukhin Dmitry
fb73c3b712
Coding - Initialize member variables with default values #362
Clang-tidy applying rule for cppcoreguidelines-pro-type-member-init.
Updated: TKernel and TKMath
Update constructor in some classes instead of direct initialization
Refactor Bnd_BoundSortBox and Bnd_Box constructors to initialize member variables directly
2025-02-12 14:26:00 +00:00
Pasukhin Dmitry
a8950426b5
Data Exchange - Step Import metadata crash protecting #357
Fix null checks and improve attribute handling in STEPCAFControl_Reader
2025-02-12 14:25:19 +00:00
luzpaz
f423143109
Documentation - Fix various typos found in codebase #361
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`
2025-02-11 12:38:56 +00:00
dpasukhi
87c04f1833 Coding - Bump version to 7.9.0.beta2 #359 2025-02-10 20:27:33 +00:00
Pasukhin Dmitry
49ae0d106f
Data Exchange, Step Import - Disable Product Metadata mode by default #358
Add default initialization for myProductMetaMode in STEPCAFControl_Reader
2025-02-10 19:39:41 +00:00
Pasukhin Dmitry
fd03c58d3b
Data Exchange - STEP Export ignore write schema #355
Refactor StepData_StepModel constructor and initialization logic for write unit
2025-02-10 15:26:39 +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
Pasukhin Dmitry
9d727d09f4
Testing - Update GH Action for 7.9.0 #340
Update CAD files with new public data
Update 3rd-party archives with new versions of dependencies
Disable signal catching in bug28054_2
2025-02-09 21:20:05 +00:00
Pasukhin Dmitry
bd77f8af4a
Coding - Refactor ShapeHealingMap to NCollection #346
Update container type to OCCT to avoid allocation on creating.
Refactor shape processing parameter handling to use XSAlgo_ShapeProcessor for consistency.
2025-02-08 21:01:14 +00:00
luzpaz
7e3d063cae
Documentation - Fix various typos found in codebase #350 2025-02-08 09:44:51 +00:00
Zernova Marina
a1d887e0c4
Data Exchange - Fix GLTF Export for vertices and edges #348
Only free vertices and edges are exported now
2025-02-07 16:06:47 +00:00
Zernova Marina
85b40aba2a
Data Exchange, GLTF Import - Fix visualization of colors #347
Fixed issue with material color space
2025-02-07 10:13:54 +00:00
oan
62e085c5ed Configuration - regression in wasm build #342
Quick fix absent definitions
2025-02-04 16:30:14 +00:00
Pasukhin Dmitry
10d1902820
Data Exchange - Schema missed during export #343
Refactor model creating to apply schema based on DE parameters.
New model creating stage no more inject header info.
2025-02-04 16:27:16 +00:00
Zernova Marina
6c77143364
Data Exchange - Fix GLTF Export Materials for edges #341
Fixed issue with edge colors
2025-02-04 09:22:45 +00:00
Zernova Marina
4b318b8bf6
Data Exchange - RWMesh_CafReader deferred loading issue for no faces #339
Fixed issue when trying to apply deferred loading for edges or vertexes.
2025-02-03 22:29:33 +00:00
Pasukhin Dmitry
bfb00b243e
Configuration - TCL OCCT version extraction issue #337
Enhance version detection in OCCDoc_DetectCasVersion
Refactor documentation build workflow and integrate into multiplatform CI
2025-02-03 22:25:29 +00:00
16329 changed files with 26528 additions and 71688 deletions

68
.github/actions/build-docs/action.yml vendored Normal file
View File

@ -0,0 +1,68 @@
name: Build Documentation
description: 'Build OCCT documentation using doxygen'
runs:
using: composite
steps:
- name: Install dependencies
run: |
choco install -y graphviz
choco install -y doxygen.install
shell: pwsh
- name: Download and extract 3rdparty dependencies
run: |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
shell: pwsh
- name: Configure OCCT
run: |
mkdir build
cd build
cmake -T host=x64 `
-D USE_FREETYPE=ON `
-D USE_TK=OFF `
-D BUILD_USE_PCH=ON `
-D BUILD_OPT_PROFILE=Production `
-D BUILD_INCLUDE_SYMLINK=ON `
-D CMAKE_BUILD_TYPE=Release `
-D BUILD_DOC_Overview=ON `
-D BUILD_DOC_RefMan=ON `
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
-D INSTALL_DIR=${{ github.workspace }}/install `
-D USE_D3D=ON `
-D USE_DRACO=ON `
-D USE_FFMPEG=ON `
-D USE_FREEIMAGE=ON `
-D USE_GLES2=ON `
-D USE_OPENVR=ON `
-D USE_VTK=ON `
-D USE_TBB=ON `
-D USE_RAPIDJSON=ON `
-D USE_OPENGL=ON `
-D CMAKE_CXX_FLAGS="/W4 /WX" `
-D CMAKE_C_FLAGS="/W4 /WX" ..
shell: pwsh
- name: Build documentation
run: |
set PATH=%PATH%;C:\Program Files\doxygen\bin;C:\Program Files\Graphviz\bin;C:\Program Files\doxygen
cd build
cmake --build . --target doc --config Release
shell: cmd
- name: Upload refman documentation
uses: actions/upload-artifact@v4.4.3
with:
name: refman-doc
path: build/doc/refman
retention-days: 90
- name: Upload overview documentation
uses: actions/upload-artifact@v4.4.3
with:
name: overview-doc
path: build/doc/overview
retention-days: 90

View File

@ -0,0 +1,57 @@
name: 'Build CSharp Sample'
description: 'Build CSharp sample using OCCT installation'
inputs:
platform:
description: 'Build platform (windows)'
required: true
install-artifact-name:
description: 'OCCT installation artifact name'
required: true
runs:
using: "composite"
steps:
- name: Download OCCT installation
uses: actions/download-artifact@v4.1.7
with:
name: ${{ inputs.install-artifact-name }}
path: occt-install
- name: Build CSharp Sample
if: inputs.platform == 'windows'
shell: cmd
run: |
REM Setup environment
call "${{ github.workspace }}\occt-install\env.bat" vc14 win64 Release
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" x64
set "PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE;%PATH%"
cd ${{ github.workspace }}/samples/CSharp
REM First upgrade solutions to VS2022
echo "Upgrading solution files to VS2022..."
devenv.exe CSharp.sln /upgrade
devenv.exe CSharp_D3D.sln /upgrade
REM Update project platform toolset
powershell -Command "(Get-Content OCCTProxy\OCCTProxy.vcxproj) -replace '<PlatformToolset>v100</PlatformToolset>', '<PlatformToolset>v143</PlatformToolset>' | Set-Content OCCTProxy\OCCTProxy.vcxproj"
powershell -Command "(Get-Content OCCTProxy_D3D\OCCTProxy_D3D.vcxproj) -replace '<PlatformToolset>v100</PlatformToolset>', '<PlatformToolset>v143</PlatformToolset>' | Set-Content OCCTProxy_D3D\OCCTProxy_D3D.vcxproj"
REM Restore NuGet packages
echo "Upgrading solution files..."
msbuild.exe CSharp.sln -t:Restore -p:Configuration=Release -p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=restore_csharp.log;Verbosity=detailed
msbuild.exe CSharp_D3D.sln -t:Restore -p:Configuration=Release -p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=restore_d3d.log;Verbosity=detailed
REM Build solutions with real-time console output
echo "Building CSharp.sln..."
msbuild.exe CSharp.sln /p:Configuration=Release /p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=build_csharp.log;Verbosity=detailed /m
echo "Building CSharp_D3D.sln..."
msbuild.exe CSharp_D3D.sln /p:Configuration=Release /p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=build_d3d.log;Verbosity=detailed /m
- name: Upload CSharp Sample
uses: actions/upload-artifact@v4.4.3
with:
name: csharp-sample-${{ inputs.platform }}-x64
path: samples/CSharp
retention-days: 7

View File

@ -0,0 +1,54 @@
name: 'Build MFC Sample'
description: 'Build MFC sample using OCCT installation'
inputs:
platform:
description: 'Build platform (windows)'
required: true
install-artifact-name:
description: 'OCCT installation artifact name'
required: true
runs:
using: "composite"
steps:
- name: Download OCCT installation
uses: actions/download-artifact@v4.1.7
with:
name: ${{ inputs.install-artifact-name }}
path: occt-install
- name: Build MFC Sample
if: inputs.platform == 'windows'
shell: cmd
run: |
REM Setup environment
call "${{ github.workspace }}\occt-install\env.bat" vc14 win64 Release
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" x64
cd ${{ github.workspace }}/samples/mfc/standard
set "PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE;%PATH%"
REM First restore the solution
echo "Restoring solution..."
msbuild.exe ALL-vc14.sln -t:Restore -p:Configuration=Release -p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=restore.log;Verbosity=detailed
REM Build solution with detailed logging
echo "Building solution..."
msbuild.exe ALL-vc14.sln /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=build.log;Verbosity=detailed /m
REM Display logs if build fails
if errorlevel 1 (
echo "Build failed. Contents of restore.log:"
type restore.log
echo "Contents of build.log:"
type build.log
exit /b 1
)
- name: Upload MFC Sample
uses: actions/upload-artifact@v4.4.3
with:
name: mfc-sample-${{ inputs.platform }}-x64
path: samples/mfc/
retention-days: 7

View File

@ -0,0 +1,108 @@
name: 'Build Qt Sample'
description: 'Build Qt samples using OCCT installation'
inputs:
platform:
description: 'Build platform (windows/linux)'
required: true
install-artifact-name:
description: 'OCCT installation artifact name'
required: true
thirdparty_url:
description: 'URL to download 3rdparty dependencies'
required: false
default: 'https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip'
runs:
using: "composite"
steps:
- name: Download OCCT installation
uses: actions/download-artifact@v4.1.7
with:
name: ${{ inputs.install-artifact-name }}
path: occt-install
- name: Install Windows dependencies
if: inputs.platform == 'windows'
shell: pwsh
run: |
Invoke-WebRequest -Uri ${{ inputs.thirdparty_url }} -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
- name: Install Linux dependencies
if: inputs.platform == 'linux'
shell: bash
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev qtbase5-dev qt5-qmake qtbase5-dev-tools qtdeclarative5-dev qttools5-dev qttools5-dev-tools
- name: Setup MSBuild
if: inputs.platform == 'windows'
uses: microsoft/setup-msbuild@v2
- name: Build Qt Samples - Windows
if: inputs.platform == 'windows'
shell: cmd
run: |
REM Setup environment
cd ${{ github.workspace }}/occt-install/
call env.bat vc14 win64 Release
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" x64
REM Setup Qt environment
set "QTDIR=${{ github.workspace }}\3rdparty-vc14-64\qt5.11.2-vc14-64"
set "PATH=%QTDIR%\bin;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE;%PATH%"
cd ${{ github.workspace }}/samples/qt
for %%s in (IESample Tutorial FuncDemo) do (
cd %%s
echo "Generating project for %%s..."
qmake -tp vc -r -o %%s.sln %%s0.pro
echo "Restoring %%s..."
msbuild.exe %%s.sln -t:Restore -p:Configuration=Release -p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=%%s_restore.log;Verbosity=detailed
echo "Building %%s..."
msbuild.exe %%s.sln /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=%%s_build.log;Verbosity=detailed /m
REM Display logs if build fails
if errorlevel 1 (
echo "Build failed for %%s. Contents of restore log:"
type %%s_restore.log
echo "Contents of build log:"
type %%s_build.log
exit /b 1
)
cd ..
)
- name: Build Qt Samples - Linux
if: inputs.platform == 'linux'
shell: bash
run: |
cd ${{ github.workspace }}/occt-install/bin
source env.sh
cd ${{ github.workspace }}/samples/qt
for sample in IESample Tutorial FuncDemo; do
cd $sample
aQMakePath=`which qmake`
host=`uname -s`
export STATION=$host
export RES_DIR="${{ github.workspace }}/samples/qt/${sample}/result"
qmake $sample.pro
aNbJobs="$(getconf _NPROCESSORS_ONLN)"
make -j$aNbJobs release
cd ..
done
- name: Upload Qt Samples
uses: actions/upload-artifact@v4.4.3
with:
name: qt-samples-${{ inputs.platform }}-x64
path: |
samples/qt/
samples/qt/
retention-days: 7

View File

@ -11,14 +11,11 @@ inputs:
thirdparty_url:
description: 'URL to download 3rdparty dependencies'
required: false
default: 'https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip'
default: 'https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip'
runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Download OCCT installation
uses: actions/download-artifact@v4.1.7
with:
@ -33,17 +30,23 @@ runs:
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
- name: Install Linux dependencies
if: inputs.platform == 'linux'
shell: bash
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev qtbase5-dev qt5-qmake qtbase5-dev-tools qtdeclarative5-dev qttools5-dev qttools5-dev-tools
- name: Checkout TInspector
shell: bash
run: |
git clone https://github.com/Open-Cascade-SAS/Inspector.git inspector
cd inspector
git checkout 6da9ba776ef72a17dca3331974df4200024c7f34
- name: Configure TInspector - Windows
if: inputs.platform == 'windows'
shell: pwsh
run: |
cd tools
cd inspector
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 `
@ -51,40 +54,40 @@ runs:
-D BUILD_SHARED_LIBS=ON `
-D 3RDPARTY_DIR=${{ github.workspace }}//3rdparty-vc14-64 `
-D OpenCASCADE_DIR=${{ github.workspace }}/occt-install `
-D INSTALL_DIR=${{ github.workspace }}/tools/install `
-D INSTALL_DIR=${{ github.workspace }}/inspector/install `
..
- name: Configure TInspector - Linux
if: inputs.platform == 'linux'
shell: bash
run: |
cd tools
cd inspector
mkdir build
cd build
cmake -G "Unix Makefiles" \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_SHARED_LIBS=ON \
-D OpenCASCADE_DIR=${{ github.workspace }}/occt-install \
-D INSTALL_DIR=${{ github.workspace }}/tools/install \
-D INSTALL_DIR=${{ github.workspace }}/inspector/install \
..
- name: Build TInspector - Windows
if: inputs.platform == 'windows'
shell: pwsh
run: |
cd tools/build
cd inspector/build
cmake --build . --config Release --target install
- name: Build TInspector - Linux
if: inputs.platform == 'linux'
shell: bash
run: |
cd tools/build
cd inspector/build
make install -j$(nproc)
- name: Upload TInspector installation
uses: actions/upload-artifact@v4.4.3
with:
name: inspector-${{ inputs.platform }}-x64
path: tools/install
path: inspector/install
retention-days: 7

View File

@ -8,7 +8,7 @@ inputs:
file-pattern:
description: 'Pattern to match files for formatting check'
required: false
default: '^(src|tools)/.*\.(cpp|hxx|cxx|lxx|h|pxx|hpp)$'
default: '^(src)/.*\.(cpp|hxx|cxx|lxx|h|pxx|hpp)$'
clang-format-version:
description: 'Required clang-format version'
required: false
@ -39,7 +39,9 @@ runs:
shell: pwsh
run: |
$changedFiles = git diff --name-only origin/${{ inputs.base-ref }} HEAD |
Where-Object { $_ -match '${{ inputs.file-pattern }}' }
Where-Object { $_ -match '${{ inputs.file-pattern }}' } |
Where-Object { Test-Path $_ }
$changedFiles | Set-Content "changed_files.txt"
if ($changedFiles.Count -gt 0) {
echo "has_files=true" >> $env:GITHUB_OUTPUT
@ -49,7 +51,7 @@ runs:
if: steps.changed-files.outputs.has_files == 'true'
shell: pwsh
run: |
$files = Get-Content "changed_files.txt"
$files = Get-Content "changed_files.txt" | Where-Object { Test-Path $_ }
$files | ForEach-Object -ThrottleLimit 8 -Parallel {
clang-format -i -style=file $_
}

145
.github/actions/run-gtest/action.yml vendored Normal file
View File

@ -0,0 +1,145 @@
name: 'Run GTest Validation'
description: 'Execute GTest suite and validate results'
inputs:
platform:
description: 'Platform (windows, macos, linux)'
required: true
compiler:
description: 'Compiler (msvc, clang, gcc)'
required: true
install-artifact-name:
description: 'Name of the artifact containing the installed files'
required: true
artifact-suffix:
description: 'Suffix for the GTest results artifact name'
required: true
default: 'x64'
outputs:
has-failures:
description: 'Whether any tests failed'
value: ${{ steps.check-failures.outputs.has_failures }}
runs:
using: "composite"
steps:
- name: Download and extract install directory
uses: actions/download-artifact@v4.1.7
with:
name: ${{ inputs.install-artifact-name }}
path: install
- name: Download and extract 3rdparty dependencies for Windows
if: inputs.platform == 'windows'
shell: pwsh
run: |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
- name: Install macOS dependencies
if: inputs.platform == 'macos'
shell: bash
run: |
brew update
brew install tcl-tk tbb gl2ps xerces-c \
libxmu libxi libxft libxpm \
glew freeimage draco glfw
- name: Install Linux dependencies
if: inputs.platform == 'linux'
shell: bash
run: |
sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake clang make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev
- name: Setup Xvfb and Mesa for Linux
if: inputs.platform == 'linux'
uses: ./.github/actions/setup-xvfb-mesa
- name: Set execute permissions on Unix platforms
if: inputs.platform != 'windows'
shell: bash
run: |
chmod +x install/bin/OpenCascadeGTest
- name: Run OpenCascadeGTest on Windows
if: inputs.platform == 'windows'
id: run-gtest-windows
shell: cmd
run: |
cd install
call env.bat ${{ inputs.compiler == 'msvc' && 'vc14' || 'clang' }} win64 release
cd bin
set GTEST_OUTPUT=""
OpenCascadeGTest.exe --gtest_output=xml:gtest_results.xml > gtest_output.log 2>&1
type gtest_output.log
exit /b 0
- name: Run OpenCascadeGTest on Unix platforms
if: inputs.platform != 'windows'
id: run-gtest-unix
shell: bash
env:
DISPLAY: ${{ inputs.platform == 'linux' && ':99' || '' }}
LIBGL_ALWAYS_SOFTWARE: 1
run: |
cd install/bin
source env.sh
./OpenCascadeGTest --gtest_output=xml:gtest_results.xml > gtest_output.log 2>&1
cat gtest_output.log
- name: Upload GTest results
uses: actions/upload-artifact@v4.4.3
with:
name: gtest-results-${{ inputs.platform }}-${{ inputs.compiler }}-${{ inputs.artifact-suffix }}
path: |
install/bin/gtest_results.xml
install/bin/gtest_output.log
retention-days: 15
- name: Check for test failures on Windows
if: inputs.platform == 'windows'
id: check-failures-windows
shell: pwsh
run: |
cd install/bin
$log = Get-Content "gtest_output.log" -Raw
if ($log -match "\[\s+FAILED\s+\]") {
Write-Error "GTest failures detected in the output."
echo "has_failures=true" >> $env:GITHUB_OUTPUT
} else {
Write-Output "No GTest failures detected."
echo "has_failures=false" >> $env:GITHUB_OUTPUT
}
- name: Check for test failures on Unix
if: inputs.platform != 'windows'
id: check-failures-unix
shell: bash
run: |
cd install/bin
if grep -q "\[ FAILED \]" gtest_output.log; then
echo "::error::GTest failures detected in the output."
echo "has_failures=true" >> $GITHUB_OUTPUT
else
echo "No GTest failures detected."
echo "has_failures=false" >> $GITHUB_OUTPUT
fi
- name: Set combined output
id: check-failures
shell: bash
run: |
if [ "${{ inputs.platform }}" == "windows" ]; then
echo "has_failures=${{ steps.check-failures-windows.outputs.has_failures }}" >> $GITHUB_OUTPUT
else
echo "has_failures=${{ steps.check-failures-unix.outputs.has_failures }}" >> $GITHUB_OUTPUT
fi
- name: Fail job if tests failed
if: steps.check-failures.outputs.has_failures == 'true'
shell: bash
run: |
echo "::error::GTest failures detected"
exit 1

View File

@ -33,6 +33,17 @@ jobs:
with:
base-ref: ${{ github.event.pull_request.base.ref || 'master' }}
documentation:
name: Build Documentation
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.1
- name: Build documentation
uses: ./.github/actions/build-docs
prepare-and-build-windows-x64:
name: Prepare and Build on Windows with MSVC (x64)
runs-on: windows-2022
@ -44,7 +55,7 @@ jobs:
- name: Download and extract 3rdparty dependencies
run: |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
shell: pwsh
@ -74,6 +85,7 @@ jobs:
-D CMAKE_BUILD_TYPE=Release `
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
-D INSTALL_DIR=${{ github.workspace }}/install `
-D USE_D3D=ON `
-D USE_DRACO=ON `
-D USE_FFMPEG=ON `
-D USE_FREEIMAGE=ON `
@ -83,8 +95,9 @@ jobs:
-D USE_TBB=ON `
-D USE_RAPIDJSON=ON `
-D USE_OPENGL=ON `
-D CMAKE_CXX_FLAGS="/W4 /WX" `
-D CMAKE_C_FLAGS="/W4 /WX" ..
-D BUILD_GTEST=ON `
-D BUILD_CPP_STANDARD=C++14 `
-D INSTALL_GTEST=ON ..
shell: pwsh
- name: Build OCCT
@ -110,7 +123,7 @@ jobs:
- name: Download and extract 3rdparty dependencies
run: |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
shell: pwsh
@ -148,6 +161,7 @@ jobs:
-D CMAKE_BUILD_TYPE=Release `
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
-D INSTALL_DIR=${{ github.workspace }}/install `
-D USE_D3D=ON `
-D USE_DRACO=ON `
-D USE_FFMPEG=ON `
-D USE_FREEIMAGE=ON `
@ -157,6 +171,9 @@ jobs:
-D USE_TBB=ON `
-D USE_RAPIDJSON=ON `
-D USE_OPENGL=ON `
-D BUILD_GTEST=ON `
-D BUILD_CPP_STANDARD=C++14 `
-D INSTALL_GTEST=ON `
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wno-unknown-warning-option" `
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra -Wno-unknown-warning-option" ..
shell: pwsh
@ -211,6 +228,9 @@ jobs:
-D USE_FREETYPE=ON \
-D USE_OPENGL=ON \
-D USE_FREEIMAGE=ON \
-D BUILD_GTEST=ON \
-D BUILD_CPP_STANDARD=C++14 \
-D INSTALL_GTEST=ON \
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra" ..
@ -264,6 +284,9 @@ jobs:
-D USE_FREETYPE=ON \
-D USE_OPENGL=ON \
-D USE_FREEIMAGE=ON \
-D BUILD_GTEST=ON \
-D BUILD_CPP_STANDARD=C++14 \
-D INSTALL_GTEST=ON \
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra" ..
@ -320,6 +343,9 @@ jobs:
-D USE_TBB=OFF \
-D USE_RAPIDJSON=ON \
-D USE_OPENGL=ON \
-D BUILD_GTEST=ON \
-D BUILD_CPP_STANDARD=C++14 \
-D INSTALL_GTEST=ON \
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra" ..
@ -375,7 +401,10 @@ jobs:
-D USE_VTK=ON \
-D USE_TBB=OFF \
-D USE_RAPIDJSON=ON \
-D USE_OPENGL=ON ..
-D USE_OPENGL=ON \
-D BUILD_GTEST=ON \
-D BUILD_CPP_STANDARD=C++14 \
-D INSTALL_GTEST=ON ..
- name: Build OCCT
run: |
@ -419,6 +448,66 @@ jobs:
platform: linux
install-artifact-name: install-linux-clang-x64
build-csharp-windows:
name: Build CSharp Sample on Windows
needs: prepare-and-build-windows-x64
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Build CSharp Sample
uses: ./.github/actions/build-sample-csharp
with:
platform: windows
install-artifact-name: install-windows-x64
build-mfc-windows:
name: Build MFC Sample on Windows
needs: prepare-and-build-windows-x64
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Build MFC Sample
uses: ./.github/actions/build-sample-mfc
with:
platform: windows
install-artifact-name: install-windows-x64
build-qt-windows:
name: Build Qt Sample on Windows
needs: prepare-and-build-windows-x64
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Build Qt Sample
uses: ./.github/actions/build-sample-qt
with:
platform: windows
install-artifact-name: install-windows-x64
build-qt-linux:
name: Build Qt Sample on Linux
needs: prepare-and-build-linux-clang-x64
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Build Qt Sample
uses: ./.github/actions/build-sample-qt
with:
platform: linux
install-artifact-name: install-linux-clang-x64
test-windows-x64:
name: Test on Windows (x64)
runs-on: windows-2022
@ -430,7 +519,7 @@ jobs:
- name: Download and extract 3rdparty dependencies
run: |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
shell: pwsh
@ -438,9 +527,9 @@ jobs:
- name: Download and extract test data
run: |
cd data
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip
Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath .
Remove-Item opencascade-dataset-7.8.0.zip
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.zip -OutFile opencascade-dataset-7.9.0.zip
Expand-Archive -Path opencascade-dataset-7.9.0.zip -DestinationPath .
Remove-Item opencascade-dataset-7.9.0.zip
shell: pwsh
- name: Download and extract install directory
@ -461,12 +550,6 @@ jobs:
.\systemwidedeploy.cmd 5
shell: cmd
- name: Install Visual C++ 2010 Redistributable
run: |
choco install -y vcredist2010
refreshenv
shell: cmd
- name: Install CJK Fonts
run: |
Invoke-WebRequest -Uri https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip -OutFile Noto-hinted.zip
@ -543,7 +626,7 @@ jobs:
- name: Download and extract 3rdparty dependencies
if: steps.check_failures.outputs.failed_count > 0
run: |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
shell: pwsh
@ -552,9 +635,9 @@ jobs:
if: steps.check_failures.outputs.failed_count > 0
run: |
cd data
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip
Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath .
Remove-Item opencascade-dataset-7.8.0.zip
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.zip -OutFile opencascade-dataset-7.9.0.zip
Expand-Archive -Path opencascade-dataset-7.9.0.zip -DestinationPath .
Remove-Item opencascade-dataset-7.9.0.zip
shell: pwsh
- name: Download and extract install directory
@ -578,13 +661,6 @@ jobs:
.\systemwidedeploy.cmd 5
shell: cmd
- name: Install Visual C++ 2010 Redistributable
if: steps.check_failures.outputs.failed_count > 0
run: |
choco install -y vcredist2010
refreshenv
shell: cmd
- name: Install CJK Fonts
if: steps.check_failures.outputs.failed_count > 0
run: |
@ -605,6 +681,22 @@ jobs:
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Repeating failed tests
if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20
run: |
cd install
call env.bat vc14 win64 release
# Repeat failed tests for 10 times
for /l %%i in (1,1,10) do (
DRAWEXE.exe -v -c testgrid -regress results/windows-x64-retest -outdir results/windows-x64-retest -parallel 0 -overwrite
DRAWEXE.exe -v -c "testsummarize results/windows-x64-retest"
)
shell: cmd
env:
LIBGL_ALWAYS_SOFTWARE: 1
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Upload regression test results
if: steps.check_failures.outputs.failed_count > 0
uses: actions/upload-artifact@v4.4.3
@ -671,7 +763,7 @@ jobs:
- name: Download and extract 3rdparty dependencies
run: |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
shell: pwsh
@ -679,9 +771,9 @@ jobs:
- name: Download and extract test data
run: |
cd data
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip
Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath .
Remove-Item opencascade-dataset-7.8.0.zip
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.zip -OutFile opencascade-dataset-7.9.0.zip
Expand-Archive -Path opencascade-dataset-7.9.0.zip -DestinationPath .
Remove-Item opencascade-dataset-7.9.0.zip
shell: pwsh
- name: Download and extract install directory
@ -702,12 +794,6 @@ jobs:
.\systemwidedeploy.cmd 5
shell: cmd
- name: Install Visual C++ 2010 Redistributable
run: |
choco install -y vcredist2010
refreshenv
shell: cmd
- name: Install CJK Fonts
run: |
Invoke-WebRequest -Uri https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip -OutFile Noto-hinted.zip
@ -784,7 +870,7 @@ jobs:
- name: Download and extract 3rdparty dependencies
if: steps.check_failures.outputs.failed_count > 0
run: |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
shell: pwsh
@ -793,9 +879,9 @@ jobs:
if: steps.check_failures.outputs.failed_count > 0
run: |
cd data
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip
Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath .
Remove-Item opencascade-dataset-7.8.0.zip
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.zip -OutFile opencascade-dataset-7.9.0.zip
Expand-Archive -Path opencascade-dataset-7.9.0.zip -DestinationPath .
Remove-Item opencascade-dataset-7.9.0.zip
shell: pwsh
- name: Download and extract install directory
@ -819,13 +905,6 @@ jobs:
.\systemwidedeploy.cmd 5
shell: cmd
- name: Install Visual C++ 2010 Redistributable
if: steps.check_failures.outputs.failed_count > 0
run: |
choco install -y vcredist2010
refreshenv
shell: cmd
- name: Install CJK Fonts
if: steps.check_failures.outputs.failed_count > 0
run: |
@ -846,6 +925,22 @@ jobs:
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Repeating failed tests
if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20
run: |
cd install
call env.bat clang win64 release
# Repeat failed tests for 10 times
for /l %%i in (1,1,10) do (
DRAWEXE.exe -v -c testgrid -regress results/windows-clang-x64-retest -outdir results/windows-clang-x64-retest -parallel 0 -overwrite
DRAWEXE.exe -v -c "testsummarize results/windows-clang-x64-retest"
)
shell: cmd
env:
LIBGL_ALWAYS_SOFTWARE: 1
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Upload regression test results
if: steps.check_failures.outputs.failed_count > 0
uses: actions/upload-artifact@v4.4.3
@ -919,8 +1014,8 @@ jobs:
- name: Download test data
run: |
cd data
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz
tar -xf opencascade-dataset-7.8.0.tar.xz
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.tar.xz
tar -xf opencascade-dataset-7.9.0.tar.xz
- name: Download and extract install directory
uses: actions/download-artifact@v4.1.7
@ -1013,8 +1108,8 @@ jobs:
if: steps.check_failures.outputs.failed_count > 0
run: |
cd data
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz
tar -xf opencascade-dataset-7.8.0.tar.xz
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.tar.xz
tar -xf opencascade-dataset-7.9.0.tar.xz
- name: Download and extract install directory
if: steps.check_failures.outputs.failed_count > 0
@ -1044,6 +1139,23 @@ jobs:
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Repeating failed tests
if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20
run: |
cd install
cd bin
source env.sh
# Repeat failed tests for 10 times
for i in {1..10}; do
./DRAWEXE -v -c testgrid -regress results/macos-x64-retest -outdir results/macos-x64-retest -parallel 0 -overwrite
./DRAWEXE -v -c "testsummarize results/macos-x64-retest"
done
shell: bash
env:
LIBGL_ALWAYS_SOFTWARE: 1
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Copy retest results back to original location
if: steps.check_failures.outputs.failed_count > 0
run: |
@ -1110,8 +1222,8 @@ jobs:
- name: Download test data
run: |
cd data
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz
tar -xf opencascade-dataset-7.8.0.tar.xz
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.tar.xz
tar -xf opencascade-dataset-7.9.0.tar.xz
- name: Download and extract install directory
uses: actions/download-artifact@v4.1.7
@ -1204,8 +1316,8 @@ jobs:
if: steps.check_failures.outputs.failed_count > 0
run: |
cd data
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz
tar -xf opencascade-dataset-7.8.0.tar.xz
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.tar.xz
tar -xf opencascade-dataset-7.9.0.tar.xz
- name: Download and extract install directory
if: steps.check_failures.outputs.failed_count > 0
@ -1235,6 +1347,23 @@ jobs:
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Repeating failed tests
if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20
run: |
cd install
cd bin
source env.sh
# Repeat failed tests for 10 times
for i in {1..10}; do
./DRAWEXE -v -c testgrid -regress results/macos-gcc-x64-retest -outdir results/macos-gcc-x64-retest -parallel 0 -overwrite
./DRAWEXE -v -c "testsummarize results/macos-gcc-x64-retest"
done
shell: bash
env:
LIBGL_ALWAYS_SOFTWARE: 1
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Upload regression test results
if: steps.check_failures.outputs.failed_count > 0
uses: actions/upload-artifact@v4.4.3
@ -1300,8 +1429,8 @@ jobs:
- name: Download test data
run: |
cd data
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz
tar -xf opencascade-dataset-7.8.0.tar.xz
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.tar.xz
tar -xf opencascade-dataset-7.9.0.tar.xz
- name: Download and extract install directory
uses: actions/download-artifact@v4.1.7
@ -1393,8 +1522,8 @@ jobs:
if: steps.check_failures.outputs.failed_count > 0
run: |
cd data
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz
tar -xf opencascade-dataset-7.8.0.tar.xz
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.tar.xz
tar -xf opencascade-dataset-7.9.0.tar.xz
- name: Download and extract install directory
if: steps.check_failures.outputs.failed_count > 0
@ -1421,6 +1550,24 @@ jobs:
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Repeating failed tests
if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20
run: |
cd install
cd bin
source env.sh
# Repeat failed tests for 10 times
for i in {1..10}; do
./DRAWEXE -v -c testgrid -regress results/linux-clang-x64-retest -outdir results/linux-clang-x64-retest -parallel 0 -overwrite
./DRAWEXE -v -c "testsummarize results/linux-clang-x64-retest"
done
shell: bash
env:
DISPLAY: :99
LIBGL_ALWAYS_SOFTWARE: 1
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Upload regression test results
if: steps.check_failures.outputs.failed_count > 0
uses: actions/upload-artifact@v4.4.3
@ -1486,8 +1633,8 @@ jobs:
- name: Download test data
run: |
cd data
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz
tar -xf opencascade-dataset-7.8.0.tar.xz
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.tar.xz
tar -xf opencascade-dataset-7.9.0.tar.xz
- name: Download and extract install directory
uses: actions/download-artifact@v4.1.7
@ -1579,8 +1726,8 @@ jobs:
if: steps.check_failures.outputs.failed_count > 0
run: |
cd data
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz
tar -xf opencascade-dataset-7.8.0.tar.xz
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/opencascade-dataset-7.9.0.tar.xz
tar -xf opencascade-dataset-7.9.0.tar.xz
- name: Download and extract install directory
if: steps.check_failures.outputs.failed_count > 0
@ -1607,6 +1754,24 @@ jobs:
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Repeating failed tests
if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20
run: |
cd install
cd bin
source env.sh
# Repeat failed tests for 10 times
for i in {1..10}; do
./DRAWEXE -v -c testgrid -regress results/linux-gcc-x64-retest -outdir results/linux-gcc-x64-retest -parallel 0 -overwrite
./DRAWEXE -v -c "testsummarize results/linux-gcc-x64-retest"
done
shell: bash
env:
DISPLAY: :99
LIBGL_ALWAYS_SOFTWARE: 1
CSF_TestScriptsPath: ${{ github.workspace }}/tests
CSF_TestDataPath: ${{ github.workspace }}/data
- name: Upload regression test results
if: steps.check_failures.outputs.failed_count > 0
uses: actions/upload-artifact@v4.4.3
@ -1653,6 +1818,108 @@ jobs:
echo "Found $FAILED_COUNT FAILED tests"
fi
run-gtest-windows-x64:
name: Run GTest on Windows with MSVC (x64)
needs: prepare-and-build-windows-x64
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Run GTests
uses: ./.github/actions/run-gtest
with:
platform: windows
compiler: msvc
install-artifact-name: install-windows-x64
artifact-suffix: x64
run-gtest-windows-clang-x64:
name: Run GTest on Windows with Clang (x64)
needs: prepare-and-build-windows-clang-x64
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Run GTests
uses: ./.github/actions/run-gtest
with:
platform: windows
compiler: clang
install-artifact-name: install-windows-clang-x64
artifact-suffix: x64
run-gtest-macos-x64:
name: Run GTest on macOS with Clang (x64)
needs: prepare-and-build-macos-x64
runs-on: macos-15
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Run GTests
uses: ./.github/actions/run-gtest
with:
platform: macos
compiler: clang
install-artifact-name: install-macos-x64
artifact-suffix: x64
run-gtest-macos-gcc-x64:
name: Run GTest on macOS with GCC (x64)
needs: prepare-and-build-macos-gcc-x64
runs-on: macos-15
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Run GTests
uses: ./.github/actions/run-gtest
with:
platform: macos
compiler: gcc
install-artifact-name: install-macos-gcc-x64
artifact-suffix: x64
run-gtest-linux-clang-x64:
name: Run GTest on Linux with Clang (x64)
needs: prepare-and-build-linux-clang-x64
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Run GTests
uses: ./.github/actions/run-gtest
with:
platform: linux
compiler: clang
install-artifact-name: install-linux-clang-x64
artifact-suffix: x64
run-gtest-linux-gcc-x64:
name: Run GTest on Linux with GCC (x64)
needs: prepare-and-build-linux-gcc-x64
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Run GTests
uses: ./.github/actions/run-gtest
with:
platform: linux
compiler: gcc
install-artifact-name: install-linux-gcc-x64
artifact-suffix: x64
test-summary:
name: 'Summarize Test Results'
runs-on: ubuntu-24.04
@ -1688,7 +1955,7 @@ jobs:
run: |
response=$(curl -s \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/actions/runs?branch=${{ github.event.pull_request.base.ref }}")
"https://api.github.com/repos/${{ github.repository }}/actions/runs?branch=${{ github.event.pull_request.base.ref }}&status=success")
latest_run_id=$(echo "$response" | jq -r '.workflow_runs[] | select(.name=="Build and Test OCCT on Multiple Platforms") | .id' | head -n 1)
echo "latest_run_id=$latest_run_id" >> $GITHUB_ENV

View File

@ -1,59 +0,0 @@
# This workflow builds the OCCT reference manual and overview documentations.
# It is triggered on pushes to the 'master' branch.
# The workflow includes steps to checkout the repository, install dependencies, build the documentation, and upload the generated documentation and logs as artifacts.
name: Build Documentation
on:
push:
branches:
- 'master'
jobs:
build:
name: Build Refman Documentation
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.1
- name: Install dependencies
run: |
choco install -y graphviz
choco install -y doxygen.install
- name: Build refman documentation
run: |
set PATH=%PATH%;C:\Program Files\doxygen\bin;C:\Program Files\Graphviz\bin;C:\Program Files\doxygen
cd adm
bash gendoc -refman
shell: cmd
- name: Upload refman documentation
uses: actions/upload-artifact@v4.4.3
with:
name: refman-doc
path: doc/refman
retention-days: 90
- name: Upload generation log
uses: actions/upload-artifact@v4.4.3
with:
name: doxygen.log
path: doc/html_doxygen_err.log
retention-days: 90
- name: Build documentation Overview
run: |
set PATH=%PATH%;C:\Program Files\doxygen\bin;C:\Program Files\Graphviz\bin;C:\Program Files\doxygen
cd adm
bash gendoc -overview
shell: cmd
- name: Upload overview documentation
uses: actions/upload-artifact@v4.4.3
with:
name: overview-doc
path: doc/overview
retention-days: 90

View File

@ -27,6 +27,7 @@ jobs:
cxx: "x86_64-w64-mingw32-g++",
package: "mingw-w64-x86_64-toolchain",
thirdparty_dir: "/mingw64",
compiler_flags: "",
dependencies: "mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-rapidjson mingw-w64-x86_64-freetype mingw-w64-x86_64-draco mingw-w64-x86_64-freeimage mingw-w64-x86_64-tbb mingw-w64-x86_64-tk mingw-w64-x86_64-tcl mingw-w64-x86_64-openvr mingw-w64-x86_64-jemalloc mingw-w64-x86_64-mesa mingw-w64-x86_64-angleproject mingw-w64-x86_64-llvm-openmp mingw-w64-x86_64-winpthreads-git mingw-w64-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
}
- {
@ -35,6 +36,7 @@ jobs:
cxx: "clang++",
package: "mingw-w64-clang-x86_64-toolchain",
thirdparty_dir: "/clang64",
compiler_flags: "-D CMAKE_CXX_FLAGS=\"-Wall -Wextra\" -D CMAKE_C_FLAGS=\"-Wall -Wextra\"",
dependencies: "mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-ninja mingw-w64-clang-x86_64-rapidjson mingw-w64-clang-x86_64-freetype mingw-w64-clang-x86_64-draco mingw-w64-clang-x86_64-freeimage mingw-w64-clang-x86_64-tbb mingw-w64-clang-x86_64-tk mingw-w64-clang-x86_64-tcl mingw-w64-clang-x86_64-openvr mingw-w64-clang-x86_64-jemalloc mingw-w64-clang-x86_64-mesa mingw-w64-clang-x86_64-angleproject mingw-w64-clang-x86_64-llvm-openmp mingw-w64-clang-x86_64-winpthreads-git mingw-w64-clang-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
}
- {
@ -43,8 +45,10 @@ jobs:
cxx: "x86_64-w64-mingw32-g++",
package: "mingw-w64-ucrt-x86_64-toolchain",
thirdparty_dir: "/ucrt64",
compiler_flags: "",
dependencies: "mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gcc-libs mingw-w64-ucrt-x86_64-omp mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-rapidjson mingw-w64-ucrt-x86_64-freetype mingw-w64-ucrt-x86_64-draco mingw-w64-ucrt-x86_64-freeimage mingw-w64-ucrt-x86_64-tbb mingw-w64-ucrt-x86_64-tk mingw-w64-ucrt-x86_64-tcl mingw-w64-ucrt-x86_64-openvr mingw-w64-ucrt-x86_64-jemalloc mingw-w64-ucrt-x86_64-mesa mingw-w64-ucrt-x86_64-angleproject mingw-w64-ucrt-x86_64-llvm-openmp mingw-w64-ucrt-x86_64-winpthreads-git mingw-w64-ucrt-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
}
build_type: [Debug, Release]
steps:
- name: Checkout repository
@ -77,14 +81,14 @@ jobs:
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
-D CMAKE_CXX_FLAGS="-Wall -Wextra" \
-D CMAKE_C_FLAGS="-Wall -Wextra" ..
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
${{ matrix.config.compiler_flags }} ..
- name: Build basic
shell: msys2 {0}
run: |
cd build
cmake --build . -- -j 4
cmake --build . --config ${{ matrix.build_type }} -- -j 4
- name: Clear up after build
shell: pwsh
@ -105,9 +109,9 @@ jobs:
-D BUILD_OPT_PROFILE=Production \
-D BUILD_LIBRARY_TYPE=Shared \
-D USE_TK=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-D USE_MMGR_TYPE=JEMALLOC \
-D INSTALL_DIR="${{ github.workspace }}/install" \
-D INSTALL_DIR="${{ github.workspace }}/install-${{ matrix.build_type }}" \
-D USE_FREETYPE=ON \
-D USE_DRACO=ON \
-D USE_FFMPEG=OFF \
@ -118,20 +122,19 @@ jobs:
-D USE_TBB=OFF \
-D USE_RAPIDJSON=ON \
-D USE_OPENGL=ON \
-D CMAKE_CXX_FLAGS="-Wall -Wextra" \
-D CMAKE_C_FLAGS="-Wall -Wextra" ..
${{ matrix.config.compiler_flags }} ..
- name: Build full shared
shell: msys2 {0}
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
- name: Clear up after build
shell: pwsh
run: |
Remove-Item -Recurse -Force build
Remove-Item -Recurse -Force ${{ github.workspace }}/install
Remove-Item -Recurse -Force ${{ github.workspace }}/install-${{ matrix.build_type }}
- name: Configure full static
shell: msys2 {0}
@ -144,12 +147,12 @@ jobs:
-D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
-D BUILD_USE_PCH=OFF \
-D BUILD_INCLUDE_SYMLINK=ON \
-D BUILD_OPT_PROFILE=Production \
-D BUILD_OPT_PROFILE=Default \
-D BUILD_LIBRARY_TYPE=Static \
-D USE_TK=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-D USE_MMGR_TYPE=JEMALLOC \
-D INSTALL_DIR="${{ github.workspace }}/install" \
-D INSTALL_DIR="${{ github.workspace }}/install-${{ matrix.build_type }}" \
-D USE_FREETYPE=ON \
-D USE_DRACO=ON \
-D USE_FFMPEG=OFF \
@ -160,20 +163,19 @@ jobs:
-D USE_TBB=OFF \
-D USE_RAPIDJSON=ON \
-D USE_OPENGL=ON \
-D CMAKE_CXX_FLAGS="-Wall -Wextra" \
-D CMAKE_C_FLAGS="-Wall -Wextra" ..
${{ matrix.config.compiler_flags }} ..
- name: Build full static
shell: msys2 {0}
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
- name: Clear up after build
shell: pwsh
run: |
Remove-Item -Recurse -Force build
Remove-Item -Recurse -Force ${{ github.workspace }}/install
Remove-Item -Recurse -Force ${{ github.workspace }}/install-${{ matrix.build_type }}
- name: Configure full with DEBUG define
shell: msys2 {0}
@ -190,8 +192,8 @@ jobs:
-D BUILD_OPT_PROFILE=Production \
-D BUILD_LIBRARY_TYPE=Shared \
-D USE_TK=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D INSTALL_DIR="${{ github.workspace }}/install" \
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-D INSTALL_DIR="${{ github.workspace }}/install-${{ matrix.build_type }}" \
-D USE_FREETYPE=ON \
-D USE_DRACO=ON \
-D USE_FFMPEG=OFF \
@ -201,16 +203,17 @@ jobs:
-D USE_VTK=OFF \
-D USE_TBB=OFF \
-D USE_RAPIDJSON=ON \
-D USE_OPENGL=ON ..
-D USE_OPENGL=ON \
${{ matrix.config.compiler_flags }} ..
- name: Build full with DEBUG define
shell: msys2 {0}
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
- name: Clear up after build
shell: pwsh
run: |
Remove-Item -Recurse -Force build
Remove-Item -Recurse -Force ${{ github.workspace }}/install
Remove-Item -Recurse -Force ${{ github.workspace }}/install-${{ matrix.build_type }}

View File

@ -51,7 +51,7 @@ jobs:
- name: Download and extract 3rdparty dependencies
run: |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
shell: pwsh
@ -141,7 +141,7 @@ jobs:
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
-D BUILD_USE_PCH=OFF `
-D BUILD_INCLUDE_SYMLINK=ON `
-D BUILD_OPT_PROFILE=Production `
-D BUILD_OPT_PROFILE=Default `
-D BUILD_LIBRARY_TYPE=Static `
-D CMAKE_BUILD_TYPE=Debug `
-D INSTALL_DIR=${{ github.workspace }}/install `

View File

@ -24,13 +24,16 @@ jobs:
- {
name: "GCC",
cc: "gcc",
cxx: "g++"
cxx: "g++",
compiler_flags: ""
}
- {
name: "Clang",
cc: "clang",
cxx: "clang++"
cxx: "clang++",
compiler_flags: "-D CMAKE_CXX_FLAGS=\"-Werror -Wall -Wextra\" -D CMAKE_C_FLAGS=\"-Werror -Wall -Wextra\""
}
build_type: [Debug, Release]
steps:
- name: Checkout repository
@ -51,13 +54,13 @@ jobs:
cmake -G "Ninja" \
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra" ..
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
${{ matrix.config.compiler_flags }} ..
- name: Build basic
run: |
cd build
cmake --build . -- -j 4
cmake --build . --config ${{ matrix.build_type }} -- -j 4
- name: Clear up after build
run: |
@ -75,9 +78,9 @@ jobs:
-D BUILD_OPT_PROFILE=Production \
-D BUILD_LIBRARY_TYPE=Shared \
-D USE_TK=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-D USE_MMGR_TYPE=JEMALLOC \
-D INSTALL_DIR=${{ github.workspace }}/install \
-D INSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
-D USE_FREETYPE=ON \
-D USE_DRACO=ON \
@ -89,18 +92,17 @@ jobs:
-D USE_TBB=ON \
-D USE_RAPIDJSON=ON \
-D USE_OPENGL=ON \
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra" ..
${{ matrix.config.compiler_flags }} ..
- name: Build full shared
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
- name: Clear up after build
run: |
rm -rf build
rm -rf ${{ github.workspace }}/install
rm -rf ${{ github.workspace }}/install-${{ matrix.build_type }}
- name: Configure full static
run: |
@ -111,12 +113,12 @@ jobs:
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-D BUILD_USE_PCH=OFF \
-D BUILD_INCLUDE_SYMLINK=ON \
-D BUILD_OPT_PROFILE=Production \
-D BUILD_OPT_PROFILE=Default \
-D BUILD_LIBRARY_TYPE=Static \
-D USE_TK=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-D USE_MMGR_TYPE=JEMALLOC \
-D INSTALL_DIR=${{ github.workspace }}/install \
-D INSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
-D USE_FREETYPE=ON \
-D USE_DRACO=ON \
@ -128,18 +130,17 @@ jobs:
-D USE_TBB=ON \
-D USE_RAPIDJSON=ON \
-D USE_OPENGL=ON \
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra" ..
${{ matrix.config.compiler_flags }} ..
- name: Build full static
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
- name: Clear up after build
run: |
rm -rf build
rm -rf ${{ github.workspace }}/install
rm -rf ${{ github.workspace }}/install-${{ matrix.build_type }}
- name: Configure full with DEBUG define
run: |
@ -154,8 +155,8 @@ jobs:
-D BUILD_OPT_PROFILE=Production \
-D BUILD_LIBRARY_TYPE=Shared \
-D USE_TK=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D INSTALL_DIR=${{ github.workspace }}/install \
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-D INSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
-D USE_FREETYPE=ON \
-D USE_DRACO=ON \
@ -171,9 +172,9 @@ jobs:
- name: Build full with DEBUG define
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
- name: Clear up after build
run: |
rm -rf build
rm -rf ${{ github.workspace }}/install
rm -rf ${{ github.workspace }}/install-${{ matrix.build_type }}

View File

@ -0,0 +1,102 @@
# This workflow validates the WebAssembly build on Ubuntu.
# It is triggered on pushes to the master branch.
# The workflow includes steps to install dependencies, configure, build, and clean up the project.
name: WebAssembly build (Ubuntu)
on:
push:
branches:
- 'master'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
USERNAME: Open-Cascade-SAS
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
FEED_URL: https://nuget.pkg.github.com/Open-Cascade-SAS/index.json
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/Open-Cascade-SAS/index.json,readwrite"
EMSDK_VERSION: 3.1.74
jobs:
wasm-build:
name: WebAssembly Build
runs-on: ubuntu-24.04
strategy:
matrix:
build_type: [Debug, Release]
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential ninja-build curl zip unzip tar nasm autoconf mono-complete
sudo apt-get install -y libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev
- name: Setup vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
- name: Add NuGet sources
run: |
mono $(${VCPKG_EXE} fetch nuget | tail -n 1) \
sources add \
-Source "${FEED_URL}" \
-StorePasswordInClearText \
-Name GitHubPackages \
-UserName "${USERNAME}" \
-Password "${{ secrets.GITHUB_TOKEN }}"
mono $(${VCPKG_EXE} fetch nuget | tail -n 1) \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-Source "${FEED_URL}"
- name: Setup Emscripten
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install ${EMSDK_VERSION}
./emsdk activate ${EMSDK_VERSION}
echo "EMSDK=${{ github.workspace }}/emsdk" >> $GITHUB_ENV
echo "${{ github.workspace }}/emsdk" >> $GITHUB_PATH
echo "${{ github.workspace }}/emsdk/upstream/emscripten" >> $GITHUB_PATH
- name: Configure OCCT with vcpkg
run: |
source "${{ github.workspace }}/emsdk/emsdk_env.sh"
mkdir -p "build-${{ matrix.build_type }}"
cd "build-${{ matrix.build_type }}"
export VCPKG_ROOT="${{ github.workspace }}/vcpkg"
emcmake cmake -G "Ninja" \
-DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_TARGET_TRIPLET=wasm32-emscripten \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE="$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake" \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_USE_VCPKG=ON \
-DUSE_MMGR_TYPE=NATIVE \
-DBUILD_LIBRARY_TYPE=Static \
-DBUILD_MODULE_Draw=OFF \
-DUSE_FREETYPE=OFF \
-DUSE_TK=OFF \
-DUSE_TCL=OFF \
-DUSE_DRACO=ON \
-DUSE_FFMPEG=OFF \
-DUSE_FREEIMAGE=OFF \
-DUSE_OPENVR=OFF \
-DUSE_VTK=OFF \
-DUSE_TBB=OFF \
-DUSE_RAPIDJSON=ON \
-DINSTALL_DIR="${{ github.workspace }}/install-wasm-${{ matrix.build_type }}" \
-DCMAKE_CXX_FLAGS="-s WASM=1 -s EXPORTED_RUNTIME_METHODS=['ccall','cwrap'] -s ALLOW_MEMORY_GROWTH=1" \
-DCMAKE_EXECUTABLE_SUFFIX=".js" ..
- name: Build
run: |
cd build-${{ matrix.build_type }}
cmake --build . --config ${{ matrix.build_type }} --target install -- -j4

View File

@ -25,7 +25,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-2022, windows-2019, macos-15, macos-14, macos-13]
os: [ubuntu-24.04, ubuntu-22.04, windows-2022, windows-2019, macos-15, macos-14, macos-13]
build_type: [Debug, Release]
steps:
@ -114,6 +114,7 @@ jobs:
-DUSE_TK=OFF \
-DBUILD_USE_PCH=ON \
-DBUILD_INCLUDE_SYMLINK=ON \
-DBUILD_LIBRARY_TYPE="Static" \
-DINSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
-DUSE_DRACO=ON \
-DUSE_FFMPEG=ON \

View File

@ -32,6 +32,30 @@ if (BUILD_USE_VCPKG)
endif()
set (VCPKG_MANIFEST_DIR "${CMAKE_SOURCE_DIR}/adm/vcpkg")
# Disable default features for vcpkg manifest
set (VCPKG_MANIFEST_NO_DEFAULT_FEATURES 1)
# detection for Emscripten toolchain
if(CMAKE_TOOLCHAIN_FILE MATCHES ".*mscripten\.cmake$" OR "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" MATCHES ".*mscripten\.cmake$")
set(EMSCRIPTEN 1)
endif()
# detection for Android toolchain
if(CMAKE_TOOLCHAIN_FILE MATCHES ".*ndroid\.toolchain\.cmake$" OR "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" MATCHES ".*ndroid\.toolchain\.cmake$")
set(ANDROID 1)
endif()
# detection for android common variables
if (NOT "${CMAKE_ANDROID_NDK}" STREQUAL "" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Android" OR NOT "${ANDROID_NDK}" STREQUAL "")
set (ANDROID 1)
endif()
else()
# Setting up the system and compiler specific variables.
# Can't be done on early stages with VCPKG enabled.
# VCPKG installing dependencies as soon as call PROJECT,
# but for then moment need to define required list of dependencies.
PROJECT (OCCT)
endif()
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
@ -58,15 +82,17 @@ elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++23")
else ()
message (FATAL_ERROR, "misprint in c++ standard name")
endif()
if (DEFINED BUILD_GTEST AND BUILD_GTEST AND CMAKE_CXX_STANDARD LESS 14)
set (CMAKE_CXX_STANDARD 14)
message (STATUS "Info: C++14 standard is required for GTest. Set to C++14.")
endif()
set (CMAKE_CXX_STANDARD_REQUIRED ON)
# macro: include patched file if it exists
# include cmake file
macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_INCLUDED_FILE}.cmake")
include (${BUILD_PATCH}/${BEING_INCLUDED_FILE}.cmake)
else()
include (${CMAKE_SOURCE_DIR}/${BEING_INCLUDED_FILE}.cmake)
endif()
endmacro()
# set using memory manager option for TKernel
@ -99,6 +125,11 @@ else()
"Please use our contact form at https://occt3d.com/")
unset (BUILD_SHARED_LIBS)
unset (BUILD_SHARED_LIBRARY_NAME_POSTFIX)
if (BUILD_OPT_PROFILE STREQUAL "Production")
set (BUILD_OPT_PROFILE "Default" CACHE STRING "Select profile for compiler and linker." FORCE)
message(WARNING "Static libraries are not optimized for production builds. "
"Please use shared libraries for production builds.")
endif()
endif()
if (WIN32)
@ -195,6 +226,20 @@ if (NOT DEFINED BUILD_INCLUDE_SYMLINK)
set (BUILD_INCLUDE_SYMLINK OFF CACHE BOOL "${BUILD_INCLUDE_SYMLINK_DESCR}")
endif()
# Overview
if (NOT DEFINED BUILD_DOC_Overview)
set (BUILD_DOC_Overview OFF CACHE BOOL "${BUILD_DOC_Overview_DESCR}")
endif()
# Reference Manual
if (NOT DEFINED BUILD_DOC_RefMan)
set (BUILD_DOC_RefMan OFF CACHE BOOL "${BUILD_DOC_RefMan_DESCR}")
endif()
if (NOT DEFINED INSTALL_DOC_RefMan)
set (INSTALL_DOC_RefMan OFF CACHE BOOL "${INSTALL_DOC_RefMan_DESCR}")
endif()
if (CMAKE_VERSION VERSION_LESS "3.14")
OCCT_CHECK_AND_UNSET (BUILD_INCLUDE_SYMLINK)
endif()
@ -288,9 +333,6 @@ elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
set (BIN_LETTER "i")
endif()
# a directory recognized as a 'patch' for OCCT
set (BUILD_PATCH "" CACHE PATH "${BUILD_PATCH_DESCR}")
# the list of being built toolkits
set (BUILD_ADDITIONAL_TOOLKITS "" CACHE STRING "${BUILD_ADDITIONAL_TOOLKITS_DESCR}")
separate_arguments (BUILD_ADDITIONAL_TOOLKITS)
@ -300,8 +342,6 @@ if (MSVC)
endif()
set (BUILD_SAMPLES_QT OFF CACHE BOOL "${BUILD_SAMPLES_QT_DESCR}")
set (BUILD_Inspector OFF CACHE BOOL "${BUILD_Inspector_DESCR}")
# uwp sample
if (MSVC)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
@ -356,10 +396,11 @@ else()
set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
endif()
# include the patched or original list of modules
# include original list of modules
# list <MODULENAME>_TOOLKITS is created foreach module and contains its toolkits
# list <OCCT_MODULES> will contain all modules
OCCT_MODULES_AND_TOOLKITS (MODULES "TOOLKITS" OCCT_MODULES)
OCCT_INCLUDE_CMAKE_FILE ("src/MODULES")
set (OCCT_MODULES ${OCCT_LIST_OF_MODULES})
foreach (OCCT_MODULE ${OCCT_MODULES})
BUILD_MODULE (${OCCT_MODULE})
@ -379,7 +420,7 @@ list (APPEND BUILD_TOOLKITS ${BUILD_ADDITIONAL_TOOLKITS})
foreach (OCCT_MODULE ${OCCT_MODULES})
if (BUILD_MODULE_${OCCT_MODULE})
list (APPEND BUILD_TOOLKITS ${${OCCT_MODULE}_TOOLKITS})
list (APPEND BUILD_TOOLKITS ${OCCT_${OCCT_MODULE}_LIST_OF_TOOLKITS})
endif()
endforeach()
@ -414,6 +455,10 @@ else()
OCCT_CHECK_AND_UNSET (USE_VTK)
endif()
if (NOT DEFINED BUILD_GTEST)
set (BUILD_GTEST OFF CACHE BOOL "${BUILD_GTEST_DESCR}")
endif()
# Rebuild *.yacc and *.lex files that are contained by TKMath toolkit
list (FIND BUILD_TOOLKITS TKMath CAN_REBUILD_PDC_FOR_TKMATH)
list (FIND BUILD_TOOLKITS StepFile CAN_REBUILD_PDC_FOR_STEPFILE)
@ -582,8 +627,10 @@ if (CAN_USE_GLES2 AND USE_GLES2)
if (NOT IOS)
list (APPEND OCCT_3RDPARTY_CMAKE_LIST "adm/cmake/egl")
list (APPEND OCCT_3RDPARTY_CMAKE_LIST "adm/cmake/gles2")
if (NOT EMSCRIPTEN)
OCCT_ADD_VCPKG_FEATURE ("angle")
endif()
endif()
else()
if (NOT CAN_USE_GLES2)
OCCT_CHECK_AND_UNSET ("USE_GLES2")
@ -675,7 +722,7 @@ else()
endif()
# Doxygen
if (BUILD_DOC_Overview)
if (BUILD_DOC_Overview OR BUILD_DOC_RefMan)
if (NOT DEFINED INSTALL_DOC_Overview)
set (INSTALL_DOC_Overview OFF CACHE BOOL "${INSTALL_DOC_Overview_DESCR}")
endif()
@ -683,7 +730,7 @@ if (BUILD_DOC_Overview)
list (APPEND OCCT_3RDPARTY_CMAKE_LIST "adm/cmake/doxygen")
else()
OCCT_CHECK_AND_UNSET ("INSTALL_DOC_Overview")
OCCT_CHECK_AND_UNSET ("INSTALL_DOC_RefMan")
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOXYGEN_EXECUTABLE")
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE")
endif()
@ -712,8 +759,8 @@ else()
OCCT_CHECK_AND_UNSET ("INSTALL_JEMALLOC")
endif()
# qt for inspector and samples
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
# qt for samples
if (BUILD_SAMPLES_QT)
# check qt 3rdparty path
add_definitions (-DHAVE_QT)
list (APPEND OCCT_3RDPARTY_CMAKE_LIST "adm/cmake/qt")
@ -724,8 +771,12 @@ else()
OCCT_CHECK_AND_UNSET ("INSTALL_QT")
endif()
# the name of the project
# VCPKG require delayed processing of 3rdparty.
# That is why we delay the creating project and setting up
# the platform specific variables.
if (BUILD_USE_VCPKG)
project (OCCT)
endif()
# copying clang-format file to the root of the project
file(COPY ${CMAKE_SOURCE_DIR}/.clang-format DESTINATION ${CMAKE_SOURCE_DIR})
@ -868,20 +919,7 @@ if(APPLE)
set (INSTALL_NAME_DIR "" CACHE STRING "install_name library suffix on OS X (e.g. @executable_path/../Frameworks)")
endif()
# Overview
if (NOT DEFINED BUILD_DOC_Overview)
set (DO_ONLY_CHECK_FOR_DOXYGEN ON)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/doxygen")
set (DO_ONLY_CHECK_FOR_DOXYGEN OFF)
if (CAN_DOXYGEN_BE_USED)
message (STATUS "Info. Overview building is turned on")
endif()
set (BUILD_DOC_Overview ${CAN_DOXYGEN_BE_USED} CACHE BOOL "${BUILD_DOC_Overview_DESCR}")
endif()
# include the patched or original list of definitions and flags
# include original list of definitions and flags
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_defs_flags")
foreach (OCCT_3RDPARTY_LIST ${OCCT_3RDPARTY_CMAKE_LIST})
@ -997,28 +1035,6 @@ else()
set (SCRIPT_EXT sh)
endif()
# OCCT tools
# include the patched or original list of tools
# list <TOOLNAME>_TOOLKITS is created foreach tool and contains its toolkits
# list <OCCT_TOOLS> will contain all tools
if (BUILD_Inspector)
add_definitions (-DHAVE_Inspector)
OCCT_MODULES_AND_TOOLKITS (TOOLS "TOOL_TOOLKITS" OCCT_TOOLS)
foreach (OCCT_TOOL ${OCCT_TOOLS})
list (APPEND BUILD_TOOL_TOOLKITS ${${OCCT_TOOL}_TOOL_TOOLKITS})
endforeach()
# collect all the headers to <binary dir>/inc/inspector folder
# Ensure the include directory exists
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/inspector")
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT tool header files into ${CMAKE_BINARY_DIR}/inc/inspector ...")
COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOL_TOOLKITS}" "tools" "${INSTALL_DIR_INCLUDE}/inspector")
endif()
# OCCT samples
# get absolute path from INSTALL_DIR
set (INSTALL_DIR_ABSOLUTE "${INSTALL_DIR}")
@ -1061,14 +1077,8 @@ if (${DRAWEXE_INDEX} GREATER -1)
OCCT_INSTALL_FILE_OR_DIR ("data/" "${INSTALL_DIR_DATA}")
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR_SAMPLES}")
# copy draw script to install script folder
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}")
install (FILES "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
else()
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif()
# copy draw script to CMake binary folder
OCCT_COPY_FILE_OR_DIR ("adm/templates/draw.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
@ -1150,9 +1160,9 @@ foreach(RESOURCE ${RESOURCES})
get_filename_component(RESOURCE_FOLDER ${RESOURCE} DIRECTORY)
if(NOT "${RESOURCE_FOLDER}" STREQUAL "")
get_filename_component(RESOURCE_FOLDER ${RESOURCE_FOLDER} NAME)
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR_RESOURCE}/${RESOURCE_FOLDER}")
OCCT_INSTALL_FILE_OR_DIR ("resources/${RESOURCE}" "${INSTALL_DIR_RESOURCE}/${RESOURCE_FOLDER}")
else()
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR_RESOURCE}")
OCCT_INSTALL_FILE_OR_DIR ("resources/${RESOURCE}" "${INSTALL_DIR_RESOURCE}")
endif()
endforeach()
@ -1181,11 +1191,36 @@ endif()
# include patched toolkit projects or original ones
foreach (BUILD_TOOLKIT ${BUILD_TOOLKITS})
OCCT_ADD_SUBDIRECTORY ("src/${BUILD_TOOLKIT}")
add_subdirectory ("${OCCT_${BUILD_TOOLKIT}_FILES_LOCATION}")
endforeach()
if (BUILD_DOC_Overview)
OCCT_ADD_SUBDIRECTORY (dox)
# Setup Google Test integration if enabled
if (BUILD_GTEST)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gtest")
enable_testing()
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_gtest")
# Initialize GTest environment and create the target first
OCCT_INIT_GTEST()
# Collect test files from all active toolkits and add them to the target
foreach (BUILD_TOOLKIT ${BUILD_TOOLKITS})
OCCT_COLLECT_TOOLKIT_TESTS(${BUILD_TOOLKIT})
endforeach()
# Set environment variables for all tests
OCCT_SET_GTEST_ENVIRONMENT()
else()
# Disable GTest integration if not enabled
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GTEST")
OCCT_CHECK_AND_UNSET_GROUP ("GTest")
OCCT_CHECK_AND_UNSET ("INSTALL_GTEST")
endif()
if (BUILD_DOC_Overview OR BUILD_DOC_RefMan)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_doc")
# Setup documentation targets
OCCT_SETUP_DOC_TARGETS()
endif()
# patch DRAWEXE
@ -1205,17 +1240,10 @@ if (MSVC AND 3RDPARTY_DLL_DIRS)
set (X_COMPILER_BITNESS "Win32")
endif()
OCCT_CONFIGURE ("adm/templates/DRAWEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/src/DRAWEXE/DRAWEXE.vcxproj.user")
OCCT_CONFIGURE ("adm/templates/DRAWEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/src/Draw/DRAWEXE/DRAWEXE.vcxproj.user")
endif()
endif()
# include patched toolkit projects or original ones
if (BUILD_TOOL_TOOLKITS)
foreach (BUILD_TOOL_TOOLKIT ${BUILD_TOOL_TOOLKITS})
OCCT_ADD_SUBDIRECTORY ("tools/${BUILD_TOOL_TOOLKIT}")
endforeach()
endif()
message (STATUS "Info: \(${CURRENT_TIME}\) OCCT toolkits processed")
# samples do not support patch usage
if (BUILD_SAMPLES_MFC OR BUILD_SAMPLES_QT)
@ -1237,7 +1265,7 @@ endif()
OCCT_MODULES_AND_TOOLKITS (SAMPLES "SAMPLES_TOOLKITS" OCCT_SAMPLES)
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
if (BUILD_SAMPLES_QT)
if (BUILD_SAMPLES_QT)
if (NOT Qt5_FOUND OR "${Qt5Gui_EGL_INCLUDE_DIRS}" STREQUAL "" OR NOT WIN32)
list (REMOVE_ITEM qt_SAMPLES_TOOLKITS AndroidQt)
@ -1266,21 +1294,6 @@ if (BUILD_MODULE_UwpSample)
add_subdirectory(samples/xaml)
endif()
if (BUILD_TOOL_TOOLKITS)
# copy tinspector script to install script folder
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/inspector.${SCRIPT_EXT}")
install (FILES "${BUILD_PATCH}/adm/templates/inspector.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
else()
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/inspector.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif()
set (OpenCASCADE_BINARY_DIR "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
# patch TInspectorEXE
OCCT_CONFIGURE ("adm/templates/TInspectorEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/tools/TInspectorEXE/TInspectorEXE.vcxproj.user")
endif()
# Prepare variables for configuration of OpenCASCADE cmake config file
set (OCCT_MODULES_ENABLED)
set (OCCT_LIBRARIES)

View File

@ -1,8 +1,7 @@
FoundationClasses TKernel TKMath
ModelingData TKG2d TKG3d TKGeomBase TKBRep
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing TKExpress
Visualization TKService TKV3d TKOpenGl TKOpenGles TKMeshVS TKIVtk TKD3DHost
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF
DataExchange TKDE TKXSBase TKDESTEP TKDEIGES TKDESTL TKDEVRML TKDECascade TKDEOBJ TKDEGLTF TKDEPLY TKXCAF TKXmlXCAF TKBinXCAF TKRWMesh
DETools TKExpress ExpToCasExe
Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE TKXSDRAWDE TKXSDRAWGLTF TKXSDRAWIGES TKXSDRAWOBJ TKXSDRAWPLY TKXSDRAWSTEP TKXSDRAWSTL TKXSDRAWVRML

View File

@ -1,4 +0,0 @@
TModelingData TKShapeView TKMessageModel TKMessageView
TVisualization TKView TKVInspector
TApplicationFramework TKTreeModel TKTInspectorAPI TKDFBrowser
TTool TKTInspector TKToolsDraw TInspectorEXE

View File

@ -1,497 +0,0 @@
n NCollection
n BSplCLib
n BSplSLib
n Bnd
n BVH
n CSLib
n Convert
n ElCLib
n ElSLib
n Expr
n ExprIntrp
n FSD
n GeomAbs
n Message
n OSD
n PLib
n Plugin
n Poly
n Precision
n Quantity
n Resource
n Standard
n StdFail
n Storage
n TColStd
n TColgp
n TCollection
n TShort
n TopLoc
n Units
n UnitsAPI
n gp
n math
r OS
n FlexLexer
t TKMath
t TKernel
n Adaptor2d
n Adaptor3d
n AdvApp2Var
n AdvApprox
n AppCont
n AppDef
n AppParCurves
n Approx
n BRep
n BRepAdaptor
n BRepLProp
n BRepTools
n BndLib
n CPnts
n Extrema
n FEmTool
n GC
n GCE2d
n GCPnts
n GProp
n Geom
n Geom2d
n Geom2dAdaptor
n Geom2dConvert
n Geom2dLProp
n GeomAdaptor
n GeomConvert
n GeomLProp
n GeomLib
n GeomProjLib
n GeomTools
n GeomEvaluator
n Hermit
n IntAna
n IntAna2d
n LProp
n LProp3d
n ProjLib
n TColGeom
n TColGeom2d
n TopAbs
n TopExp
n TopTools
n TopoDS
n gce
t TKBRep
t TKG2d
t TKG3d
t TKGeomBase
n AppBlend
n ApproxInt
n BOPTools
n BRepAlgo
n BRepAlgoAPI
n BRepApprox
n BRepBlend
n BRepBndLib
n BRepBuilderAPI
n BRepCheck
n BRepClass
n BRepClass3d
n BRepExtrema
n BRepFeat
n BRepFill
n BRepFilletAPI
n BRepGProp
n BRepIntCurveSurface
n BRepLib
n BRepMAT2d
n BRepMesh
n BRepMeshData
n BRepOffset
n BRepOffsetAPI
n BRepPreviewAPI
n BRepPrim
n BRepPrimAPI
n BRepProj
n BRepSweep
n BRepTopAdaptor
n BiTgte
n Bisector
n Blend
n BlendFunc
n ChFi2d
n ChFi3d
n ChFiDS
n ChFiKPart
n Contap
n Draft
n FairCurve
n FilletSurf
n GccAna
n GccEnt
n GccInt
n Geom2dAPI
n Geom2dGcc
n Geom2dHatch
n Geom2dInt
n GeomAPI
n GeomFill
n GeomInt
n GeomPlate
n HLRAlgo
n HLRBRep
n HLRTopoBRep
n HLRAppli
n Hatch
n HatchGen
n IMeshData
n IMeshTools
n IntCurve
n IntCurveSurface
n IntCurvesFace
n IntImp
n IntImpParGen
n IntPatch
n IntPolyh
n IntRes2d
n IntStart
n IntSurf
n IntTools
n IntWalk
n Intf
n Intrv
n Law
n LocOpe
n LocalAnalysis
n MAT
n MAT2d
n NLPlate
n Plate
n ShapeAlgo
n ShapeAnalysis
n ShapeBuild
n ShapeConstruct
n ShapeCustom
n ShapeExtend
n ShapeFix
n ShapeProcess
n ShapeProcessAPI
n ShapeUpgrade
n Sweep
n TopBas
n TopClass
n TopCnx
n TopOpeBRep
n TopOpeBRepBuild
n TopOpeBRepDS
n TopOpeBRepTool
n TopTrans
n XBRepMesh
t TKBO
t TKBool
t TKFeat
t TKFillet
t TKGeomAlgo
t TKHLR
t TKMesh
t TKOffset
t TKPrim
t TKShHealing
t TKTopAlgo
t TKXMesh
n AIS
n Aspect
n DsgPrs
n PrsDim
n Graphic3d
n Image
n Media
n MeshVS
n OpenGl
n OpenGles
n D3DHost
n Prs3d
n PrsMgr
n Select3D
n SelectBasics
n SelectMgr
n StdPrs
n StdSelect
n V3d
n Wasm
n WNT
n Xw
n Cocoa
r Textures
r Shaders
r XRResources
t TKMeshVS
t TKOpenGl
t TKOpenGles
t TKD3DHost
t TKService
t TKV3d
n BinTObjDrivers
n LDOM
n TObj
n XmlTObjDrivers
n AppStd
n AppStdL
n BinDrivers
n BinLDrivers
n BinMDF
n BinMDataStd
n BinMDataXtd
n BinMDocStd
n BinMFunction
n BinMNaming
n BinObjMgt
n BinTools
n CDF
n CDM
n PCDM
n StdLDrivers
n StdLPersistent
n StdObjMgt
n StdDrivers
n StdObject
n StdPersistent
n StdStorage
n ShapePersistent
n TDF
n TDataStd
n TDataXtd
n TDocStd
n TFunction
n TNaming
n TPrsStd
n UTL
n XmlDrivers
n XmlLDrivers
n XmlMDF
n XmlMDataStd
n XmlMDataXtd
n XmlMDocStd
n XmlMFunction
n XmlMNaming
n XmlObjMgt
r StdResource
r XmlOcafResource
t TKBin
t TKBinL
t TKBinTObj
t TKCAF
t TKCDF
t TKLCAF
t TKStdL
t TKStd
t TKTObj
t TKXml
t TKXmlL
t TKXmlTObj
n IGESFile
n StepFile
n APIHeaderSection
n BRepToIGES
n BRepToIGESBRep
n BinMXCAFDoc
n BinXCAFDrivers
n Geom2dToIGES
n GeomToIGES
n GeomToStep
n HeaderSection
n IFGraph
n IFSelect
n IGESAppli
n IGESBasic
n IGESCAFControl
n IGESControl
n IGESConvGeom
n IGESData
n IGESDefs
n IGESDimen
n IGESDraw
n IGESGeom
n IGESGraph
n IGESSelect
n IGESSolid
n IGESToBRep
n Interface
n LibCtl
n MoniTool
n RWHeaderSection
n RWStepAP203
n RWStepAP214
n RWStepAP242
n RWStepBasic
n RWStepDimTol
n RWStepElement
n RWStepFEA
n RWStepGeom
n RWStepKinematics
n RWStepRepr
n RWStepShape
n RWStepVisual
n RWStl
n STEPCAFControl
n STEPConstruct
n STEPControl
n STEPEdit
n STEPSelections
n StepAP203
n StepAP209
n StepAP214
n StepAP242
n StepBasic
n StepData
n StepDimTol
n StepElement
n StepFEA
n StepGeom
n StepKinematics
n StepRepr
n StepSelect
n StepShape
n StepToGeom
n StepToTopoDS
n StepVisual
n StlAPI
n TopoDSToStep
n Transfer
n TransferBRep
n UnitsMethods
n Vrml
n VrmlAPI
n VrmlConverter
n VrmlData
n XCAFApp
n XCAFDimTolObjects
n XCAFDoc
n XCAFPrs
n XSAlgo
n XSControl
n XmlMXCAFDoc
n XmlXCAFDrivers
r SHMessage
r XSMessage
r XSTEPResource
t TKBinXCAF
t TKDESTL
t TKDEVRML
t TKXCAF
t TKDE
t TKDECascade
t TKDEIGES
t TKDESTEP
t TKXSBase
t TKXmlXCAF
n BOPTest
n BRepTest
n DBRep
n DDF
n DDataStd
n DDocStd
n DE
n DEXCAFCascade
n DEBRepCascade
n DNaming
n DPrsStd
n Draw
n DrawDim
n DrawFairCurve
n DrawTrSurf
n GeometryTest
n GeomliteTest
n HLRTest
n MeshTest
n SWDRAW
n TObjDRAW
n OpenGlTest
n OpenGlesTest
n D3DHostTest
n ViewerTest
n XDEDRAW
n XSDRAW
n XSDRAWIGES
n XSDRAWSTEP
n XSDRAWSTL
n XSDRAWVRML
n XSDRAWDE
n XSDRAWGLTF
n XSDRAWOBJ
n XSDRAWPLY
r DrawResources
t TKDCAF
t TKDraw
t TKTObjDRAW
t TKTopTest
t TKOpenGlTest
t TKOpenGlesTest
t TKD3DHostTest
t TKViewerTest
t TKXDEDRAW
t TKXSDRAW
t TKXSDRAWIGES
t TKXSDRAWSTEP
t TKXSDRAWSTL
t TKXSDRAWVRML
t TKXSDRAWDE
t TKXSDRAWGLTF
t TKXSDRAWOBJ
t TKXSDRAWPLY
x DRAWEXE
n QADraw
n QANCollection
n QANewBRepNaming
n QANewDBRepNaming
n QANewModTopOpe
t TKQADraw
n QADNaming
n QABugs
n Font
n BOPAlgo
n BOPDS
n BOPCol
n IVtk
n IVtkOCC
n IVtkVTK
n IVtkTools
t TKIVtk
n IVtkDraw
t TKIVtkDraw
n Geom2dEvaluator
t TKVCAF
n XCAFView
n XCAFNoteObjects
t TKRWMesh
t TKDEGLTF
t TKDEOBJ
t TKDEPLY
n RWGltf
n RWMesh
n RWObj
n RWPly
n DFBrowser
n DFBrowserPane
n DFBrowserPaneXDE
n ShapeView
n TInspector
n TInspectorAPI
x TInspectorEXE
t TKDFBrowser
t TKShapeView
t TKTInspector
t TKTInspectorAPI
t TKToolsDraw
t TKTreeModel
t TKView
t TKVInspector
n ToolsDraw
n TreeModel
n View
n ViewControl
n VInspector
n Express
t TKExpress
x ExpToCasExe

View File

@ -56,7 +56,7 @@ else()
endif()
endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET (DOXYGEN_SKIP_DOT)
OCCT_CHECK_AND_UNSET (DOXYGEN_EXECUTABLE)
OCCT_CHECK_AND_UNSET (DOXYGEN_DOT_EXECUTABLE)
# hide all redundant variables
mark_as_advanced (DOXYGEN_SKIP_DOT)
mark_as_advanced (DOXYGEN_EXECUTABLE)
mark_as_advanced (DOXYGEN_DOT_EXECUTABLE)

View File

@ -83,5 +83,5 @@ else()
set (3RDPARTY_EIGEN_INCLUDE_DIR "" CACHE PATH "the path to Eigen header file" FORCE)
endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET(Eigen3_DIR)
# hide all redundant variables
mark_as_advanced(Eigen3_DIR)

View File

@ -247,7 +247,7 @@ foreach (LIBRARY_NAME ${CSF_FFmpeg})
mark_as_advanced (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME})
endforeach()
# unset all redundant variables
OCCT_CHECK_AND_UNSET (FFMPEG_INCLUDE_DIRS)
OCCT_CHECK_AND_UNSET (FFMPEG_LIBRARY_DIRS)
OCCT_CHECK_AND_UNSET (FFMPEG_DIR)
# hide all redundant variables
mark_as_advanced (FFMPEG_INCLUDE_DIRS)
mark_as_advanced (FFMPEG_LIBRARY_DIRS)
mark_as_advanced (FFMPEG_DIR)

View File

@ -389,10 +389,10 @@ endif()
endif()
#endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_ft2build)
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_freetype2)
OCCT_CHECK_AND_UNSET(FREETYPE_LIBRARY_RELEASE)
# hide all redundant variables
mark_as_advanced(FREETYPE_INCLUDE_DIR_ft2build)
mark_as_advanced(FREETYPE_INCLUDE_DIR_freetype2)
mark_as_advanced(FREETYPE_LIBRARY_RELEASE)
if (BUILD_SHARED_LIBS)
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)

66
adm/cmake/gtest.cmake Normal file
View File

@ -0,0 +1,66 @@
# Google Test integration for OCCT
# Only proceed if tests are enabled
if (NOT BUILD_GTEST)
set(GOOGLETEST_FOUND FALSE)
return()
endif()
# Check if the user has specified whether to install Google Test
if (NOT DEFINED INSTALL_GTEST)
set(INSTALL_GTEST OFF CACHE BOOL "Install Google Test")
endif()
# Google Test configuration options
option(GTEST_USE_EXTERNAL "Use externally provided Google Test installation" OFF)
option(GTEST_USE_FETCHCONTENT "Use FetchContent to download and build Google Test" ON)
# Try to find existing GTest installation
find_package(GTest QUIET)
if(GTest_FOUND)
message(STATUS "Found Googletest installation")
set(GOOGLETEST_FOUND TRUE)
set(GTEST_USE_EXTERNAL TRUE)
set(GTEST_USE_FETCHCONTENT FALSE)
else()
message(STATUS "Googletest not found in system paths")
if(GTEST_USE_FETCHCONTENT)
include(FetchContent)
# Set option to disable GMock before declaring the content
set(BUILD_GMOCK OFF CACHE BOOL "Builds the googlemock subproject" FORCE)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/tags/v1.16.0.zip
DOWNLOAD_EXTRACT_TIMESTAMP true
)
FetchContent_MakeAvailable(googletest)
# Set proper grouping for the targets in solution explorer
if(TARGET gtest)
set_target_properties(gtest PROPERTIES FOLDER "ThirdParty/GoogleTest")
target_compile_definitions(gtest PRIVATE GTEST_CREATE_SHARED_LIBRARY=1)
endif()
if(TARGET gtest_main)
set_target_properties(gtest_main PROPERTIES FOLDER "ThirdParty/GoogleTest")
target_compile_definitions(gtest_main PRIVATE GTEST_CREATE_SHARED_LIBRARY=1)
endif()
# Set variables for consistent use throughout the build system
set(GOOGLETEST_FOUND TRUE)
else()
message(STATUS "Google Test not available. Tests will be skipped.")
set(GOOGLETEST_FOUND FALSE)
endif()
endif()
# Enable CTest if Google Test is available
if(GOOGLETEST_FOUND)
include(GoogleTest)
endif()

View File

@ -82,6 +82,25 @@ else()
set (CSF_Draco)
endif()
# VTK
if (USE_VTK)
# the variable must to be empty, but keep there the list of libs
# that is used in the VTK component.
set (CSF_VTK
# vtkCommonCore
# vtkRenderingCore
# vtkRenderingFreeType
# vtkFiltersGeneral
# vtkIOImage
# vtkImagingCore
# vtkInteractionStyle
# vtkRenderingOpenGL
# vtkRenderingFreeTypeOpenGL
)
else()
set (CSF_VTK)
endif()
if (WIN32)
set (CSF_advapi32 "advapi32.lib")
set (CSF_gdi32 "gdi32.lib")

View File

@ -26,7 +26,7 @@ endif()
if (MSVC)
# suppress C26812 on VS2019/C++20 (prefer 'enum class' over 'enum')
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise /wd\"26812\"")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise /wd26812")
# suppress warning on using portable non-secure functions in favor of non-portable secure ones
add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
else()
@ -172,7 +172,7 @@ elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPIL
if (APPLE)
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")
elseif(NOT WIN32)
set (CMAKE_SHARED_LINKER_FLAGS "-lm -Wl,-Bsymbolic ${CMAKE_SHARED_LINKER_FLAGS}")
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")
endif()
endif()
endif()

687
adm/cmake/occt_doc.cmake Normal file
View File

@ -0,0 +1,687 @@
##
# Function to collect modules, toolkits, and packages information for documentation
function(OCCT_DOC_COLLECT_MODULES_INFO)
# Set output variables in parent scope
set(OCCT_MODULES ${OCCT_MODULES} PARENT_SCOPE)
# For each module, collect its toolkits
foreach(OCCT_MODULE ${OCCT_MODULES})
if(NOT "${OCCT_MODULE}" STREQUAL "")
set(MODULES_TOOLKITS ${${OCCT_MODULE}_TOOLKITS})
set(TOOLKITS_IN_MODULE_${OCCT_MODULE} ${MODULES_TOOLKITS} PARENT_SCOPE)
# For each toolkit, collect its packages
foreach(TOOLKIT ${MODULES_TOOLKITS})
set(TOOLKIT_PARENT_MODULE_${TOOLKIT} ${OCCT_MODULE} PARENT_SCOPE)
# Get packages from toolkit
set(TOOLKIT_PACKAGES "")
EXTRACT_TOOLKIT_PACKAGES("src" ${TOOLKIT} TOOLKIT_PACKAGES)
set(PACKAGES_IN_TOOLKIT_${TOOLKIT} ${TOOLKIT_PACKAGES} PARENT_SCOPE)
endforeach()
endif()
endforeach()
endfunction()
# Function to generate module dependency graph
function(OCCT_DOC_CREATE_MODULE_DEPENDENCY_GRAPH OUTPUT_DIR FILENAME)
set(DOT_FILE "${OUTPUT_DIR}/${FILENAME}.dot")
# Create .dot file for module dependencies
file(WRITE ${DOT_FILE} "digraph ${FILENAME}\n{\n")
# Create a list to track unique module connections
set(MODULE_CONNECTIONS)
foreach(MODULE ${OCCT_MODULES})
if(NOT "${MODULE}" STREQUAL "")
# Convert module name to lowercase for URL
string(TOLOWER ${MODULE} MODULE_LOWER)
file(APPEND ${DOT_FILE} "\t${MODULE} [ URL = \"module_${MODULE_LOWER}.html\" ]\n")
# Add dependencies between modules
foreach(MODULE_TOOLKIT ${TOOLKITS_IN_MODULE_${MODULE}})
foreach(DEPENDENT_TOOLKIT ${TOOLKIT_DEPENDENCY_${MODULE_TOOLKIT}})
if(DEFINED TOOLKIT_PARENT_MODULE_${DEPENDENT_TOOLKIT} AND
NOT "${TOOLKIT_PARENT_MODULE_${DEPENDENT_TOOLKIT}}" STREQUAL "${MODULE}")
# Create a unique connection identifier
set(CONNECTION "${TOOLKIT_PARENT_MODULE_${DEPENDENT_TOOLKIT}}->${MODULE}")
list(FIND MODULE_CONNECTIONS "${CONNECTION}" CONNECTION_EXISTS)
# Add connection only if it doesn't exist yet
if(${CONNECTION_EXISTS} EQUAL -1)
list(APPEND MODULE_CONNECTIONS "${CONNECTION}")
file(APPEND ${DOT_FILE} "\t${TOOLKIT_PARENT_MODULE_${DEPENDENT_TOOLKIT}} -> ${MODULE} [ dir = \"back\", color = \"midnightblue\", style = \"solid\" ]\n")
endif()
endif()
endforeach()
endforeach()
endif()
endforeach()
file(APPEND ${DOT_FILE} "}\n")
# Return the output file name
set(DOT_OUTPUT_FILE "${FILENAME}" PARENT_SCOPE)
endfunction()
# Function to generate toolkit dependency graph for a module
function(OCCT_DOC_CREATE_TOOLKIT_DEPENDENCY_GRAPH OUTPUT_DIR FILENAME MODULE_NAME)
set(DOT_FILE "${OUTPUT_DIR}/${FILENAME}.dot")
# Create .dot file for toolkit dependencies within a module
file(WRITE ${DOT_FILE} "digraph ${FILENAME}\n{\n")
foreach(TOOLKIT ${TOOLKITS_IN_MODULE_${MODULE_NAME}})
# Convert toolkit name to lowercase for URL
string(TOLOWER ${TOOLKIT} TOOLKIT_LOWER)
file(APPEND ${DOT_FILE} "\t${TOOLKIT} [ URL = \"toolkit_${TOOLKIT_LOWER}.html\" ]\n")
# Add dependencies between toolkits in the same module
foreach(DEPENDENT_TOOLKIT ${TOOLKIT_DEPENDENCY_${TOOLKIT}})
if(DEFINED TOOLKIT_PARENT_MODULE_${DEPENDENT_TOOLKIT} AND
"${TOOLKIT_PARENT_MODULE_${DEPENDENT_TOOLKIT}}" STREQUAL "${MODULE_NAME}")
file(APPEND ${DOT_FILE} "\t${DEPENDENT_TOOLKIT} -> ${TOOLKIT} [ dir = \"back\", color = \"midnightblue\", style = \"solid\" ]\n")
endif()
endforeach()
endforeach()
file(APPEND ${DOT_FILE} "}\n")
# Return the output file name
set(DOT_OUTPUT_FILE "${FILENAME}" PARENT_SCOPE)
endfunction()
# Function to generate dependency graph for a specific toolkit
function(OCCT_DOC_CREATE_SINGLE_TOOLKIT_DEPENDENCY_GRAPH OUTPUT_DIR FILENAME TOOLKIT_NAME)
set(DOT_FILE "${OUTPUT_DIR}/${FILENAME}.dot")
# Create .dot file for dependencies of a single toolkit
file(WRITE ${DOT_FILE} "digraph ${FILENAME}\n{\n")
# Convert toolkit name to lowercase for URL
string(TOLOWER ${TOOLKIT_NAME} TOOLKIT_NAME_LOWER)
file(APPEND ${DOT_FILE} "\t${TOOLKIT_NAME} [ URL = \"toolkit_${TOOLKIT_NAME_LOWER}.html\", shape = box ]\n")
# Add toolkit dependencies
foreach(DEPENDENT_TOOLKIT ${TOOLKIT_DEPENDENCY_${TOOLKIT_NAME}})
# Convert dependent toolkit name to lowercase for URL
string(TOLOWER ${DEPENDENT_TOOLKIT} DEPENDENT_TOOLKIT_LOWER)
file(APPEND ${DOT_FILE} "\t${DEPENDENT_TOOLKIT} [ URL = \"toolkit_${DEPENDENT_TOOLKIT_LOWER}.html\", shape = box ]\n")
file(APPEND ${DOT_FILE} "\t${TOOLKIT_NAME} -> ${DEPENDENT_TOOLKIT} [ color = \"midnightblue\", style = \"solid\" ]\n")
endforeach()
if(TOOLKIT_DEPENDENCY_${TOOLKIT_NAME})
list(LENGTH TOOLKIT_DEPENDENCY_${TOOLKIT_NAME} DEPS_COUNT)
if(DEPS_COUNT GREATER 1)
file(APPEND ${DOT_FILE} "\taspect = 1\n")
endif()
endif()
file(APPEND ${DOT_FILE} "}\n")
# Return the output file name
set(DOT_OUTPUT_FILE "${FILENAME}" PARENT_SCOPE)
endfunction()
# Function to generate main page for documentation
function(OCCT_DOC_GENERATE_MAIN_PAGE OUTPUT_DIR OUTPUT_FILE)
set(MAIN_PAGE_FILE "${OUTPUT_DIR}/${OUTPUT_FILE}")
file(WRITE ${MAIN_PAGE_FILE} "/**\n")
# Check if we're generating documentation for a single module
if(DOC_SINGLE_MODULE)
file(APPEND ${MAIN_PAGE_FILE} "\\mainpage OCCT Module ${DOC_SINGLE_MODULE}\n")
else()
file(APPEND ${MAIN_PAGE_FILE} "\\mainpage Open CASCADE Technology Reference Manual\n\n")
# List all modules
foreach(MODULE ${OCCT_MODULES})
if(NOT "${MODULE}" STREQUAL "")
# page id must be in lowercase
string(TOLOWER ${MODULE} MODULE_LOWER)
file(APPEND ${MAIN_PAGE_FILE} "\\li \\subpage module_${MODULE_LOWER}\n")
endif()
endforeach()
# Add modules relationship diagram
OCCT_DOC_CREATE_MODULE_DEPENDENCY_GRAPH("${OUTPUT_DIR}/html" "schema_all_modules")
file(APPEND ${MAIN_PAGE_FILE} "\\dotfile schema_all_modules.dot\n")
endif()
file(APPEND ${MAIN_PAGE_FILE} "**/\n\n")
# Generate pages for modules and their toolkits
foreach(MODULE ${OCCT_MODULES})
if(NOT "${MODULE}" STREQUAL "")
file(APPEND ${MAIN_PAGE_FILE} "/**\n")
if(DOC_SINGLE_MODULE)
file(APPEND ${MAIN_PAGE_FILE} "\\mainpage OCCT Module ${MODULE}\n")
else()
# page id must be in lowercase
string(TOLOWER ${MODULE} MODULE_LOWER)
file(APPEND ${MAIN_PAGE_FILE} "\\page module_${MODULE_LOWER} Module ${MODULE}\n")
endif()
# List toolkits in the module
foreach(TOOLKIT ${TOOLKITS_IN_MODULE_${MODULE}})
# page id must be in lowercase
string(TOLOWER ${TOOLKIT} TOOLKIT_LOWER)
file(APPEND ${MAIN_PAGE_FILE} "\\li \\subpage toolkit_${TOOLKIT_LOWER}\n")
endforeach()
# Add module diagram
OCCT_DOC_CREATE_TOOLKIT_DEPENDENCY_GRAPH("${OUTPUT_DIR}/html" "schema_${MODULE}" ${MODULE})
file(APPEND ${MAIN_PAGE_FILE} "\\dotfile schema_${MODULE}.dot\n")
file(APPEND ${MAIN_PAGE_FILE} "**/\n\n")
endif()
endforeach()
# Generate pages for toolkits and their packages
foreach(MODULE ${OCCT_MODULES})
if(NOT "${MODULE}" STREQUAL "")
foreach(TOOLKIT ${TOOLKITS_IN_MODULE_${MODULE}})
file(APPEND ${MAIN_PAGE_FILE} "/**\n")
# page id must be in lowercase
string(TOLOWER ${TOOLKIT} TOOLKIT_LOWER)
file(APPEND ${MAIN_PAGE_FILE} "\\page toolkit_${TOOLKIT_LOWER} Toolkit ${TOOLKIT}\n")
# List packages in toolkit
foreach(PACKAGE ${PACKAGES_IN_TOOLKIT_${TOOLKIT}})
set(PACKAGE_NAME ${PACKAGE})
# page id must be in lowercase
string(TOLOWER ${PACKAGE_NAME} PACKAGE_NAME_LOWER)
file(APPEND ${MAIN_PAGE_FILE} "\\li \\subpage package_${PACKAGE_NAME_LOWER}\n")
endforeach()
# Add toolkit dependencies diagram
OCCT_DOC_CREATE_SINGLE_TOOLKIT_DEPENDENCY_GRAPH("${OUTPUT_DIR}/html" "schema_${TOOLKIT}" ${TOOLKIT})
file(APPEND ${MAIN_PAGE_FILE} "\\dotfile schema_${TOOLKIT}.dot\n")
file(APPEND ${MAIN_PAGE_FILE} "**/\n\n")
endforeach()
endif()
endforeach()
# Generate pages for packages and their classes
foreach(MODULE ${OCCT_MODULES})
if(NOT "${MODULE}" STREQUAL "")
foreach(TOOLKIT ${TOOLKITS_IN_MODULE_${MODULE}})
foreach(PACKAGE ${PACKAGES_IN_TOOLKIT_${TOOLKIT}})
file(APPEND ${MAIN_PAGE_FILE} "/**\n")
# page id must be in lowercase
string(TOLOWER ${PACKAGE} PACKAGE_LOWER)
file(APPEND ${MAIN_PAGE_FILE} "\\page package_${PACKAGE_LOWER} Package ${PACKAGE}\n")
# Find header files in the package
EXTRACT_PACKAGE_FILES ("src" ${PACKAGE} ALL_FILES _)
set (HEADER_FILES_FILTERING ${ALL_FILES})
list (FILTER HEADER_FILES_FILTERING INCLUDE REGEX ".+[.](h|hxx|hpp)$")
foreach(HEADER ${HEADER_FILES_FILTERING})
get_filename_component(HEADER_NAME ${HEADER} NAME_WE)
file(APPEND ${MAIN_PAGE_FILE} "\\li \\subpage ${HEADER_NAME}\n")
# Append header file to DOXYGEN_INPUT_FILES list
list(APPEND DOXYGEN_INPUT_FILES "${HEADER}")
endforeach()
file(APPEND ${MAIN_PAGE_FILE} "**/\n\n")
endforeach()
endforeach()
endif()
endforeach()
# Create a variable containing all input files for Doxygen
string(REPLACE ";" " " DOXYGEN_INPUT_FILES_STRING "${DOXYGEN_INPUT_FILES}")
set(DOXYGEN_INPUT_FILES_STRING ${DOXYGEN_INPUT_FILES_STRING} PARENT_SCOPE)
endfunction()
# Function to extract dependency information for toolkits
function(OCCT_DOC_EXTRACT_TOOLKIT_DEPENDENCIES)
foreach(MODULE ${OCCT_MODULES})
if(NOT "${MODULE}" STREQUAL "")
foreach(TOOLKIT ${TOOLKITS_IN_MODULE_${MODULE}})
EXTRACT_TOOLKIT_EXTERNLIB("src" ${TOOLKIT} EXTERNLIB_LIST)
set(DEPENDENT_TOOLKITS "")
foreach(EXTERNLIB ${EXTERNLIB_LIST})
if(EXTERNLIB MATCHES "^TK")
list(APPEND DEPENDENT_TOOLKITS ${EXTERNLIB})
endif()
endforeach()
set(TOOLKIT_DEPENDENCY_${TOOLKIT} ${DEPENDENT_TOOLKITS} PARENT_SCOPE)
endforeach()
endif()
endforeach()
endfunction()
# Function to load file lists for documentation
function(OCCT_DOC_LOAD_FILE_LISTS)
# Load list of HTML documentation files
set(FILES_HTML_PATH "${CMAKE_SOURCE_DIR}/dox/FILES_HTML.txt")
if(EXISTS ${FILES_HTML_PATH})
file(STRINGS ${FILES_HTML_PATH} HTML_FILES REGEX "^[^#]+")
set(OCCT_DOC_HTML_FILES ${HTML_FILES} PARENT_SCOPE)
else()
set(OCCT_DOC_HTML_FILES "" PARENT_SCOPE)
endif()
# Load list of PDF documentation files
set(FILES_PDF_PATH "${CMAKE_SOURCE_DIR}/dox/FILES_PDF.txt")
if(EXISTS ${FILES_PDF_PATH})
file(STRINGS ${FILES_PDF_PATH} PDF_FILES REGEX "^[^#]+")
set(OCCT_DOC_PDF_FILES ${PDF_FILES} PARENT_SCOPE)
else()
set(OCCT_DOC_PDF_FILES "" PARENT_SCOPE)
endif()
endfunction()
# Function to collect image directories from input files
function(OCCT_DOC_COLLECT_IMAGE_DIRS INPUT_DIRS RESULT_IMAGE_DIRS)
set(IMAGE_DIRS "")
foreach(INPUT_DIR ${INPUT_DIRS})
# Check if directory exists
if(EXISTS "${INPUT_DIR}")
# Add the standard "images" subdirectory if it exists
if(EXISTS "${INPUT_DIR}/images")
list(APPEND IMAGE_DIRS "${INPUT_DIR}/images")
endif()
# Find all subdirectories containing images
file(GLOB_RECURSE IMAGE_FILES
"${INPUT_DIR}/*.png"
"${INPUT_DIR}/*.jpg"
"${INPUT_DIR}/*.jpeg"
"${INPUT_DIR}/*.gif"
"${INPUT_DIR}/*.svg")
foreach(IMAGE_FILE ${IMAGE_FILES})
get_filename_component(IMAGE_DIR ${IMAGE_FILE} DIRECTORY)
list(APPEND IMAGE_DIRS "${IMAGE_DIR}")
endforeach()
endif()
endforeach()
if(IMAGE_DIRS)
list(REMOVE_DUPLICATES IMAGE_DIRS)
endif()
set(${RESULT_IMAGE_DIRS} ${IMAGE_DIRS} PARENT_SCOPE)
endfunction()
# Function to configure and run Doxygen for documentation generation
function(OCCT_DOC_CONFIGURE_DOXYGEN OUTPUT_DIR CONFIG_FILE DOC_TYPE)
# Create output directory if it doesn't exist
file(MAKE_DIRECTORY ${OUTPUT_DIR})
# Use existing Doxygen template file as base
if(DOC_TYPE STREQUAL "OVERVIEW")
set(TEMPLATE_DOXYFILE "${CMAKE_SOURCE_DIR}/dox/resources/occt_ug_html.doxyfile")
else()
set(TEMPLATE_DOXYFILE "${CMAKE_SOURCE_DIR}/dox/resources/occt_rm.doxyfile")
endif()
# Define Doxygen parameters that need to be overridden from the template
set(DOXYGEN_CONFIG_FILE "${OUTPUT_DIR}/${CONFIG_FILE}")
# Check if template file exists
if(NOT EXISTS ${TEMPLATE_DOXYFILE})
message(FATAL_ERROR "ERROR: Doxygen template file not found: ${TEMPLATE_DOXYFILE}")
return()
endif()
# Read template content
file(READ ${TEMPLATE_DOXYFILE} DOXYGEN_TEMPLATE_CONTENT)
# Create the output Doxyfile
file(WRITE ${DOXYGEN_CONFIG_FILE} "# Doxyfile generated by OCCT_DOC_CONFIGURE_DOXYGEN\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "# Base template: ${TEMPLATE_DOXYFILE}\n\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "${DOXYGEN_TEMPLATE_CONTENT}\n\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "# Custom overrides set by CMake:\n")
# Project information
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_NUMBER = ${OCC_VERSION_STRING_EXT}\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "OUTPUT_DIRECTORY = ${OUTPUT_DIR}\n")
# Ensure client-side search is configured correctly
file(APPEND ${DOXYGEN_CONFIG_FILE} "\n# Search engine settings\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "SEARCHENGINE = YES\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "SERVER_BASED_SEARCH = NO\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXTERNAL_SEARCH = NO\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "SEARCHDATA_FILE = searchdata.xml\n")
# Additional parameters based on the document type
if(DOC_TYPE STREQUAL "OVERVIEW")
# Settings for Overview documentation
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_LOGO = ${CMAKE_SOURCE_DIR}/dox/resources/occ_logo.png\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXTRACT_ALL = NO\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXTRACT_PRIVATE = NO\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXTRACT_STATIC = NO\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXCLUDE_PATTERNS = */src/* */inc/* */drv/* */Properties/*\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "ENABLED_SECTIONS = OVERVIEW_SECTION\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "GENERATE_TAGFILE = ${OUTPUT_DIR}/occt.tag\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "GENERATE_TREEVIEW = YES\n")
# Setup tag file for cross-referencing with Reference Manual
if(BUILD_DOC_RefMan)
file(APPEND ${DOXYGEN_CONFIG_FILE} "\n# Cross-referencing with Reference Manual\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "TAGFILES = \"${CMAKE_BINARY_DIR}/doc/refman/occt_refman.tag=../../refman/html\"\n")
endif()
# Input files for overview
if(DEFINED OCCT_OVERVIEW_FILES)
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT = ${OCCT_OVERVIEW_FILES}\n")
else()
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT = ${CMAKE_SOURCE_DIR}/dox\n")
endif()
# Collect image directories for overview
set(OVERVIEW_INPUT_DIRS ${CMAKE_SOURCE_DIR}/dox)
OCCT_DOC_COLLECT_IMAGE_DIRS("${OVERVIEW_INPUT_DIRS}" OVERVIEW_IMAGE_DIRS)
# Image path for overview
if(OVERVIEW_IMAGE_DIRS)
string(REPLACE ";" " " OVERVIEW_IMAGE_DIRS_STR "${OVERVIEW_IMAGE_DIRS}")
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${OVERVIEW_IMAGE_DIRS_STR} ${CMAKE_SOURCE_DIR}/dox/resources\n")
else()
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${CMAKE_SOURCE_DIR}/dox/resources\n")
endif()
# Example paths
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXAMPLE_PATH = ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/samples\n")
else()
# Settings for Reference Manual
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_NAME = \"Open CASCADE Technology Reference Manual\"\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_LOGO = ${CMAKE_SOURCE_DIR}/dox/resources/occ_logo.png\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "BUILTIN_STL_SUPPORT = YES\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXTRACT_PRIVATE = NO\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXTRACT_PACKAGE = YES\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXCLUDE_PATTERNS = */Properties/*\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "FILE_PATTERNS = *.h *.hxx *.lxx *.gxx *.pxx *.cxx *.cpp *.c *.md\n")
# Generate a tag file for cross-referencing from Overview
file(APPEND ${DOXYGEN_CONFIG_FILE} "\n# Generate tag file for cross-referencing\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "GENERATE_TAGFILE = ${OUTPUT_DIR}/occt_refman.tag\n")
# Input files for reference manual - CRITICAL FOR PROPER GENERATION
file(APPEND ${DOXYGEN_CONFIG_FILE} "\n# Input files for reference manual\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT = ${CMAKE_SOURCE_DIR}/src\n")
# If generating documentation for specific modules
if(DEFINED OCCT_DOC_MODULES)
set(MODULE_PATHS "")
foreach(MODULE ${OCCT_DOC_MODULES})
foreach(TOOLKIT ${${MODULE}_TOOLKITS})
list(APPEND MODULE_PATHS "${CMAKE_SOURCE_DIR}/src/${TOOLKIT}")
endforeach()
endforeach()
string(REPLACE ";" " " MODULE_PATHS_STR "${MODULE_PATHS}")
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT += ${MODULE_PATHS_STR}\n") # Use += to append to existing INPUT
endif()
# Configure image path for reference manual
set(REFMAN_INPUT_DIRS ${CMAKE_SOURCE_DIR}/src)
OCCT_DOC_COLLECT_IMAGE_DIRS("${REFMAN_INPUT_DIRS}" REFMAN_IMAGE_DIRS)
if(REFMAN_IMAGE_DIRS)
string(REPLACE ";" " " REFMAN_IMAGE_DIRS_STR "${REFMAN_IMAGE_DIRS}")
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${REFMAN_IMAGE_DIRS_STR} ${CMAKE_SOURCE_DIR}/dox/resources\n")
else()
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${CMAKE_SOURCE_DIR}/dox/resources\n")
endif()
# Add main page file if generated
if(EXISTS "${OUTPUT_DIR}/main_page.dox")
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT += ${OUTPUT_DIR}/main_page.dox\n") # Use += to append to existing INPUT
endif()
# Add header files to Doxygen input
if(DEFINED DOXYGEN_INPUT_FILES_STRING)
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT += ${DOXYGEN_INPUT_FILES_STRING}\n") # Use += to append to existing INPUT
endif()
endif()
# Custom CSS
if(EXISTS "${CMAKE_SOURCE_DIR}/dox/resources/custom.css")
file(APPEND ${DOXYGEN_CONFIG_FILE} "HTML_EXTRA_STYLESHEET = ${CMAKE_SOURCE_DIR}/dox/resources/custom.css\n")
endif()
# Set paths for dot tool
if(GRAPHVIZ_DOT_EXECUTABLE)
file(APPEND ${DOXYGEN_CONFIG_FILE} "DOT_PATH = ${GRAPHVIZ_DOT_EXECUTABLE}\n")
get_filename_component(DOT_DIRECTORY ${GRAPHVIZ_DOT_EXECUTABLE} DIRECTORY)
file(APPEND ${DOXYGEN_CONFIG_FILE} "DOTFONTPATH = ${DOT_DIRECTORY}\n")
file(APPEND ${DOXYGEN_CONFIG_FILE} "DOTFILE_DIRS = ${OUTPUT_DIR}/html\n")
endif()
# Confirm file creation
if(EXISTS ${DOXYGEN_CONFIG_FILE})
message(STATUS "Successfully created Doxygen configuration file at: ${DOXYGEN_CONFIG_FILE}")
else()
message(FATAL_ERROR "Failed to create Doxygen configuration file at: ${DOXYGEN_CONFIG_FILE}")
endif()
endfunction()
# Function to check if required tools are available
function(OCCT_DOC_CHECK_TOOLS)
# Find Doxygen
find_package(Doxygen QUIET)
if(NOT DOXYGEN_FOUND)
message(WARNING "Doxygen not found. Documentation will not be generated.")
set(OCCT_DOC_TOOLS_AVAILABLE FALSE PARENT_SCOPE)
return()
endif()
# Find Graphviz
find_program(GRAPHVIZ_DOT_EXECUTABLE NAMES dot)
# Check for MathJax for LaTeX formulas
if(NOT MATHJAX_PATH)
set(MATHJAX_PATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5")
endif()
# Find tools for PDF generation if needed
if(BUILD_DOC_PDF)
# Find pdflatex
find_program(PDFLATEX_EXECUTABLE NAMES pdflatex)
if(NOT PDFLATEX_EXECUTABLE)
message(WARNING "pdflatex not found. PDF documentation will not be generated.")
set(BUILD_DOC_PDF FALSE PARENT_SCOPE)
endif()
# Find Inkscape (for SVG to PNG conversion for PDFs)
find_program(INKSCAPE_EXECUTABLE NAMES inkscape)
if(NOT INKSCAPE_EXECUTABLE)
message(WARNING "Inkscape not found. SVG images will not be properly converted in PDF documentation.")
endif()
set(PDFLATEX_EXECUTABLE ${PDFLATEX_EXECUTABLE} PARENT_SCOPE)
set(INKSCAPE_EXECUTABLE ${INKSCAPE_EXECUTABLE} PARENT_SCOPE)
endif()
# Find tools for CHM generation if needed
if(BUILD_DOC_CHM AND WIN32)
# Find HTML Help Compiler
find_program(HHC_EXECUTABLE NAMES hhc HHC)
if(NOT HHC_EXECUTABLE)
message(WARNING "HTML Help Compiler not found. CHM documentation will not be generated.")
set(BUILD_DOC_CHM FALSE PARENT_SCOPE)
endif()
set(HHC_EXECUTABLE ${HHC_EXECUTABLE} PARENT_SCOPE)
endif()
set(GRAPHVIZ_DOT_EXECUTABLE ${GRAPHVIZ_DOT_EXECUTABLE} PARENT_SCOPE)
set(MATHJAX_PATH ${MATHJAX_PATH} PARENT_SCOPE)
set(OCCT_DOC_TOOLS_AVAILABLE TRUE PARENT_SCOPE)
endfunction()
# Function to process LaTeX files for PDF generation
function(OCCT_DOC_PROCESS_LATEX OUTPUT_DIR)
# Skip if PDF generation is not enabled or pdflatex not found
if(NOT BUILD_DOC_PDF OR NOT PDFLATEX_EXECUTABLE)
return()
endif()
message(STATUS "Processing LaTeX files for PDF generation...")
# Process SVG images if Inkscape is available
if(INKSCAPE_EXECUTABLE)
file(GLOB SVG_FILES "${OUTPUT_DIR}/latex/*.svg")
foreach(SVG_FILE ${SVG_FILES})
get_filename_component(FILE_NAME ${SVG_FILE} NAME_WE)
set(PNG_FILE "${OUTPUT_DIR}/latex/${FILE_NAME}.png")
execute_process(
COMMAND ${INKSCAPE_EXECUTABLE} -z -e ${PNG_FILE} ${SVG_FILE}
RESULT_VARIABLE INKSCAPE_RESULT
)
if(NOT INKSCAPE_RESULT EQUAL 0)
message(WARNING "Failed to convert ${SVG_FILE} to PNG")
endif()
endforeach()
endif()
# Generate PDF from LaTeX
execute_process(
COMMAND ${PDFLATEX_EXECUTABLE} -interaction=nonstopmode refman.tex
WORKING_DIRECTORY "${OUTPUT_DIR}/latex"
RESULT_VARIABLE LATEX_RESULT
OUTPUT_VARIABLE LATEX_OUTPUT
ERROR_VARIABLE LATEX_ERROR
)
if(NOT LATEX_RESULT EQUAL 0)
message(WARNING "Error generating PDF: ${LATEX_ERROR}")
else()
# Run pdflatex again for references
execute_process(
COMMAND ${PDFLATEX_EXECUTABLE} -interaction=nonstopmode refman.tex
WORKING_DIRECTORY "${OUTPUT_DIR}/latex"
)
message(STATUS "PDF documentation generated at ${OUTPUT_DIR}/latex/refman.pdf")
# Copy the PDF to a more accessible location
file(COPY "${OUTPUT_DIR}/latex/refman.pdf" DESTINATION "${OUTPUT_DIR}")
file(RENAME "${OUTPUT_DIR}/refman.pdf" "${OUTPUT_DIR}/${DOC_OUTPUT_NAME}.pdf")
endif()
endfunction()
# Main function to set up documentation targets
function(OCCT_SETUP_DOC_TARGETS)
# Check if required tools are available
OCCT_DOC_CHECK_TOOLS()
if(NOT OCCT_DOC_TOOLS_AVAILABLE)
return()
endif()
# Load lists of documentation files
OCCT_DOC_LOAD_FILE_LISTS()
# Collect module information
OCCT_DOC_COLLECT_MODULES_INFO()
# Extract toolkit dependencies
OCCT_DOC_EXTRACT_TOOLKIT_DEPENDENCIES()
# Create documentation output directories
set(DOC_ROOT_DIR "${CMAKE_BINARY_DIR}/doc")
file(MAKE_DIRECTORY ${DOC_ROOT_DIR})
# Setup Reference Manual target
if(BUILD_DOC_RefMan)
# Create output directories
set(REFMAN_OUTPUT_DIR "${DOC_ROOT_DIR}/refman")
file(MAKE_DIRECTORY ${REFMAN_OUTPUT_DIR})
file(MAKE_DIRECTORY "${REFMAN_OUTPUT_DIR}/html")
# Copy index file to provide fast access to HTML documentation
file(COPY "${CMAKE_SOURCE_DIR}/dox/resources/index.html" DESTINATION "${REFMAN_OUTPUT_DIR}")
# Generate main page for reference manual
OCCT_DOC_GENERATE_MAIN_PAGE(${REFMAN_OUTPUT_DIR} "main_page.dox")
# Configure Doxygen
set(DOC_TYPE "REFMAN")
OCCT_DOC_CONFIGURE_DOXYGEN(${REFMAN_OUTPUT_DIR} "Doxyfile" ${DOC_TYPE})
# Add custom target for reference manual
add_custom_target(RefMan
COMMAND ${DOXYGEN_EXECUTABLE} ${REFMAN_OUTPUT_DIR}/Doxyfile
COMMENT "Generating Reference Manual with Doxygen"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
VERBATIM
)
# Add custom command to install generated documentation if required
if(INSTALL_DOC_RefMan)
install(DIRECTORY "${REFMAN_OUTPUT_DIR}/html/"
DESTINATION "${INSTALL_DIR_DOC}/refman/html"
OPTIONAL)
endif()
endif()
# Setup Overview documentation target (after RefMan so it can use the RefMan tag file)
if(BUILD_DOC_Overview)
# Create output directories
set(OVERVIEW_OUTPUT_DIR "${DOC_ROOT_DIR}/overview")
file(MAKE_DIRECTORY ${OVERVIEW_OUTPUT_DIR})
file(MAKE_DIRECTORY "${OVERVIEW_OUTPUT_DIR}/html")
# Configure Doxygen for Overview
set(DOC_TYPE "OVERVIEW")
OCCT_DOC_CONFIGURE_DOXYGEN(${OVERVIEW_OUTPUT_DIR} "Doxyfile" ${DOC_TYPE})
# Add custom target for overview documentation
add_custom_target(Overview
COMMAND ${DOXYGEN_EXECUTABLE} ${OVERVIEW_OUTPUT_DIR}/Doxyfile
COMMENT "Generating Overview documentation with Doxygen"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
VERBATIM
)
# Copy index file to provide fast access to HTML documentation
file(COPY "${CMAKE_SOURCE_DIR}/dox/resources/index.html" DESTINATION "${OVERVIEW_OUTPUT_DIR}")
# Add custom command to copy generated documentation to install location if required
if(INSTALL_DOC_Overview)
install(DIRECTORY "${OVERVIEW_OUTPUT_DIR}/html/"
DESTINATION "${INSTALL_DIR_DOC}/overview/html"
OPTIONAL)
# Create overview.html only for windows
if(WIN32)
install(FILES "${CMAKE_SOURCE_DIR}/dox/resources/overview.html"
DESTINATION "${INSTALL_DIR_DOC}")
endif()
endif()
endif()
# Combined documentation target
if(BUILD_DOC_Overview AND BUILD_DOC_RefMan)
add_custom_target(doc ALL
DEPENDS RefMan Overview
COMMENT "Generating all documentation"
)
set_property (TARGET Overview PROPERTY FOLDER "Documentation")
set_property (TARGET RefMan PROPERTY FOLDER "Documentation")
add_dependencies(Overview RefMan) # Ensure Overview uses RefMan tag file
elseif(BUILD_DOC_Overview)
add_custom_target(doc ALL
DEPENDS Overview
COMMENT "Generating Overview documentation"
)
set_property (TARGET Overview PROPERTY FOLDER "Documentation")
elseif(BUILD_DOC_RefMan)
add_custom_target(doc ALL
DEPENDS RefMan
COMMENT "Generating Reference Manual"
)
set_property (TARGET RefMan PROPERTY FOLDER "Documentation")
endif()
set_property (TARGET doc PROPERTY FOLDER "Documentation")
endfunction()

245
adm/cmake/occt_gtest.cmake Normal file
View File

@ -0,0 +1,245 @@
# Google Test integration for OCCT toolkits
set (TEST_PROJECT_NAME OpenCascadeGTest)
# Initialize Google Test environment and create the target
function(OCCT_INIT_GTEST)
if (NOT GOOGLETEST_FOUND)
message(STATUS "Google Test not available. Skipping test project ${TEST_PROJECT_NAME}")
return()
endif()
# Initialize test data collections
set(OCCT_GTEST_SOURCE_FILES "" PARENT_SCOPE)
set(OCCT_GTEST_SOURCE_FILES_ABS "" PARENT_SCOPE)
set(OCCT_GTEST_TESTS_LIST "" PARENT_SCOPE)
# Create the test executable once
add_executable(${TEST_PROJECT_NAME})
set_target_properties(${TEST_PROJECT_NAME} PROPERTIES FOLDER "Testing")
# Link with Google Test
target_link_libraries(${TEST_PROJECT_NAME} PRIVATE GTest::gtest_main)
# Add pthreads if necessary (for Linux)
if (UNIX AND NOT APPLE)
target_link_libraries(${TEST_PROJECT_NAME} PRIVATE pthread)
endif()
target_compile_definitions(${TEST_PROJECT_NAME} PRIVATE GTEST_LINKED_AS_SHARED_LIBRARY=1)
# Link with all active toolkits that are libraries
foreach(TOOLKIT ${BUILD_TOOLKITS})
if(TARGET ${TOOLKIT})
get_target_property(TOOLKIT_TYPE ${TOOLKIT} TYPE)
if(TOOLKIT_TYPE STREQUAL "SHARED_LIBRARY" OR TOOLKIT_TYPE STREQUAL "STATIC_LIBRARY")
target_link_libraries(${TEST_PROJECT_NAME} PRIVATE ${TOOLKIT})
endif()
endif()
endforeach()
if (INSTALL_GTEST)
# Install the test executable
install (TARGETS ${TEST_PROJECT_NAME}
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
if (EMSCRIPTEN)
install(FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${TEST_PROJECT_NAME}.wasm DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}")
endif()
endif()
endfunction()
# Add tests from a specific toolkit to the main test executable
function(OCCT_COLLECT_TOOLKIT_TESTS TOOLKIT_NAME)
# Skip if Google Test is not available or the test executable wasn't created
if (NOT GOOGLETEST_FOUND OR NOT TARGET ${TEST_PROJECT_NAME})
return()
endif()
# Extract test source files from FILES.cmake
set(FILES_CMAKE_PATH "${OCCT_${TOOLKIT_NAME}_FILES_LOCATION}/GTests/FILES.cmake")
if(EXISTS "${FILES_CMAKE_PATH}")
# Reset toolkit test files list
set(OCCT_${TOOLKIT_NAME}_GTests_FILES)
# Include the toolkit's FILES.cmake which sets OCCT_${TOOLKIT_NAME}_GTests_FILES
include("${FILES_CMAKE_PATH}")
set(TEST_SOURCE_FILES "${OCCT_${TOOLKIT_NAME}_GTests_FILES}")
# Skip if no test files found
if(NOT TEST_SOURCE_FILES)
return()
endif()
# Get module name for test organization
get_target_property(TOOLKIT_MODULE ${TOOLKIT_NAME} MODULE)
if(NOT TOOLKIT_MODULE)
set(TOOLKIT_MODULE "Unknown")
endif()
# Get absolute paths of test source files and add them to the executable
set(TEST_SOURCE_FILES_ABS)
foreach(TEST_SOURCE_FILE ${TEST_SOURCE_FILES})
set(TEST_SOURCE_FILE_ABS "${OCCT_${TOOLKIT_NAME}_GTests_FILES_LOCATION}/${TEST_SOURCE_FILE}")
list(APPEND TEST_SOURCE_FILES_ABS "${TEST_SOURCE_FILE_ABS}")
endforeach()
# Add test sources to the executable
target_sources(${TEST_PROJECT_NAME} PRIVATE ${TEST_SOURCE_FILES_ABS})
# Create a more reliable test discovery approach
# Use the WORKING_DIRECTORY parameter to ensure proper test execution context
gtest_add_tests(
TARGET ${TEST_PROJECT_NAME}
TEST_PREFIX "${TOOLKIT_MODULE}::${TOOLKIT_NAME}::"
SOURCES ${TEST_SOURCE_FILES_ABS}
TEST_LIST TOOLKIT_TESTS
SKIP_DEPENDENCY
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
)
# Configure test output properties to improve result capture
foreach(test_name ${TOOLKIT_TESTS})
set_tests_properties(${test_name} PROPERTIES
# Use proper result detection by checking output and return code
PASS_REGULAR_EXPRESSION "\\[ PASSED \\]"
FAIL_REGULAR_EXPRESSION "\\[ FAILED \\]"
)
endforeach()
# Add these tests to the main list so we can set environment for all tests later
# Get the existing list first
if(DEFINED OCCT_GTEST_TESTS_LIST)
set(TEMP_GTEST_TESTS_LIST ${OCCT_GTEST_TESTS_LIST})
else()
set(TEMP_GTEST_TESTS_LIST "")
endif()
# Append the new tests
list(APPEND TEMP_GTEST_TESTS_LIST ${TOOLKIT_TESTS})
# Update the parent scope variable
set(OCCT_GTEST_TESTS_LIST "${TEMP_GTEST_TESTS_LIST}" PARENT_SCOPE)
endif()
endfunction()
# Set environment variables for all collected tests
function(OCCT_SET_GTEST_ENVIRONMENT)
if (NOT GOOGLETEST_FOUND OR NOT TARGET ${TEST_PROJECT_NAME})
return()
endif()
if (OCCT_GTEST_TESTS_LIST)
# Set common environment variables
set(TEST_ENVIRONMENT
"CSF_LANGUAGE=us"
"MMGT_CLEAR=1"
"CSF_SHMessage=${CMAKE_SOURCE_DIR}/resources/SHMessage"
"CSF_MDTVTexturesDirectory=${CMAKE_SOURCE_DIR}/resources/Textures"
"CSF_ShadersDirectory=${CMAKE_SOURCE_DIR}/resources/Shaders"
"CSF_XSMessage=${CMAKE_SOURCE_DIR}/resources/XSMessage"
"CSF_TObjMessage=${CMAKE_SOURCE_DIR}/resources/TObj"
"CSF_StandardDefaults=${CMAKE_SOURCE_DIR}/resources/StdResource"
"CSF_PluginDefaults=${CMAKE_SOURCE_DIR}/resources/StdResource"
"CSF_XCAFDefaults=${CMAKE_SOURCE_DIR}/resources/StdResource"
"CSF_TObjDefaults=${CMAKE_SOURCE_DIR}/resources/StdResource"
"CSF_StandardLiteDefaults=${CMAKE_SOURCE_DIR}/resources/StdResource"
"CSF_IGESDefaults=${CMAKE_SOURCE_DIR}/resources/XSTEPResource"
"CSF_STEPDefaults=${CMAKE_SOURCE_DIR}/resources/XSTEPResource"
"CSF_XmlOcafResource=${CMAKE_SOURCE_DIR}/resources/XmlOcafResource"
"CSF_MIGRATION_TYPES=${CMAKE_SOURCE_DIR}/resources/StdResource/MigrationSheet.txt"
"CSF_OCCTResourcePath=${CMAKE_SOURCE_DIR}/resources"
"CSF_OCCTDataPath=${CMAKE_SOURCE_DIR}/data"
"CSF_OCCTDocPath=${CMAKE_SOURCE_DIR}/doc"
"CSF_OCCTSamplesPath=${CMAKE_SOURCE_DIR}/samples"
"CSF_OCCTTestsPath=${CMAKE_SOURCE_DIR}/tests"
"CSF_OCCTBinPath=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
"CSF_OCCTLibPath=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}"
"CSF_OCCTIncludePath=${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}"
"CASROOT=${CMAKE_SOURCE_DIR}"
)
# Build PATH environment variable
set(PATH_ELEMENTS
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
)
# Add 3rdparty paths to PATH
if(3RDPARTY_TCL_LIBRARY_DIR)
list(APPEND PATH_ELEMENTS "${3RDPARTY_TCL_LIBRARY_DIR}")
endif()
if(3RDPARTY_TK_LIBRARY_DIR)
list(APPEND PATH_ELEMENTS "${3RDPARTY_TK_LIBRARY_DIR}")
endif()
if(3RDPARTY_FREETYPE_LIBRARY_DIR)
list(APPEND PATH_ELEMENTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
endif()
if(3RDPARTY_FREEIMAGE_LIBRARY_DIRS)
list(APPEND PATH_ELEMENTS "${3RDPARTY_FREEIMAGE_LIBRARY_DIRS}")
endif()
if(3RDPARTY_TBB_LIBRARY_DIR)
list(APPEND PATH_ELEMENTS "${3RDPARTY_TBB_LIBRARY_DIR}")
endif()
if(3RDPARTY_VTK_LIBRARY_DIR)
list(APPEND PATH_ELEMENTS "${3RDPARTY_VTK_LIBRARY_DIR}")
endif()
if(3RDPARTY_FFMPEG_LIBRARY_DIR)
list(APPEND PATH_ELEMENTS "${3RDPARTY_FFMPEG_LIBRARY_DIR}")
endif()
if(3RDPARTY_QT_DIR)
list(APPEND PATH_ELEMENTS "${3RDPARTY_QT_DIR}/bin")
endif()
if (3RDPARTY_DLL_DIRS)
foreach(DLL_DIR ${3RDPARTY_DLL_DIRS})
list(APPEND PATH_ELEMENTS "${DLL_DIR}")
endforeach()
endif()
# Create the PATH variable that ctest will use
if(WIN32)
string(REPLACE ";" "\\;" TEST_PATH_ENV "$ENV{PATH}")
string(REPLACE ";" "\\;" PATH_ELEMENTS_STR "${PATH_ELEMENTS}")
list(APPEND TEST_ENVIRONMENT "PATH=${PATH_ELEMENTS_STR}\\;${TEST_PATH_ENV}")
else()
string(REPLACE ";" ":" PATH_ELEMENTS_STR "${PATH_ELEMENTS}")
list(APPEND TEST_ENVIRONMENT "PATH=${PATH_ELEMENTS_STR}:$ENV{PATH}")
# Set LD_LIBRARY_PATH for Unix systems
list(APPEND TEST_ENVIRONMENT "LD_LIBRARY_PATH=${PATH_ELEMENTS_STR}:$ENV{LD_LIBRARY_PATH}")
# Set DYLD_LIBRARY_PATH for macOS
if(APPLE)
list(APPEND TEST_ENVIRONMENT "DYLD_LIBRARY_PATH=${PATH_ELEMENTS_STR}:$ENV{DYLD_LIBRARY_PATH}")
endif()
endif()
# Add DrawResources related environment if it exists
if(EXISTS "${CMAKE_SOURCE_DIR}/resources/DrawResources")
list(APPEND TEST_ENVIRONMENT "DRAWHOME=${CMAKE_SOURCE_DIR}/resources/DrawResources")
list(APPEND TEST_ENVIRONMENT "CSF_DrawPluginDefaults=${CMAKE_SOURCE_DIR}/resources/DrawResources")
if(EXISTS "${CMAKE_SOURCE_DIR}/resources/DrawResources/DrawDefault")
list(APPEND TEST_ENVIRONMENT "DRAWDEFAULT=${CMAKE_SOURCE_DIR}/resources/DrawResources/DrawDefault")
endif()
endif()
# Set FPE signal handler if enabled
if(BUILD_ENABLE_FPE_SIGNAL_HANDLER)
list(APPEND TEST_ENVIRONMENT "CSF_FPE=1")
endif()
# Set TCL/TK library paths if they differ
if(3RDPARTY_TCL_LIBRARY_DIR AND 3RDPARTY_TK_LIBRARY_DIR AND NOT 3RDPARTY_TCL_LIBRARY_DIR STREQUAL 3RDPARTY_TK_LIBRARY_DIR)
if(3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT)
list(APPEND TEST_ENVIRONMENT "TCL_LIBRARY=${3RDPARTY_TCL_LIBRARY_DIR}/../lib/tcl${3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT}")
endif()
if(3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT)
list(APPEND TEST_ENVIRONMENT "TK_LIBRARY=${3RDPARTY_TK_LIBRARY_DIR}/../lib/tk${3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT}")
endif()
endif()
# Set environment for all tests in the project
set_tests_properties(${OCCT_GTEST_TESTS_LIST} PROPERTIES ENVIRONMENT "${TEST_ENVIRONMENT}")
endif()
endfunction()

View File

@ -34,9 +34,7 @@ endmacro()
function (FILE_TO_LIST FILE_NAME FILE_CONTENT)
set (LOCAL_FILE_CONTENT)
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${FILE_NAME}")
file (STRINGS "${BUILD_PATCH}/${FILE_NAME}" LOCAL_FILE_CONTENT)
elseif (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}")
if (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}")
file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
endif()
@ -44,9 +42,7 @@ function (FILE_TO_LIST FILE_NAME FILE_CONTENT)
endfunction()
function(FIND_FOLDER_OR_FILE FILE_OR_FOLDER_NAME RESULT_PATH)
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${FILE_OR_FOLDER_NAME}")
set (${RESULT_PATH} "${BUILD_PATCH}/${FILE_OR_FOLDER_NAME}" PARENT_SCOPE)
elseif (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_OR_FOLDER_NAME}")
if (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_OR_FOLDER_NAME}")
set (${RESULT_PATH} "${CMAKE_SOURCE_DIR}/${FILE_OR_FOLDER_NAME}" PARENT_SCOPE)
else()
set (${RESULT_PATH} "" PARENT_SCOPE)
@ -175,25 +171,8 @@ function (FIND_SUBDIRECTORY ROOT_DIRECTORY DIRECTORY_SUFFIX SUBDIRECTORY_NAME)
endfunction()
function (OCCT_ORIGIN_AND_PATCHED_FILES RELATIVE_PATH SEARCH_TEMPLATE RESULT)
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}")
file (GLOB FOUND_FILES "${BUILD_PATCH}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
endif()
file (GLOB ORIGIN_FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
foreach (ORIGIN_FILE ${ORIGIN_FILES})
# check for existence of patched version of current file
if (NOT BUILD_PATCH OR NOT EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}")
list (APPEND FOUND_FILES ${ORIGIN_FILE})
else()
get_filename_component (ORIGIN_FILE_NAME "${ORIGIN_FILE}" NAME)
if (NOT EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}/${ORIGIN_FILE_NAME}")
list (APPEND FOUND_FILES ${ORIGIN_FILE})
endif()
endif()
endforeach()
set (${RESULT} ${FOUND_FILES} PARENT_SCOPE)
set (${RESULT} ${ORIGIN_FILES} PARENT_SCOPE)
endfunction()
function (FILLUP_PRODUCT_SEARCH_TEMPLATE PRODUCT_NAME COMPILER COMPILER_BITNESS SEARCH_TEMPLATES)
@ -249,60 +228,31 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
endfunction()
macro (OCCT_INSTALL_FILE_OR_DIR BEING_INSTALLED_OBJECT DESTINATION_PATH)
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}")
if (IS_DIRECTORY "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}")
# first of all, install original files
install (DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
# secondly, rewrite original files with patched ones
install (DIRECTORY "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
else()
install (FILES "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
endif()
else()
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}")
install (DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
else()
install (FILES "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
endif()
endif()
endmacro()
macro (OCCT_CONFIGURE_AND_INSTALL BEING_CONGIRUGED_FILE BUILD_NAME INSTALL_NAME DESTINATION_PATH)
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}")
configure_file("${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
else()
configure_file("${CMAKE_SOURCE_DIR}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
endif()
install(FILES "${OCCT_BINARY_DIR}/${BUILD_NAME}" DESTINATION "${DESTINATION_PATH}" RENAME ${INSTALL_NAME})
endmacro()
function (EXTRACT_TOOLKIT_PACKAGES RELATIVE_PATH OCCT_TOOLKIT RESULT_PACKAGES)
set (OCCT_TOOLKIT_PACKAGES "")
get_property(OCCT_TOOLKIT_PACKAGES GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_PACKAGES)
if (OCCT_TOOLKIT_PACKAGES)
set (${RESULT_PACKAGES} ${OCCT_TOOLKIT_PACKAGES} PARENT_SCOPE)
return()
endif()
FILE_TO_LIST ("${RELATIVE_PATH}/${OCCT_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES)
set (${RESULT_PACKAGES} ${OCCT_TOOLKIT_PACKAGES} PARENT_SCOPE)
set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_PACKAGES "${OCCT_TOOLKIT_PACKAGES}")
set (${RESULT_PACKAGES} ${OCCT_${OCCT_TOOLKIT}_LIST_OF_PACKAGES} PARENT_SCOPE)
endfunction()
function(EXTRACT_TOOLKIT_EXTERNLIB RELATIVE_PATH OCCT_TOOLKIT RESULT_LIBS)
set (OCCT_TOOLKIT_LIBS "")
get_property(OCCT_TOOLKIT_LIBS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_LIBS)
if (OCCT_TOOLKIT_LIBS)
set (${RESULT_LIBS} ${OCCT_TOOLKIT_LIBS} PARENT_SCOPE)
return()
endif()
FILE_TO_LIST ("${RELATIVE_PATH}/${OCCT_TOOLKIT}/EXTERNLIB" OCCT_TOOLKIT_LIBS)
set (${RESULT_LIBS} ${OCCT_TOOLKIT_LIBS} PARENT_SCOPE)
set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_LIBS "${OCCT_TOOLKIT_LIBS}")
set (${RESULT_LIBS} ${OCCT_${OCCT_TOOLKIT}_EXTERNAL_LIBS} PARENT_SCOPE)
endfunction()
function (EXTRACT_PACKAGE_FILES RELATIVE_PATH OCCT_PACKAGE RESULT_FILES RESULT_INCLUDE_FOLDER)
# Package name can be relative path, need to get only the name of the final element
get_filename_component (OCCT_PACKAGE ${OCCT_PACKAGE} NAME)
# package name is not unique, it can be reuse in tools and src,
# use extra parameter as relative path to distinguish between them
set (OCCT_PACKAGE_FILES "")
@ -314,32 +264,20 @@ function (EXTRACT_PACKAGE_FILES RELATIVE_PATH OCCT_PACKAGE RESULT_FILES RESULT_I
return()
endif()
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}/${OCCT_PACKAGE}/FILES")
file (STRINGS "${BUILD_PATCH}/${RELATIVE_PATH}/${OCCT_PACKAGE}/FILES" OCCT_PACKAGE_FILES)
set (OCCT_PACKAGE_INCLUDE_DIR "${BUILD_PATCH}/${RELATIVE_PATH}/${OCCT_PACKAGE}")
elseif (EXISTS "${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${OCCT_PACKAGE}/FILES")
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${OCCT_PACKAGE}/FILES" OCCT_PACKAGE_FILES)
set (OCCT_PACKAGE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${OCCT_PACKAGE}")
endif()
set (OCCT_PACKAGE_INCLUDE_DIR "${OCCT_${OCCT_PACKAGE}_FILES_LOCATION}")
set (OCCT_PACKAGE_FILES "${OCCT_${OCCT_PACKAGE}_FILES}")
# collect and searach for the files in the package directory or patached one
# collect and search for the files in the package directory or patched one
# FILE contains inly filename that must to be inside package or patched directory
set (FILE_PATH_LIST)
foreach (OCCT_FILE ${OCCT_PACKAGE_FILES})
string (REGEX REPLACE "[^:]+:+" "" OCCT_FILE "${OCCT_FILE}")
FIND_FOLDER_OR_FILE ("${RELATIVE_PATH}/${OCCT_PACKAGE}/${OCCT_FILE}" CUSTOM_FILE_PATH)
if (CUSTOM_FILE_PATH)
list (APPEND FILE_PATH_LIST "${CUSTOM_FILE_PATH}")
endif()
list (APPEND FILE_PATH_LIST "${OCCT_PACKAGE_INCLUDE_DIR}/${OCCT_FILE}")
endforeach()
if (NOT FILE_PATH_LIST)
if(BUILD_PATH)
message (WARNING "FILES has not been found in ${BUILD_PATCH}/${RELATIVE_PATH}/${OCCT_PACKAGE}")
else()
message (WARNING "FILES has not been found in ${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${OCCT_PACKAGE}")
endif()
message (WARNING "FILES has not been found in ${OCCT_PACKAGE_INCLUDE_DIR} for package ${OCCT_PACKAGE}")
endif()
set (${RESULT_FILES} ${FILE_PATH_LIST} PARENT_SCOPE)
@ -348,7 +286,11 @@ function (EXTRACT_PACKAGE_FILES RELATIVE_PATH OCCT_PACKAGE RESULT_FILES RESULT_I
set_property(GLOBAL PROPERTY OCCT_PACKAGE_${RELATIVE_PATH}_${OCCT_PACKAGE}_INCLUDE_DIR "${OCCT_PACKAGE_INCLUDE_DIR}")
endfunction()
function(EXCTRACT_TOOLKIT_DEPS RELATIVE_PATH OCCT_TOOLKIT RESULT_TKS_AS_DEPS RESULT_INCLUDE_FOLDERS)
# SOLUTION_TYPE: MODULES, TOOLS, SAMPLES
# OCCT_TOOLKIT: TK*
# RESULT_TKS_AS_DEPS: TK* dependencies
# RESULT_INCLUDE_FOLDERS: include folders
function(EXCTRACT_TOOLKIT_DEPS SOLUTION_TYPE OCCT_TOOLKIT RESULT_TKS_AS_DEPS RESULT_INCLUDE_FOLDERS)
set (OCCT_TOOLKIT_DEPS "")
set (OCCT_TOOLKIT_INCLUDE_FOLDERS "")
get_property(OCCT_TOOLKIT_DEPS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_DEPS)
@ -359,7 +301,7 @@ function(EXCTRACT_TOOLKIT_DEPS RELATIVE_PATH OCCT_TOOLKIT RESULT_TKS_AS_DEPS RES
return()
endif()
set (EXTERNAL_LIBS)
EXTRACT_TOOLKIT_EXTERNLIB (${RELATIVE_PATH} ${OCCT_TOOLKIT} EXTERNAL_LIBS)
EXTRACT_TOOLKIT_EXTERNLIB (${SOLUTION_TYPE} ${OCCT_TOOLKIT} EXTERNAL_LIBS)
foreach (EXTERNAL_LIB ${EXTERNAL_LIBS})
string (REGEX MATCH "^TK" TK_FOUND ${EXTERNAL_LIB})
if (TK_FOUND)
@ -368,9 +310,9 @@ function(EXCTRACT_TOOLKIT_DEPS RELATIVE_PATH OCCT_TOOLKIT RESULT_TKS_AS_DEPS RES
endforeach()
set (OCCT_TOOLKIT_PACKAGES)
EXTRACT_TOOLKIT_PACKAGES (${RELATIVE_PATH} ${OCCT_TOOLKIT} OCCT_TOOLKIT_PACKAGES)
EXTRACT_TOOLKIT_PACKAGES (${SOLUTION_TYPE} ${OCCT_TOOLKIT} OCCT_TOOLKIT_PACKAGES)
foreach(OCCT_PACKAGE ${OCCT_TOOLKIT_PACKAGES})
EXTRACT_PACKAGE_FILES (${RELATIVE_PATH} ${OCCT_PACKAGE} OCCT_PACKAGE_FILES OCCT_PACKAGE_INCLUDE_DIR)
EXTRACT_PACKAGE_FILES (${SOLUTION_TYPE} ${OCCT_PACKAGE} OCCT_PACKAGE_FILES OCCT_PACKAGE_INCLUDE_DIR)
list (APPEND OCCT_TOOLKIT_INCLUDE_FOLDERS ${OCCT_PACKAGE_INCLUDE_DIR})
endforeach()
@ -380,7 +322,11 @@ function(EXCTRACT_TOOLKIT_DEPS RELATIVE_PATH OCCT_TOOLKIT RESULT_TKS_AS_DEPS RES
set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_INCLUDE_FOLDERS "${OCCT_TOOLKIT_INCLUDE_FOLDERS}")
endfunction()
function(EXCTRACT_TOOLKIT_FULL_DEPS RELATIVE_PATH OCCT_TOOLKIT RESULT_TKS_AS_DEPS RESULT_INCLUDE_FOLDERS)
# SOLUTION_TYPE: MODULES, TOOLS, SAMPLES
# OCCT_TOOLKIT: TK*
# RESULT_TKS_AS_DEPS: list of TK* dependencies
# RESULT_INCLUDE_FOLDERS: list of include folders
function(EXCTRACT_TOOLKIT_FULL_DEPS SOLUTION_TYPE OCCT_TOOLKIT RESULT_TKS_AS_DEPS RESULT_INCLUDE_FOLDERS)
set (OCCT_TOOLKIT_DEPS "")
set (OCCT_TOOLKIT_INCLUDE_FOLDERS "")
get_property(OCCT_TOOLKIT_DEPS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_FULL_DEPS)
@ -391,12 +337,12 @@ function(EXCTRACT_TOOLKIT_FULL_DEPS RELATIVE_PATH OCCT_TOOLKIT RESULT_TKS_AS_DEP
return()
endif()
EXCTRACT_TOOLKIT_DEPS(${RELATIVE_PATH} ${OCCT_TOOLKIT} OCCT_TOOLKIT_DEPS OCCT_TOOLKIT_INCLUDE_DIR)
EXCTRACT_TOOLKIT_DEPS(${SOLUTION_TYPE} ${OCCT_TOOLKIT} OCCT_TOOLKIT_DEPS OCCT_TOOLKIT_INCLUDE_DIR)
list(APPEND OCCT_TOOLKIT_FULL_DEPS ${OCCT_TOOLKIT_DEPS})
list(APPEND OCCT_TOOLKIT_INCLUDE_FOLDERS ${OCCT_TOOLKIT_INCLUDE_DIR})
foreach(DEP ${OCCT_TOOLKIT_DEPS})
EXCTRACT_TOOLKIT_FULL_DEPS(${RELATIVE_PATH} ${DEP} DEP_TOOLKIT_DEPS DEP_INCLUDE_DIRS)
EXCTRACT_TOOLKIT_FULL_DEPS(${SOLUTION_TYPE} ${DEP} DEP_TOOLKIT_DEPS DEP_INCLUDE_DIRS)
list(APPEND OCCT_TOOLKIT_FULL_DEPS ${DEP_TOOLKIT_DEPS})
list(APPEND OCCT_TOOLKIT_INCLUDE_FOLDERS ${DEP_INCLUDE_DIRS})
endforeach()
@ -412,9 +358,7 @@ endfunction()
function (FILE_TO_LIST FILE_NAME FILE_CONTENT)
set (LOCAL_FILE_CONTENT)
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${FILE_NAME}")
file (STRINGS "${BUILD_PATCH}/${FILE_NAME}" LOCAL_FILE_CONTENT)
elseif (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}")
if (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}")
file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
endif()
@ -426,9 +370,6 @@ function (COLLECT_AND_INSTALL_OCCT_HEADER_FILES THE_ROOT_TARGET_OCCT_DIR THE_OCC
# consider patched header.in template
set (TEMPLATE_HEADER_PATH "${CMAKE_SOURCE_DIR}/adm/templates/header.in")
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/header.in")
set (TEMPLATE_HEADER_PATH "${BUILD_PATCH}/adm/templates/header.in")
endif()
set (OCCT_HEADER_FILES_COMPLETE)
foreach(OCCT_TOOLKIT ${THE_OCCT_BUILD_TOOLKITS})
@ -437,7 +378,7 @@ function (COLLECT_AND_INSTALL_OCCT_HEADER_FILES THE_ROOT_TARGET_OCCT_DIR THE_OCC
foreach(OCCT_PACKAGE ${USED_PACKAGES})
EXTRACT_PACKAGE_FILES (${THE_RELATIVE_PATH} ${OCCT_PACKAGE} ALL_FILES _)
set (HEADER_FILES_FILTERING ${ALL_FILES})
list (FILTER HEADER_FILES_FILTERING INCLUDE REGEX ".+[.](h|g|p|lxx)")
list (FILTER HEADER_FILES_FILTERING INCLUDE REGEX ".+[.](h|g|p|lxx|hxx|pxx|hpp|gxx)$")
list (APPEND OCCT_HEADER_FILES_COMPLETE ${HEADER_FILES_FILTERING})
endforeach()
endforeach()
@ -477,7 +418,7 @@ function (COLLECT_AND_INSTALL_OCCT_HEADER_FILES THE_ROOT_TARGET_OCCT_DIR THE_OCC
endforeach()
set (OCCT_HEADER_FILES_INSTALLATION ${OCCT_HEADER_FILES_COMPLETE})
list (FILTER OCCT_HEADER_FILES_INSTALLATION INCLUDE REGEX ".*[.](h|lxx)")
list (FILTER OCCT_HEADER_FILES_INSTALLATION INCLUDE REGEX ".*[.](h|hxx|lxx)$")
install (FILES ${OCCT_HEADER_FILES_INSTALLATION} DESTINATION "${INSTALL_DIR}/${THE_OCCT_INSTALL_DIR_PREFIX}")
endfunction()
@ -509,25 +450,14 @@ macro (OCCT_COPY_FILE_OR_DIR BEING_COPIED_OBJECT DESTINATION_PATH)
if (EXISTS "${CMAKE_SOURCE_DIR}/${BEING_COPIED_OBJECT}")
file (COPY "${CMAKE_SOURCE_DIR}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
endif()
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_COPIED_OBJECT}")
# secondly, rewrite original files with patched ones
file (COPY "${BUILD_PATCH}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
endif()
endmacro()
macro (OCCT_CONFIGURE BEING_CONGIRUGED_FILE FINAL_NAME)
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}")
configure_file("${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
else()
configure_file("${CMAKE_SOURCE_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
endif()
endmacro()
macro (OCCT_ADD_SUBDIRECTORY BEING_ADDED_DIRECTORY)
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
add_subdirectory(${BUILD_PATCH}/${BEING_ADDED_DIRECTORY})
elseif (EXISTS "${CMAKE_SOURCE_DIR}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
if (EXISTS "${CMAKE_SOURCE_DIR}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
add_subdirectory (${CMAKE_SOURCE_DIR}/${BEING_ADDED_DIRECTORY})
else()
message (STATUS "${BEING_ADDED_DIRECTORY} directory is not included")
@ -762,7 +692,7 @@ macro (OCCT_UPDATE_TARGET_FILE)
install (CODE
"string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE)
file (GLOB ALL_OCCT_TARGET_FILES \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\")
file (GLOB ALL_OCCT_TARGET_FILES \"\$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\")
foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES})
file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT)
file (REMOVE \"\${TARGET_FILENAME}\")

View File

@ -3,8 +3,8 @@
macro (OCCT_GENERATE_CONTENT_ONLY CurrentResource)
set (RESOURCE_FILES)
set (isResDirectory FALSE)
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/src/${CurrentResource}")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${CurrentResource}/FILES" RESOURCE_FILES)
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/resources/${CurrentResource}")
file (STRINGS "${CMAKE_SOURCE_DIR}/resources/${CurrentResource}/FILES" RESOURCE_FILES)
set (CurrentResource_Directory "${CurrentResource}")
set (isResDirectory TRUE)
else()
@ -27,38 +27,24 @@ macro (OCCT_GENERATE_CONTENT_ONLY CurrentResource)
string (REPLACE "." "_" CurrentResource_FileName "${CurrentResource_FileName}")
set (HEADER_FILE_NAME "${CurrentResource_Directory}_${CurrentResource_FileName}.pxx")
set (toProcessResFile TRUE)
if (isResDirectory)
list (FIND RESOURCE_FILES "${HEADER_FILE_NAME}" aResIndex)
if ("${aResIndex}" STREQUAL "-1")
set (toProcessResFile FALSE)
endif()
endif()
if (toProcessResFile)
message(STATUS "Info. Generating header file from resource file: ${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${RESOURCE_FILE}")
message(STATUS "Info. Generating header file from resource file: ${CMAKE_SOURCE_DIR}/resources/${CurrentResource_Directory}/${RESOURCE_FILE}")
# generate content for header file
set (OCCT_HEADER_FILE_CONTENT "// This file has been automatically generated from resource file src/${CurrentResource_Directory}/${RESOURCE_FILE}\n\n")
set (OCCT_HEADER_FILE_CONTENT "// This file has been automatically generated from resource file resources/${CurrentResource_Directory}/${RESOURCE_FILE}\n\n")
# read resource file
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${RESOURCE_FILE}" RESOURCE_FILE_LINES_LIST)
file (STRINGS "${CMAKE_SOURCE_DIR}/resources/${CurrentResource_Directory}/${RESOURCE_FILE}" RESOURCE_FILE_LINES_LIST)
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT}static const char ${CurrentResource_Directory}_${CurrentResource_FileName}[] =")
foreach (line IN LISTS RESOURCE_FILE_LINES_LIST)
string (REPLACE "\"" "\\\"" line "${line}")
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT}\n \"${line}\\n\"")
endforeach()
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT};")
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT};\n\n")
# Save generated content to header file
set (HEADER_FILE "${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${HEADER_FILE_NAME}")
set (HEADER_FILE "${OCCT_${CurrentResource_Directory}_FILES_LOCATION}/${HEADER_FILE_NAME}")
if (EXISTS "${HEADER_FILE}")
file (REMOVE "${HEADER_FILE}")
endif()
configure_file ("${CMAKE_SOURCE_DIR}/adm/templates/header.in" "${HEADER_FILE}" @ONLY NEWLINE_STYLE LF)
endif()
endif()
endforeach()
endif()
endmacro()

View File

@ -64,12 +64,12 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
set (HEADER_FILES_FILTERING ${ALL_FILES})
set (SOURCE_FILES_FILTERING ${ALL_FILES})
list (FILTER HEADER_FILES_FILTERING INCLUDE REGEX ".+[.](h|p|g|lxx)")
list (FILTER HEADER_FILES_FILTERING INCLUDE REGEX ".+[.](h|p|g|lxx|hxx|pxx|hpp|gxx)$")
if(APPLE)
list (FILTER SOURCE_FILES_FILTERING INCLUDE REGEX ".+[.](c|mm)")
list (FILTER SOURCE_FILES_FILTERING INCLUDE REGEX ".+[.](c|cxx|cpp|mm)$")
else()
list (FILTER SOURCE_FILES_FILTERING INCLUDE REGEX ".+[.](c)")
list (FILTER SOURCE_FILES_FILTERING INCLUDE REGEX ".+[.](c|cpp|cxx)$")
endif()
list (APPEND HEADER_FILES ${HEADER_FILES_FILTERING})
@ -96,13 +96,8 @@ string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}")
set (USED_RCFILE "")
if (MSVC)
set (USED_RCFILE "${CMAKE_BINARY_DIR}/resources/${PROJECT_NAME}.rc")
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in")
configure_file("${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
else()
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
endif()
endif()
set (CURRENT_MODULE)
foreach (OCCT_MODULE ${OCC_MODULES_LIST})
@ -134,7 +129,7 @@ if (EXECUTABLE_PROJECT)
else()
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
if (MSVC)
if (MSVC AND BUILD_SHARED_LIBS)
if (BUILD_FORCE_RelWithDebInfo)
set (aReleasePdbConf "Release")
else()
@ -194,6 +189,7 @@ elseif (BUILD_SOVERSION_NUMBERS GREATER 1)
elseif (BUILD_SOVERSION_NUMBERS GREATER 0)
set (OCC_SOVERSION "${OCC_VERSION_MAJOR}")
endif()
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
SOVERSION "${OCC_SOVERSION}"
VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
@ -281,11 +277,10 @@ else()
endif()
endif()
if (BUILD_SHARED_LIBS OR EXECUTABLE_PROJECT)
if(IS_VTK_9XX)
string (REGEX REPLACE "vtk" "VTK::" USED_TOOLKITS_BY_CURRENT_PROJECT "${USED_TOOLKITS_BY_CURRENT_PROJECT}")
endif()
endif()
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
if (USE_QT)

View File

@ -1,13 +0,0 @@
if ("${TARGET_FOLDER}" STREQUAL "")
set (USE_QT ON)
set (RELATIVE_DIR "tools")
set (MODULES_LIST ${OCCT_TOOLS})
set (TARGET_FOLDER "Tools")
set (TOOLKITS_NAME_SUFFIX "TOOL_TOOLKITS")
else()
unset (USE_QT)
unset (RELATIVE_DIR)
unset (MODULES_LIST)
unset (TARGET_FOLDER)
unset (TOOLKITS_NAME_SUFFIX)
endif("${TARGET_FOLDER}" STREQUAL "")

View File

@ -31,13 +31,26 @@ if (NOT ${Qt5_FOUND})
# Now we can apply standard CMake finder for Qt. We do this mostly
# to have qt4_wrap_cpp() function available
find_package(Qt4)
elseif(NOT ${USE_QT_FROM_3RDPARTY_DIR} AND WIN32)
# Qt5_DIR typically points to lib/cmake/Qt5, need to go up to Qt root
get_filename_component(QT_CMAKE_DIR "${Qt5_DIR}" DIRECTORY)
get_filename_component(QT_LIB_DIR "${QT_CMAKE_DIR}" DIRECTORY)
get_filename_component(QT_ROOT_DIR "${QT_LIB_DIR}" DIRECTORY)
# Verify this is indeed the Qt root by checking for bin and packages directories
if(EXISTS "${QT_ROOT_DIR}/bin")
set(3RDPARTY_QT_DIR ${QT_ROOT_DIR} CACHE PATH "The directory containing Qt" FORCE)
else()
message(WARNING "Found Qt5 at ${Qt5_DIR} but could not determine Qt root directory with bin/ and plugins/ folders")
set(3RDPARTY_QT_DIR ${Qt5_DIR} CACHE PATH "The directory containing Qt" FORCE)
endif()
elseif(NOT ${USE_QT_FROM_3RDPARTY_DIR})
set(3RDPARTY_QT_DIR ${Qt5_DIR} CACHE PATH "The directory containing Qt" FORCE)
endif()
set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}")
if (3RDPARTY_QT_DIR OR EXISTS "${3RDPARTY_QT_DIR}")
if (3RDPARTY_QT_DIR OR EXISTS "${3RDPARTY_QT_DIR}/bin")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_QT_DIR}/bin")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_QT_DLL_DIR)

View File

@ -90,5 +90,5 @@ else()
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "" CACHE PATH "the path to RapidJSON header file" FORCE)
endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET(RapidJSON_DIR)
# hide all redundant variables
mark_as_advanced(RapidJSON_DIR)

View File

@ -273,13 +273,12 @@ if (TK_FOUND AND 3RDPARTY_TCL_DIR)
endif()
endif()
# unset all redundant variables
# hide all redundant variables
# TCL
OCCT_CHECK_AND_UNSET (TCL_LIBRARY)
OCCT_CHECK_AND_UNSET (TCL_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TCL_TCLSH)
mark_as_advanced (TCL_LIBRARY)
mark_as_advanced (TCL_INCLUDE_PATH)
mark_as_advanced (TCL_TCLSH)
#TK
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TK_WISH)
mark_as_advanced (TK_LIBRARY)
mark_as_advanced (TK_INCLUDE_PATH)
mark_as_advanced (TK_WISH)

View File

@ -274,15 +274,15 @@ if (BUILD_SHARED_LIBS)
mark_as_advanced (3RDPARTY_TK_LIBRARY 3RDPARTY_TK_DLL)
endif()
# unset all redundant variables
#TCL
OCCT_CHECK_AND_UNSET (TCL_LIBRARY)
OCCT_CHECK_AND_UNSET (TCL_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TCL_TCLSH)
# hide all redundant variables
mark_as_advanced (TCL_LIBRARY)
mark_as_advanced (TCL_INCLUDE_PATH)
mark_as_advanced (TCL_TCLSH)
#TK
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TK_WISH)
mark_as_advanced (TK_LIBRARY)
mark_as_advanced (TK_INCLUDE_PATH)
mark_as_advanced (TK_WISH)
if (NOT BUILD_SHARED_LIBS)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_LIBRARY)

View File

@ -1,13 +1,5 @@
# variable description
#
set (BUILD_PATCH_DESCR
"Points to the directory recognized as a 'patch' for OCCT. If specified,
the files from this directory take precedence over the corresponding native
OCCT sources. This way you are able to introduce patches to Open CASCADE
Technology not affecting the original source distribution")
set (BUILD_LIBRARY_TYPE_DESCR
"Specifies the type of library to be created. 'Shared' libraries
are linked dynamically and loaded at runtime. 'Static' libraries
@ -121,7 +113,6 @@ endmacro()
BUILD_MODULE_MESSAGE (BUILD_MODULE_ApplicationFramework "ApplicationFramework")
BUILD_MODULE_MESSAGE (BUILD_MODULE_DataExchange "DataExchange")
BUILD_MODULE_MESSAGE (BUILD_MODULE_DETools "DETools")
BUILD_MODULE_MESSAGE (BUILD_MODULE_Draw "Draw")
BUILD_MODULE_MESSAGE (BUILD_MODULE_FoundationClasses "FoundationClasses")
BUILD_MODULE_MESSAGE (BUILD_MODULE_ModelingAlgorithms "ModelingAlgorithms")
@ -145,13 +136,6 @@ set (BUILD_SAMPLES_QT_DESCR
These samples show some possibilities of using OCCT and they can be executed
with script samples.bat from the installation directory (INSTALL_DIR)")
set (BUILD_Inspector_DESCR
"Indicates whether OCCT inspector should be built together with OCCT.
This inspector provides functionality to interactively inspect low-level content
of the OCAF data model, OCCT viewer, etc. have been introduced in OCCT.
It can be executed with script inspector.bat from the installation directory (INSTALL_DIR) or
using 'tinspector' command in DRAW interpretator")
set (BUILD_MODULE_UwpSample_DESCR
"Indicates whether OCCT UWP sample should be built together with OCCT.")
@ -215,7 +199,30 @@ set (USE_XLIB_DESCR "Indicates whether X11 is used or not")
set (USE_D3D_DESCR "Indicates whether optional Direct3D wrapper in OCCT visualization module should be build or not")
# Documentation variables
set (BUILD_DOC_Overview_DESCR
"Build OCCT overview documentation using Doxygen")
set (BUILD_DOC_RefMan_DESCR
"Build OCCT reference manual documentation using Doxygen")
set (INSTALL_DOC_Overview_DESCR
"Install OCCT overview documentation")
set (INSTALL_DOC_RefMan_DESCR
"Install OCCT reference manual documentation")
macro (BUILD_MODULE MODULE_NAME)
set (ENABLE_MODULE TRUE)
set (BUILD_MODULE_${MODULE_NAME} ${ENABLE_MODULE} CACHE BOOL "${BUILD_MODULE_${MODULE_NAME}_DESCR}")
OCCT_INCLUDE_CMAKE_FILE (src/${MODULE_NAME}/TOOLKITS)
set (${MODULE_NAME}_TOOLKITS ${OCCT_${MODULE_NAME}_LIST_OF_TOOLKITS})
foreach (TOOLKIT ${OCCT_${MODULE_NAME}_LIST_OF_TOOLKITS})
OCCT_INCLUDE_CMAKE_FILE (src/${MODULE_NAME}/${TOOLKIT}/PACKAGES)
OCCT_INCLUDE_CMAKE_FILE (src/${MODULE_NAME}/${TOOLKIT}/EXTERNLIB)
OCCT_INCLUDE_CMAKE_FILE (src/${MODULE_NAME}/${TOOLKIT}/FILES)
foreach (PACKAGE ${OCCT_${TOOLKIT}_LIST_OF_PACKAGES})
OCCT_INCLUDE_CMAKE_FILE (src/${MODULE_NAME}/${TOOLKIT}/${PACKAGE}/FILES)
endforeach()
endforeach()
endmacro()

View File

@ -16,7 +16,7 @@
# For development version git commit hash can be added to the version string
#======================================================================
set (OCC_VERSION_MAJOR 7 )
set (OCC_VERSION_MINOR 9 )
set (OCC_VERSION_MAJOR 8 )
set (OCC_VERSION_MINOR 0 )
set (OCC_VERSION_MAINTENANCE 0 )
set (OCC_VERSION_DEVELOPMENT "beta1" )
set (OCC_VERSION_DEVELOPMENT "dev" )

View File

@ -2,8 +2,20 @@
# vcpkg processing
if (BUILD_USE_VCPKG)
find_package(VTK REQUIRED)
set(CSF_VTK VTK::CommonCore)
find_package(VTK REQUIRED
COMPONENTS
CommonCore
RenderingUI
RenderingOpenGL2
OPTIONAL_COMPONENTS
mpi
utf8
eigen
doubleconversion
lz4
lzma
expat
)
set(IS_VTK_9XX 1)
if (WIN32)
set (USED_3RDPARTY_VTK_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin")
@ -26,7 +38,7 @@ endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify VTK folder in connectin with 3RDPARTY_DIR
# specify VTK folder in connection with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_VTK_DIR PATH "The directory containing VTK")
@ -74,7 +86,20 @@ if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
set (ENV{VTK_DIR} "${3RDPARTY_VTK_DIR}")
endif()
find_package(VTK QUIET)
find_package(VTK QUIET
COMPONENTS
CommonCore
RenderingUI
RenderingOpenGL2
OPTIONAL_COMPONENTS
mpi
utf8
eigen
doubleconversion
lz4
lzma
expat
)
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
set (ENV{VTK_DIR} ${CACHED_VTK_DIR})
@ -316,6 +341,7 @@ if (NOT INSTALL_VTK)
endif()
endif()
OCCT_CHECK_AND_UNSET (VTK_INCLUDE_DIRS)
OCCT_CHECK_AND_UNSET (VTK_LIBRARY_DIRS)
OCCT_CHECK_AND_UNSET (VTK_DIR)
# hide some variables
mark_as_advanced (VTK_INCLUDE_DIRS)
mark_as_advanced (VTK_LIBRARY_DIRS)
mark_as_advanced (VTK_DIR)

View File

@ -1,19 +0,0 @@
#!/bin/bash
# Helper script to run generation of OCCT documentation on Linux.
# Running it requires that Tcl, Doxygen, and MikTex (for PDF generation) should be in the PATH
anArgs=$*
anOldPath="$PATH"
anOldLd="$LD_LIBRARY_PATH"
anOldDyLd="$DYLD_LIBRARY_PATH"
# go to the script directory
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
if [ -e "${aScriptPath}/../env.sh" ]; then source "${aScriptPath}/../env.sh"; fi
tclsh "${aScriptPath}/start.tcl" gendoc $anArgs
export PATH="$anOldPath"
export LD_LIBRARY_PATH="$anOldLd"
export DYLD_LIBRARY_PATH="$anOldDyLd"

View File

@ -1,23 +0,0 @@
@echo off
rem Helper script to run generation of OCCT documentation on Windows.
rem Running it requires that Tcl, Doxygen, and MikTex (for PDF generation)
rem should be in the PATH
SET "OLD_PATH=%PATH%"
if exist "%~dp0../env.bat" (
call "%~dp0../env.bat"
)
set "TCL_EXEC=tclsh.exe"
for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X)
if defined TCL_FOUND (
%TCL_EXEC% %~dp0start.tcl gendoc %*
) else (
echo "Error. %TCL_EXEC% is not found. Please update PATH variable"
)
SET "PATH=%OLD_PATH%"

View File

@ -1,906 +0,0 @@
# =======================================================================
# Created on: 2014-03-21
# Created by: OMY
# Copyright (c) 1996-1999 Matra Datavision
# Copyright (c) 1999-2014 OPEN CASCADE SAS
#
# This file is part of Open CASCADE Technology software library.
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License version 2.1 as published
# by the Free Software Foundation, with special exception defined in the file
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
# distribution for complete text of the license and disclaimer of any warranty.
#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.
# =======================================================================
# This script defines command gendoc compiling OCCT documents
# from *.md files to HTML pages
# =======================================================================
# load auxiliary tools
source [file join [file dirname [info script]] occaux.tcl]
# ======================================
# Common functions
# ======================================
# Prints help message
proc OCCDoc_PrintHelpMessage {} {
puts "\nUsage: gendoc \[-h\] {-refman|-overview} \[-html|-pdf|-chm\] \[-m=<list of modules>|-ug=<list of docs>\] \[-v\] \[-s=<search_mode>\] \[-mathjax=<path>\]"
puts ""
puts "Options are:"
puts ""
puts "choice of documentation to be generated:"
puts " -overview : To generate Overview and User Guides"
puts " (cannot be used with -refman)"
puts " -refman : To generate class Reference Manual"
puts " (cannot be used with -overview)"
puts ""
puts "choice of output format:"
puts " -html : To generate HTML files"
puts " (default, cannot be used with -pdf or -chm)"
puts " -pdf : To generate PDF files"
puts " (cannot be used with -refman, -html, or -chm)"
puts " -chm : To generate CHM files"
puts " (cannot be used with -html or -pdf)"
puts ""
puts "additional options:"
puts " -m=<modules_list> : List of OCCT modules (separated with comma),"
puts " for generation of Reference Manual"
puts " -ug=<docs_list> : List of MarkDown documents (separated with comma),"
puts " to use for generation of Overview / User Guides"
puts " -mathjax=<path> : To use local or alternative copy of MathJax"
puts " -s=<search_mode> : Specifies the Search mode of HTML documents"
puts " Can be: none | local | server | external"
puts " -h : Prints this help message"
puts " -v : Enables more verbose output"
}
# A command for User Documentation compilation
proc gendoc {args} {
# Parameters
set DOC_TYPE "REFMAN"
set GEN_MODE "HTML_ONLY"
set DOCFILES {}
set MODULES {}
set DOCLABEL ""
set VERB_MODE "NO"
set SEARCH_MODE "none"
set MATHJAX_LOCATION "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1"
set mathjax_js_name "MathJax.js"
set DOCTYPE_COMBO_FLAG 0
set GENMODE_COMBO_FLAG 0
set GENERATE_PRODUCTS_REFMAN "NO"
global available_docfiles; # The full list of md files for HTML or CHM generation
global available_pdf; # The full list of md files for PDF generation
global tcl_platform
global args_names
global args_values
global env
# Load list of docfiles
if { [OCCDoc_LoadFilesList] != 0 } {
puts "Error: File FILES_HTML.txt or FILES_PDF.txt was not found on this computer.\nAborting..."
return -1
}
# Parse CL arguments
if {[OCCDoc_ParseArguments $args] == 1} {
return -1
}
# Print help message if no arguments provided
if {[llength $args_names] == 0} {
OCCDoc_PrintHelpMessage
return 0
}
foreach arg_n $args_names {
if {$arg_n == "h"} {
OCCDoc_PrintHelpMessage
return 0
} elseif {$arg_n == "html"} {
if { ([ lsearch $args_names "refman" ] == -1) &&
([ lsearch $args_names "overview" ] == -1) } {
puts "Warning: Please specify -refman or -overview argument."
return -1
}
if { [ lsearch $args_names "refman" ] != -1 } {
continue
}
if { $GENMODE_COMBO_FLAG != 1 } {
set GEN_MODE "HTML_ONLY"
set GENMODE_COMBO_FLAG 1
} else {
puts "Error: Options -html, -pdf and -chm can not be combined."
return -1
}
} elseif {$arg_n == "chm"} {
if { ([ lsearch $args_names "refman" ] == -1) &&
([ lsearch $args_names "overview" ] == -1) } {
puts "Warning: Please specify -refman or -overview argument."
return -1
}
if { [ lsearch $args_names "refman" ] != -1 } {
continue
}
if { $GENMODE_COMBO_FLAG != 1 } {
set GEN_MODE "CHM_ONLY"
set GENMODE_COMBO_FLAG 1
} else {
puts "Error: Options -html, -pdf and -chm cannot be combined."
return -1
}
} elseif {$arg_n == "pdf"} {
if { ([ lsearch $args_names "refman" ] == -1) &&
([ lsearch $args_names "overview" ] == -1) } {
puts "Warning: Please specify -refman or -overview argument."
return -1
}
if { [ lsearch $args_names "refman" ] != -1 } {
continue
}
if { $GENMODE_COMBO_FLAG != 1 } {
set GEN_MODE "PDF_ONLY"
set GENMODE_COMBO_FLAG 1
} else {
puts "Error: Options -html, -pdf and -chm cannot be combined."
return -1
}
} elseif {$arg_n == "overview"} {
if { $DOCTYPE_COMBO_FLAG != 1 } {
set DOC_TYPE "OVERVIEW"
set DOCTYPE_COMBO_FLAG 1
} else {
puts "Error: Options -refman and -overview cannot be combined."
return -1
}
# Print ignored options
if { [ lsearch $args_names "m" ] != -1 } {
puts "\nInfo: The following options will be ignored: \n"
puts " * -m"
}
puts ""
} elseif {$arg_n == "refman"} {
if { $DOCTYPE_COMBO_FLAG != 1 } {
set DOC_TYPE "REFMAN"
set DOCTYPE_COMBO_FLAG 1
if { [file exists [OCCDoc_GetProdRootDir]/src/VAS/Products.tcl] } {
set GENERATE_PRODUCTS_REFMAN "YES"
}
} else {
puts "Error: Options -refman and -overview cannot be combined."
return -1
}
# Print ignored options
if { ([ lsearch $args_names "pdf" ] != -1) ||
([ lsearch $args_names "chm" ] != -1) ||
([ lsearch $args_names "ug" ] != -1) } {
puts "\nInfo: The following options will be ignored: \n"
if { [ lsearch $args_names "pdf" ] != -1 } {
puts " * -pdf"
}
if { [ lsearch $args_names "chm" ] != -1 } {
puts " * -chm"
}
if { [ lsearch $args_names "ug" ] != -1 } {
puts " * -ug"
}
puts ""
}
} elseif {$arg_n == "v"} {
set VERB_MODE "YES"
} elseif {$arg_n == "ug"} {
if { ([ lsearch $args_names "refman" ] != -1) } {
continue
}
if {$args_values(ug) != "NULL"} {
set DOCFILES $args_values(ug)
} else {
puts "Error in argument ug."
return -1
}
# Check if all chosen docfiles are correct
foreach docfile $DOCFILES {
if { [ lsearch $args_names "pdf" ] == -1 } {
# Check to generate HTMLs
if { [lsearch $available_docfiles $docfile] == -1 } {
puts "Error: File \"$docfile\" is not presented in the list of available docfiles."
puts " Please specify the correct docfile name."
return -1
}
} else {
# Check to generate PDFs
if { [lsearch $available_pdf $docfile] == -1 } {
puts "Error: File \"$docfile\" is not presented in the list of generic PDFs."
puts " Please specify the correct pdf name."
return -1
}
}
}
} elseif {$arg_n == "m"} {
if { [ lsearch $args_names "overview" ] != -1 } {
continue
}
if {$args_values(m) != "NULL"} {
set MODULES $args_values(m)
} else {
puts "Error in argument m."
return -1
}
} elseif {$arg_n == "s"} {
if { [ lsearch $args_names "pdf" ] != -1 } {
puts "Warning: search is not used with PDF and will be ignored."
continue
}
if {$args_values(s) != "NULL"} {
set SEARCH_MODE $args_values(s)
} else {
puts "Error in argument s."
return -1
}
} elseif {$arg_n == "mathjax"} {
if { [ lsearch $args_names "pdf" ] != -1 } {
puts "Warning: MathJax is not used with PDF and will be ignored."
}
set possible_mathjax_loc $args_values(mathjax)
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
set MATHJAX_LOCATION $args_values(mathjax)
puts "$MATHJAX_LOCATION"
} else {
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
puts " MathJax will be used from $MATHJAX_LOCATION"
}
} else {
puts "\nWrong argument: $arg_n"
OCCDoc_PrintHelpMessage
return -1
}
}
# Check the existence of the necessary tools
set DOXYGEN_PATH ""
set GRAPHVIZ_PATH ""
set INKSCAPE_PATH ""
set PDFLATEX_PATH ""
set HHC_PATH ""
OCCDoc_DetectNecessarySoftware $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH $PDFLATEX_PATH
if {$DOXYGEN_PATH == ""} {
puts " Aborting..."
return -1
}
if {"$::tcl_platform(platform)" == "windows"} {
if { ($GEN_MODE == "CHM_ONLY") && ($HHC_PATH == "") } {
puts " Aborting..."
return -1
}
}
if { ($PDFLATEX_PATH == "") && ($GEN_MODE == "PDF_ONLY") } {
puts " Aborting..."
return -1
}
# If we do not specify list for docfiles with -m argument,
# we assume that we have to generate all docfiles
if { [llength $DOCFILES] == 0 } {
if { $GEN_MODE != "PDF_ONLY" } {
set DOCFILES $available_docfiles
} else {
set DOCFILES $available_pdf
}
}
puts ""
# Start main activities
if { $GEN_MODE != "PDF_ONLY" } {
if { [OCCDoc_GetProdRootDir] == ""} {
OCCDoc_Main $DOC_TYPE $DOCFILES $MODULES $GEN_MODE $VERB_MODE $SEARCH_MODE $MATHJAX_LOCATION $GENERATE_PRODUCTS_REFMAN $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
} else {
if { $DOC_TYPE == "REFMAN" } {
if { $MODULES != "" } {
foreach module $MODULES {
OCCDoc_Main $DOC_TYPE $DOCFILES $module $GEN_MODE $VERB_MODE $SEARCH_MODE $MATHJAX_LOCATION $GENERATE_PRODUCTS_REFMAN $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
}
} else {
OCCDoc_Main $DOC_TYPE $DOCFILES $MODULES $GEN_MODE $VERB_MODE $SEARCH_MODE $MATHJAX_LOCATION $GENERATE_PRODUCTS_REFMAN $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
}
} else {
foreach md $DOCFILES {
OCCDoc_Main $DOC_TYPE $md $MODULES $GEN_MODE $VERB_MODE $SEARCH_MODE $MATHJAX_LOCATION $GENERATE_PRODUCTS_REFMAN $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
}
}
}
} else {
puts "Generating OCCT User Guides in PDF format..."
foreach pdf $DOCFILES {
puts "\nInfo: Processing file $pdf"
# Some values are hardcoded because they are related only to PDF generation
OCCDoc_Main "OVERVIEW" [list $pdf] {} "PDF_ONLY" $VERB_MODE "none" $MATHJAX_LOCATION "NO" $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
}
puts "\n[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generation completed."
}
}
# Main procedure for documents compilation
proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode searchMode mathjaxLocation generateProductsRefman DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH HHC_PATH} {
global available_docfiles
global available_pdf
set ROOTDIR [OCCDoc_GetRootDir [OCCDoc_GetProdRootDir]]
set INDIR [OCCDoc_GetDoxDir]
set OUTDIR $ROOTDIR/doc
set PDFDIR $OUTDIR/pdf
set UGDIR $PDFDIR/user_guides
set DGDIR $PDFDIR/dev_guides
set TAGFILEDIR $OUTDIR/refman
set HTMLDIR $OUTDIR/overview/html
set LATEXDIR $OUTDIR/overview/latex
set DOXYFILE $OUTDIR/OCCT.cfg
# OUTDIR for products documentation should be separate directories for each components
if { [OCCDoc_GetProdRootDir] != ""} {
if { $docType == "REFMAN" } {
if { "$modules" != "" } {
source "[OCCDoc_GetSourceDir [OCCDoc_GetProdRootDir]]/VAS/${modules}.tcl"
set doc_component_name [${modules}:documentation_name]
set OUTDIR $OUTDIR/$doc_component_name
}
} else {
if {[regexp {([^/]+)/([^/]+)/([^/]+)} $docfiles dump doc_type doc_component doc_name]} {
set PDFNAME [file rootname $doc_name]
set OUTDIR $OUTDIR/$doc_component
} else {
error "Could not parse input path to *.md file: \"${docfiles}\""
}
}
set HTMLDIR $OUTDIR/html
set LATEXDIR $OUTDIR/latex
set DOXYFILE $OUTDIR/OCCT.cfg
set TAGFILEDIR $OUTDIR/refman
}
# Create or cleanup the output folders
if { [string compare -nocase $generateProductsRefman "YES"] != 0 } {
if { ![file exists $OUTDIR] } {
file mkdir $OUTDIR
}
if { ![file exists $HTMLDIR] } {
file mkdir $HTMLDIR
}
if { [OCCDoc_GetProdRootDir] == ""} {
if { ![file exists $PDFDIR] } {
file mkdir $PDFDIR
}
if { ![file exists $UGDIR] } {
file mkdir $UGDIR
}
if { ![file exists $DGDIR] } {
file mkdir $DGDIR
}
}
if { $generatorMode == "PDF_ONLY" } {
if { [file exists $LATEXDIR] } {
file delete -force $LATEXDIR
}
file mkdir $LATEXDIR
}
}
if { $docType == "REFMAN" } {
if { ![file exists $TAGFILEDIR] } {
file mkdir $TAGFILEDIR
}
}
# is MathJax HLink?
set mathjax_relative_location $mathjaxLocation
if { [file isdirectory "$mathjaxLocation"] } {
if { $generatorMode == "HTML_ONLY" } {
# related path
set mathjax_relative_location [OCCDoc_GetRelPath $HTMLDIR $mathjaxLocation]
} elseif { $generatorMode == "CHM_ONLY" } {
# absolute path
set mathjax_relative_location [file normalize $mathjaxLocation]
}
}
if { $generateProductsRefman == "YES" } {
set DOCDIR "$OUTDIR/refman"
puts "\nGenerating OCC Products Reference Manual\n"
} else {
if { $docType == "REFMAN"} {
set DOCDIR "$OUTDIR/refman"
puts "\nGenerating Open CASCADE Reference Manual\n"
} elseif { $docType == "OVERVIEW" } {
if { [OCCDoc_GetProdRootDir] == ""} {
set DOCDIR "$OUTDIR/overview"
} else {
set DOCDIR "$OUTDIR"
}
set FORMAT ""
if { ($generatorMode == "HTML_ONLY") || ($generatorMode == "CHM_ONLY") } {
if { $generatorMode == "HTML_ONLY" } {
set FORMAT " in HTML format..."
} elseif { $generatorMode == "CHM_ONLY" } {
set FORMAT " in CHM format..."
}
puts "Generating OCCT User Guides$FORMAT\n"
}
} else {
puts "Error: Invalid documentation type: $docType. Can not process."
return -1
}
}
# Generate Doxyfile
puts "[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generating Doxyfile..."
if { [OCCDoc_MakeDoxyfile $docType $DOCDIR $TAGFILEDIR $DOXYFILE $generatorMode $docfiles $modules $verboseMode $searchMode $HHC_PATH $mathjax_relative_location $GRAPHVIZ_PATH [OCCDoc_GetProdRootDir]] == -1 } {
return -1
}
# Run doxygen tool
set starttimestamp [clock format [clock seconds] -format {%Y-%m-%d %H:%M}]
if { ($generatorMode == "HTML_ONLY") || ($docType == "REFMAN") } {
set LOGPREFIX "html_"
puts "$starttimestamp Generating HTML files..."
# Copy index file to provide fast access to HTML documentation
file copy -force $INDIR/resources/index.html $DOCDIR/index.html
} elseif { $generatorMode == "CHM_ONLY" } {
set LOGPREFIX "chm_"
puts "$starttimestamp Generating CHM file..."
} elseif { $generatorMode == "PDF_ONLY" } {
set LOGPREFIX "[file rootname [file tail [lindex $docfiles 0]]]_"
puts "$starttimestamp Generating PDF file..."
}
# Clean logfiles
set DOXYLOG $OUTDIR/${LOGPREFIX}doxygen_err.log
set DOXYOUT $OUTDIR/${LOGPREFIX}doxygen_out.log
file delete -force $DOXYLOG
file delete -force $DOXYOUT
set RESULT [catch {exec $DOXYGEN_PATH $DOXYFILE >> $DOXYOUT} DOX_ERROR]
if {$RESULT != 0} {
set NbErrors [regexp -all -line {^\s*[^\s]+} $DOX_ERROR]
if {$NbErrors > 0} {
puts "Warning: Doxygen reported $NbErrors messages."
puts "See log in $DOXYLOG"
set DOX_ERROR_FILE [open $DOXYLOG "a"]
if {$generatorMode == "PDF_ONLY"} {
puts $DOX_ERROR_FILE "\n===================================================="
puts $DOX_ERROR_FILE "Logfile for $docfiles"
puts $DOX_ERROR_FILE "====================================================\n"
}
puts $DOX_ERROR_FILE $DOX_ERROR
close $DOX_ERROR_FILE
}
}
# Close the Doxygen application
after 300
# Start Post Processing
set curtime [clock format [clock seconds] -format {%Y-%m-%d %H:%M}]
if { $docType == "REFMAN" } {
# Post Process generated HTML pages and draw dependency graphs
if {[OCCDoc_PostProcessor $DOCDIR] == 0} {
puts "$curtime Generation completed."
puts "\nInfo: doxygen log file is located in:"
puts "${DOXYOUT}."
puts "\nReference Manual is generated in \n$DOCDIR"
}
} elseif { $docType == "OVERVIEW" } {
# Start PDF generation routine
if { $generatorMode == "PDF_ONLY" } {
set OS $::tcl_platform(platform)
if { $OS == "unix" } {
set PREFIX ".sh"
} elseif { $OS == "windows" } {
set PREFIX ".bat"
}
# Prepare a list of TeX files, generated by Doxygen
cd $LATEXDIR
set TEXFILES [glob $LATEXDIR -type f -directory $LATEXDIR -tails "*.tex" ]
foreach path $TEXFILES {
if { [string compare -nocase $path $LATEXDIR] == 0 } {
set DEL_IDX [lsearch $TEXFILES $path]
if { $DEL_IDX != -1 } {
set TEXFILES [lreplace $TEXFILES $DEL_IDX $DEL_IDX]
}
}
}
set TEXFILES [string map [list refman.tex ""] $TEXFILES]
if {$verboseMode == "YES"} {
puts "Info: Preprocessing generated TeX files..."
}
OCCDoc_ProcessTex $TEXFILES $LATEXDIR $verboseMode
if {$verboseMode == "YES"} {
puts "Info: Converting SVG images to PNG format..."
}
if { $INKSCAPE_PATH != "" } {
OCCDoc_ProcessSvg $LATEXDIR $verboseMode
} else {
puts "Warning: SVG images will be lost in PDF documents."
}
if {$verboseMode == "YES"} {
puts "Info: Generating PDF file from TeX files..."
}
foreach TEX $TEXFILES {
# Rewrite existing REFMAN.tex file...
set TEX [lindex [split $TEX "."] 0]
if {$verboseMode == "YES"} {
puts "Info: Generating PDF file from $TEX..."
}
OCCDoc_MakeRefmanTex $TEX $LATEXDIR $verboseMode $available_pdf
if {"$::tcl_platform(platform)" == "windows"} {
set is_win "yes"
} else {
set is_win "no"
}
if {$verboseMode == "YES"} {
# ...and use it to generate PDF from TeX...
if {$is_win == "yes"} {
puts "Info: Executing $LATEXDIR/make.bat..."
} else {
puts "Info: Executing $LATEXDIR/Makefile..."
}
}
set PDFLOG $OUTDIR/${LOGPREFIX}pdflatex_err.log
set PDFOUT $OUTDIR/${LOGPREFIX}pdflatex_out.log
file delete -force $PDFLOG
file delete -force $PDFOUT
if {"$is_win" == "yes"} {
set RESULT [catch {eval exec [auto_execok $LATEXDIR/make.bat] >> "$PDFOUT"} LaTeX_ERROR]
} else {
set RESULT [catch {eval exec "make -f $LATEXDIR/Makefile" >> "$PDFOUT"} LaTeX_ERROR]
# Small workaround for *nix stations
set prev_loc [pwd]
cd $LATEXDIR
set RESULT [catch {eval exec "pdflatex refman.tex" >> "$PDFOUT"} LaTeX_ERROR]
cd $prev_loc
}
if {$RESULT != 0} {
set NbErrors [regexp -all -line {^\s*[^\s]+} $LaTeX_ERROR]
if {$NbErrors > 0} {
puts "Warning: PDFLaTeX reported $NbErrors messages.\nSee log in $PDFLOG"
set LaTeX_ERROR_FILE [open $PDFLOG "a+"]
puts $LaTeX_ERROR_FILE "\n===================================================="
puts $LaTeX_ERROR_FILE "Logfile of file $TEX:"
puts $LaTeX_ERROR_FILE "====================================================\n"
puts $LaTeX_ERROR_FILE $LaTeX_ERROR
close $LaTeX_ERROR_FILE
}
}
# ...and place it to the specific folder
if {![file exists "$LATEXDIR/refman.pdf"]} {
puts "Fatal: PDFLaTeX failed to create output file, stopping!"
return -1
}
set destFolder $PDFDIR
set parsed_string [split $TEX "_"]
if { [OCCDoc_GetProdRootDir] == ""} {
if { [lsearch $parsed_string "tutorial"] != -1 } {
set TEX [string map [list occt__ occt_] $TEX]
set destFolder $PDFDIR
} elseif { [lsearch $parsed_string "user"] != -1 } {
set TEX [string map [list user_guides__ ""] $TEX]
set destFolder $UGDIR
} elseif { [lsearch $parsed_string "dev"] != -1 } {
set TEX [string map [list dev_guides__ ""] $TEX]
set destFolder $DGDIR
}
} else {
set destFolder $OUTDIR
set TEX "$PDFNAME"
}
file rename -force $LATEXDIR/refman.pdf "$destFolder/$TEX.pdf"
puts "Generated $destFolder/$TEX.pdf"
}
} elseif { $generatorMode == "CHM_ONLY" } {
if { [OCCDoc_GetProdRootDir] == ""} {
file rename $OUTDIR/overview.chm $OUTDIR/occt_overview.chm
} else {
file rename -force $ROOTDIR/doc/overview.chm $OUTDIR/occt_overview.chm
}
}
cd $INDIR
if { $generatorMode == "HTML_ONLY" } {
puts "HTML documentation is generated in \n$DOCDIR"
} elseif { $generatorMode == "CHM_ONLY" } {
puts "Generated CHM documentation is in \n$OUTDIR/overview.chm"
}
}
# Remove temporary Doxygen files
set deleteList [glob -nocomplain -type f "*.tmp"]
foreach file $deleteList {
file delete $file
}
return 0
}
# Generates Doxygen configuration file for Overview documentation
proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMode ""} {DocFilesList {}} {ModulesList {}} verboseMode searchMode hhcPath mathjaxLocation graphvizPath productsPath} {
global module_dependency
set inputDir [OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]
set TEMPLATES_DIR [OCCDoc_GetDoxDir]/resources
set occt_version [OCCDoc_DetectCasVersion]
# Delete existent doxyfile
file delete $doxyFileName
# Copy specific template to the target folder
if { $docType == "REFMAN" } {
file copy "$TEMPLATES_DIR/occt_rm.doxyfile" $doxyFileName
} elseif { $docType == "OVERVIEW" } {
if { $generatorMode == "HTML_ONLY" || $generatorMode == "CHM_ONLY" } {
file copy "$TEMPLATES_DIR/occt_ug_html.doxyfile" $doxyFileName
} elseif { $generatorMode == "PDF_ONLY"} {
file copy "$TEMPLATES_DIR/occt_ug_pdf.doxyfile" $doxyFileName
} else {
puts "Error: Unknown generation mode"
return -1
}
} else {
puts "Error: Cannot generate unknown document type"
return -1
}
set doxyFile [open $doxyFileName "a"]
# Write specific options
if { $docType == "REFMAN" } {
# always include optional components
set aHaveD3dBack ""
set aHaveGlesBack ""
set aHaveVtkBack ""
if { [info exists ::env(HAVE_D3D)] } { set aHaveD3dBack "$::env(HAVE_D3D)" }
if { [info exists ::env(HAVE_GLES2)] } { set aHaveGlesBack "$::env(HAVE_GLES2)" }
if { [info exists ::env(HAVE_VTK)] } { set aHaveVtkBack "$::env(HAVE_VTK)" }
set ::env(HAVE_D3D) "true"
set ::env(HAVE_GLES2) "true"
set ::env(HAVE_VTK) "true"
# Load lists of modules scripts
if { $productsPath == "" } {
set modules_scripts [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $productsPath]/OS/" *.tcl]
} else {
set modules_scripts [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $productsPath]/VAS/" *.tcl]
}
if { [llength $modules_scripts] != 0} {
foreach module_file $modules_scripts {
source $module_file
}
}
set ALL_MODULES [OCCDoc_GetModulesList $productsPath]
if { [llength $ModulesList] == 0 } {
# by default take all modules
set modules $ALL_MODULES
} else {
set modules $ModulesList
}
# Detect invalid names of modules
foreach module $modules {
if { $module == "" } {
continue
}
if {[lsearch $ALL_MODULES $module] == -1 } {
puts "Error: No module $module is known. Aborting..."
return -1
}
}
# Set context
set one_module [expr [llength $modules] == 1]
if { $one_module } {
set title "OCCT [$modules:name]"
set name $modules
} else {
set title "Open CASCADE Technology"
set name OCCT
}
OCCDoc_LoadData "${productsPath}"
# Add all dependencies of modules to the graph
set additional_modules {}
foreach module $modules {
set additional_modules [list {*}$additional_modules {*}$module_dependency($module)]
}
set modules [list {*}$modules {*}$additional_modules]
set modules [lsort -unique $modules]
# Get list of header files in the specified modules
set filelist {}
foreach module $modules {
if { $module == "" } {
continue
}
foreach tk [$module:toolkits] {
foreach pk [split [OCCDoc_GetPackagesList [OCCDoc_Locate $tk $productsPath]]] {
if { [llength $pk] != "{}" } {
lappend filelist [OCCDoc_GetHeadersList "p" "$pk" "$productsPath"]
}
}
}
}
# Filter out files Handle_*.hxx and *.lxx
set hdrlist {}
foreach fileset $filelist {
set hdrset {}
foreach hdr $fileset {
if { ! [regexp {Handle_.*[.]hxx} $hdr] && ! [regexp {.*[.]lxx} $hdr] } {
lappend hdrset $hdr
}
}
lappend hdrlist $hdrset
}
set filelist $hdrlist
set doxyFile [open $doxyFileName "a"]
puts $doxyFile "PROJECT_NAME = \"$title\""
puts $doxyFile "PROJECT_NUMBER = $occt_version"
puts $doxyFile "OUTPUT_DIRECTORY = $outDir/."
puts $doxyFile "GENERATE_TAGFILE = $outDir/${name}.tag"
if { [string tolower $searchMode] == "none" } {
puts $doxyFile "SEARCHENGINE = NO"
puts $doxyFile "SERVER_BASED_SEARCH = NO"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} else {
puts $doxyFile "SEARCHENGINE = YES"
if { [string tolower $searchMode] == "local" } {
puts $doxyFile "SERVER_BASED_SEARCH = NO"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} elseif { [string tolower $searchMode] == "server" } {
puts $doxyFile "SERVER_BASED_SEARCH = YES"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} elseif { [string tolower $searchMode] == "external" } {
puts $doxyFile "SERVER_BASED_SEARCH = YES"
puts $doxyFile "EXTERNAL_SEARCH = YES"
} else {
puts "Error: Wrong search engine type: $searchMode."
close $doxyFile
return -1
}
}
puts $doxyFile "DOTFILE_DIRS = $outDir/html"
puts $doxyFile "DOT_PATH = $graphvizPath"
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetSourceDir $productsPath]"
# list of files to generate
set mainpage [OCCDoc_MakeMainPage $outDir $outDir/$name.dox $modules $productsPath]
puts $doxyFile ""
puts $doxyFile "INPUT = $mainpage \\"
foreach header $filelist {
puts $doxyFile " $header \\"
}
puts $doxyFile "MATHJAX_FORMAT = HTML-CSS"
puts $doxyFile "MATHJAX_RELPATH = ${mathjaxLocation}"
puts $doxyFile ""
# restore environment variables
set ::env(HAVE_D3D) "$aHaveD3dBack"
set ::env(HAVE_GLES2) "$aHaveGlesBack"
set ::env(HAVE_VTK) "$aHaveVtkBack"
} elseif { $docType == "OVERVIEW" } {
# Add common options for generation of Overview and User Guides
puts $doxyFile "PROJECT_NUMBER = $occt_version"
puts $doxyFile "OUTPUT_DIRECTORY = $outDir/."
puts $doxyFile "PROJECT_LOGO = [OCCDoc_GetDoxDir]/resources/occ_logo.png"
puts $doxyFile "EXAMPLE_PATH = [OCCDoc_GetSourceDir $productsPath]"
set PARAM_INPUT "INPUT ="
set PARAM_IMAGEPATH "IMAGE_PATH = [OCCDoc_GetDoxDir]/resources/ "
foreach docFile $DocFilesList {
set NEW_IMG_PATH "$inputDir/$docFile"
if { [string compare $NEW_IMG_PATH [OCCDoc_GetRootDir $productsPath]] != 0 } {
set img_string [file dirname $NEW_IMG_PATH]/images
if { [file exists $img_string] } {
append PARAM_IMAGEPATH " $img_string"
}
}
append PARAM_INPUT " " $inputDir/$docFile
}
puts $doxyFile $PARAM_INPUT
puts $doxyFile $PARAM_IMAGEPATH
# Add document type-specific options
if { $generatorMode == "HTML_ONLY"} {
# generate tree view
puts $doxyFile "GENERATE_TREEVIEW = YES"
# Set a reference to a TAGFILE
if { $tagFileDir != "" } {
if {[file exists $tagFileDir/OCCT.tag] == 1} {
#set tagPath [OCCDoc_GetRelPath $tagFileDir $outDir/html]
set tagPath $tagFileDir
puts $doxyFile "TAGFILES = $tagFileDir/OCCT.tag=../../refman/html"
}
}
# HTML Search engine options
if { [string tolower $searchMode] == "none" } {
puts $doxyFile "SEARCHENGINE = NO"
puts $doxyFile "SERVER_BASED_SEARCH = NO"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} else {
puts $doxyFile "SEARCHENGINE = YES"
if { [string tolower $searchMode] == "local" } {
puts $doxyFile "SERVER_BASED_SEARCH = NO"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} elseif { [string tolower $searchMode] == "server" } {
puts $doxyFile "SERVER_BASED_SEARCH = YES"
puts $doxyFile "EXTERNAL_SEARCH = NO"
} elseif { [string tolower $searchMode] == "external" } {
puts $doxyFile "SERVER_BASED_SEARCH = YES"
puts $doxyFile "EXTERNAL_SEARCH = YES"
} else {
puts "Error: Wrong search engine type: $searchMode."
close $doxyFile
return -1
}
}
} elseif { $generatorMode == "CHM_ONLY"} {
# specific options for CHM file generation
puts $doxyFile "GENERATE_TREEVIEW = NO"
puts $doxyFile "SEARCHENGINE = NO"
puts $doxyFile "GENERATE_HTMLHELP = YES"
puts $doxyFile "CHM_FILE = ../../overview.chm"
puts $doxyFile "HHC_LOCATION = \"$hhcPath\""
puts $doxyFile "DISABLE_INDEX = YES"
}
# Formula options
puts $doxyFile "MATHJAX_RELPATH = ${mathjaxLocation}"
}
close $doxyFile
return 0
}

View File

@ -1,921 +0,0 @@
# =======================================================================
# Created on: 2014-03-21
# Created by: OMY
# Copyright (c) 1996-1999 Matra Datavision
# Copyright (c) 1999-2014 OPEN CASCADE SAS
#
# This file is part of Open CASCADE Technology software library.
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License version 2.1 as published
# by the Free Software Foundation, with special exception defined in the file
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
# distribution for complete text of the license and disclaimer of any warranty.
#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.
# =======================================================================
# This script contains auxiliary functions which can be used
# in documentation generation process
# =======================================================================
# ==============================================
# Commonly used functions
# ==============================================
# Parses arguments line like "-arg1=val1 -arg2=val2 ..." to array args_names and map args_values
proc OCCDoc_ParseArguments {arguments} {
global args_names
global args_values
set args_names {}
array set args_values {}
foreach arg $arguments {
if {[regexp {^(-)[a-z_]+$} $arg] == 1} {
set name [string range $arg 1 [string length $arg]-1]
lappend args_names $name
set args_values($name) "NULL"
continue
} elseif {[regexp {^(-)[a-z_]+=.+$} $arg] == 1} {
set equal_symbol_position [string first "=" $arg]
set name [string range $arg 1 $equal_symbol_position-1]
lappend args_names $name
set value [string range $arg $equal_symbol_position+1 [string length $arguments]-1]
# To parse a list of values for -m parameter
if { [string first "," $value] != -1 } {
set value [split $value ","];
}
set args_values($name) $value
} else {
puts "Error in argument $arg."
return 1
}
}
return 0
}
# Returns script parent folder
proc OCCDoc_GetDoxDir { {theProductsPath ""} } {
if { $theProductsPath == "" } {
return [file normalize [file dirname [info script]]/../dox]
} else {
return [file normalize $theProductsPath]/dox
}
}
# Returns products root folder
proc OCCDoc_GetProdRootDir {} {
if {[info exists ::env(PRODROOT)]} {
return [file normalize $::env(PRODROOT)]
}
}
# Returns OCCT root dir
proc OCCDoc_GetOCCTRootDir {} {
set path [OCCDoc_GetDoxDir]
return [file normalize $path/..]
}
# Returns root dir
proc OCCDoc_GetRootDir { {theProductsPath ""} } {
if { $theProductsPath == "" } {
return [OCCDoc_GetOCCTRootDir]
} else {
return [file normalize $theProductsPath]
}
}
# Returns OCCT include dir
proc OCCDoc_GetIncDir { {theProductsPath ""} } {
set path [OCCDoc_GetRootDir $theProductsPath]
return "$path/inc"
}
# Returns OCCT source dir
proc OCCDoc_GetSourceDir { {theProductsPath ""} } {
set path [OCCDoc_GetRootDir $theProductsPath]
return "$path/src"
}
# Returns name of the package from the current toolkit
proc OCCDoc_GetNameFromPath { thePath } {
set splitted_path [split $thePath "/" ]
set package_name [lindex $splitted_path end]
return $package_name
}
# Returns the relative path between two folders
proc OCCDoc_GetRelPath {thePathFrom thePathTo} {
if { [file isdirectory "$thePathFrom"] == 0 } {
return ""
}
set aPathFrom [file normalize "$thePathFrom"]
set aPathTo [file normalize "$thePathTo"]
set aCutedPathFrom "${aPathFrom}/dummy"
set aRelatedDeepPath ""
while { "$aCutedPathFrom" != [file normalize "$aCutedPathFrom/.."] } {
set aCutedPathFrom [file normalize "$aCutedPathFrom/.."]
# does aPathTo contain aCutedPathFrom?
regsub -all $aCutedPathFrom $aPathTo "" aPathFromAfterCut
if { "$aPathFromAfterCut" != "$aPathTo" } { # if so
if { "$aCutedPathFrom" == "$aPathFrom" } { # just go higher, for example, ./somefolder/someotherfolder
set aPathTo ".${aPathTo}"
} elseif { "$aCutedPathFrom" == "$aPathTo" } { # remove the last "/"
set aRelatedDeepPath [string replace $aRelatedDeepPath end end ""]
}
regsub -all $aCutedPathFrom $aPathTo $aRelatedDeepPath aPathToAfterCut
regsub -all "//" $aPathToAfterCut "/" aPathToAfterCut
return $aPathToAfterCut
}
set aRelatedDeepPath "$aRelatedDeepPath../"
}
return $thePathTo
}
# Returns OCCT version string from version.cmake (if available)
proc OCCDoc_DetectCasVersion {} {
set occt_ver "7.8.0"
set occt_ver_add ""
set filename "[OCCDoc_GetSourceDir]/../adm/cmake/version.cmake"
if { [file exists $filename] } {
set fh [open $filename "r"]
set fh_loaded [read $fh]
close $fh
regexp {set\s+OCC_VERSION_MAJOR\s+([0-9]+)} $fh_loaded dummy major
regexp {set\s+OCC_VERSION_MINOR\s+([0-9]+)} $fh_loaded dummy minor
regexp {set\s+OCC_VERSION_MAINTENANCE\s+([0-9]+)} $fh_loaded dummy maint
regexp {set\s+OCC_VERSION_DEVELOPMENT\s+\"([^\"]+)\"} $fh_loaded dummy occt_ver_add
set occt_ver "$major.$minor.$maint"
if { "$occt_ver_add" != "" } { set occt_ver ${occt_ver}.$occt_ver_add }
}
return $occt_ver
}
# Checks if the necessary tools exist
proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH HHC_PATH PDFLATEX_PATH } {
upvar 1 DOXYGEN_PATH doxy_path
upvar 1 GRAPHVIZ_PATH graph_path
upvar 1 INKSCAPE_PATH inkscape_path
upvar 1 HHC_PATH hhc_path
upvar 1 PDFLATEX_PATH latex_path
set doxy_path ""
set graph_path ""
set inkscape_path ""
set latex_path ""
set hhc_path ""
set is_win "no"
if { "$::tcl_platform(platform)" == "windows" } {
set is_win "yes"
}
if {"$is_win" == "yes"} {
set exe ".exe"
set com ".com"
} else {
set exe ""
set com ""
}
set g_flag "no"
set d_flag "no"
set i_flag "no"
set h_flag "no"
set l_flag "no"
puts ""
set envPath $::env(PATH)
if { $is_win == "yes" } {
set searchPathsList [split $envPath ";"]
} else {
set searchPathsList [split $envPath ":"]
}
foreach path $searchPathsList {
if { ($is_win == "no") &&
(($path == "/usr/bin") || ($path == "/usr/local/bin")) } {
# Avoid searching in default bin location
continue
}
if {$d_flag == "no"} {
if { [file exists $path/doxygen$exe] } {
catch { exec $path/doxygen -V } version_string
set version [lindex [split $version_string "\n"] 0]
puts "Info: $version "
puts " found in $path."
set doxy_path "$path/doxygen$exe"
set d_flag "yes"
}
}
if {$g_flag == "no"} {
if { [file exists $path/dot$exe] } {
catch { exec $path/dot -V } version
puts "Info: $version "
puts " found in $path."
set graph_path "$path/dot$exe"
set g_flag "yes"
}
}
if {$i_flag == "no"} {
if { [file exists $path/inkscape$com] } {
catch { exec $path/inkscape -V } version
puts "Info: $version "
puts " found in $path."
set inkscape_path "$path/inkscape$com"
set i_flag "yes"
}
}
if {$l_flag == "no"} {
if { [file exists $path/pdflatex$exe] } {
catch { exec $path/pdflatex -version } version
set version [lindex [split $version "\n"] 0]
puts "Info: $version "
puts " found in $path."
set latex_path "$path/pdflatex$exe"
set l_flag "yes"
}
}
if { ("$is_win" == "yes") && ($h_flag == "no") } {
if { [file exists $path/hhc.exe] } {
puts "Info: hhc "
puts " found in $path."
set hhc_path "hhc$exe"
set h_flag "yes"
}
}
if { ($d_flag == "yes") &&
($i_flag == "yes") &&
($g_flag == "yes") &&
($l_flag == "yes") &&
(($is_win == "yes") &&
($h_flag == "yes")) } {
break
}
}
# On Windows search for hhc.exe in the default location
# if it has not been found yet
if { ("$is_win" == "yes") && ($h_flag == "no") } {
if { [info exists ::env(ProgramFiles\(x86\))] } {
set h_flag "yes"
set path "$::env(ProgramFiles\(x86\))\\HTML Help Workshop"
set hhc_path "$path\\hhc.exe"
puts "Info: hhc "
puts " found in $path."
} else {
if { [info exists ::env(ProgramFiles)] } {
set h_flag "yes"
set path "$::env(ProgramFiles)\\HTML Help Workshop"
set hhc_path "$path\\hhc.exe"
puts "Info: hhc"
puts " found in $path."
}
}
}
# On *nix-like platforms,
# check the default binary locations if the tools had not been found yet
if { $is_win == "no" &&
(($d_flag == "no") ||
($i_flag == "no") ||
($g_flag == "no") ||
($l_flag == "no")) } {
set default_path { "/usr/bin" "/usr/local/bin" }
foreach path $default_path {
if {$d_flag == "no"} {
if { [file exists $path/doxygen$exe] } {
catch { exec $path/doxygen -V } version_string
set version [lindex [split $version_string "\n"] 0]
puts "Info: $version "
puts " found in $path."
set doxy_path "$path/doxygen$exe"
set d_flag "yes"
}
}
if {$g_flag == "no"} {
if { [file exists $path/dot$exe] } {
catch { exec $path/dot -V } version
puts "Info: $version "
puts " found in $path."
set graph_path "$path/dot$exe"
set g_flag "yes"
}
}
if {$i_flag == "no"} {
if { [file exists $path/inkscape$exe] } {
catch { exec $path/inkscape -V } version
puts "Info: $version "
puts " found in $path."
set inkscape_path "$path/inkscape$exe"
set i_flag "yes"
}
}
if {$l_flag == "no"} {
if { [file exists $path/pdflatex$exe] } {
catch { exec $path/pdflatex -version } version
set version [lindex [split $version "\n"] 0]
puts "Info: $version "
puts " found in $path."
set latex_path "$path/pdflatex$exe"
set l_flag "yes"
}
}
}
}
# Check if tools have been found
if { $d_flag == "no" } {
puts "Warning: Could not find doxygen installed."
return -1
}
if { $g_flag == "no" } {
puts "Warning: Could not find graphviz installed."
}
if { $i_flag == "no" } {
puts "Warning: Could not find inkscape installed."
}
if { $l_flag == "no" } {
puts "Warning: Could not find pdflatex installed."
}
if { ("$::tcl_platform(platform)" == "windows") && ($h_flag == "no") } {
puts "Warning: Could not find hhc installed."
}
puts ""
}
# Convert SVG files to PDF format to allow including them to PDF
# (requires InkScape to be in PATH)
proc OCCDoc_ProcessSvg {latexDir verboseMode} {
set anSvgList [glob -nocomplain $latexDir/*.svg]
if { $anSvgList == {} } {
return
}
catch { exec inkscape -V } anInkVer
set isOldSyntax 0
if {[string match "Inkscape 0.*" $anInkVer]} { set isOldSyntax 1 }
foreach file $anSvgList {
if {$verboseMode == "YES"} {
puts "Info: Converting file $file..."
}
set pdffile "[file rootname $file].pdf"
if { $isOldSyntax == 1 } {
if { [catch {exec inkscape -z -D --file=$file --export-pdf=$pdffile} res] } {
#puts "Error: $res."
return
}
} else {
if { [catch {exec inkscape $file --export-area-drawing --export-type=pdf --export-filename=$pdffile} res] } {
#puts "Error: $res."
return
}
}
}
}
# ==============================================
# Reference Manual-specific functions
# ==============================================
# Finds dependencies between all modules
proc OCCDoc_CreateModulesDependencyGraph {dir filename modules mpageprefix} {
global module_dependency
if {![catch {open $dir/$filename.dot "w"} file]} {
puts $file "digraph $filename"
puts $file "\{"
foreach mod $modules {
if { $mod == "" } {
continue
}
puts $file "\t$mod \[ URL = \"[string tolower $mpageprefix$mod.html]\" \]"
foreach mod_depend $module_dependency($mod) {
puts $file "\t$mod_depend -> $mod \[ dir = \"back\", color = \"midnightblue\", style = \"solid\" \]"
}
}
puts $file "\}"
close $file
return $filename
}
}
# Finds dependencies between all toolkits in module
proc OCCDoc_CreateModuleToolkitsDependencyGraph {dir filename modulename tpageprefix} {
global toolkits_in_module
global toolkit_dependency
global toolkit_parent_module
if {![catch {open $dir/$filename.dot "w"} file]} {
puts $file "digraph $filename"
puts $file "\{"
foreach tk $toolkits_in_module($modulename) {
puts $file "\t$tk \[ URL = \"[string tolower $tpageprefix$tk.html]\"\ ]"
foreach tkd $toolkit_dependency($tk) {
if { [info exists toolkit_parent_module($tkd)] } {
if {$toolkit_parent_module($tkd) == $modulename} {
puts $file "\t$tkd -> $tk \[ dir = \"back\", color = \"midnightblue\", style = \"solid\" \]"
}
}
}
}
puts $file "\}"
close $file
return $filename
}
}
# Finds dependencies between the current toolkit and other toolkits
proc OCCDoc_CreateToolkitDependencyGraph {dir filename toolkitname tpageprefix} {
global toolkit_dependency
if {![catch {open $dir/$filename.dot "w"} file]} {
puts $file "digraph $filename"
puts $file "\{"
puts $file "\t$toolkitname \[ URL = \"[string tolower $tpageprefix$toolkitname.html]\"\, shape = box ]"
foreach tkd $toolkit_dependency($toolkitname) {
puts $file "\t$tkd \[ URL = \"[string tolower $tpageprefix$tkd.html]\"\ , shape = box ]"
puts $file "\t$toolkitname -> $tkd \[ color = \"midnightblue\", style = \"solid\" \]"
}
if {[llength $toolkit_dependency($toolkitname)] > 1} {
puts $file "\taspect = 1"
}
puts $file "\}"
close $file
return $filename
}
}
# Fills arrays of modules, toolkits, dependency of modules/toolkits etc
proc OCCDoc_LoadData { {theProductsDir ""} } {
global toolkits_in_module
global toolkit_dependency
global toolkit_parent_module
global module_dependency
if { $theProductsDir == ""} {
set modules_files [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $theProductsDir]/OS/" *.tcl]
} else {
set modules_files [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $theProductsDir]/VAS/" *.tcl]
}
foreach module_file $modules_files {
source $module_file
}
set modules [OCCDoc_GetModulesList $theProductsDir]
foreach mod $modules {
if { $mod == "" } {
continue
}
# Get toolkits of current module
set toolkits_in_module($mod) [$mod:toolkits]
# Get all dependence of current toolkit
foreach tk $toolkits_in_module($mod) {
# set parent module of current toolkit
set toolkit_parent_module($tk) $mod
set exlibfile [open "[OCCDoc_GetSourceDir $theProductsDir]/$tk/EXTERNLIB" r]
set exlibfile_data [read $exlibfile]
set exlibfile_data [split $exlibfile_data "\n"]
set toolkit_dependency($tk) {}
foreach dtk $exlibfile_data {
if { ([string first "TK" $dtk 0] == 0) ||
([string first "P" $dtk 0] == 0) } {
lappend toolkit_dependency($tk) $dtk
}
}
close $exlibfile
}
}
# Get modules dependency
foreach mod $modules {
set module_dependency($mod) {}
foreach tk $toolkits_in_module($mod) {
foreach tkd $toolkit_dependency($tk) {
if { [info exists toolkit_parent_module($tkd)] } {
if { $toolkit_parent_module($tkd) != $mod &&
[lsearch $module_dependency($mod) $toolkit_parent_module($tkd)] == -1} {
lappend module_dependency($mod) $toolkit_parent_module($tkd)
}
}
}
}
}
}
# Returns list of packages of the given toolkit
proc OCCDoc_GetPackagesList { theToolKitPath } {
set packages_list {}
# Open file with list of packages of the given toolkit
set fileid [open "$theToolKitPath/PACKAGES" "r"]
while { [eof $fileid] == 0 } {
set str [gets $fileid]
if { $str != "" } {
lappend packages_list $str
}
}
close $fileid
return $packages_list
}
# Returns list of modules from UDLIST
proc OCCDoc_GetModulesList { {theProductsDir ""} } {
if { $theProductsDir == "" } {
source "[OCCDoc_GetSourceDir $theProductsDir]/OS/Modules.tcl"
# load a command from this file
set modules [OS:Modules]
} else {
source "[OCCDoc_GetSourceDir $theProductsDir]/VAS/Products.tcl"
# load a command from this file
set modules [VAS:Products]
set modules [lsearch -not -all -inline $modules "VAS"]
}
return $modules
}
# Returns list of desired files in the specified location
proc OCCDoc_GetHeadersList { theDesiredContent thePackageName {theProductsDir ""} } {
# Get list of header files with path
set files_list [split [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $theProductsDir]/$thePackageName" "${thePackageName}.hxx" "${thePackageName}_*.hxx"]]
# Get content according to desired type ('p' for path and 'f' for filenames only)
if { $theDesiredContent == "p" } {
return $files_list
} elseif { $theDesiredContent == "f" } {
# Cut paths from filenames
foreach file $files_list {
set elem_index [lsearch $files_list $file]
lset files_list $elem_index [OCCDoc_GetNameFromPath [lindex $files_list $elem_index]]
}
return $files_list
}
}
# Returns location of the toolkit
proc OCCDoc_Locate { theToolKitName {theProductsDir ""} } {
set tk_dir "[OCCDoc_GetSourceDir $theProductsDir]/[OCCDoc_GetNameFromPath $theToolKitName]"
return $tk_dir
}
# Gets contents of the given html node (for Post-processing)
proc OCCDoc_GetNodeContents {node props html} {
set openTag "<$node$props>"
set closingTag "</$node>"
set start [string first $openTag $html]
if {$start == -1} {
return ""
}
set start [expr $start + [string length $openTag]]
set end [string length $html]
set html [string range $html $start $end]
set start [string first $closingTag $html]
set end [string length $html]
if {$start == -1} {
return ""
}
set start [expr $start - 1]
return [string range $html 0 $start]
}
# Generates main page file describing module structure
proc OCCDoc_MakeMainPage {outDir outFile modules {theProductsDir ""} } {
global env
set one_module [expr [llength $modules] == 1]
set fd [open $outFile "w"]
set module_prefix "module_"
set toolkit_prefix "toolkit_"
set package_prefix "package_"
if { ! [file exists "$outDir/html"] } {
file mkdir "$outDir/html"
}
OCCDoc_LoadData $theProductsDir
# Main page: list of modules
if { ! $one_module } {
puts $fd "/**"
puts $fd "\\mainpage Open CASCADE Technology"
foreach mod $modules {
puts $fd "\\li \\subpage [string tolower $module_prefix$mod]"
}
# insert modules relationship diagram
puts $fd "\\dotfile [OCCDoc_CreateModulesDependencyGraph $outDir/html schema_all_modules $modules $module_prefix]"
puts $fd "**/\n"
}
# One page per module: list of toolkits
set toolkits {}
foreach mod $modules {
if { $mod == "" } {
continue
}
puts $fd "/**"
if { $one_module } {
puts $fd "\\mainpage OCCT Module [$mod:name]"
} else {
puts $fd "\\page [string tolower module_$mod] Module [$mod:name]"
}
foreach tk [lsort [$mod:toolkits]] {
lappend toolkits $tk
puts $fd "\\li \\subpage [string tolower $toolkit_prefix$tk]"
}
puts $fd "\\dotfile [OCCDoc_CreateModuleToolkitsDependencyGraph $outDir/html schema_$mod $mod $toolkit_prefix]"
puts $fd "**/\n"
}
# One page per toolkit: list of packages
set packages {}
foreach tk $toolkits {
puts $fd "/**"
puts $fd "\\page [string tolower toolkit_$tk] Toolkit $tk"
foreach pk [lsort [OCCDoc_GetPackagesList [OCCDoc_Locate $tk $theProductsDir]]] {
lappend packages $pk
set u [OCCDoc_GetNameFromPath $pk]
puts $fd "\\li \\subpage [string tolower $package_prefix$u]"
}
puts $fd "\\dotfile [OCCDoc_CreateToolkitDependencyGraph $outDir/html schema_$tk $tk $toolkit_prefix]"
puts $fd "**/\n"
}
# One page per package: list of classes
foreach pk $packages {
set u [OCCDoc_GetNameFromPath $pk]
puts $fd "/**"
puts $fd "\\page [string tolower $package_prefix$u] Package $u"
foreach hdr [lsort [OCCDoc_GetHeadersList "f" "$pk" "$theProductsDir"]] {
if { ! [regexp {^Handle_} $hdr] && [regexp {(.*)[.]hxx} $hdr str obj] } {
puts $fd "\\li \\subpage $obj"
}
}
puts $fd "**/\n"
}
close $fd
return $outFile
}
# Parses generated files to add a navigation path
proc OCCDoc_PostProcessor {outDir} {
puts "[clock format [clock seconds] -format {%Y.%m.%d %H:%M}] Post-process is started ..."
append outDir "/html"
set files [glob -nocomplain -type f $outDir/package_*]
if { $files != {} } {
foreach f [lsort $files] {
set packageFilePnt [open $f r]
set packageFile [read $packageFilePnt]
set navPath [OCCDoc_GetNodeContents "div" " id=\"nav-path\" class=\"navpath\"" $packageFile]
set packageName [OCCDoc_GetNodeContents "div" " class=\"title\"" $packageFile]
regsub -all {<[^<>]*>} $packageName "" packageName
# add package link to nav path
set first [expr 1 + [string last "/" $f]]
set last [expr [string length $f] - 1]
set packageFileName [string range $f $first $last]
set end [string first "</ul>" $navPath]
set end [expr $end - 1]
set navPath [string range $navPath 0 $end]
append navPath " <li class=\"navelem\"><a class=\"el\" href=\"$packageFileName\">$packageName</a> </li>\n </ul>"
# get list of files to update
set listContents [OCCDoc_GetNodeContents "div" " class=\"textblock\"" $packageFile]
set listContents [OCCDoc_GetNodeContents "ul" "" $listContents]
set lines [split $listContents "\n"]
foreach line $lines {
if {[regexp {href=\"([^\"]*)\"} $line tmpLine classFileName]} {
# check if anchor is there
set anchorPos [string first "#" $classFileName]
if {$anchorPos != -1} {
set classFileName [string range $classFileName 0 [expr $anchorPos - 1]]
}
# read class file
set classFilePnt [open $outDir/$classFileName r+]
set classFile [read $classFilePnt]
# find position of content block
set contentPos [string first "<div class=\"header\">" $classFile]
set navPart [string range $classFile 0 [expr $contentPos - 1]]
# position where to insert nav path
set posToInsert [string last "</div>" $navPart]
set prePart [string range $classFile 0 [expr $posToInsert - 1]]
set postPart [string range $classFile $posToInsert [string length $classFile]]
set newClassFile ""
append newClassFile $prePart " <div id=\"nav-path\" class=\"navpath\">" $navPath \n " </div>" \n $postPart
# write updated content
seek $classFilePnt 0
puts $classFilePnt $newClassFile
close $classFilePnt
}
}
close $packageFilePnt
}
return 0
} else {
puts "no files found"
return 1
}
}
# ======================================
# User Guides-specific functions
# ======================================
# Loads a list of docfiles from file FILES.txt
proc OCCDoc_LoadFilesList {} {
set INPUTDIR [OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]
global available_docfiles
set available_docfiles {}
# Read data from file
if { [file exists "$INPUTDIR/FILES_HTML.txt"] == 1 } {
set FILE [open "$INPUTDIR/FILES_HTML.txt" r]
while {1} {
set line [string trim [gets $FILE]]
# trim possible comments starting with '#'
set line [regsub {\#.*} $line {}]
if {$line != ""} {
lappend available_docfiles $line
}
if {[eof $FILE]} {
close $FILE
break
}
}
} else {
return -1
}
global available_pdf
set available_pdf {}
# Read data from file
if { [file exists "$INPUTDIR/FILES_PDF.txt"] } {
set FILE [open "$INPUTDIR/FILES_PDF.txt" r]
while {1} {
set line [string trim [gets $FILE]]
# Trim possible comments starting with '#'
set line [regsub {\#.*} $line {}]
if {$line != ""} {
lappend available_pdf $line
}
if {[eof $FILE]} {
close $FILE
break
}
}
} else {
return -1
}
return 0
}
# Writes new TeX file for conversion from tex to pdf for a specific doc
proc OCCDoc_MakeRefmanTex {fileName latexDir verboseMode latexFilesList} {
if { $verboseMode == "YES" } {
puts "Info: Making refman.tex file for $fileName..."
}
set DOCNAME "$latexDir/refman.tex"
if {[file exists $DOCNAME] == 1} {
file delete -force $DOCNAME
}
# Copy template file to latex folder
if { "[OCCDoc_GetProdRootDir]" != "" } {
file copy "[OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]/resources/prod_pdf_template.tex" $DOCNAME
} else {
file copy "[OCCDoc_GetDoxDir]/resources/occt_pdf_template.tex" $DOCNAME
}
# Get templatized data
set texfile [open $DOCNAME "r"]
set texfile_loaded [read $texfile]
close $texfile
# Replace dummy values
set year [clock format [clock seconds] -format {%Y}]
set month [clock format [clock seconds] -format {%B}]
set texfile [open $DOCNAME "w"]
set casVersion [OCCDoc_DetectCasVersion]
# Get name of the document
set docLabel ""
foreach aFileName $latexFilesList {
# Find the file in FILES_PDF.txt
set parsedFileName [file rootname [lindex [split $aFileName "/" ] end]]
if { [regexp "${parsedFileName}$" $fileName] } {
set filepath "[OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]/$aFileName"
if { [file exists $filepath] } {
set MDFile [open $filepath "r"]
set label [split [gets $MDFile] "\{"]
set docLabel [lindex $label 0]
close $MDFile
break
}
}
}
set occtlogo_path "[OCCDoc_GetDoxDir]/resources/occt_logo.png"
set occlogo_path "[OCCDoc_GetDoxDir]/resources/occ_logo.png"
set copyright_path "[OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]/resources/prod_pdf_template.tex"
set texfile_loaded [string map [list DEFDOCLABEL "$docLabel" DEFCASVERSION "$casVersion" DEFFILENAME "$fileName" DEFYEAR "$year" DEFMONTH "$month" DEFCOPYRIGHT "$copyright_path" DEFLOGO "$occtlogo_path" DEFOCCLOGO "$occlogo_path" DEFTITLE ""] $texfile_loaded]
# Get data
puts $texfile $texfile_loaded
close $texfile
}
# Postprocesses generated TeX files
proc OCCDoc_ProcessTex {{texFiles {}} {latexDir} verboseMode} {
foreach TEX $texFiles {
if {$verboseMode == "YES"} {
puts "Info: Preprocessing file $TEX..."
}
if {![file exists $TEX]} {
puts "Error: file $TEX does not exist."
return -1
}
set IN_F [open "$TEX" "r"]
set TMPFILENAME "$latexDir/temp.tex"
set OUT_F [open $TMPFILENAME w]
while {1} {
set line [gets $IN_F]
if { [string first "\\includegraphics" $line] != -1 } {
# replace svg extension by pdf
set line [regsub {[.]svg} $line ".pdf"]
# Center images in TeX files
set line "\\begin{center}\n $line\n\\end{center}"
} elseif { [string first "\\subsection" $line] != -1 } {
# Replace \subsection with \section tag
regsub -all "\\\\subsection" $line "\\\\section" line
} elseif { [string first "\\subsubsection" $line] != -1 } {
# Replace \subsubsection with \subsection tag
regsub -all "\\\\subsubsection" $line "\\\\subsection" line
} elseif { [string first "\\paragraph" $line] != -1 } {
# Replace \paragraph with \subsubsection tag
regsub -all "\\\\paragraph" $line "\\\\subsubsection" line
}
puts $OUT_F $line
if {[eof $IN_F]} {
close $IN_F
close $OUT_F
break
}
}
file delete -force $TEX
file rename $TMPFILENAME $TEX
}
}

View File

@ -33,7 +33,6 @@ set "BUILD_ModelingAlgorithms=ON"
set "BUILD_Visualization=ON"
set "BUILD_ApplicationFramework=ON"
set "BUILD_DataExchange=ON"
set "BUILD_DETools=OFF"
rem Optional 3rd-party libraries to enable
set "USE_FREETYPE=ON"
@ -168,7 +167,6 @@ if ["%toCMake%"] == ["1"] (
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
-D BUILD_MODULE_DETools:BOOL="OFF" ^
-D BUILD_MODULE_Draw:BOOL="OFF" ^
-D BUILD_DOC_Overview:BOOL="OFF" ^
-D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^

View File

@ -27,7 +27,6 @@ rem set "BUILD_ModelingAlgorithms=ON"
rem set "BUILD_Visualization=ON"
rem set "BUILD_ApplicationFramework=ON"
rem set "BUILD_DataExchange=ON"
rem set "BUILD_MODULE_DETools=OFF"
rem Optional 3rd-party libraries to enable
rem set "USE_RAPIDJSON=ON"

View File

@ -16,7 +16,6 @@ rem set "BUILD_DIR=build-vs%VS%-%VSPLATFORM%"
rem set "INSTALL_DIR=%SrcRoot%\install"
rem set BUILD_DOC_Overview=OFF
rem set BUILD_Inspector=OFF
rem set BUILD_LIBRARY_TYPE=Shared
rem set BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
rem set BUILD_WITH_DEBUG=OFF
@ -28,12 +27,8 @@ rem Use semicolon-separated list of toolkits if you want to disable all modules
rem and build only some toolkits.
rem set BUILD_ADDITIONAL_TOOLKITS=
rem Set a directory recognized as a patch for OCCT.
rem set BUILD_PATCH=
rem set BUILD_MODULE_ApplicationFramework=ON
rem set BUILD_MODULE_DataExchange=ON
rem set BUILD_MODULE_DETools=OFF
rem set BUILD_MODULE_Draw=ON
rem set BUILD_MODULE_ModelingAlgorithms=ON
rem set BUILD_MODULE_ModelingData=ON

View File

@ -11,7 +11,6 @@ FREETYPE_DIR="$OCCT3RDPARTY/freetype-2.7.1"
#INSTALL_DIR="$SrcRoot/install"
#BUILD_DOC_Overview=OFF
#BUILD_Inspector=OFF
#BUILD_LIBRARY_TYPE=Shared
#BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
#BUILD_WITH_DEBUG=OFF
@ -21,12 +20,8 @@ FREETYPE_DIR="$OCCT3RDPARTY/freetype-2.7.1"
# and build only some toolkits.
#BUILD_ADDITIONAL_TOOLKITS=
# Set a directory recognized as a patch for OCCT.
#BUILD_PATCH=
#BUILD_MODULE_ApplicationFramework=ON
#BUILD_MODULE_DataExchange=ON
#BUILD_MODULE_DETools=OFF
#BUILD_MODULE_Draw=ON
#BUILD_MODULE_ModelingAlgorithms=ON
#BUILD_MODULE_ModelingData=ON

View File

@ -17,9 +17,7 @@ set "INSTALL_DIR=%SrcRoot%\install"
set BUILD_ADDITIONAL_TOOLKITS=
set BUILD_DOC_Overview=OFF
set BUILD_Inspector=OFF
set BUILD_LIBRARY_TYPE=Shared
set BUILD_PATCH=
set BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
set BUILD_WITH_DEBUG=OFF
set BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
@ -28,7 +26,6 @@ set BUILD_FORCE_RelWithDebInfo=OFF
set BUILD_MODULE_ApplicationFramework=ON
set BUILD_MODULE_DataExchange=ON
set BUILD_MODULE_DETools=OFF
set BUILD_MODULE_Draw=ON
set BUILD_MODULE_ModelingAlgorithms=ON
set BUILD_MODULE_ModelingData=ON
@ -59,17 +56,14 @@ cmake -G "%arch_compile%" ^
-D 3RDPARTY_DIR:STRING="%OCCT3RDPARTY%" ^
-D BUILD_ADDITIONAL_TOOLKITS:STRING="%BUILD_ADDITIONAL_TOOLKITS%" ^
-D BUILD_DOC_Overview:BOOL=%BUILD_DOC_Overview% ^
-D BUILD_Inspector:BOOL=%BUILD_Inspector% ^
-D BUILD_LIBRARY_TYPE:STRING=%BUILD_LIBRARY_TYPE% ^
-D BUILD_MODULE_ApplicationFramework:BOOL=%BUILD_MODULE_ApplicationFramework% ^
-D BUILD_MODULE_DataExchange:BOOL=%BUILD_MODULE_DataExchange% ^
-D BUILD_MODULE_DETools:BOOL=%BUILD_MODULE_DETools% ^
-D BUILD_MODULE_Draw:BOOL=%BUILD_MODULE_Draw% ^
-D BUILD_MODULE_FoundationClasses:BOOL=ON ^
-D BUILD_MODULE_ModelingAlgorithms:BOOL=%BUILD_MODULE_ModelingAlgorithms% ^
-D BUILD_MODULE_ModelingData:BOOL=%BUILD_MODULE_ModelingData% ^
-D BUILD_MODULE_Visualization:BOOL=%BUILD_MODULE_Visualization% ^
-D BUILD_PATCH:PATH="%BUILD_PATCH%" ^
-D BUILD_RELEASE_DISABLE_EXCEPTIONS:BOOL=%BUILD_RELEASE_DISABLE_EXCEPTIONS% ^
-D BUILD_WITH_DEBUG:BOOL=%BUILD_WITH_DEBUG% ^
-D BUILD_ENABLE_FPE_SIGNAL_HANDLER:BOOL=%BUILD_ENABLE_FPE_SIGNAL_HANDLER% ^

View File

@ -22,16 +22,13 @@ INSTALL_DIR_LIB=lin64/gcc/lib$DEB
BUILD_ADDITIONAL_TOOLKITS=
BUILD_DOC_Overview=OFF
BUILD_Inspector=OFF
BUILD_LIBRARY_TYPE=Shared
BUILD_PATCH=
BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
BUILD_WITH_DEBUG=OFF
BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
BUILD_MODULE_ApplicationFramework=ON
BUILD_MODULE_DataExchange=ON
BUILD_MODULE_DETools=OFF
BUILD_MODULE_Draw=ON
BUILD_MODULE_ModelingAlgorithms=ON
BUILD_MODULE_ModelingData=ON
@ -60,17 +57,14 @@ cmake -G "Unix Makefiles" \
-D 3RDPARTY_FREETYPE_DIR:PATH="$FREETYPE_DIR" \
-D BUILD_ADDITIONAL_TOOLKITS:STRING="$BUILD_ADDITIONAL_TOOLKITS" \
-D BUILD_DOC_Overview:BOOL=$BUILD_DOC_Overview \
-D BUILD_Inspector:BOOL=$BUILD_Inspector \
-D BUILD_LIBRARY_TYPE:STRING=$BUILD_LIBRARY_TYPE \
-D BUILD_MODULE_ApplicationFramework:BOOL=$BUILD_MODULE_ApplicationFramework \
-D BUILD_MODULE_DataExchange:BOOL=$BUILD_MODULE_DataExchange \
-D BUILD_MODULE_DETools:BOOL=$BUILD_MODULE_DETools \
-D BUILD_MODULE_Draw:BOOL=$BUILD_MODULE_Draw \
-D BUILD_MODULE_FoundationClasses:BOOL=ON \
-D BUILD_MODULE_ModelingAlgorithms:BOOL=$BUILD_MODULE_ModelingAlgorithms \
-D BUILD_MODULE_ModelingData:BOOL=$BUILD_MODULE_ModelingData \
-D BUILD_MODULE_Visualization:BOOL=$BUILD_MODULE_Visualization \
-D BUILD_PATCH:PATH="$BUILD_PATCH" \
-D BUILD_RELEASE_DISABLE_EXCEPTIONS:BOOL=$BUILD_RELEASE_DISABLE_EXCEPTIONS \
-D BUILD_WITH_DEBUG:BOOL=$BUILD_WITH_DEBUG \
-D BUILD_ENABLE_FPE_SIGNAL_HANDLER:BOOL=$BUILD_ENABLE_FPE_SIGNAL_HANDLER \

View File

@ -34,7 +34,6 @@ export BUILD_ModelingAlgorithms=ON
export BUILD_Visualization=ON
export BUILD_ApplicationFramework=ON
export BUILD_DataExchange=ON
export BUILD_DETools=OFF
export USE_FREETYPE=ON
export USE_FREEIMAGE=OFF
@ -148,7 +147,6 @@ function buildArch {
-D BUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
-D BUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
-D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
-D BUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \
-D BUILD_MODULE_Draw:BOOL="OFF" \
-D BUILD_DOC_Overview:BOOL="OFF" \
"$aCasSrc" 2>&1 | tee -a "$aLogFile"

View File

@ -20,7 +20,6 @@ export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-ios"
#export BUILD_Visualization=ON
#export BUILD_ApplicationFramework=ON
#export BUILD_DataExchange=ON
#export BUILD_DETools=OFF
#export USE_RAPIDJSON=ON
#export USE_DRACO=ON

View File

@ -34,7 +34,6 @@ export BUILD_ModelingAlgorithms=ON
export BUILD_Visualization=ON
export BUILD_ApplicationFramework=ON
export BUILD_DataExchange=ON
export BUILD_DETools=OFF
export BUILD_Draw=ON
export USE_FREETYPE=ON
@ -145,7 +144,6 @@ function buildArch {
-D BUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
-D BUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
-D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
-D BUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \
-D BUILD_MODULE_Draw:BOOL="${BUILD_Draw}" \
-D BUILD_DOC_Overview:BOOL="OFF" \
"$aCasSrc" 2>&1 | tee -a "$aLogFile"

View File

@ -19,7 +19,6 @@ export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-macos"
#export BUILD_Visualization=ON
#export BUILD_ApplicationFramework=ON
#export BUILD_DataExchange=ON
#export BUILD_DETools=OFF
#export BUILD_Draw=ON
#export USE_RAPIDJSON=ON

View File

@ -32,7 +32,6 @@ set "BUILD_ModelingAlgorithms=ON"
set "BUILD_Visualization=ON"
set "BUILD_ApplicationFramework=ON"
set "BUILD_DataExchange=ON"
set "BUILD_DETools=OFF"
set "BUILD_Draw=ON"
rem Optional 3rd-party libraries to enable
@ -155,7 +154,6 @@ if ["%toCMake%"] == ["1"] (
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
-D BUILD_MODULE_DETools:BOOL="%BUILD_DETools%" ^
-D BUILD_MODULE_Draw:BOOL="%BUILD_Draw%" ^
-D 3RDPARTY_TCL_DIR:PATH="%aTclTk%" ^
-D 3RDPARTY_TCL_INCLUDE_DIR:FILEPATH="%aTclTk%/include" ^

View File

@ -22,7 +22,6 @@ rem set "BUILD_ModelingAlgorithms=ON"
rem set "BUILD_Visualization=ON"
rem set "BUILD_ApplicationFramework=ON"
rem set "BUILD_DataExchange=ON"
rem set "BUILD_DETools=OFF"
rem set "BUILD_Draw=ON"
rem set "USE_RAPIDJSON=ON"

View File

@ -32,7 +32,6 @@ set "BUILD_ModelingAlgorithms=ON"
set "BUILD_Visualization=ON"
set "BUILD_ApplicationFramework=ON"
set "BUILD_DataExchange=ON"
set "BUILD_DETools=OFF"
set "BUILD_Draw=OFF"
rem Optional 3rd-party libraries to enable
@ -176,7 +175,6 @@ if ["%toCMake%"] == ["1"] (
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
-D BUILD_MODULE_DETools:BOOL="%BUILD_DETools%" ^
-D BUILD_MODULE_Draw:BOOL="%BUILD_Draw%" ^
-D BUILD_DOC_Overview:BOOL="OFF" ^
-D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^

View File

@ -20,7 +20,6 @@ export BUILD_ModelingAlgorithms=ON
export BUILD_Visualization=ON
export BUILD_ApplicationFramework=ON
export BUILD_DataExchange=ON
export BUILD_DETools=OFF
if [ -f "${aScriptDir}/wasm_custom.sh" ] ; then
. "${aScriptDir}/wasm_custom.sh"
@ -75,7 +74,6 @@ echo cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \
-DBUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
-DBUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
-DBUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
-DBUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \
-DBUILD_MODULE_Draw:BOOL="OFF" \
-DBUILD_DOC_Overview:BOOL="OFF" "${aSrcRoot}"
@ -94,7 +92,6 @@ cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \
-DBUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
-DBUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
-DBUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
-DBUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \
-DBUILD_MODULE_Draw:BOOL="OFF" \
-DBUILD_DOC_Overview:BOOL="OFF" "${aSrcRoot}"

View File

@ -23,7 +23,6 @@ rem set "BUILD_ModelingAlgorithms=ON"
rem set "BUILD_Visualization=ON"
rem set "BUILD_ApplicationFramework=ON"
rem set "BUILD_DataExchange=ON"
rem set "BUILD_DETools=OFF"
rem set "USE_RAPIDJSON=ON"
rem set "USE_DRACO=ON"

View File

@ -14,4 +14,3 @@ export EMSDK_ROOT="$aSrcRoot/../emsdk"
#export BUILD_Visualization=ON
#export BUILD_ApplicationFramework=ON
#export BUILD_DataExchange=ON
#export BUILD_DETools=OFF

View File

@ -1,30 +0,0 @@
#!/usr/bin/tclsh
# =======================================================================
# Created on: 2014-03-21
# Created by: OMY
# Copyright (c) 1996-1999 Matra Datavision
# Copyright (c) 1999-2014 OPEN CASCADE SAS
#
# This file is part of Open CASCADE Technology software library.
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License version 2.1 as published
# by the Free Software Foundation, with special exception defined in the file
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
# distribution for complete text of the license and disclaimer of any warranty.
#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.
if { [llength $argv] < 1 } {
puts "Command-line starter for Tcl command defined in same-named file."
puts "Use it as follows:"
puts "\> tclsh start.tcl command \[arguments\]"
return
}
set cmdname [lindex $argv 0]
source [file join [file dirname [info script]] $cmdname.tcl]
eval $cmdname [lrange $argv 1 end]

View File

@ -3,7 +3,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@X_COMPILER_BITNESS@'">
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/resources
DRAWHOME=@CMAKE_SOURCE_DIR@/resources/DrawResources
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
@ -16,7 +17,7 @@ PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|@X_COMPILER_BITNESS@'">
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/resources
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
@ -29,7 +30,8 @@ PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@X_COMPILER_BITNESS@'">
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
DRAWHOME=@CMAKE_SOURCE_DIR@/resources/DrawResources
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/resources
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests

View File

@ -27,7 +27,7 @@ get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib$")
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib(32|64)?$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/libs/${CMAKE_ANDROID_ARCH_ABI}$")

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@X_COMPILER_BITNESS@'">
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
QTDIR=@3RDPARTY_QT_DIR@
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;@OpenCASCADE_BINARY_DIR@;%PATH%
</LocalDebuggerEnvironment>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|@X_COMPILER_BITNESS@'">
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
QTDIR=@3RDPARTY_QT_DIR@
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;@OpenCASCADE_BINARY_DIR@i;%PATH%
</LocalDebuggerEnvironment>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@X_COMPILER_BITNESS@'">
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
QTDIR=@3RDPARTY_QT_DIR@
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;@OpenCASCADE_BINARY_DIR@d;%PATH%
</LocalDebuggerEnvironment>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
</PropertyGroup>
</Project>

View File

@ -35,7 +35,7 @@ if /I "%VCVER%" == "@COMPILER@" (
)
set "CSF_OCCTIncludePath=@CMAKE_BINARY_DIR@/inc"
set "CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src"
set "CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/resources"
set "CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data"
set "CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples"
set "CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests"

View File

@ -23,8 +23,8 @@ if [ "$1" == "@BIN_LETTER@" ]; then
export CSF_OCCTBinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
export CSF_OCCTLibPath="@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
export CSF_OCCTIncludePath="@CMAKE_BINARY_DIR@/inc"
export CSF_OCCTResourcePath="@CMAKE_SOURCE_DIR@/src"
export CSF_OCCTIncludePath="@CMAKE_BINARY_DIR@/@INSTALL_DIR_INCLUDE@"
export CSF_OCCTResourcePath="@CMAKE_SOURCE_DIR@/resources"
export CSF_OCCTDataPath="@CMAKE_SOURCE_DIR@/data"
export CSF_OCCTSamplesPath="@CMAKE_SOURCE_DIR@/samples"
export CSF_OCCTTestsPath="@CMAKE_SOURCE_DIR@/tests"

View File

@ -1,11 +1,22 @@
#!/bin/bash
aCurrentPath="$PWD"
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
cd ${aCurrentPath}
# ----- For compatibility with external application using CASROOT -----
if [ "${CASROOT}" == "" ]; then
# Get the last directory name from the path
lastDir=$(basename "$aScriptPath")
# Check if last directory is exactly bin, bind, or bini
if [ "$lastDir" = "bin" ] || [ "$lastDir" = "bind" ] || [ "$lastDir" = "bini" ]; then
# If path contains binary folder, go one level up
export CASROOT=$(cd "$aScriptPath/.." && pwd)
else
# Keep current location
export CASROOT="${aScriptPath}"
fi
cd ${aCurrentPath}
fi
# ----- Define path to 3rdparty products -----
export THIRDPARTY_DIR="@3RDPARTY_DIR@"

View File

@ -1,10 +1,21 @@
#!/bin/bash
aCurrentPath="$PWD"
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
cd ${aCurrentPath}
# ----- For compatibility with external application using CASROOT -----
if [ "${CASROOT}" == "" ]; then
export CASROOT="@INSTALL_DIR@"
# Get the last directory name from the path
lastDir=$(basename "$aScriptPath")
# Check if last directory is exactly bin, bind, or bini
if [ "$lastDir" = "bin" ] || [ "$lastDir" = "bind" ] || [ "$lastDir" = "bini" ]; then
# If path contains binary folder, go one level up
export CASROOT=$(cd "$aScriptPath/.." && pwd)
else
# Keep current location
export CASROOT="${aScriptPath}"
fi
cd ${aCurrentPath}
fi
# ----- Define path to 3rdparty products -----

View File

@ -1 +1,2 @@
@OCCT_HEADER_FILE_CONTENT@
// clang-format off
@OCCT_HEADER_FILE_CONTENT@// clang-format on

View File

@ -1,17 +0,0 @@
@echo off
rem Use:
rem - first argument specifies version of Visual Studio (vc8, vc9, or vc10),
rem - second argument specifies architecture (win32 or win64),
rem - third argument specifies build mode (Debug or Release)
rem - fourth and next arguments specify loaded tool plugins
rem The arguments are: dfbrowser shapeview vinspector
rem If there are no tool plugins are specified, all plugins will be loaded
rem Default options are:
rem vc8 win32 Release
rem Setup environment and launch TInspector
call "%~dp0env.bat" %1 %2 %3
TInspectorEXE.exe %*

View File

@ -1,9 +0,0 @@
#!/bin/bash
aCurrentPath="$PWD"
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
source "${aScriptPath}/env.sh" "$1"
cd ${aCurrentPath}
TInspectorEXE

View File

@ -48,7 +48,6 @@ user_guides/xde/xde.md
user_guides/de_wrapper/de_wrapper.md
user_guides/ocaf/ocaf.md
user_guides/draw_test_harness/draw_test_harness.md
user_guides/inspector/inspector.md
user_guides/vis/vis.md
specification/specification.md

View File

@ -21,7 +21,6 @@ user_guides/iges/iges.md
user_guides/step/step.md
user_guides/xde/xde.md
user_guides/de_wrapper/de_wrapper.md
user_guides/inspector/inspector.md
user_guides/draw_test_harness/draw_test_harness.md
contribution/contribution_workflow/contribution_workflow.md

View File

@ -12,54 +12,70 @@ The easiest way to install third-party libraries is to download archive with pre
from [Development Portal](https://dev.opencascade.org/resources/download/3rd-party-components).
You can also build third-party libraries from their sources, see @ref build_upgrade_building_3rdparty for instructions.
On Linux and macOS we recommend to use libraries maintained by distributive developers, when possible.
On Linux and macOS we recommend using libraries maintained by distributive developers when possible.
@section build_occt_win_cmake Building with CMake tool
@section build_requirements System Requirements
This chapter describes the [CMake](https://cmake.org/download/)-based build process, which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources.
OCCT requires CMake version 3.1 or later.
* **CMake** version 3.10 or later (3.16+ recommended for precompiled headers support)
* C++11 compliant compiler (required)
* Supported platforms and compilers:
* Windows:
- Visual Studio 2015 or later
- MinGW-w64 7.3 or later
* Linux:
- GCC 5.0 or later
- Clang 3.8 or later
* macOS:
- Apple Clang 9.0 or later
- Xcode 9.0 or later
CMake is a tool that generates the actual project files for the selected target build system (e.g. Unix makefiles) or IDE (e.g. Visual Studio 2010).
Here we describe the build procedure on the example of Windows platform with Visual Studio 2010.
@section build_occt_cmake Building with CMake
This chapter describes the [CMake](https://cmake.org/download/)-based build process, which is the standard way to produce OCCT binaries from sources.
CMake is a tool that generates project files for the selected target build system (e.g. Unix makefiles) or IDE (e.g. Visual Studio).
Here we describe the build procedure using Windows platform with Visual Studio as an example.
However, CMake is cross-platform and can be used to build OCCT on Linux and macOS in essentially the same way.
CMake deals with three directories: source, build or binary and installation.
* The source directory is where the sources of OCCT are located in your file system;
* The build or binary directory is where all files created during CMake configuration and generation process will be located. The mentioned process will be described below.
* The installation directory is where binaries will be installed after building the *INSTALL* project that is created by CMake generation process, along with header files and resources required for OCCT use in applications.
* The build or binary directory is where all files created during CMake configuration and generation process will be located;
* The installation directory is where binaries will be installed after building the *INSTALL* project, along with header files and resources required for OCCT use in applications.
The good practice is not to use the source directory as a build one.
Different configurations should be built in different build directories to avoid conflicts.
It is however possible to choose one installation directory for several configurations of OCCT (differentiated by platform, bitness, compiler and build type), for example:
For example:
d:/occt/ - the source directory
d:/tmp/occt-build-vc10-x64 - the build directory with the generated
d:/tmp/occt-build-vc14-x64 - the build directory with the generated
solution and other intermediate files created during a CMake tool working
d:/occt-install - the installation directory that is
able to contain several OCCT configurations
d:/occt-install - the installation directory that can
contain several OCCT configurations
@subsection build_cmake_conf Configuration process
For unexperienced users we recommend to start with *cmake-gui* -- a cross-platform GUI tool provided by CMake on Windows, Mac and Linux.
For inexperienced users we recommend starting with *cmake-gui* -- a cross-platform GUI tool provided by CMake on Windows, Mac and Linux.
A command-line alternative, *ccmake* can also be used.
If the command-line tool is used, run the tool from the build directory with a single argument indicating the source (relative or absolute path) directory, and press *c* to configure:
If the command-line tool is used, run it from the build directory with a single argument indicating the source directory:
cd d:/tmp/occt-build-vc10-x64
cd d:/tmp/occt-build-vc14-x64
ccmake d:/occt
Then press *c* to configure.
@figure{/build/build_occt/images/cmake_image000.png}
If the GUI tool is used, run this tool without additional arguments and after that specify the source directory by clicking **Browse Source** and the build (binary) one by clicking **Browse Build**:
If the GUI tool is used, run this tool without additional arguments and specify the source directory by clicking **Browse Source** and the build directory by clicking **Browse Build**:
@figure{/build/build_occt/images/cmake_image001.png}
@note Each configuration of the project should be built in its own directory.
When building multiple configurations it is suggested to indicate in the name of build directories the system, bitness and compiler (e.g., <i>d:/occt/build/win32-vc10</i>).
When building multiple configurations it is suggested to indicate in the name of build directories the system, bitness and compiler (e.g., <i>d:/occt/build/win32-vc14</i>).
Once the source and build directories are selected, "Configure" button should be pressed in order to start manual configuration process.
It begins with selection of a target configurator. It is "Visual Studio 10 2010 Win64" in our example.
It begins with selection of a target configurator. It is "Visual Studio 14 2015 Win64" in our example.
@figure{/build/build_occt/images/cmake_image002.png}
@ -87,23 +103,28 @@ The following table gives the full list of environment variables used at the con
|----------|------|---------|
| CMAKE_BUILD_TYPE | String | Specifies the build type on single-configuration generators (such as make). Possible values are Debug, Release and RelWithDebInfo |
| USE_FREETYPE | Boolean | Indicates whether FreeType product should be used in OCCT for text rendering |
| USE_FREEIMAGE | Boolean | Indicates whether FreeImage product should be used in OCCT visualization module for support of popular graphics image formats (PNG, BMP, etc.) |
| USE_OPENVR | Boolean | Indicates whether OpenVR product should be used in OCCT visualization module for support of Virtual Reality |
| USE_OPENGL | Boolean | Indicates whether TKOpenGl graphic driver using OpenGL library (desktop) should be built within OCCT visualization module |
| USE_GLES2 | Boolean | Indicates whether TKOpenGles graphic driver using OpenGL ES library (embedded OpenGL) should be built within OCCT visualization module |
| USE_RAPIDJSON | Boolean | Indicates whether RapidJSON product should be used in OCCT Data Exchange module for support of glTF mesh file format |
| USE_DRACO | Boolean | Indicates whether Draco product should be used in OCCT Data Exchange module for support of Draco compression in glTF mesh file format |
| USE_TK | Boolean | Indicates whether Tcl/Tk product should be used in OCCT Draw Harness module for user interface (in addition to Tcl, which is mandatory for Draw Harness) |
| USE_TBB | Boolean | Indicates whether TBB (Threading Building Blocks) 3rd party is used or not. Note that OCCT remains parallel even without TBB product |
| USE_VTK | Boolean | Indicates whether VTK 3rd party is used or not. OCCT comes with a bridge between CAD data representation and VTK by means of its dedicated VIS component (VTK Integration Services). You may skip this 3rd party unless you are planning to use VTK visualization for OCCT geometry. See the official documentation @ref occt_user_guides__vis for the details on VIS |
| USE_FREEIMAGE | Boolean | Indicates whether FreeImage product should be used in OCCT visualization module for support of popular graphics image formats |
| USE_FFMPEG | Boolean | Indicates whether FFmpeg framework should be used for video encoding/decoding support |
| USE_OPENVR | Boolean | Indicates whether OpenVR product should be used in OCCT visualization module for VR support |
| USE_OPENGL | Boolean | Indicates whether TKOpenGl graphic driver using OpenGL library (desktop) should be built |
| USE_GLES2 | Boolean | Indicates whether TKOpenGles graphic driver using OpenGL ES library should be built |
| USE_RAPIDJSON | Boolean | Indicates whether RapidJSON product should be used for JSON format support |
| USE_DRACO | Boolean | Indicates whether Draco mesh compression library should be used |
| USE_TK | Boolean | Indicates whether Tcl/Tk product should be used in Draw Harness for user interface |
| USE_TBB | Boolean | Indicates whether TBB (Threading Building Blocks) should be used for parallel computations |
| USE_VTK | Boolean | Indicates whether VTK bridge should be built |
| BUILD_USE_PCH | Boolean | Enable/disable use of precompiled headers. Requires CMake 3.16 or later |
| BUILD_USE_VCPKG | Boolean | Use vcpkg for managing third-party dependencies |
| BUILD_INCLUDE_SYMLINK | Boolean | Use symbolic links instead of copies for header files in build directory |
| BUILD_MODULE_<MODULE>| Boolean | Indicates whether the corresponding OCCT module should be built |
| BUILD_LIBRARY_TYPE | String | Specifies library type ("Shared" or "Static") |
| BUILD_CPP_STANDARD | String | Select C++ standard (C++11, C++14, C++17, C++20, C++23) |
| 3RDPARTY_DIR | Path | Defines the root directory where all required 3rd party products will be searched. Once you define this path it is very convenient to click "Configure" button in order to let CMake automatically detect all necessary products|
| 3RDPARTY_FREETYPE_* | Path | Path to FreeType binaries |
| 3RDPARTY_TCL_* 3RDPARTY_TK_* | Path | Path to Tcl/Tk binaries |
| 3RDPARTY_FREEIMAGE* | Path | Path to FreeImage binaries |
| 3RDPARTY_TBB* | Path | Path to TBB binaries |
| 3RDPARTY_VTK_* | Path | Path to VTK binaries |
| BUILD_MODULE_<MODULE>| Boolean | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in @ref user_guides |
| BUILD_LIBRARY_TYPE | String | Specifies the type of library to be created. "Shared" libraries are linked dynamically and loaded at runtime. "Static" libraries are archives of object files used when linking other targets. Note that Draw Harness plugin system is incompatible with "Static" builds, and therefore it is disabled for these builds.|
| BUILD_ADDITIONAL_TOOLKITS | String | Semicolon-separated individual toolkits to include into build process. If you want to build some particular libraries (toolkits) only, then you may uncheck all modules in the corresponding *BUILD_MODUE_\<MODULE\>* options and provide the list of necessary libraries here. Of course, all dependencies will be resolved automatically |
| BUILD_YACCLEX | Boolean | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this option leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
| BUILD_SAMPLES_MFC | Boolean | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms |
@ -113,7 +134,6 @@ The following table gives the full list of environment variables used at the con
| BUILD_PATCH | Path | Points to the directory recognized as a "patch" for OCCT. If specified, the files from this directory take precedence over the corresponding native OCCT sources. This way you are able to introduce patches to Open CASCADE Technology not affecting the original source distribution |
| BUILD_WITH_DEBUG | Boolean | Enables extended messages of many OCCT algorithms, usually printed to cout. These include messages on internal errors and special cases encountered, timing, etc. |
| BUILD_ENABLE_FPE_SIGNAL_HANDLER | Boolean | Enable/Disable the floating point exceptions (FPE) during DRAW execution only. Corresponding environment variable (CSF_FPE) can be changed manually in custom.bat/sh scripts without regeneration by CMake. |
| BUILD_CPP_STANDARD | String | Employ corresponding c++ standard (C++11, C++14, ..C++23) for building OCCT |
| CMAKE_CONFIGURATION_TYPES | String | Semicolon-separated CMake configurations |
| INSTALL_DIR | Path | Points to the installation directory. *INSTALL_DIR* is a synonym of *CMAKE_INSTALL_PREFIX*. The user can specify both *INSTALL_DIR* or *CMAKE_INSTALL_PREFIX* |
| INSTALL_DIR_BIN | Path | Relative path to the binaries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_BIN}) |
@ -211,7 +231,7 @@ The directory structure is as follows:
samples - samples
src - all required source files for OCCT
tests - OCCT test suite
win32\vc10\bind - binary files (installed 3rdparties and occt)
win32\vc14\bind - binary files (installed 3rdparties and occt)
\libd - libraries (installed 3rdparties and occt)
@note The above example is given for debug configuration.
@ -219,7 +239,7 @@ However, it is generally safe to use the same installation directory for the rel
In the latter case the contents of install directory will be enriched with subdirectories and files related to the release configuration.
In particular, the binaries directory win64 will be expanded as follows:
\win32\vc10\bind
\win32\vc14\bind
\libd
\bin
\lib
@ -235,10 +255,11 @@ This section describes the steps to build OCCT libraries for Android from a comp
The steps on Windows 7 and Ubuntu 15.10 are similar. There is the only one difference: makefiles are built with mingw32-make on Windows and native GNU make on Ubuntu.
Required tools (download and install if it is required):
- CMake 3.0+
- [Cross-compilation toolchain for CMake](https://github.com/taka-no-me/android-cmake)
- [Android NDK r12+](https://developer.android.com/ndk/downloads)
- GNU Make: MinGW v4.82+ for [Windows](https://www.mingw-w64.org/), GNU Make 4.0 for Ubuntu.
- CMake 3.10+ (3.16+ recommended)
- Android NDK r19+
- Android SDK API level 21+
- For Windows: MinGW-w64 7.3+ or Visual Studio 2015+
- For Linux/macOS: GNU Make 4.0+
Run GUI tool provided by CMake and:
- Specify the root folder of OCCT (`$CASROOT`, which contains *CMakelists.txt* file) by clicking **Browse Source**.
@ -263,9 +284,9 @@ specify `CMAKE_MAKE_PROGRAM` to mingw32-make executable.
@figure{/build/build_occt/images/android_image005.png}
How to configure OCCT, see @ref build_cmake_conf "Configure" section taking into account the specific configuration variables for Android:
- `ANDROID_ABI` = `armeabi-v7a`
- `ANDROID_NATIVE_API_LEVEL` = `15`
- `ANDROID_NDK_LAYOUT` is equal to `CMAKE_BUILD_TYPE` variable
- `ANDROID_ABI` = `armeabi-v7a`, `arm64-v8a`, `x86`, or `x86_64`
- `ANDROID_PLATFORM` = `android-21` (minimum supported API level)
- `ANDROID_STL` = `c++_shared` (recommended)
- `BUILD_MODULE_Draw` = `OFF`
@figure{/build/build_occt/images/android_image006.png}

View File

@ -233,13 +233,18 @@ void Average (const Standard_Real** theArray,
To improve the open source readability and, consequently, maintainability, the following set of rules is applied.
### Clang-format [MANDATORY]
The source code should be formatted using the clang-format tool with the configuration file provided in the OCCT repository.
The version of clang-format should be 18.1.8 or higher.
### International language [MANDATORY]
All comments in all sources must be in English.
### Line length
Try to stay within the limit of 120 characters per line in all sources.
Try to stay within the limit of 100 characters per line in all sources.
### C++ style comments
@ -254,49 +259,6 @@ Delete unused code instead of commenting it or using \#define.
Indentation in all sources should be set to two space characters.
Use of tabulation characters for indentation is disallowed.
### Separating spaces
Punctuation rules follow the rules of the English language.
* C/C++ reserved words, commas, colons and semicolons should be followed by a space character if they are not at the end of a line.
* There should be no space characters after '(' and before ')'. Closing and opening brackets should be separated by a space character.
* For better readability it is also recommended to surround conventional operators by a space character.
Examples:
~~~~{.cpp}
while (true) // NOT: while( true ) ...
{
DoSomething (theA, theB, theC, theD); // NOT: DoSomething(theA,theB,theC,theD);
}
for (anIter = 0; anIter < 10; ++anIter) // NOT: for (anIter=0;anIter<10;++anIter){
{
theA = (theB + theC) * theD; // NOT: theA=(theB+theC)*theD
}
~~~~
### Declaration of pointers and references
In declarations of simple pointers and references put asterisk (*) or ampersand (&) right after the type without extra space.
Since declaration of several variables with mixed pointer types contrudicts this rule, it should be avoided. Instead, declare each variable independently with fully qualified type.
Examples:
~~~~{.cpp}
Standard_Integer *theVariable; // not recommended
Standard_Integer * theVariable; // not recommended
Standard_Integer* theVariable; // this is OK
Standard_Integer *&theVariable; // not recommended
Standard_Integer *& theVariable; // not recommended
Standard_Integer*& theVariable; // this is OK
Standard_Integer **theVariable; // not recommended
Standard_Integer ** theVariable; // not recommended
Standard_Integer** theVariable; // this is OK
Standard_Integer *theA, theB, **theC; // not recommended (declare each variable independently)
~~~~
### Separate logical blocks
Separate logical blocks of code with one blank line and comments.
@ -330,19 +292,16 @@ Each descriptive block should contain at least a function name and purpose descr
See the following example:
~~~~{.cpp}
// =======================================================================
// function : TellMeSmthGood
// purpose : Gives me good news
// =======================================================================
// ================================================================================================
void TellMeSmthGood()
{
...
}
// =======================================================================
// function : TellMeSmthBad
// purpose : Gives me bad news
// =======================================================================
// ================================================================================================
void TellMeSmthBad()
{
...
@ -400,23 +359,6 @@ if (THE_LIMIT == theValue) // bad style (global constant vs. variable)
if (theValue == THE_LIMIT) // OK
~~~~
### Alignment
Use alignment wherever it enhances the readability. See the following example:
~~~~{.cpp}
MyPackage_MyClass anObject;
Standard_Real aMinimum = 0.0;
Standard_Integer aVal = theVal;
switch (aVal)
{
case 0: computeSomething(); break;
case 12: computeSomethingElse (aMinimum); break;
case 3:
default: computeSomethingElseYet(); break;
}
~~~~
### Indentation of comments
Comments should be indented in the same way as the code to which they refer or they can be in the same line if they are short.

View File

@ -47,6 +47,9 @@ ENUM_VALUES_PER_LINE = 8
TREEVIEW_WIDTH = 250
EXTERNAL_PAGES = NO
SEARCHDATA_FILE = searchdata.xml
SERVER_BASED_SEARCH = NO
SEARCHENGINE = YES
EXTERNAL_SEARCH = YES
SKIP_FUNCTION_MACROS = YES
FORMULA_FONTSIZE = 12
FORMULA_TRANSPARENT = YES

View File

@ -62,7 +62,6 @@ Additionally, @ref occt_user_guides__modeling_algos "Modeling Algorithms" are us
The **Topology** section of the Overview demonstrates the functions used in 3D operations.
Multiple use cases are provided, including different object intersections, modifying and calculations.
Some of these use cases are described in the documentation, such as @ref occt_user_guides__inspector "Inspector" usage.
@figure{sample_overview_qt_topology.png,"",240} height=440px

View File

@ -7,7 +7,7 @@ Upgrade from older OCCT versions {#occt__upgrade}
This document provides technical details on changes made in particular versions of OCCT. It can help to upgrade user applications based on previous versions of OCCT to newer ones.
@ref upgrade_occt780 "SEEK TO THE LAST CHAPTER (UPGRADE TO 7.8.0)"
@ref upgrade_occt790 "SEEK TO THE LAST CHAPTER (UPGRADE TO 7.9.0)"
@subsection upgrade_intro_precautions Precautions
@ -2409,3 +2409,77 @@ The most recommended manager is `JeMalloc`. To use it with a plugin system, like
`BUILD_OPT_PROFILE` is a new variable to define optimization level. Available profiles:
* `Default` - specializes only in quality-dependent parameters for the compiler.
* `Production` - specializes in performance and quality-dependent parameters for the compiler and linker.
@section upgrade_occt790 Upgrade to OCCT 7.9.0
@subsection upgrade_790_code_formatting Code Formatting update
The entire code base has been formatted with `clang-format` 18.1.8 (Windows) using settings available in the root of the repository.
Most custom patches on top of previous releases will likely have merge conflicts.
When encountering merge conflicts, it is recommended to use `clang-format` to format the code.
To maintain patches, it is recommended to merge them into the main repository as part of a contribution. See [Get Involved](https://dev.opencascade.org/get_involved) and [Contribution Guide](https://github.com/Open-Cascade-SAS/OCCT/discussions/36).
@subsection upgrade_790_migration Migration to GitHub
The OCCT repository has been migrated to GitHub. The new repository is available at [GitHub](https://github.com/Open-Cascade-SAS/OCCT).
The old repository will be available for some time, but it is recommended to use the new repository for all new changes.
Contribution to the new repository is available through the GitHub interface - see [Get Involved](https://dev.opencascade.org/get_involved) and [Contribution Guide](https://github.com/Open-Cascade-SAS/OCCT/discussions/36).
@subsection upgrade_790_configuration GenProj no longer supported
The `GenProj` tool is no longer supported. It is recommended to use CMake for building OCCT.
In case of problems, please refer to the [CMake Guide](https://dev.opencascade.org/doc/overview/html/build_upgrade__building_occt.html).
@subsection upgrade_790_modeling_scale_exception Disabling exception for transformation with scale
The exception for transformation with scale has been disabled by default.
These exceptions were enabled in OCCT 7.6.0 for all cases of applying a transformation on a `TopoDS_Shape` with scale or negative determinant.
Now the exceptions are disabled by default but can be enabled by changing the parameter in the method which applies the transformation on `TopoDS_Shape`.
@subsection upgrade_790_de_wrapper Migration of DE_Wrapper classes
The DE Wrapper classes have been reorganized to follow a single style throughout the OCCT open source and commercial code.
All DE formats starting from 7.8.0 were grouped into their own TKs with the `TKDE` prefix.
Now all DE Wrapper interfaces have moved to their own package with the `DE` prefix.
DE Wrapper classes follow the pattern: `DE<Format>_Parameters`, `DE<Format>_Provider`, and `DE<Format>_ConfigurationNode`.
Example: `DESTEP_Parameters`, `DESTEP_Provider`, `DESTEP_ConfigurationNode`.
@subsection upgrade_790_de_shape_healing Migration of shape healing parameters
The shape healing parameters have migrated from the resource file to the DE interface.
The previous implementation was based on the resource file or `Interface_Static`.
Now the parameters are stored in the `DE_ShapeFixParameters` structure with the option to use a string-string map to store extra parameters.
To use the previous interface, use code similar to:
~~~~{.cpp}
STEPControl_Reader aReader;
XSAlgo_ShapeProcessor::ProcessingData aProcessingData =
XSAlgo_ShapeProcessor::ReadProcessingData("read.step.resource.name", "read.step.sequence");
aReader.SetShapeFixParameters(std::move(aProcessingData.first));
aReader.SetShapeProcessFlags(aProcessingData.second);
~~~~
It is recommended to use the new interface to store parameters in the `DE_ShapeFixParameters` structure directly.
@subsection upgrade_790_de_interface_static Migration of DE parameters from Interface_Static
During transfer operations, all parameters that were stored in `Interface_Static` have moved to their own DE structure.
The parameters are read only once during initialization and stored in the model.
Parameters are now available as part of the DE Wrapper interface, for example: `DESTEP_Parameters`, `DEIGES_Parameters`.
Code samples showing how to set the parameters can be found in `DESTEP_Provider` and `DEIGES_Provider`.
@subsection upgrade_790_general_handle_types Deprecated Handle types
The `Handle_*` type names have been deprecated in favor of directly using the macro.
The `Handle_*` type names are still available, but it is recommended to use the macro directly.
Example:
~~~~{.cpp}
Handle(TDataStd_Application) anApp = new TDataStd_Application(); // recommended
Handle_TDataStd_Application anApp = new TDataStd_Application(); // deprecated
~~~~
@subsection upgrade_790_general_map NCollection_Map algorithm method migration
The `NCollection_Map` class has been reorganized to migrate extra methods to the `NCollection_MapAlgo` class.
Boolean operations on maps are now available in the `NCollection_MapAlgo` class.

View File

@ -24,15 +24,15 @@ This guide principally deals with the following OCCT classes:
| CAD format | Extensions | RW support | Thread Safety | Presentation | Package |
| :--------- | :--------- | :--------- | :----------- | :----------- | :------ |
| STEP | .stp, .step .stepz | RW | No | BRep, Mesh | STEPCAFControl |
| XCAF | .xbf | RW | Yes | BRep, Mesh | DEXCAFCascade |
| BREP | .brep | RW | Yes | BRep, Mesh | DEBRepCascade |
| IGES | .igs, .iges | RW | No | BRep | IGESCAFControl |
| OBJ | .obj | RW | Yes | Mesh | RWObj |
| STL | .stl | RW | Yes | Mesh | RWStl |
| PLY | .ply | W | Yes | Mesh | RWPly |
| GLTF | .glTF .glb | RW | Yes | Mesh | RWGltf |
| VRML | .wrl .vrml | RW | Yes | Mesh | Vrml |
| STEP | .stp, .step .stepz | RW | No | BRep, Mesh | DESTEP |
| XCAF | .xbf | RW | Yes | BRep, Mesh | DEXCAF |
| BREP | .brep | RW | Yes | BRep, Mesh | DEBREP |
| IGES | .igs, .iges | RW | No | BRep | DEIGES |
| OBJ | .obj | RW | Yes | Mesh | DEOBJ |
| STL | .stl | RW | Yes | Mesh | DESTL |
| PLY | .ply | W | Yes | Mesh | DEPLY |
| GLTF | .glTF .glb | RW | Yes | Mesh | DEGLTF |
| VRML | .wrl .vrml | RW | Yes | Mesh | DEVRML |
**Note** :
* The format names in the first column match the FormatName values used for configuration nodes.
@ -41,7 +41,7 @@ This guide principally deals with the following OCCT classes:
@section occt_de_wrapper_3 DE Session Configuration
Any providers can have their own read/write parameters. The transfer process is set up using DE configuration nodes, which hold all relevant parameters. There are two ways to change the parameter values: directly from code or by an external resource file/string.
The session is a global or static DE_Wrapper object that stores registered DE configuration nodes and wraps DE commands to work with them. It has some configuration parameters of its own and also keeps track of loaded nodes and specilal global parameters.
The session is a global or static DE_Wrapper object that stores registered DE configuration nodes and wraps DE commands to work with them. It has some configuration parameters of its own and also keeps track of loaded nodes and special global parameters.
@subsection occt_de_wrapper_3_1 Getting a DE session. Code sample
@ -197,7 +197,7 @@ All registered providers are set to the map with information about its vendor an
@subsubsection occt_de_wrapper_3_3_1 Registering providers. Code sample
It is nesessary to register only one ConfigurationNode for all needed formats.
It is necessary to register only one ConfigurationNode for all needed formats.
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
Handle(DE_ConfigurationNode) aNode = new DESTEP_ConfigurationNode();

View File

@ -1261,7 +1261,7 @@ clear
**Example:**
~~~~{.php}
# erase eveerything with a name starting with c_
# erase everything with a name starting with c_
foreach var [directory c_*] {erase $var}
# clear 2d views
@ -6480,7 +6480,7 @@ blend b b 2 .
==fleche : 0.001
==tolblend 0.01 0.0001 1e-05 0.001
==Pick an object
# click on the edge you want ot fillet
# click on the edge you want to fillet
==COMPUTE: temps total 0.1s dont :
==- Init + ExtentAnalyse 0s
@ -10885,6 +10885,7 @@ mdist
This section describes commands that make possible to use Inspector.
Inspector available in https://github.com/Open-Cascade-SAS/Inspector repository.
@subsection occt_draw_13_1 tinspector

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -1,224 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="165.36458mm"
height="99.483337mm"
viewBox="0 0 165.36458 99.483337"
version="1.1"
id="svg8"
sodipodi:docname="3DView_elements.svg"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="237.05748"
inkscape:cy="217.01184"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1410"
inkscape:window-height="786"
inkscape:window-x="265"
inkscape:window-y="101"
inkscape:window-maximized="0"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
showborder="true"
inkscape:showpageshadow="false" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-208.35938,-140.66904)">
<rect
style="opacity:1;fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:#000000;stroke-width:0.52916667;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4147-9"
width="164.83542"
height="98.95417"
x="208.62396"
y="140.93362"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#bfbfbf;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4157-5"
width="155.95102"
height="20.214758"
x="212.62312"
y="145.17099"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#bfbfbf;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4159-1"
width="155.83388"
height="64.776878"
x="212.62471"
y="170.05089"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620295;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1-1"
width="30.417513"
height="11.316654"
x="286.53876"
y="149.43106"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620295;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1-5-9"
width="30.417513"
height="11.316654"
x="321.21384"
y="149.43106"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="295.72775"
y="156.1628"
id="text5675-5"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5677-3"
x="295.72775"
y="156.1628"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Single</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="331.03946"
y="156.53418"
id="text5679-5"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5681-0"
x="331.03946"
y="156.53418"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Clean</tspan></text>
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.45057005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-8-33"
width="14.354354"
height="56.42762"
x="216.9996"
y="174.34537"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.83517319;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-7-0"
width="67.939919"
height="26.352776"
x="265.93634"
y="189.26295"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.3866663px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222221px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="295.6308"
y="201.46571"
id="text5683-5-2"
transform="scale(0.98830373,1.0118347)"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5685-3-7"
x="295.6308"
y="201.46571"
style="font-size:3.83516741px;line-height:1.25;stroke-width:0.28222221px">3D view</tspan></text>
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620298;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1-1-3"
width="30.417513"
height="11.316654"
x="217.1886"
y="149.43106"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="227.84984"
y="156.48491"
id="text5675-5-2"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5677-3-2"
x="227.84984"
y="156.48491"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">View</tspan></text>
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.36620298;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.29879999;stroke-opacity:1"
id="rect4195-1-1-9"
width="30.417513"
height="11.316654"
x="251.86369"
y="149.43106"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.38666677px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28222224px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="262.35156"
y="156.53418"
id="text5675-5-9"
inkscape:export-filename="F:\OCC\master_CR29018\dox\user_guides\inspector\images\3DView.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan5677-3-0"
x="262.35156"
y="156.53418"
style="font-size:3.88055563px;line-height:1.25;stroke-width:0.28222224px">Multi</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View File

@ -1,27 +0,0 @@
<svg width="609" height="426" xmlns="http://www.w3.org/2000/svg">
<g id="Layer_1">
<title>Layer 1</title>
<rect stroke="#58a50b" id="svg_1" height="424.00001" width="605" y="-0.00001" x="0.5" stroke-width="4" fill="#ffffff"/>
<rect id="svg_2" height="89" width="575" y="16" x="13.5" stroke-width="4" stroke="#58a50b" fill="#66af1c"/>
<rect stroke="#58a50b" id="svg_3" height="280" width="277.99999" y="121" x="16.5" stroke-width="4" fill="#66af1c"/>
<rect stroke="#58a50b" id="svg_4" height="122" width="277.99999" y="120" x="309.5" stroke-width="4" fill="#66af1c"/>
<rect stroke="#58a50b" id="svg_5" height="140" width="277.99999" y="256" x="310.5" stroke-width="4" fill="#66af1c"/>
<rect id="svg_6" height="64" width="219" y="184" x="47.5" stroke-width="4" stroke="#58a50b" fill="#ffffff"/>
<rect id="svg_7" height="40" width="277" y="36" x="30.5" stroke-width="4" stroke="#58a50b" fill="#ffffff"/>
<rect stroke="#58a50b" id="svg_8" height="40" width="112" y="36" x="321.5" stroke-width="4" fill="#ffffff"/>
<rect stroke="#58a50b" id="svg_10" height="40" width="119" y="36" x="446.5" stroke-width="4" fill="#ffffff"/>
<text style="cursor: move;" xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_11" y="61" x="98.5" stroke-width="0" stroke="#58a50b" fill="#000000">Tree Navigation</text>
<text xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_12" y="63" x="338.5" stroke-width="0" stroke="#58a50b" fill="#000000">Update</text>
<text xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_13" y="65" x="474.5" stroke-width="0" stroke="#58a50b" fill="#ffffff">Search</text>
<text style="cursor: move;" xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_14" y="62" x="475.5" stroke-width="0" stroke="#58a50b" fill="#000000">Search</text>
<rect stroke="#58a50b" id="svg_20" height="54" width="136.99999" y="291" x="318.5" stroke-width="4" fill="#ffffff"/>
<rect stroke="#58a50b" id="svg_21" height="52" width="188" y="180" x="391.5" stroke-width="4" fill="#ffffff"/>
<rect stroke="#58a50b" id="svg_22" height="54" width="163" y="136" x="323.5" stroke-width="4" fill="#ffffff"/>
<rect stroke="#58a50b" id="svg_23" height="53" width="146" y="317" x="426.5" stroke-width="4" fill="#ffffff"/>
<text xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_27" y="170" x="338.5" stroke-width="0" stroke="#58a50b" fill="#000000">Property panel</text>
<text xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_28" y="227" x="83.5" stroke-width="0" stroke="#58a50b" fill="#000000">OCAF tree view</text>
<text xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="21" id="svg_30" y="322" x="322.5" stroke-width="0" stroke="#58a50b" fill="#000000">Dump View</text>
<text xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_31" y="352" x="459.5" stroke-width="0" stroke="#58a50b" fill="#000000">3D View</text>
<text style="cursor: move;" xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="18" id="svg_32" y="214" x="398.5" stroke-width="0" stroke="#58a50b" fill="#000000">Property panel (custom)</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.3 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

View File

@ -1,21 +0,0 @@
<svg width="300" height="300" xmlns="http://www.w3.org/2000/svg">
<g id="Layer_1">
<title>Layer 1</title>
<rect stroke="#ff56ff" id="svg_1" height="296.99999" width="297.00002" y="1.6" x="1" stroke-width="4" fill="#ffffff"/>
<rect id="svg_3" height="120" width="136" y="22.6" x="153" stroke-width="4" stroke="#ff56ff" fill="#ff56ff"/>
<rect stroke="#ff56ff" id="svg_4" height="259.99999" width="126.99999" y="18.6" x="16" stroke-width="4" fill="#ff56ff"/>
<rect stroke="#ff56ff" id="svg_5" height="122" width="131" y="155.6" x="156" stroke-width="4" fill="#ff56ff"/>
<rect stroke="#ff56ff" id="svg_6" height="41.00001" width="125" y="87.6" x="17" stroke-width="4" fill="#ffffff"/>
<rect id="svg_7" height="3" width="2" y="364.6" x="89" stroke-width="4" stroke="#ff56ff" fill="#ffffff"/>
<rect stroke="#ffffff" id="svg_8" height="41.00001" width="117" y="126.6" x="21" stroke-width="4" fill="#ffffff"/>
<rect stroke="#ff56ff" id="svg_9" height="41.00001" width="125" y="63.6" x="164" stroke-width="4" fill="#ffffff"/>
<rect stroke="#ff56ff" id="svg_10" height="64.00001" width="114.00001" y="158.6" x="159" stroke-width="4" fill="#ffffff"/>
<rect stroke="#ff56ff" id="svg_11" height="41.00001" width="101.00001" y="215.6" x="184" stroke-width="4" fill="#ffffff"/>
<text transform="matrix(0.742836 0 0 0.850555 6.17194 14.6433)" stroke="#ff56ff" xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_13" y="119.6" x="24" stroke-width="0" fill="#000000">Message report</text>
<text style="cursor: move;" transform="matrix(0.742836 0 0 0.850555 6.17194 46.6433)" stroke="#ff56ff" xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_14" y="118.4243" x="24" stroke-width="0" fill="#000000">tree view</text>
<text style="cursor: move;" xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_15" y="90.6" x="167" stroke-width="0" stroke="#ff56ff" fill="#000000">Dump panel</text>
<text xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_16" y="245.6" x="190" stroke-width="0" stroke="#ff56ff" fill="#000000">3D View</text>
<text transform="matrix(0.784367 0 0 0.769922 36.8545 36.9383)" stroke="#ff56ff" xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_17" y="181.6" x="157" stroke-width="0" fill="#000000">Property panel</text>
<text transform="matrix(0.884685 0 0 0.774516 20.9874 38.7657)" stroke="#ff56ff" xml:space="preserve" text-anchor="start" font-family="Noto Sans JP" font-size="24" id="svg_18" y="206.5113" x="176.34827" stroke-width="0" fill="#000000">(custom)</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 44 KiB

Some files were not shown because too many files have changed in this diff Show More