1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Compare commits

..

3707 Commits

Author SHA1 Message Date
dpasukhi
dbba6f1289 Data Exchange - Losing attributes on NonManifold STEP #284
Move step related processing from XSBase to STP module.
Added history apply after reading of NonManifold
2025-01-24 09:51:54 +00:00
dpasukhi
a0401c7872 Data Exchange - Clear up Step from Static_Interface #283
Remove unused Interface_Static includes
Update SchemaName method signatures
2025-01-24 09:51:15 +00:00
dpasukhi
1e0d8c3f1e Data Exchange - DE Wrapper Shape Healing Parameters #282
Propagate shape healing parameters to STP and IGES nodes.
Update naming to avoid misunderstanding.
2025-01-24 00:20:14 +00:00
dkulikov
f5a02d2b0c Data Exchange - Update Readers with ShapeHealing parameters #247
All instances of using XSAlgo_AlgoContainer are replaced with
XSAlgo_ShapeProcessor.

Parameters for XSAlgo_ShapeProcessor operations are now can be passes
via the updated interface of respective classes.

Staqtic function to read processing parameters from file is added to
XSAlgo_ShapeProcessor.
2025-01-23 22:51:31 +01:00
Elias Cohenca
bb84ecf5c6 Coding - Fix draco buffer index out of bounds
Fixed an exception where the bufferIndex is out of bounds.
Happens when Draco compression is combined with SetMergeFaces.
2025-01-23 00:25:08 +00:00
Elias Cohenca
87a64bbad5 Configuration - fix jemalloc installation #281 2025-01-22 19:28:29 +00:00
dpasukhi
a02c267a13 Testing - Update retest artifact uploading #272
Add "bugs moddata_1 bug20627" to ignore in linux related to
  performance issue.
2025-01-20 08:22:15 +00:00
dpasukhi
c24871f654 Testing - Retesting step for GH Actions #268
Adding new step to retest result per each job line.
Rework logic to minimize retesting.
Creating base for splitting into actions.
Adding new TCL command to clear up test folder from skipped
2025-01-19 17:55:15 +00:00
dpasukhi
22379e84ef Testing - Add cpulimit to address critical issue on Ubuntu #267 2025-01-17 19:20:01 +00:00
dpasukhi
5c64284f9a Testing - Update path for propeller script in video recorder tests #266 2025-01-17 18:40:49 +00:00
dpasukhi
ac450989ef Testing - Fix loading order of OCAF and XDE in bug tests #265
GNU compiler have some optimization leads to multiple definitions
  of static global objects.
In case of static linking there are no possible issues, but in case of plug-in
  application can have multiple definitions of single object.
2025-01-17 18:34:14 +00:00
dpasukhi
f9c046f5ff Testing - Specify test result folder #264
Update build-and-test workflow to specify output directories for test results
2025-01-17 17:48:41 +00:00
dpasukhi
6222d1b1f0 Coding - Move StepData_ConfParameters to DESTEP package #261
Replace StepData_ConfParameters with DESTEP_Parameters across multiple files.
New location will help to keep any translate related stuff in one place for high level usage.
2025-01-17 15:48:38 +00:00
dpasukhi
1083052cc2 Coding - Separate DE Wrapper's plugins to own packages #260
Reorganize DE Wrapper classes to have single style and logic.
Each TKDE* will have own DE*_Provider and DE*_ConfigurationNode
DE* package will have all necessary classes and enums inside instead of another places.
2025-01-17 15:29:17 +00:00
dpasukhi
e6b2e97f13 Testing - Update file handling outside catch block #263 2025-01-17 13:58:14 +00:00
dpasukhi
3744d7c687 Testing - Update dependencies to include additional font packages #262 2025-01-17 12:19:15 +00:00
dpasukhi
f91655b0c5 Coding - Isolate long attached comments for clang-format #259
Automatically update code with clang-format disabling for avoiding formatting.
You can check the python script in GitHub PR
2025-01-16 20:15:29 +00:00
dpasukhi
9a6854774d Data Exchange - STP provider missed parameters #257
Update STEPCAFControl_Provider and StepData_ConfParameters for improved parameter handling.
Update the default write parameters for WriteMode_Assembly to auto
2025-01-16 14:48:00 +00:00
dpasukhi
fe1382f3c2 Coding - Add clang-format configuration #246
New clang-format configuration added to determinate code style.
The default version is 16.
Extend CMake to copy config file to build root.
Method/function separator deprecation:
  In case if function/method has declaration in header,
    definition must not have related comment.
    Only //==== [100 chars] ==== is allowed as a not connected
    separator.
  In case if function/method has  NOT declaration in header,
    definition must have related comment in doxygen style:
    // Descriptions
    // @param
    // @return
    Or just function/method separator:
    //==== [100 chars] ====
  All old separators with no description must be replaced to
    //==== [100 chars] ====
2025-01-14 23:07:40 +00:00
dpasukhi
e9855c9335 Foundation Classes - Standard_Type destructor static_assert #255
Fix assertion logic in Standard_Type destructor for registry unbinding
2025-01-13 15:29:41 +00:00
dpasukhi
d4197764ab Testing - MinGW build validation #253
Add MinGW build validation workflow for Windows
Fix MinGW freetype linkings
2025-01-12 21:01:02 +00:00
dpasukhi
835ba7f104 Testing - MSVC build validation #252
Add MSVC and Clang build validation workflow for Windows
2025-01-11 01:24:23 +00:00
dpasukhi
39da39668b Testing - Ubuntu build validation #251
Add GitHub Actions workflow for Ubuntu build validation
TODO: check static build with VTK support
2025-01-10 22:23:56 +00:00
dpasukhi
30a23ff7a2 Configuration - Headers are missed during installing #250
Regression after #223
Fix regex in OCCT header files installation to include files with xx at the end
2025-01-09 18:02:40 +00:00
dpasukhi
a7f679e70f Configuration - Library CSF directory separation #248
Refactor jemalloc CMake processing to handling in CMake scripts
2025-01-09 17:58:21 +00:00
dpasukhi
3d6c21124a Coding - Deprecate Handle_* type usage #240
Handle_* require special processing in Windows
  and it is already not needed for VS15+
In 7.9 dev will be reorginized to use typedef even for MSVC.
In  8.0 will be fully removed.
2025-01-05 14:48:27 +00:00
dpasukhi
9687f7369c Foundation Classes - TopoDS_Shape accept scaling by default #239
Refactor Location and Move methods to validate transformations.
New default value to raise exception is false.
2025-01-04 23:47:53 +00:00
dpasukhi
a4443d74ad Coding - Remove static global variables #238
Refactor IGES Protocols to eliminate redundant type registrations
2025-01-04 23:45:07 +00:00
dpasukhi
0665ef79f8 Foundation Classes - Standard_Type avoiding C++ RTTI #236
Refactor OCCT RTTI to not keep reference to std::type_info.
Deep copy is returned as before version 7.8.0.
Keep only owning information about classes.
2025-01-04 20:13:36 +00:00
dpasukhi
d7d5b123b7 Foundation Classes - Standard_Type Instance reorganization #235
Refactor Standard_Type to have inline instances.
Now types are stored directly in classes.
2025-01-04 18:56:39 +00:00
dpasukhi
6766feb5ed Foundation Classes - Optimize IsKind operation #234
Refactor Standard_Type::SubType methods for improved clarity and performance
2025-01-04 15:19:49 +00:00
dpasukhi
ba2f25cfa5 DRAW - Static plugin factory refactor #233
Reorganize Static plug-in mapping to be more transparent.
2025-01-04 12:07:25 +00:00
dpasukhi
9e3e17d41e Foundation Classes - Update type declaration #232
Refactor type handling in BinMDataStd and Interface modules;
update RTTI implementations in StepVisual and XCAFDoc
2025-01-04 11:06:47 +00:00
dpasukhi
6d28546add Coding - Moving to use IsKind by type #224
Refactor AIS_InteractiveContext and MeshVS_Mesh to use STANDARD_TYPE for type checks;
deprecate old FindBuilder method
2024-12-29 14:16:37 +00:00
dpasukhi
33c22d1b19 Coding - Disable exporting internal RWStep* includes #223
Refactor header file extensions from .hxx to .pxx and update include statements.
Enable handling by IDE gxx and pxx extensions as a cpp header files.
Introduce Standard_HIDDEN to hide symbols
2024-12-29 11:20:53 +00:00
dpasukhi
abf2e1bacb Coding - Combining multiple gxx IntWalk and IntPatch #222
Refactor IntWalk and IntPatch to remove unused gxx files
  and combine to one with refactoring
2024-12-28 23:29:40 +00:00
dpasukhi
fade88f72d Coding - Refactor TopoDS.hxx #221
Remove TopoDS.lxx and move inline definition to declarations.
Refactor TopoDS.hxx with more detailed description.
2024-12-28 21:49:09 +00:00
dpasukhi
b9bcbb457b Coding - Remove unused source files and clean up header includes #220 2024-12-28 21:14:47 +00:00
dpasukhi
5c0ad5d8ea Coding - Refactor IntCurveSurface to remove gxx files #219
Refactor IntCurveSurface: Remove unused HCurveTool files
2024-12-28 19:49:18 +00:00
dpasukhi
a90cf73afd Coding - Coding - Refactor TopClass to remove gxx files #218
Refactor TopClass and BRepClass3d files by renaming and removing obsolete Classifier3d implementations
2024-12-28 18:56:47 +00:00
dpasukhi
ad315a4221 Coding - Refactor Blend to remove gxx files #217
Refactor Blend and BRepBlend files by renaming and removing obsolete Walking implementations
2024-12-28 18:19:21 +00:00
dpasukhi
fe92094cc4 Testing - GH Mesa3D script update #216
Update Mesa3D download links and set environment variables for software rendering
2024-12-27 21:50:04 +00:00
dpasukhi
727f8fa188 Foundation Classes - Move Map's algo part to external file #213
Updated multiple classes to utilize the new NCollection_MapAlgo
  for union, intersection, and other set operations,
    improving code structure and maintainability.
Deprecated older methods in NCollection_Map in favor of the new algorithmic approaches.
2024-12-27 13:07:05 +00:00
dpasukhi
1b4bb62150 Foundation Classes - Separate map's prime declaration #211
Refactor TCollection to use NCollection_Primes and remove obsolete TCollection.cxx
New prime declaration now will be more clear to use.
2024-12-27 10:40:54 +00:00
dpasukhi
ca688cfac3 Coding - Reorganize packages between TKExpress and TKMath #210
- Moved expressions libraries to TKExpress.
- Updated package dependencies in TKExpress and TKMath.
2024-12-26 11:51:01 +00:00
dpasukhi
8e4bda3043 Coding - Fixing warning for Clang #209
Update CMake flags and override methods for improved compatibility
Enhance build configurations and improve code quality with compiler flags
2024-12-23 21:12:11 +00:00
dpasukhi
f7dea47c33 Coding - Fixing clang-tidy warnings #207
First iteration for fixing warnings for:
- TKernel
- TKMath
- TKGeomBase
2024-12-22 12:16:58 +00:00
dpasukhi
0ffcc44c82 Coding - Remove obsolete Standard_Copy.tcl file 2024-12-21 13:27:29 +00:00
dpasukhi
4bda7ebe40 Coding - GeomTools performance update #19
Update size of buffer for the brep parsing according standard
2024-12-21 11:13:07 +00:00
dpasukhi
819ae9a55f Configuration - Add VCPKG Manifest mode support #205
The basic implementation of VCPKG as a beta version.
By default will be disabled.
To enable needs to remove CMake cache and reconfigure with BUILD_USE_VCPKG flag to ON.
The current version do not support whole list of 3rd-party, only limited.
  and VCPKG_ROOT reachable as a CMake or env variable
Add vcpkg support for FFmpeg and Jemalloc, including configuration files and patches.
2024-12-20 16:55:36 +00:00
dpasukhi
e71d92a133 Configuration - Remove obsolete qmake configuration files #206
QtCreator supports CMake natively.
At the moment OCCT qmake configuration is out-of-date and better to clean.
In case if support of qmake will require for specific platform - can be returned.
  But with requirement to be tested by test system Jenkins/GitLab or GH.
2024-12-20 15:03:13 +00:00
dpasukhi
1dfcac2978 Documentation - Add GH overview documentation build #200 2024-12-18 10:17:02 +00:00
dpasukhi
73ec4a59da Documentation - Move gendoc to adm directory #199
Update documentation paths and improve generation instructions
2024-12-16 16:17:31 +00:00
dkulikov
9df5967d6e Shape Healing interface update #189
New class XSAlgo_ShapeProcessor is added. It reimplements functionality
of XSAlgo_AlgoContainer and makes it more convenient to use.
XSAlgo_AlgoContainer is now internally uses methods of
XSAlgo_ShapeProcessor when possible.
New overload of Perform() method is added to class ShapeProcess. It
accepts a set of flags that defines required operations instead of
string.
2024-12-16 13:46:46 +00:00
dpasukhi
73dcda743b Configuration - Inspector with SymLink error #198
When configure Inspector with Symlink flag - configuration failed.
Added force creating include folder to symlink creating.
2024-12-15 15:37:37 +00:00
dpasukhi
1e17479b1f Configuration - Debug Draco linking issue #197
Refactor Draco dependency configuration to improve clarity and functionality
2024-12-15 15:15:36 +00:00
dpasukhi
007992d349 Documentation - Issue Template update #193
Update issue templates to include '0. New' label for bug reports and feature requests.
The new labels helps to mark not checked issues from development side.
2024-12-14 13:55:07 +00:00
dpasukhi
25906563a3 Coding, GLTF - Isolate RapidJSon part #192
Regression after #184 where some methods are not isolated.
2024-12-14 13:06:32 +00:00
dpasukhi
673e133a51 Coding - Clear up XSAlgo package #188
Removed XSAlgo_ToolContainer which is have no functionality.
Removed XSAlgo_Caller as no more used.
Remove XSAlgo_AlgoContainer.lxx as no more needed.
2024-12-12 20:59:56 +00:00
dpasukhi
7fe67ff441 Coding - Change Tk to tcl header in IVtkDraw_Interactor.hxx #187 2024-12-12 20:52:13 +00:00
dpasukhi
b03c2ff23e Revert "0023638: Data Exchange - Reading IGES file produced invalid shape" #186
This reverts commit c479c4f6d8.
The problem related with no changes on the ShapeHealing stage.
ReShape do not propagated well for all scenarios.
The test case update is not relevant.
2024-12-12 10:30:58 +00:00
dpasukhi
41ee315e1c Documentation - Remove unnecessary fields from issue templates #185 2024-12-11 14:26:44 +00:00
dkulikov
bbbb8ea79d GLTF Import - Metadata support #184
Limited support of metadata import is added to RWGltf_GltfJsonParser.
Following Json data types are currently supported: int32, double, string,
array of int32, array of double, array of strings, Json object.
Notable unsupported types are: binary data, array of Json objects.
Metadata is processed for nodes and meshes.
Tests "gltf_export" are updated with import testing and renamed to "gltf".

Method RWGltf_GltfJsonParser::gltfParseSceneNode() is slightly
refactored: parsing of transformations and transformation matrices is
moved into separate functions.
2024-12-10 17:05:38 +00:00
mzernova
d5afabec90 Visualization - Selection does not work for simple shape #182
Fixed direction calculation for Select3D_SensitiveCylinder created from Geom_CylindricalSurface
2024-12-06 14:40:35 +00:00
dkulikov
875660a560 Documentation - Enhance comments in StlAPI_Reader.hxx #180
Update comments to clarify STL file reading inefficiencies
2024-12-05 15:03:10 +00:00
dpasukhi
1c94e9e877 Coding - Missing include in TopoDSToStep_Builder.hxx #179 2024-12-04 17:26:08 +00:00
dpasukhi
3998181768 Configuration - Remove package precompiled definitions from CMake #174 2024-12-01 18:01:03 +00:00
dpasukhi
129eb07cea Configuration - Update minimum CMake version to 3.10 #169 2024-11-24 19:18:22 +00:00
dpasukhi
676f92fb10 Configuration - Removing '.gxx' from installation #165
Refactor file extension filters in CMake and QMake configurations.
Gxx extension used as a "old-way-template" to repeat .cxx content.
Marking gxx as a source file instead of header.
Moving to absolute path for the gxx integrations.
2024-11-18 12:43:53 +00:00
dpasukhi
0a7449da36 Testing - GH Enabling multiprocessor testing on Win #162
tcl threads required VC C++ 2010 redistribution package for run-time.
Downloading dll helps to start testing in multiprocessor env
2024-11-17 20:27:39 +00:00
dpasukhi
604c3b890c Documentation - Update parameter annotations for consistency #161
Reorganized style for param to the next templates:
 - "@param theParameter description ..."
 - "@param[in] theParameter description ..."
 - "@param[out] theParameter description ..."
 - "@param[in][out] theParameter description ..."
 The replacement was with keeping spacing, no removing of extra spaces.
In some files '/' was used instead of '@', that was not updated yet.
2024-11-17 20:22:51 +00:00
dpasukhi
ac5a612645 Coding - PCH improvements #160
Refactor precompiled headers and improve Windows compatibility.
Extend TKernel, TKMath and TKBRep pch with more usage headers.
Implement PCH for TKDEIGES, TKDESTEP, TKMesh, and TKXSBase.
2024-11-17 20:14:04 +00:00
dpasukhi
4ebc468140 Configuration - Optimize include copy logic #155
Avoiding re-copying the existed header file.
2024-11-14 21:44:31 +00:00
dpasukhi
0744d56fee Coding - Update env.sh to handle aarch64 #158
Fix architecture check to include aarch64 in build and install scripts
2024-11-14 07:43:25 +00:00
dpasukhi
6b06684539 Coding - Compiling issue on aarch64 #157
Enumerator value evaluates to -1, which cannot be narrowed to type 'char' [-Wc++11-narrowing]
2024-11-14 07:41:02 +00:00
dpasukhi
fd4fb824c7 Testing - Limit for MacOS on GH #149
Limit MacOS for testing only "caf basic" to view only DRAW status.
Simplify cmake install operation for each job
2024-11-10 18:19:43 +00:00
dpasukhi
05ec4972c3 Testing - Update tests with direct VIS loading #148
XShow and XDisplay XDE require VISUALIZATION for correct work.
In some scenario DRAWEXE can generate a duplicates of the internal static singletons.
This means each dynamic library will have their own instance of the static singleton.
Update all direct library loading to use the XDE plugin mechanism.
This will ensure that the XDE plugin is loaded only once and that the correct instance is used.
Originally issue is reproduced only Linux with dlopen with "RTLD_LAZY".
Can be resolved additionally adding "RTLD_LAZY | RTLD_GLOBAL" for dlopen
2024-11-05 19:45:59 +00:00
dpasukhi
ea86bfe2fa Testing - Removing direct DCAF loading #147
DCAF require VISUALIZATION for correct work.
  In some scenario DRAWEXE can generate a dublicates of the
  internal static singletons. This means each dynamic library
  will have their own instance of the static singleton.
Update all direct library loading to use the DCAF plugin
  mechanism. This will ensure that the DCAF plugin is loaded
  only once and that the correct instance is used.
Originally issue is reproduced only Linux with dlopen with "RTLD_LAZY".
Can be resolved additionally adding "RTLD_LAZY | RTLD_GLOBAL" for dlopen
2024-11-05 17:00:06 +00:00
dpasukhi
e09563c802 Configuration - MinGW Clang build support #144
Clang with GNU needs the same compiler flags as for GCC.
Refactor compiler flag to be more flexible.
2024-11-03 20:14:36 +00:00
dpasukhi
3ec8891916 Testing - Update GH Win Jobs with Mesa3D #143
Extend GH actions on windows with mesa3D
2024-11-03 15:05:58 +00:00
dpasukhi
2d9c5a868d Testing - Disable GH master summarizing #138
Disable GH action for summarize on master branch
2024-10-31 21:53:57 +00:00
dpasukhi
3ddb860a44 Foundation Classes - AsciiString RemoveAll do not trunk the string #136
Updated RemoveAll to trunk the string and
  reuse single method for case sensitive and not sensitive
2024-10-31 21:30:59 +00:00
dpasukhi
f180697d9c Configuration - Update optimization flag to O3 #132
By Default CMake was used O3 in release mode.
It means on production mode we override from O3 to O2.
2024-10-30 09:27:58 +00:00
dpasukhi
eb69515cb5 Testing - GH Actions RefMan on Windows #131
The RefMan doc generation is OS depended.
All previous versions were generated on Win.
2024-10-30 09:03:02 +00:00
dpasukhi
802ef8ce4c Configuration - Second installation failed #129
After first installation, second will be failed
Regression after#97
2024-10-28 15:52:38 +00:00
dpasukhi
1b65bc8f68 Documentation - Issue template simplification #127
Combine the templates into group with bug and feature
2024-10-28 12:19:08 +00:00
dpasukhi
158ed439c4 Coding - GH Issue templates #125
Add new issue templates for DRAW, Mesh, Coding, Build,
  Samples, Testing, Modeling, and Configuration
2024-10-27 17:54:36 +00:00
dpasukhi
5c242e8d9d Testing - Update GH test compare handling #124
Extend workflow to work on master
Extend the retention days for summary for 2 weeks
2024-10-27 16:52:29 +00:00
dpasukhi
328ffa1679 Documentation - Add Contribution guidelines #121 2024-10-27 09:24:02 +00:00
dpasukhi
a1dba069fd Testing - Extend GH Actions to compare results #119
Implement new logic to compare test result with target branch.
The compare results  are stored in single archive contained .html file per job.
Tests results stored as an artefact per job separately.
Extend the jobs with new 3rd-party and new use_* flags
2024-10-27 09:20:24 +00:00
dpasukhi
9f685bf453 Configuration - Extend support Ubuntu packages #118
Draco, vtk and openvr now can be used from ubuntu packages
Fixed issue for Clang with msvc lib detection
2024-10-26 22:00:18 +01:00
dpasukhi
72415a8313 Testing - Upgrading action script versions #111
Fixing dependabot alert issue with version upgrade
2024-10-20 21:09:14 +01:00
dpasukhi
857b1b648d Tests - DRAWEXE Testing integration into GH #109
Introduced a comprehensive multi-platform build and
  test workflow for OCCT, supporting Windows, macOS, and Linux.
Added a new workflow for automated documentation building.
Reorganized a code analysis workflow using CodeQL
  and Microsoft C++ Code Analysis.
2024-10-20 16:07:45 +01:00
dpasukhi
674c246128 Configuration - Update optimization flags for release build #108 2024-10-20 15:03:00 +01:00
dpasukhi
191fc37915 Coding - OpenVR module compilation fail #107
Compilation failed with Clang on OpenVR module
2024-10-20 14:59:18 +01:00
dpasukhi
a97a8e66e3 Configuration - Production build type for linux #106
Fixed problem with not relevant flags and missed C language flags.
2024-10-19 17:05:16 +01:00
dpasukhi
3cdf8e79f9 Configuration - JeMalloc from default package #105
Fixed issue with jemalloc from ubuntu, debian and etc default packages
2024-10-19 17:03:33 +01:00
dpasukhi
96bdb9db84 Tests - Action to build Refman doc #103
Add GitHub Actions workflow for building OCCT refman documentation
2024-10-19 15:07:38 +01:00
dpasukhi
83b4e3f988 Configuration - Option to disable PCH after enabling #102
After enabling PCH it was not possible to disable back.
New CMake feature used for disabling
2024-10-13 09:03:26 +00:00
dpasukhi
f336684b26 Configuration - CLang-cl msvc support #101
Update compiler flags and env.bat to work with clang-cl
2024-10-12 22:57:13 +01:00
dpasukhi
d16f03b5b5 Configuration - Restoring VTK toolkit processing #99
Migration to PCH breaks some VTK search functionality.
Fixed non-unique package name caching
2024-10-12 19:44:14 +00:00
dpasukhi
50f1e73469 0033565: Configuration - JeMalloc process different build types
Accept only static build of JeMalloc
2024-10-12 17:28:09 +00:00
dpasukhi
6c92579764 Configuration - custom.bat/sh disappearance #97
Fixed issue when  custom.bat/sh not regeneration in build directory
  in case when exists in install directory.
2024-10-12 17:09:51 +00:00
dpasukhi
1b5fc7f980 Configuration - CMake extension with PCH and symlink #90
Removed cotire PCH
Integrated native PCH by CMake with the same BUILD_USE_PCH flag
Added new option to avoid extra files in 'build/include' folder and replace it by symlink
  Symlink creates link to the origin file, it has some benefits from debug and build side.
The CMake parameter for symlink is 'BUILD_INCLUDE_SYMLINK'
2024-10-12 16:31:03 +00:00
dpasukhi
55527ad756 Coding - GCC13 warning suppressing #96 2024-10-12 16:26:32 +00:00
dpasukhi
858709699a Coding - Non-dependency include update #89
Removed or reorganized include that are not a part of the project dependency.
The new file for typedef is added because Select is not direct dependency.
2024-10-07 21:57:14 +00:00
dpasukhi
e83a646c14 Coding - Reorganize code with constexpr #85
Continue rework Precision.hxx and Standard type definitions
2024-09-30 17:38:25 +00:00
ika
5cc7cbea8b Data Exchange, Gltf Export - Metadata support #79
Add supporting of metadata key-value export into extras section of each node.
2024-09-30 16:04:12 +00:00
dpasukhi
3462ea5716 0033813: Data Exchange - Implementing common logic for scaling during Write procedure
Fixed inconsistency of tests.
'IGES.OCC.write.unit no more' used.
2024-09-28 18:49:22 +00:00
dkulikov
6faeaa4b62 Data Exchange, Step Export - Crash on PCurve processing #80
Crash in TopoDSToStep_MakeStepFace::Init() that occured due to attempt
to copy null Geom2d_Curve is fixed.
2024-09-28 18:01:11 +02:00
dkulikov
ff15a5d1ab 0033498: Data Exchange, Step Export - Meshed pretessellated geometry is skipped on write
Processing of complex_triangulated_surface_set is added to
  STEPCAFControl_GDTProperty::GetTessellation().
Processing of tessellated_curve_set is refactored and moved to a
  separate function.

Problems related to normals list are fixed in
RWStepVisual_RWComplexTriangulatedSurfaceSet::WriteStep():
  Normals list is now checked for nullptr. It is a valid situation that
  occurs when complex_triangulated_surface_set in STEP file has no
  normals.
  Traversing of normals list is performed in correct order. Previously
  rows and columns were switched, which led to crashes or incorrect data.
2024-09-28 15:59:02 +00:00
dpasukhi
50a7319b45 Coding - GitIgnore update with .cache #84
Updated .gitignore
2024-09-28 15:56:04 +00:00
dpasukhi
aa7c38d60e Documentation - Update the main ReadMe #81
ReadMe was moved to markdown format.
Updated a links to the resources
2024-09-26 15:25:04 +00:00
jfa
b0922ff9a1 0033828: Modeling Algorithms - GCPnts_QuasiUniformDeflection returns very different results under small change in deflection 2024-09-26 13:47:31 +00:00
anv
d8a26498d2 0033813: Data Exchange - Implementing common logic for scaling during Write procedure
Implementation of common logic for OCCT formats.
2024-09-26 11:28:15 +00:00
dkulikov
071f14697f 0027410: Data Exchange, Iges Import - Possible resource leak when parsing an invalid file
fclose() call is added before early return statement in igesread() function.
2024-09-25 10:05:51 +00:00
dpasukhi
5c454ed695 0033723: Configuration - Removing Genproj and Update files
Cleaning repo from not maintaining functionality - genproj and wok
Only 'gendoc' functionality kept.
TODO: migrate gendoc to cmake
2024-09-25 08:23:52 +00:00
dkulikov
539ddf30fb 0033487: Data Exchange, Step Import - Unresolved reference crashes
Fixed crash in STEPConstruct_Styles::GetColors() due to nullptr
  dereferencing when source step file has missing
  FILL_AREA_STYLE_COLOUR entities.
2024-09-25 08:16:26 +00:00
dpasukhi
495a6a642d Testing, GitHub - Marking warnings as errors #73
Windows, Linux builds now starts checking the warning.
  In warning case the job will be failed.
MacOS having too much warnings related with sprintf.
Linux Clang having a problem with Flex and Bison.

TODO: Fix the warnings for MacOS and Linux Clang.
2024-09-22 13:32:33 +00:00
dkulikov
e5998666ee 0033665: Data Exchange, Step Import - TransferRoots crashes for invalid STEP files
Fixed exception in RWStepShape_RWEdgeCurve::Check() thrown when trying
    to access step entity in Interface_EntityIterator with zero entities.
Fixed a crash in StepToTopoDS_TranslateFace::Init() caused by
    dereferencing nullptr.
RWStepShape_RWEdgeCurve and RWStepShape_RWEdgeCurve are refactored.
Test bug33665 is added to check the fixed behavior.
2024-09-22 12:46:54 +00:00
dpasukhi
8082b955bd Coding - Reorganize code with constexpr #68
After rework Precision.hxx some local
  variables can be marked as constexpr
2024-09-22 12:46:46 +00:00
dpasukhi
72c6d55bf2 0033765: Data Exchange, IGES Export - Missing Model Curves in transfer cache
Curve list should be not unique, list is recommended.
One curve can be used by multiple edges.
2024-09-14 20:26:41 +00:00
oan
d0e33902bc 0033806: Shape Healing - ShapeCustom optimization while rebuilding compounds
Avoid double binding of shapes to context.
Take all changes into account by reshape
2024-09-14 20:26:41 +00:00
dpasukhi
a52ee17c73 Coding - Precision.hxx file optimization
Precision.hxx optimized to have compiler-time
  constants for the most common floating-point values.
Reorganized code to avoid static jumping for parametric.
2024-09-14 20:26:41 +00:00
dpasukhi
72b244bc98 Coding - Resolving C26439 & type formatting warnings
Sprintf  with %s always convert values into char*, not safety from int.
Move operators and constructors can be marked as noexcept
2024-09-14 20:26:41 +00:00
dpasukhi
9c6914c3cc Coding - Resolving C6319 warning
Use of the comma-operator in a tested expression
  causes the left argument to be ignored when it has no side-effects.
2024-09-14 20:26:41 +00:00
dpasukhi
4ab54d60ef Coding - Resolving C26498 warning
C26498 - marking variables constexpr to improve performance
2024-09-14 20:26:41 +00:00
dpasukhi
09a69618da Coding - Resolving C6287 & C6282 warnings
Removing redundant code and incorrect operator
2024-09-14 15:16:54 +00:00
dpasukhi
6cb0b9b4e3 Coding - Resolving C6263 warnings
Reorganizing code to not call alloca inside loop.
  alloca allocated memory from stack and free after finishing function
2024-09-14 15:16:54 +00:00
dpasukhi
33339b0dc2 Coding - GeomConvert_CurveToAnaCurve warnings fix 2024-09-14 11:01:24 +00:00
dpasukhi
392ba7dbb6 Coding - Image_AlienPixMap unused parameters 2024-09-14 11:01:10 +00:00
dpasukhi
ed20837d8b 0033703: Data Exchange, Step Export - Transfer edge speed improvement
Move optional code close to use case to avoid extra calculation
2024-09-06 20:22:00 +00:00
reciprocal
2ab4e9e180 0033319: Coding - Static linking fails with unresolved symbols due to linking order and missing transitive dependencies
The absence of target_link_libraries calls for static libraries caused CMake to fail
in modeling the link dependencies correctly.
This fix ensures that CMake correctly exports the dependencies in OpenCASCADEConfig.cmake and
resolves downstream linking errors for projects that link against static OpenCASCADE libraries.
2024-09-05 18:15:57 +00:00
dpasukhi
d83d72acf9 0033805: Configuration - Implement GitHub Actions build scripts
Enable MSVC code analyzing to push SARIF files
2024-09-05 17:55:07 +00:00
dpasukhi
fae5678dc7 0033750: Configuration - make file configuration failed in mfc example
Updated MFC sample to build together with OCCT
2024-09-05 17:55:01 +00:00
dpasukhi
488c43ed0c 0033812: Configuration, MacOS - Debug Symbols Stripped From Dynamic Libraries
Update optimization flag to release only
2024-09-05 09:14:24 +00:00
dpasukhi
2fa9309186 0033805: Configuration - Implement GitHub Actions build scripts
Build Scripts:
- Linux GCC x64 dynamic
- Linux Clang x64 dynamic
- Windows MSVC x64 dynamic
- macOS Clang x64 dynamic
Security scanning:
- CodeQL security scanning
- MSVC code scanning
2024-08-31 13:33:59 +00:00
dpasukhi
4309cf7362 0033810: Coding - GitIgnore update with .vscode
Updated .gitignore
2024-08-31 13:31:34 +00:00
dpasukhi
7236e83dcc 0033808: Coding - FreeType Use unsigned point and contour indexing in FT_Outline
Changes to auto instead of specific type
2024-08-31 13:28:20 +00:00
luzpaz
099e0d2524 0033807: Documentation - Fix various typos found in codebase 2024-08-31 14:26:15 +01:00
astromko
b332761e13 0033648: Modeling Algorithms - Bad partition result
Removed unnecessary tolerance increase for Line\Line intersection.
Tolerance increasing logic for some specific curve types
  was added with #26619.
Original fix had no test for Line/Line case and
  theoretically was added as a possible issue.
After research Line/Line case doesn't need a special tolerance case.
2024-08-25 08:37:51 +00:00
dpasukhi
da71394f31 0033612: Configuration - Build configuration may fail to detect TBB
Fixed TBB type to depends on package
2024-08-25 08:35:49 +00:00
oan
2736652117 0033791: Shape Healing - ShapeCustom not take location of source shape for the cached context and misses root one
Pass ShapeBuild_ReShape to recursive call to retrieve complete change history.
Update history of changes by the source shape (if changed), not only by its subshapes.
Check the context for a cached shape using a reference shape without location.
2024-08-09 15:27:03 +00:00
ichesnok
677f383561 0033788: Data Exchange, DE Wrapper - Shape Healing configuration node
DE_ShapeFixParameters class added for shape healing parameters storage.
DE_ShapeFixConfigurationNode class added for work with parameters.
2024-08-09 15:26:59 +00:00
oan
bd14b69336 0033790: Data Exchange - XCAFDoc_LayerTool creates temporary instances during initialization of layer attributes
Removed initialization of temporary objects.
2024-08-09 15:26:53 +00:00
anv
f0620a8d65 0033781: Modeling Algorithms - Using incorrect boundaries while traversing through triangulation
Upper boundary updated for triangulation normals traversing.
2024-08-05 08:28:17 +00:00
luzpaz
245febe036 0033778: Documentation - Fix various typos found in codebase 2024-07-26 08:51:12 +01:00
carlosah
9fcfec881c 0033513: Visualization - Integration of the ability to zoom with vertical mouse movements
Added a new gesture for zooming after vertical mouse movement - AIS_MouseGesture_ZoomVertical
2024-07-17 12:52:16 +01:00
Vitaut Tryputsin
ca0c5a4074 0033729: Visualization - Fixed transparency for capping in 'Graphic3d_RTM_BLEND_OIT' mode
Added changes connected with restoring of color mask (if we store and restore only rgb part, we can miss transparency)
2024-07-17 12:51:03 +01:00
luzpaz
d51eb087ab 0033766: Documentation - Fix various typos found in codebase 2024-07-15 16:57:52 +01:00
luzpaz
76df27830b 0033762: Documentation - Fix various typos found in codebase 2024-07-14 15:19:44 +01:00
akaftasev
5cf1003a66 0033689: Canonical Recognition - Circle construction problem
Fixed problem with creating null-length gp_Dir
2024-07-12 10:31:22 +01:00
akaftasev
c6065f5da9 0033570: Modeling Algorithms - Incorrect result of cutting spheres
The reason of current problem lies inside projection algorithm
Function_SetUVBounds() for projection of circle onto sphere produces shifted bounds.
Incorrect checking of placement on summit of the sphere was fixed.
2024-07-09 09:49:22 +01:00
anv
f39f9838e4 0033751: Shape Healing - Use static values in case of an absent Resource file
If a Resource file with parameters for ShapeFix is absent, use static parameters instead if possible.
2024-07-08 17:28:00 +02:00
anv
100d03d273 0033748: OCCT:Coding - Changing function signature to a more common one
Changing function virtual specifier and return type order to a more common to avoid wrapping issues.
2024-07-08 17:28:00 +02:00
hosali
dc997b884b 0033423: Coding - Memory leak with locale conversion
use of stack allocated temp string instead of dynamic one
2024-07-08 17:28:00 +02:00
akaftase
b828814131 0033541: Modeling Algorithms - Simple sphere cut from cylinder fails
Changed condition for combination of WLines into one.
WLine would be excluded from consideration for merging, if one of its middle points between vertices is out of domain (does not lie on both surfaces).
2024-07-08 17:28:00 +02:00
akaftase
5811a330c7 0033615: Modeling Algorithms - Partition algorithm creates unexpected vertices
This problem occurs because of obtaining 2 ALines which share same vertex on the seam edge.
There should be 2 different vertices with same(or almost the same) 3d parameters, but
with different UV parameters because of periodic surface.
Current fix allows to avoid the same vertices on seam edge and also checks the next vertex.
Added consideration of predicted next point to avoid skipping tha point which is not on seam edge.
Added test case for #33702
2024-07-08 17:28:00 +02:00
Pasukhin Dmitry
818c68f22e 0033737: Data Exchange, XCAF - Implementing filter tree functionality
Implemented base functionality to filter tree with input label to keep.
2024-07-08 17:28:00 +02:00
Pasukhin Dmitry
25d3030ed5 0033752: Configuration - Update permission inspector.sh
Updated permission to  owner write only
2024-07-08 17:28:00 +02:00
Thomas
cf27d6cada 0033749: Configuration - Update permission draw.sh
Limit draw.sh permission to 755 instead of 777
2024-07-08 17:28:00 +02:00
drochalo
4c8faa5e2d 0032752: Visualization, TKOpenGl - extend V3d_View::ToPixMap() options with Z-layer
Added option to dump only a selection of zlayer's content.
Changed zlayers redraw and render method for selection of layers to render.
Added filters for layer parsing.
Modified vdump command.
Added test with multiple dumps for comparison.
Added option to dump shadow maps.
2024-05-19 16:03:09 +01:00
astromko
65d8eece35 0032964: Modeling Algorithms - 2d Offset sometimes 'split' straight edges
Implemented avoiding force cut of an edge in case of simple edge (that contains just 1 curve).
2024-05-19 16:03:09 +01:00
astromko
8991082051 0033156: Modeling Algorithms - Planar face creation problem
Implemented suggested patch to avoid unnecessary replacement of a wire.
Added the second test case.
2024-05-19 16:03:09 +01:00
astromko
1db93f640e 0033146: Modeling Algorithms - 2D Offset with arc-lin approximation fails on open B-spline edge
Added additional conditions to avoid crash.
Added a test case.
2024-05-19 16:03:09 +01:00
drochalo
fc51ce503e 0030484: Visualization, SelectMgr_ViewerSelector - Graphic3d_TMF_2d persistence sorting issues
Added property to SelectableObject for selection focused on display priority.
Modified SelectMgr_ViewerSelector CompareResults based on the focus priority property.
Added display priority to the sorting criterion
Added tests for multiple types of sensitive entities.
Modified vpriority command to change an object's selection priority.
2024-05-19 16:03:08 +01:00
drochalo
ad9840d4d4 0033533: Visualization - possibility to redefine Graphic3d_TransformPers
Split template method apply and moved calculations to virtual method.
2024-05-19 16:02:30 +01:00
drochalo
7f1d0563bb 0033514: Visualization - Scaled view twists zoom persistence objects
Added flag to transform persistence to handle axial scaling.
Modified manipulator's zoom transform persistence to fit in axial scaling events.
Added tests for cases 27832 and 33514.
Logic change on Graphic3d_TransformPers::Apply for Graphic3d_TMF_AxialScalePers.
Logic fixes in AIS_Manipulator to integrate axial scale in both zoomable and unzoomable states.
2024-05-17 08:31:06 +00:00
dpasukhi
69f380ae32 0033699: Data Exchange, DE Wrapper - Integration activation plug-in mechanism plug-in
New virtual function is implemented
2024-05-06 10:53:55 +01:00
ika
36dc3d2037 0033371: USD - Implementation of import and export USD files using the USD SDK. 1 Stage
Do auxiliary improvement in OCCT.
2024-04-17 23:19:49 +01:00
anv
ead71c66a3 0033430: IFC Import - Adding basic support of materials
Updated XStat to show VisMaterials info
2024-04-17 23:19:48 +01:00
drochalo
d4dbeab49b 0032750: Visualization, AIS_Manipulator - selection of moved object is broken
Completed the stop transform action when dragging manipulator with mouse.
Added context redisplay for update of interactive object sensitive areas.
Added test.
2024-04-17 23:19:48 +01:00
dpasukhi
4fb9b2f250 Update version to 7.8.2 dev 2024-04-17 23:14:47 +01:00
ika
b78ccf1f9b 0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
Add processing of tessellated_annotation_occurrence.
Add test cases.
2024-04-07 10:46:17 +01:00
oan
2956d432e2 0033560: PARASOLID Import - XT importer raises exception SIGFPE Arithmetic Exception
Prevent division by zero in exceptional cases when vector of parameters contains only a single value.
2024-03-28 13:58:36 +00:00
anv
d3e00bfaa6 0033616: Application Framework - Using filter while reading XBF may result in unresolved links
- Added tracking of unresolved links for TreeNodes;
- Test case added.
2024-03-28 13:55:46 +00:00
ichesnok
983e35ed71 0033410: Data Exchange, Step Import - TRIANGULATED_FACE from STEP where there are no pnval entries
Problem fixed by using array of nodes in case when aPnindices is empty.
2024-03-24 22:26:23 +00:00
astromko
74095a8b46 0033367: Modeling Algorithms - Normal projection or BOP problem [Regression]
Fixed passing of an incorrect curve into GeomAdaptor::MakeCurve() function.
2024-03-24 22:25:59 +00:00
astromko
576f376108 0031601: Modeling Algorithms - BRepOffset_Tool Segmentation Fault
Added protection against null pointer dereferencing.
Modified BRepOffset_MakeOffset::MakeThickSolid method.
Fixed the problem with negative volume values.
Fixed several unit tests and added a new one.
2024-03-24 22:25:42 +00:00
ichesnok
447396c9b9 0029241: Data Exchange - Empty shape after reading STEP file.
Entity mechanical_design_and_draughting_relationship and function for its transfer added.
2024-03-18 22:17:56 +00:00
ichesnok
9d93d9b9b8 0033638: Data Exchange, Step Import - Style for tessellated object missed
TransferBRep_ShapeBinder used for tessellated face.
2024-03-16 19:36:33 +00:00
ichesnok
d5bcd33386 0033631: Data Exchange, Step import - Crash by reading STEP file
Creating Poly_Triangulation from ComplexTriangulatedSurfaceSet was fixed.
2024-03-16 19:36:18 +00:00
ichesnok
3888b58c27 0033603: Data Exchange, Step Import - Crash reading corrupted STEP file
Crash fixed by checking IsNull().
2024-03-16 19:35:48 +00:00
ichesnok
d1eae5b0d0 0033602: Data Exchange, Step - Carriage return removing
Carriage removing integrated
2024-03-16 19:35:29 +00:00
ichesnok
32f7b4e5bf 0033641: Data Exchange, Step Import - Changing default value for metadata flag
Value for myMetaMode flag changed from 'false' to 'true'.
2024-03-13 17:18:41 +00:00
ichesnok
993da38d54 0033611: Data Exchange - Incorrect header guard for STEP property
Incorrect header guard fixed.
2024-03-13 17:18:27 +00:00
ichesnok
a9becad233 0033596: Documentation - Incorrect default value read.step.tessellated
Default value of read.step.tessellated corrected.
2024-03-13 17:18:13 +00:00
abv
5939991070 0025415: Data Exchange - Invalid result of loading a STEP file
Handling of special case found on some STEP files produced by FPX Expert 2013 (PCB design system):
edge curve is line displaced from its true position but with correct direction;
we shift the line in this case so that it passes through vertices correcty.

Protection against possible exception in writing XDE.
2024-03-13 17:17:45 +00:00
astromko
e8a36f3a02 0033383: Modeling Algorithms - Wire/Face creation problem
ProjCurve3d and BRepAlgo_FaceRestrictor::Perform functions should not continue to work and should terminate if the BRep_Tool::Curve function returns null pointer.
2024-02-28 18:30:11 +00:00
ichesnok
f286953d85 0033530: Data Exchange, Step Import - Implement GENERAL_PROPERTY support
The necessary classes for GeneralProperty support were added.
The ReadMetadata method was created for reading and saving attributes.
2024-02-15 14:00:40 +00:00
ichesnok
20955d88da 0033261: Data Exchange, Step Import - Empty shape after reading process
Added a transfer for ShapeRepresentationRelationship in Transfer of MappedItem method,
in order to support link of components according to ISO 10303-203-2003.
2024-02-08 19:15:58 +00:00
ichesnok
80705eaf31 0033569: Data Exchange, STEP - Crash when reading multi-body file
Datum reading changed in ReadDatums() method:
using DatumSystemAP242 (DatumSystem or DatumReference) array
instead of DatumSystem array (DatumReference)
2024-02-02 12:11:45 +00:00
ichesnok
7b9bda716e 0025188: Data Exchange, Step Export - Losing shapes after import
Check on null for description added to WriteStep methods
(for product, product_definition and product_definition_formation)
2024-02-02 12:10:51 +00:00
ichesnok
dec56592dd 0032980: Data Exchange - STEP import produce a crash
Check on null for loop added
2024-01-30 11:02:05 +00:00
rodrlyra
f035e0718b 0033551: Visualization - Add new transform persistence mode to force orthographic projection on object.
The new transform persistence mode, with flag `Graphic3d_TMF_OrthoPers`, can be combined (bitwise OR operation) with the other persistence modes (2D, Trihedron or Zoom/Rotate Persistence) to make objects be rendered with orthographic projection when it is on a view with perspective projection.

If the view already uses orthographic projection, there will be no difference.

This feature was implemented to fix ViewCube being distorted when view with perspective projection changes size.
2024-01-17 12:53:49 +00:00
vglukhik
cb290cc932 Revert "0033551: Visualization - Add new transform persistence mode to force orthographic projection on object."
This reverts commit 0141024df5.
2024-01-15 15:15:41 +00:00
dpasukhi
cdc6566c3c 0033564: Data Exchange, STEP - Making default unit parameter
Updated signature for step makers with units
  to have default unit as a mm (no scaling)
2024-01-12 17:24:16 +00:00
oan
631a34a05f 0033567: Modeling Data - GeomLib_IsPlanarSurface raises exception SIGFPE Arithmetic Exception in Release mode
Add protection against zero-division
2024-01-12 17:23:55 +00:00
rodrlyra
0141024df5 0033551: Visualization - Add new transform persistence mode to force orthographic projection on object.
The new transform persistence mode, with flag `Graphic3d_TMF_OrthoPers`, can be combined (bitwise OR operation) with the other persistence modes (2D, Trihedron or Zoom/Rotate Persistence) to make objects be rendered with orthographic projection when it is on a view with perspective projection.

If the view already uses orthographic projection, there will be no difference.

This feature was implemented to fix ViewCube being distorted when view with perspective projection changes size.
2024-01-05 18:36:54 +00:00
drochalo
5c94806385 0032487: Visualization - synchronize myHasEntityWithPersistence with such entities number
Changed myHasEntityWithPersistence to a counter.
Renamed variable to myNbEntityWithPersistence.
Modified HasEntityWithPersistence() method.
Modified logical test in SelectMgr_ViewerSelector::traverseObject.
2023-12-26 08:38:03 +00:00
dpasukhi
f0caf64f54 Update version to 7.8.1 dev 2023-12-26 08:38:01 +00:00
dpasukhi
656b0d217f 0033557: Coding - Cocoa compilation problem
Fixed extern relation for VisTest component on MacOS
2023-12-26 08:37:59 +00:00
dpasukhi
83bb2a329d 0033555: Foundation Classes - DEBUG macro leads to compile error
Removed incorrect parameter call when DEBUG macro is active
2023-12-15 19:53:17 +00:00
dpasukhi
5b0f5b52b9 0033554: Foundation Classes - Missed hash specialization for enumerations
Fixed problem with missed hash specialization
2023-12-15 19:53:06 +00:00
dpasukhi
06282d9c7c 0033553: Foundation Classes - HashUtils compilation problem
Updated OptimalSeed template
2023-12-15 19:52:56 +00:00
Xu Zhongxing
60792f26f0 0033552: Foundation Classes - NCollection_BaseMap move ctor clears wrong pointer
Replaced correct class member to clear
2023-12-15 19:51:57 +00:00
rodrlyra
6ef56849a5 0033542: Visualization, AIS_ViewController - New AIS_DragAction for when drag interaction is confirmed
Added AIS_DragAction_Confirmed drag action, which will be called by AIS_ViewController when the drag interaction is confirmed (mouse moved more than click threshold).
2023-12-15 19:51:25 +00:00
dpasukhi
e8605596c9 0033548: Tests - VC142 internal problem for Chamfer functionality
Update test cases for Jenkins old compiler. Mark as BAD
2023-12-12 17:28:20 +00:00
dpasukhi
ffd7a3aa4f 0033544: Foundation Classes - Fixing compiler problems [HotFix]
Fixed problem with Clang-16
Fixed problem with SWIG-4
Fixed genproj procedure
2023-12-06 13:00:13 +00:00
dpasukhi
8147976d9f Update OCCT version to 7.8.0 2023-12-04 15:53:08 +00:00
dpasukhi
40b80d8d66 0033300: Data Exchange, DE Wrapper - Specialize WS for each transfer process
Updated STEP and IGES to personalize own work session
2023-12-04 15:53:07 +00:00
dpasukhi
7036facf10 0033399: Configuration - Research into opportunities to increase performance
Implement CMake profiles to modify compiler and linker flags
2023-12-04 15:53:07 +00:00
ichesnok
a6e425d0a6 0033540: Data Exchange - Segmentation fault on loading model
Implemented workaround to avoid crash on out-of-ISO files
2023-12-04 15:53:07 +00:00
ichesnok
b9fbc699b5 0033483: Data Exchange - Static_Interface local instance for the model
StepData_StepParameters class created and used instead of Interface_Static
2023-12-04 15:53:06 +00:00
ichesnok
0435edfe54 0033474: Data Exchange - Implement stream reading into RWMesh interface
Stream usage as parameter
2023-12-04 15:53:05 +00:00
dpasukhi
bd651bbbd9 0033531: Configuration - Rework DataExchange ToolKits organization
Integrated DE plugin functionality.
Reworked DE components:
 - TKDESTEP: Handling STEP file format.
 - TKDEOBJ: Handling OBJ file format.
 - TKDEIGES: Handling IGES file format.
 - TKDEGLTF: Handling GLTF file format.
 - TKDEVRML: Handling VRML file format.
 - TKDEPLY: Handling PLY file format.
 - TKDESTL: Handling STL file format.
Reworked DE DRAW components:
  TKXSDRAWSTEP: Container for DE command to work with STEP.
  TKXSDRAWOBJ: Container for DE command to work with OBJ.
  TKXSDRAWIGES: Container for DE command to work with IGES.
  TKXSDRAWGLTF: Container for DE command to work with GLTF.
  TKXSDRAWVRML: Container for DE command to work with VRML.
  TKXSDRAWPLY: Container for DE command to work with PLY.
  TKXSDRAWSTL: Container for DE command to work with STL.
TKXSDRAW rework to be base DRAW plugin to keep DE session and utils.
Updated documentation
Updated samples
2023-12-04 15:52:47 +00:00
dpasukhi
3aeea1e96e 0033425: Configuration - Implement JeMalloc memory manager
Integrated CMake procedure to choose MMGR
Default MMGE is Native
2023-12-04 13:38:51 +00:00
dpasukhi
ed85665b55 0033529: Data Exchange, Step - Move on IncAllocator functionality
Update allocation mechanism for StepParser
Decrease the table size for parsing
2023-12-04 13:37:10 +00:00
dpasukhi
1103eb60af 0033370: Foundation Classes - Moving into STL and Boost functionality
NCollection containers update:
  - NCollection_Array1 - updated functionality
  - NCollection_Array2 - NCollection_Array1 as a wrapper for 2array
  - NCollection_Vector -> NCollection_DynamicArray was renamed and reworked.
TCollection:
  - Use static empty string to avoid allocations on empty string
 NCollection allocators update:
  - NCollection_Allocator - allocator that used Standard::Allocate
  - NCollection_OccAllocator - allocator-wrapper that used OCC BaseAllocator objects
  - NCollection_IncAllocator - rework to increase performance
Standard:
  - Rework functionality to use different allocation libs
  - Implement basic of new way to wrap allocations tools
  - Define 4 ways to allocation (defines in configure stage)
 Additional changes:
  - Hash function uses std::hash functionality
   - size_t as a hash value
  - New HashUtils with Murmur and FVN hash algo for x32 and x64
  - Deprecated _0.cxx and .gxx DE classes reorganized
  - Create own utility for std memory
  - Update Standard_Transient to be more platform-independent
 Math TK changes:
  - math_Vector -> match_BaseVector<>
    - Buffer decreased to cash 32 elements instead of 512
2023-12-04 13:37:09 +00:00
rodrlyra
6dbfade692 0033521: Visualization - possibility to redefine rotation persistence in Graphic3d_TransformPers
Added virtual function to Graphic3d_TransformPers that allows overriding rotation persistence behavior on application level.
2023-11-28 13:33:19 +00:00
ichesnok
588ee924e4 0033491: Data Exchange, Step Import - Incorrect import of ComplexTriangulatedFace
Reading and writing of triangle_strips and triangle_fans has been corrected in RWStepVisual_RWComplexTriangulatedFace.cxx file. And corresponding corrections have been added to other files.
2023-11-09 15:05:29 +00:00
akaftasev
f0c6e6fc8d 0033515: Modeling Algorithm - BRepExtrema_DistShapeShape poduces wrong result
Changed redundant square operation
2023-11-03 14:21:37 +00:00
dorlov
58390c4eb1 0032666: Data Exchange - Cannot write STEP file from an XCAF document containing only triangulations in the faces
Added support of reading and writing of the triangulated_surface_set.
Prevented creation of tesselated geometry under the schemas different from AP242DIS.
test step_read corrected, switched parameter write.step.schema to AP242DIS in begin and back to AP214CD at the end
2023-10-18 12:39:00 +01:00
ika
38581280d0 0033486: Data Exchange - Mistake in processing of the oriented dimensions
Remove using the array member's number instead of array member.
2023-09-23 14:41:46 +01:00
ika
4ce99d9697 0033470: Application Framework - TDataStd_NamedData HasSmth() methods return true for empty containers.
Add checks for empty containers.
2023-09-22 14:35:53 +01:00
anv
2b5ee7c791 0033484: Data Exchange, Step Import - Pretessellated geometry is translated incompletely
Added proper translation for TessellatedCurveSet and ComplexTriangulatedSurfaceSet.
2023-09-22 05:57:01 +01:00
ichesnok
06f2625c35 0033426: Data Exchange, VRML - Impossible to import VRML V1
VrmlData_ShapeNode creating (for vrml v1 case) was added
2023-09-14 08:16:45 +01:00
ichesnok
28b505b27b 0033351: Data Exchange, Step - Improvement for thread safety of the STEP translator
Local StepData_Factors object usage for each session
Static variables isolated
2023-09-08 11:28:53 +01:00
ichesnok
a948803521 0033183: Data Exchange - Lose texture after saving XBF file
Texture reading and writing changed in VisMaterial drivers
2023-09-08 11:28:27 +01:00
akaftasev
e7bcf415c3 0033450: Modeling algorithm - HLR algorightm stucks
Selecting the middle point between XInf and XSup leads situation, where X values almost does not change.
To prevent this situation, select shifted point instead of middle.
2023-09-05 23:52:02 +01:00
akaftasev
0e6977d668 0033449: Modeling Algorithm - Crash in BRepTools_GTrsfModification::NewTriangulation() method
Changed iteration limits from theTriangulation->NbTriangles() to theTriangulation->NbNodes()
Provided modification of the normals only with rotation (gp_GTrsf::Form() == gp_Other  leads to crash)
2023-08-29 13:18:39 +01:00
akaftasev
0e97c80e6a 0033446: Modeling Alghorithms - Creating offset with one of the degenerated edge leads to crash
Added condition to prevent out of range error
2023-08-24 15:11:57 +01:00
akaftasev
73914537d1 0033445: Coding - Changing binary XOR in boolean expression
Changed binary XOR to the ternary operator.
2023-08-10 20:33:23 +01:00
akaftasev
ae1683705e 0033420: Modeling Algorithm - Missing inner part after offset operation
Added condition to not remove face image, consisting only of invalid edges for artifactically invalid face.
This face image should be connected with other image faces minimum through the edge.
2023-08-07 11:32:08 +01:00
oan
f3a66dd7c0 0033436: Data Exchange, DE_Wrapper - DEXCAFCascade_ConfigurationNode::BuildProvider() not initialize provider
Pass pointer to DEXCAFCascade_ConfigurationNode to DEXCAFCascade_Provider;
Remove forcible manual reset of Provider's node in DE_Wrapper::FindProvider() to verify that all specializations of configuration node work properly without necessity of workarounds.
2023-08-07 11:30:06 +01:00
akaftasev
eb2be8bb46 0033421: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception
In method ShapeUpgrade_UnifySameDomain::IntUnifyFaces() the searched edge is finally checked that it is not empty before accessing it.
2023-08-07 11:26:07 +01:00
akaftasev
b32425859a 0031217: Modeling Algorithms - Exception is raised in GeomFill_SectionPlacement when parallel path and SectionAxis
Added protection from crashes when IsParallel
2023-08-07 11:23:54 +01:00
akaftasev
96d1fe2b05 0033398: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception on specific STEP model
Added additional checking in static method FindCoordBounds to avoid processing null pcurves
2023-08-07 11:21:47 +01:00
akaftasev
5e53920228 0026578: Modeling Algorithm - Exceptions in offset operation with intersection
Added test cases
2023-08-07 11:19:24 +01:00
ichesnok
2a0420be1d 0032681: Data Exchange - Missed dimension after STEP export
Changed level of detalisation (TopAbs_EDGE -> TopAbs_VERTEX by default)
2023-08-02 10:24:47 +01:00
sshutina
3421323164 0032879: Visualization, AIS_ViewController - define separate gesture mappings for dragging
Fixed problem of usage of objects dragging during zoom and pan
Added new draw command to change gesture for muse buttons
Added test
2023-07-18 16:20:12 +01:00
dkulikov
1dad584450 0033419: Tests - Updating test case data
Filenames in bug33414 are updated.
2023-07-05 13:01:49 +01:00
btokarev
a958a3377e 33343: Documentation, Overview - Incorrect doxygen syntax
Removed inclusions of empathized *text* from the titles
Text empathizers re-implemented
Reverted to no empathize style
2023-07-05 12:58:03 +01:00
dkulikov
afccc8d019 0033414: Modeling Algorithms - Access violation during executing BRepAlgoAPI_Section::Build()
Crush occurred due to the fields
IntTools_SurfaceRangeLocalizeData::myUParams,
IntTools_SurfaceRangeLocalizeData::myVParams
and IntTools_SurfaceRangeLocalizeData::myGridPoints not being checked
for NULL in some cases.
Missing checks are added.
2023-06-30 19:22:48 +01:00
mzernova
b47b7e69f7 0031956: Visualization - provide Image_AlienPixMap::Save() writing into a memory buffer instead of a file
Added two new Image_AlienPixMap::Save() overloads, taking std::ostream or memory buffer arguments.
2023-06-12 11:20:44 +01:00
dpasukhi
6aa053ae00 0033391: Coding - Clearing old definition way for strcasecmp
Removed artifacts for strcasecmp definitions
2023-05-31 20:17:31 +01:00
dpasukhi
54ed243582 0033372: Visualization - Compilation of git master fails against vtk 9.2.6
Fixed compilation on vtk 9.2.6.
Resolved name collisions with X11 headers
2023-05-31 20:07:16 +01:00
akaftasev
8748042259 0033390: Coding - Debug version of OCCT does not compile
Deleted code for OCCT_DEBUG was returned and added under macros OCCT_DEBUG
2023-05-22 12:00:32 +01:00
dpasukhi
92e0a76a50 0033379: Coding - Processing Clang-15 warnings
Fixed warning generated by Clang++-15
2023-05-19 19:34:37 +01:00
dpasukhi
b2fedee6a1 0033375: Coding - Static Analyzing processing. Performance
Performance update applied:
  - moving to const reference as much as possible
Result of CLANG_TIDY (static analyzing filter: perform*)
2023-05-19 19:33:59 +01:00
akaftasev
c28dd7f1cf 0033361: Modeling Algorithm - Fuse operation generates incomplete result
Added additional check of Face-Face intersection to avoid missing section edges because of sequence of Face-Face interference processing
2023-05-18 22:48:45 +01:00
dpasukhi
c36205a05e 0033378: Configuration - Moving ExpToCas into separate module
Moved ExpToCasExe and its DLL to new module - DETools
Created new module - DETools to keep tools to DE
Changed definition of main of ExpToCasExe to not const parameter
FlexLexer.h moved to general location into TKernel
2023-05-18 22:48:02 +01:00
ichesnok
945e309564 0030066: Data Exchange - Fail to load VRML from ArcGIS
Fixed VrmlData_Scene::readHeader method
2023-05-17 21:47:01 +01:00
ichesnok
e3841f9ffe 0033318: Data Exchange - Modifying the BRep flag after exporting the shape
Fixed condition for setting 'checked' flag
2023-05-17 21:46:06 +01:00
anv
bcfc5f0d5a 0033369: Modeling Algorithms - BRepBuilderAPI_Transform makes invalid shape after transformation
Added check to avoid setting parametric boundaries to infinity.
2023-05-17 21:45:13 +01:00
dpasukhi
c3f6267d24 0033382: Configuration - Installation issue for debug mode for static build
Updated install command to handle BUILD_SHARED_LIBS configuration
2023-05-16 13:48:11 +01:00
dpasukhi
5d8b1a4076 0033350: Data Exchange, Step Import - Improving parsing performance
Improved performance of parser by disable checking for eof (20% parsing time)
Changed step parser's record to keep last one to fast insert into end.
2023-05-14 21:40:28 +01:00
dpasukhi
e4f00dbb7e 0033377: Data Exchange - STEPCAFControl_Reader crash in OCC 7.7.0
Added checking for null object for STEPCAFControl_Reader::SettleShapeData
2023-05-10 19:29:14 +01:00
msmediasofts
359edc7d8a 0033366: Documentation - Add description of BRepAlgoAPI_Algo::Shape()
Added description of BRepAlgoAPI_Algo::Shape()
2023-04-19 18:04:52 +01:00
mzernova
f9998f03ad 0031777: Visualization - improve SelectMgr_EntityOwner to process selection scheme
The selection scheme has been propagated to Owner object interface, and the
AIS_Selection::Select() method has been replaced to unify the logic.
2023-04-05 17:20:33 +01:00
dorlov
c479c4f6d8 0023638: Data Exchange - Reading IGES file produced invalid shape
Removed double healing of Iges group entities
Added ShapeBuild_ReShape member to the IGESData_IGESModel class, shapes which are registered in ShapeBuild_ReShape class does not process to healing
2023-03-28 01:00:42 +01:00
dpasukhi
c51df6bfd2 0033327: Data Exchange, IGES Import - SubfigureDef can't read string
Fixed problem with texted types
Added checking for null string for subfigure via XCAF transferring
2023-03-20 23:11:36 +00:00
dpasukhi
5e43274280 0033337: DRAW - Can't load plugins on Linux OS
WSL 2 have windows FileSystem and as a result we have \r symbols before \n
For this cases we can just remove \r\n (\n is a last symbol) for the node value.
2023-03-20 23:11:35 +00:00
dpasukhi
efe960751c 0033331: Data Exchange, Step Import - Unsupported Representation Items
Fixed problem with iteration on Null RI
2023-03-20 23:11:27 +00:00
anv
6b9e0dc3f8 0033345: Coding - Memory allocation operators got inaccessible
Macros was moved back to public.
2023-03-19 20:53:54 +00:00
akaftasev
2ef94c994e 0033340: Modeling Algorithm - Improve memory management performance in the PaveFiller
Changed NCollection_BaseAllocator to NCollection_IncAllocator in BOPAlgo_PaveFiller::MakeBlocks()
2023-03-19 20:53:53 +00:00
dpasukhi
1dd4b902c0 0033092: Data Exchange, Documentation - Implementation of DE_Wrapper documentation
Implement new user-guide documentation for DE Wrapper
2023-03-19 20:53:53 +00:00
akaftasev
a846d36326 0033264: Modeling Algorithms - Result of section operation is incomplete
Test case added.
2023-03-19 20:53:53 +00:00
akaftasev
86e352849d 0033263: Modeling Algorithms - BRepFilletAPI_MakeFillet doesn't work for current parameters
Do not calculate edge state if there are more than 4 G1 connections for currect vertex.
2023-02-10 15:35:41 +00:00
akaftasev
6d140acb14 0030292: Modeling Algorithms - BRepBndLib should avoid using Poly_Polygon3D when called with useTriangulation set to false
BRepBndLib.cxx : treatment of useTriangulation is modified according to specified behavior of algorithm
BRepTest_CurveCommands.cxx : creation edge from polygon3d is added in Draw command mkedge.
2023-02-06 17:51:52 +00:00
akaftasev
44be123039 0030055: BRepOffset_MakeOffset throws "TopoDS_Vertex hasn't gp_Pnt" in intersection mode
Diagnostic of mixed connectivity of faces along common edge is added.
If algorithm finds such pair of faces, it stops working with special error code.
2023-02-06 14:15:35 +03:00
dpasukhi
47263fa6a3 0033317: Data Exchange, Step Export - Ignoring color attached to the reference shape label
Fixed problem with pure referencing.
  To export reference label to step we convert it to the assembly with one part.
  All attributes attached to the label should be moved to the new part.
  For working with it new map contains only pure reference labels, that converted to the part
  was implemented to the STEPCAFControl_Writer.
Updated code style of the STEPCAFControl_Writer
Improved ability to export labels from different documents
Removed OCCT_Debug macros to print in Trace gravity
2023-02-04 09:18:29 +00:00
mzernova
b0afa94d10 0027848: Visualization - sensitivity of lines is too high
Improved objects sorting by depth.

The sensitivity calculation for the manipulator has been changed.
Now the sensitivity of the elements of the manipulator depends on its size.

Also fixed the problem of erroneous selection of unfilled circles (SelectMgr_Frustum<N>::hasCircleOverlap() function).

Test case vselect/bugs/bug27848 added.
2023-02-04 09:17:58 +00:00
dorlov
c772c6caa4 0030828: Data Exchange - The commands getting shapes from XCAF document should be available in C++
Added two new overloaded methods XCAFDoc_ShapeTool::GetOneShape: one returns TopoDS_Shape from TDF_LabelSequence and the other from a sequence of all top-level shapes which are free
2023-02-02 15:04:50 +00:00
mzernova
53eae1a935 0032570: Visualization, AIS_AnimationObject - define rotation around axis
When using AIS_AnimationObject, linear interpolation is performed from one gp_Trsf transformation to another.
But when an object rotates around a specific axis, the object moves not along a linear trajectory,
but along a circle. Therefore, a separate class AIS_AnimationAxisRotation was created that
allows to animate rotation around a specific axis.

Test case tests/v3d/bugs/bug32570 was added.
2023-02-01 23:26:46 +00:00
dpasukhi
d22b135217 0033307: Data Exchange, Step Import - Crash after reading empty edge loop
Fixed problem with empty edge list in the edge loop, mark as a fail entity in this case
2023-02-01 00:09:26 +00:00
vro
3c7c705d77 0033320: Data Exchange - Reading of a VRML file with a long line fails
Implement rolling back input stream to split on possible logical parts by comma or space.
2023-01-24 22:38:57 +00:00
dorlov
fc72568ba9 0033312: Data Exchange - NULL-dereference in StepToTopoDS_TranslateShell::Init()
The condition "if" was changed to opposite
2023-01-20 03:10:45 +00:00
akaftasev
107b57a955 0033311: Modeling Algorithm - No results of thrusection algorithm
Changed default value of myPercent
2023-01-17 20:47:54 +00:00
oan
8b301eb865 0033315: Mesh - BRepMesh_IncrementalMesh takes forever to finish (ends up with system memory, etc)
Added test case
2023-01-16 22:00:35 +00:00
rodrlyra
1f469e3781 0033305: Coding - BOPTools_PairSelector::Clear method uses "Clear" instead of "clear" on std::vector 2023-01-16 15:22:08 +00:00
akaftasev
ce4d294074 0033306: Modeling Algorithm - Crash in TrimEdge() method
Added condition to not cut the edges by closely located parameters
2023-01-09 21:44:11 +00:00
akaftasev
9f338a00a1 0033298: Modeling Algorithm - Offset operation gives wrong result
Process only those images of the faces, if one if them has anInsideEdges/anInsideVertices and the other is not.
2023-01-03 18:01:14 +00:00
akaftasev
a011359b8a 0033227: Modeling Algorithm - BOPAlgo_BuilderSolid generates incomplete result
Deleted outer loop for shells.
Added additional check of edges orientation for RefineShell().
2023-01-03 18:01:05 +00:00
msv
42e4ae96ae 0033304: Modeling Data - Floating point signal when converting a B-spline curve to analytical form
Protect the static function ConicDefinition from calling sqrt with negative argument.
2023-01-03 18:00:55 +00:00
akaftasev
686926c0a9 0033247: Modeling Algorithm - BOP report small edges problem and produce empty result
Build shifted pcurve for ellipse and circle cases.
2022-12-22 16:20:54 +00:00
akaftasev
a638dd6224 0033265: Modeling Algorithms - Boolean operation hangs on the attached shapes
Added test case.
2022-12-16 14:28:08 +00:00
ifv
961a306dc4 0033244: Modeling Algorithms - Surface-surface intersection produces the double curves
IntAna_QuadQuadGeo.cxx - estimation of angular tolerance is added for case cone-cone

tests/lowalgos/intss/bug33244 - new test case added
2022-12-12 10:27:10 +03:00
ifv
195a068c4f 0030781: Sweep algorithm creates non-planar edges (orig. BOPAlgo_MakerVolume fails to build a solid)
BRepFill/BRepFill_AdvancedEvolved.cxx - estimation of angular tolerance is added in method GetLids()

tests/evolved/voluved/bug30781 - new test added
2022-12-10 14:04:53 +00:00
dpasukhi
669e0dfc17 0033246: Data Exchange, DE Wrapper - Checking license leads to performance problem
ReWork UpdateLoad functionality:
UpdateLoad calls only if provider is found.
UpdateLoad calls only for chosen type of translation (read/write)
Add new method to UpdateLoad all registered nodes.
2022-12-10 14:02:56 +00:00
nunomsil
74cb5673a5 0031919: Modeling Algorithms - General Fuse raises exception on attempt to imprint a contour to a shell
Exception no longer occurs in current version. However, fuzzyvalue should be set to 1 for the result of the operation to make sense (result of common is 1 wire). Test case added
2022-12-07 14:45:36 +00:00
dpasukhi
768f3a4a19 0033235: Configuration - Solving the problem with static building of ExpToCasExe
Added new dependency to ExpToCasExe - CSF_wsock32 (on Win only)
2022-12-04 13:49:06 +03:00
dpasukhi
2a8c5ad46c 0033250: Configuration - Missing Limits header file
Added new include limits to fix build problem
2022-12-04 13:48:24 +03:00
stv
7ea3eff4f8 0033218: Data Exchange - XCAFPrs_Texture not allow to use classes inherited from Image_Texture
Type of field XCAFPrs_Texture::myImageSource was changed from Image_Texture to Handle(Image_Texture)
2022-12-04 13:47:36 +03:00
dpasukhi
c07f4ee70d 0033232: Data Exchange, DE_Wrapper - Implement ability to change global session
Add ability to set/get global session
2022-12-04 13:46:38 +03:00
dpasukhi
6cc679d81c 0033230: Data Exchange, DE Wrapper - Update API to find CAD provider
Moved FindProvider method to public section
Made FindProvider as virtual to make it possible to overwrite.
2022-12-04 13:46:38 +03:00
dpasukhi
62f554bc3f 0033228: Data Exchange, DE Wrapper - Make the document argument of the method Read const handle
Rewrite document argument for DE_Wrapper Read method
2022-12-04 13:46:37 +03:00
sshutina
7eeb5d5fbf 0032965: PMIVis - PMIVis_TOT_Vectorized text regressions
Added the ability to draw a shaded shape in the required group.
2022-12-04 13:44:52 +03:00
oan
9b7f1aea28 0031865: Mesh - triangulation fails with large deflection values due to unhandled Standard_OutOfRange, BRepMesh_PairOfIndex::Append()
Define minimum number of points for specific types of curves like it was done for circular edges.
2022-12-04 13:43:52 +03:00
knosulko
1e96cf65fa 0033156: Modeling Algorithms - Planar face creation problem
BRepLib_MakeFace::BRepLib_MakeFace: deleted degenerative edges from the input wire;
add test tests\mkface\mkplane\bug33156.
2022-12-04 13:42:28 +03:00
ddzama
03275c0be1 0022821: Crash with BRepFilletAPI_MakeFillet
test bugs modalg_7 bug22821 failed on fillet shape with 5-th edge.
Experimentally has been found that reducing of parameter
ChFi3d_Builder::tolesp for this task solves the issue.

So, as soluton it is proposed to link parameter toleps with parameter range of
spine curve. So, production coefficient has been set to pass all tests and
2 teset was extended: tests/blend/complex/A6, tests/bugs/modalg_7/bug22821

first has been extended to test different scaling factors,
second has been extended to make fillet on all edges from 12.

Additionally:
 - fixed misusage of tolesp in contexts where tolerance of point in 3d is excepted;
     In some context usage of tol_esp is irrelevant, because its essentiality - tolerance of the parameter on the 3d curve.
     So, in such context it has been replaced with new parameter tol3d (with fix value 1.0e-4).
     Get rid of tolapp3d duplication constant - tol_3d
 - tolesp = 5.0e-5 * (umax - umin)
 - tolesp replaced by tolpoint2d/tolpoint3d in several classes.
     Blend_Walking
     BRepBlend_SurfRstLineBuilder
     BRepBlend_RstRstLineBuilder
     Blend_CSWalking
     Instead `tolesp` - `tolgui` is employed in contexts where tolerance of guide curve parameter is excepted.
     Instead `tolesp` - `tolpoint2d` or `tolpoint3d` is employed in contexts where tolerance of point in 2d or 3d space is excepted.
 - Replace tolesp with tolpoint2d/tolpoint3d in BBPP function argument.
 - Use tolapp3d instead tolesp in BonVoisin function,
2022-12-04 13:41:29 +03:00
ddzama
2f33e34038 0032934: Modelling Algorithms - BRepExtrema_DistShapeShape returns two solutions instead of one
distmini of two edges returns two solution points instead one.
Second unneeded solution point is the same as first.

The problem was in fact that second edge has continuity C0.
In this case additional extremas analysis performed in special procedure

PERFORM_C0

And second point found in this procedure.
Folowing code of

BRepExtrema_DistanceSS::Perform (variant for Edge/Edge)

we should this additional solution extremas set
to be object of test TRI_SOLUTION before pushing
into main list of solution.
This solves the problem.
Corresponding test and compound with edges has been created.

Additionally, in the function

PERFORM_C0

an obvious error has fixed.
2022-12-04 13:39:35 +03:00
akaftasev
3eb891ec49 0033180: We had a problem calling the OCC library at the customer site, and the program crashed
Added status for thrusection operations and changed throw constructions to set of the status and break the function.
2022-12-04 13:35:24 +03:00
smoskvin
057dcfddf7 0033225: Changing the status of tests on Ubuntu 20.04 and Windows 64 VC142 2022-11-28 00:04:06 +03:00
atereshi
3837b3bf28 0033217: DRAW - Missed Standard_EXPORT attribute in DrawTrSurf_Set* functions 2022-11-25 13:03:27 +03:00
gelin
db2bfd1e83 0032818: Modeling Algorithms - Result of sweep operation is invalid
BRepFill_TrimShellCorner.cxx - setting correct orientation for NewEdge
tests/pipe/bugs/bug32818 - new test case added
2022-11-21 20:13:47 +03:00
ika
a855215141 0030256: ACIS Import - crash while importing SAT file on constructing a pipe
Fix for thin section with both first and last parameters located in one segment.
2022-11-21 20:11:13 +03:00
ifv
195aac3a42 0033193: Modeling Algorithms - Regression: UnifySameDomain raises SIGSEGV
ShapeUpgrade_UnifySameDomain.cxx - method ReconstructMissedSeam is improved.

tests/bugs/heal/bug33193 - new test case added
2022-11-21 20:10:06 +03:00
atereshi
f706dd34b3 0027122: Data Exchange - invalid shapes are produced during model translation due to huge face tolerance
Problem: The shape has two faces that dimensions are less than tolerance in the specified STEP file. This situation produces the invalid shape.
Change: Shape process has operator FixFaceSize, that is exactly suitable for this shape. The only option of FixFaceSize operator was added to InterfaceStatic, to manage the operator from DRAW command.
Result: The shape without artifacts can be reproduced from STEP file with an extra healing procedure.
2022-11-21 20:06:04 +03:00
ifv
c325231de6 0033179: Modeling Algorithms - Crash in ShapeFix_Shape with the attached object, when healing for fixing SameParameterFlag
BSplCLib_2.cxx - method MergeBSplineKnots is modified in order to have always not empty result.
Geom2dConvert.cxx - in static function MultNumandDenom tolerance for comparing knots is decreased.

tests/bugs/modalg_8/bug33179 test case added
2022-11-21 20:03:35 +03:00
ifv
91a2f58f8f 0026441: Modeling Algorithms - BRepOffset_MakeOffset affects original shape
BRepOffset_MakeOffset.cxx - tolerance control for building planar faces is implemented,
                            updating tolerance for initial entities is avoided

BRepAlgo_Loop.cxx - "total" setting tolerance 0.001 is removing

BRepLib.cxx - checking of "locked" for vertex is removing in static function UpdShTol

QABugs_20.cxx - add new command OCC26441 for checking tolerance differenses between two "identical" shapes

tests/bugs/modalg_7/bug30054 - case now is "BAD", because really result shape is invalid: many faces has not closed wires with huge gaps between ends of edges. Result was "OK" only because tolerances of vertices were increased by algorithm to cover all gaps.

tests/bugs/modalg_8/bug26441 - new test case added

Other test: B3, C8, A7, C8: they were "BAD" and now are "BAD", only some problems are changed.
2022-11-21 20:00:23 +03:00
ifv
8175a70c4e 0033173: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape causing Standard_OutOfRange exception
Extrema/Extrema_ExtCC.cxx - checking number of solutions is added

tests/bugs/modalg_8/bug33173 - test case added
2022-11-21 19:57:45 +03:00
atereshi
f9990707fe 0033187: Modeling Algorithms - Crash in postprocessing of imported shape
Problem: Desynchronization of behaviors of GeomAdaptor_Curve::NbIntervals and
 GeomAdaptor_Curve::Intervals functions. First calculates number of intervals, then
 array is created and second fills the array. In some cases the size of array
 is less than need for filling.

Change:
1. Added function BSplCLib::Intervals that calculates number of interval and fills
 the array with its (if needed).
2. Simplified the algorithm of intervals calculation.
3. GeomAdaptor_Curve::NbIntervals/Intervals and Geom2dAdaptor_Curve::NbIntervals/Intervals
 use BSplCLib::Intervals.
4. When creating an adapter for the base curve, the boundaries of the adapter for the offset curve are applied.
5. Test for problem shape was created: bugs modalg_8 bug33187.

Result: The new approach eliminates the problem of writing outside the array bounds.
2022-11-21 19:53:59 +03:00
knosulko
aba5c241c6 0033144: Modeling Algorithms - Wrong result of Shape Proximity
Added step of refinement the coarser of the two shapes meshes to produce two meshes with approximately the same density.
Added tests lowalgos/proximity.

Fixed accounting of parameters to adjust number of initial sample points
2022-11-21 19:50:40 +03:00
ifv
cc164fd7dc 0033170: Modeling Algorithms - Checking for canonical geometry: plane detection problems
GeomLib_IsPlanarSurface.cxx - using poles for checking BSpline, Bezier curves and surface changed
                              on checking by curve, surface points.

BRepOffset_MakeOffset.cxx - set normal of plane surface according to normal of initial face surface

tests/cr/bugs/bug33170 - new test case added
2022-11-21 19:44:10 +03:00
ona
d7d89acb39 0032977: OCC V7.5, V7.6 cannot read STEP color correctly for the root label, but v6.8 can
- color overriding mechanism is implemented for assembles, parts and instances
2022-11-21 19:41:08 +03:00
Eugeny Maltchikov
d444cc35c6 0033171: Modeling Algorithms - Invalid result of faces unification
Avoid unification of the faces belonging to the different shells.
2022-11-21 19:38:22 +03:00
smoskvin
eeba62cbd3 Increment OCCT version up to 7.8.0dev 2022-11-12 01:20:10 +03:00
dpasukhi
185d29b92f 0033198: Using a third-party Draco to compile in DEBUG mode
Added new CMake variables to build using DRACO
Windows OS works with Debug and Release configuration DRACO
Linux works with Release configuration DRACO
2022-11-12 01:19:44 +03:00
smoskvin
2923ef0df8 fixed compilation by the genproj tool 2022-11-11 11:26:00 +03:00
atychini
402ad27743 0033190: Error on de_wrapper/configuration/A3
Removing provider.VRML.OCC.read.memory.limit from the test because this parameter doesn't exist inside the Vrml_ConfigurationNode class
2022-11-02 22:22:09 +03:00
aba
f8d4cfbb80 0027142: Data Exchange - add possibility to set location in XCAFDoc_ShapeTool interface 2022-10-31 19:19:33 +03:00
azv
aaacd83510 0033032: Samples - Warning on Ubuntu 20.04
Fix warnings:
* catching polymorphic type 'class Standard_Failure' by value [-Wcatch-value=]
* this 'if' clause does not guard... [-Wmisleading-indentation]
2022-10-31 19:18:08 +03:00
mahaidong
3e06b70623 0032350: Data Exchange - STEPControl_Writer.writeStream(std::ostream)
STEPCAFControl_Writer::WriteStream(), STEPControl_Writer::WriteStream() - added interface for writing into stream.
STEPCAFControl_Reader::ReadStream() - added stream reading method (similar to STEPControl_Reader::ReadStream()).

Added option -stream to commands ReadStep, WriteStep, and testwritestep.
2022-10-31 19:18:08 +03:00
oan
b77de43fb0 0032053: Mesh - Invalid mesh after shape scaling
Added test case
2022-10-31 19:18:08 +03:00
oan
59223e118d 0031926: Shape Healing - ShapeAnalysis::OuterWire() considers next iteration element always to be a wire causing skipping of primal one
ShapeAnalysis::OuterWire(): fixed missed logic when TopoDS_Iterator notifies about more objects to iterate, but there are only vertices and no additional wires at all.
2022-10-31 19:18:07 +03:00
oan
3b5a94a165 0033050: [Regression to OCCT 7.3.0] Mesh - meshing deflection is not reached
Add parameter EnableControlSurfaceDeflectionAllSurfaces to IMeshTools_Parameters enabling possibility to optimize mesh even on analytical surfaces;
Add corresponding parameter -surf_def_all to incmesh Draw command.
2022-10-31 19:18:07 +03:00
akaftasev
5cbd98a5be 0029093: BOP PaveFiller hungs and constantly consumes memory
Method IntWalk_PWalking::ExtendLineInCommonZone(...) now is not called if the already found intersection point is on surface boundary.
As result, the intersection line going along any boundary will never be extended. It is appropriate for high-level OCCT-algorithm because they will take the boundary (not computed line) as intersection result.
2022-10-31 19:18:07 +03:00
akaftasev
25b5e83a4c 0032691: Modeling Algorithms - Exception when trying to build solid during sweep algorithm
Changed the condition for checking the correctness of the sweep algorithm. Exception is no longer raised, algorithm finishes with "Not done" status.
2022-10-31 19:18:06 +03:00
vmigunov
3c9178dd5c 0033165: Data exchange - Instance name is not saved during writing step file
Instance name is saved also with identity location transformation
2022-10-31 18:22:37 +03:00
oan
f73592edf0 0028500: Artifact in shaded view of the shape
Increase minimum number of discretization points by one explicitly on each iteration of model healer to cover cases degenerated to line (for cases when face consists of 2 edges only).
2022-10-31 18:21:44 +03:00
oan
a24391a133 0033163: Bad definition of values in IMeshData_Status
Corrected value of status enum
2022-10-31 18:21:08 +03:00
oan
3a24514d48 0031476: Wrong shading of a toroidal face from a SAT file
Added test case
2022-10-31 18:20:29 +03:00
kgv
3453354ee1 0033141: BVH_BaseBox<T, 3, BVH_Box>::Transformed() returns empty box for identity matrix 2022-10-31 18:19:37 +03:00
Eugeny Maltchikov
9218d04b9a 0033138: [Foundation Classes] - NCollection_IncAllocator- Decrease the default block size
Set default memory block size for IncAllocator to 12KB to make sure the Low Fragmentation Heap is used for memory allocations on Windows platform.
2022-10-31 18:18:21 +03:00
abulyche
259b930379 0023954: Modeling Algorithms - BRepPrimAPI_MakeRevol fails to recognize a torus case
Fixed the Toroidal surface recognition;
The test case bugs/moddata_1/bug22296: the result is a torus with parameters: u [0, 2*PI], v [PI, 3*PI];
The test case bugs/modalg_5/bug23954: BAD -> OK.
2022-10-31 18:17:37 +03:00
ddzama
3536158f11 0033153: Configuration: Linker error when building from source for VS2022 x64.
With enabled flag BUILD_USE_PCH we get an error of compilation of TKService:

1>Image_VideoRecorder.obj :
  error LNK2019:
    unresolved external symbol
      "int __cdecl av_strerror(int,char *,unsigned __int64)"
      (?av_strerror@@YAHHPEAD_K@Z) referenced in function
      "protected: class TCollection_AsciiString __cdecl Image_VideoRecorder::formatAvError(int)const "
      (?formatAvError@Image_VideoRecorder@@IEBA?AVTCollection_AsciiString@@H@Z)
1>Media_FormatContext.obj :
  error LNK2001:
    unresolved external symbol
      "int __cdecl av_strerror(int,char *,unsigned __int64)" (?av_strerror@@YAHHPEAD_K@Z)

And many other similar errors. Similar errors occures in some other projects too:

TKService
TKOpenGl
TKOpenGles
TKXCAF
TKXDEDRAW
TKDFBrowser
TKMessageModel
TKMessageView
TKShapeView
TKTInspector
TKTreeModel
TKVInspector
TKView

Proposed solution: turn off cotire from targets, whose compilation cause error while applying cotire tool.
In this ticket migration to cotire 1.8.1 (from 1.7.9) is done.

COTIRE_PREFIX_HEADER_IGNORE_PATH does not apply here, because its employing
causes some errors in 3rdparty libraries (for example, in TKService project).

Projects (TKDFBrowser TKMessageModel TKMessageView TKShapeView TKTInspector TKTreeModel TKVInspector TKView)
which use Qt may be proceeded by cotire tool, but after fixing a bug of cotire:

https://gitlab.kitware.com/cmake/cmake/-/issues/18353

0033153: Fix cotire bug, causing impossibility of compilation targets depending from Qt.

Solution is proposed in:
https://gitlab.kitware.com/cmake/cmake/-/issues/18353
2022-10-31 18:16:19 +03:00
ddzama
cb77bfc4f0 0033155: Regression [0033117] Coding, relocation R_X86_64_PC32 against symbol `TT_RunIns' can not be used.
After emploing intel oneTBB of version 2021.5 on NEXT platforms arises error on OCC Pr.:

`
*/ld: */libfreetype.a(truetype.o): relocation R_X86_64_PC32 against symbol `TT_RunIns' can not be used when making a shared object; recompile with -fPIC
*/ld: final link failed: bad value
`

Proposed solution: linking with shared object of libfreetype, rather than with archive library.
Despite that error occurred only in OCC Pr., it is worth to accept changes for OCCT too.
2022-10-31 18:14:31 +03:00
ddzama
92f1875fc0 0033147: [Regression to 7.6.3] Coding, Configuration - CMake Error TBB "Directory is not set".
Previous approach do not taking into account, that oneTBB library may be installed in the system folder
on Linux. So, solve the problem it is proposed to employ find_package utility, that works great
as on Windows, as on Linux.
2022-10-31 18:13:44 +03:00
atereshi
a453f9d128 0028414: Data Exchange, STEP - Face on a closed surface with single inner wire and without natural bound not correctly read
Problem: From the point of view of the STEP format (and others), it is allowed
to describe a face on a surface with natural boundaries (torus, sphere) without
specifying these boundaries. Thus, a face on a closed surface and containing
an inner wire (or several) is correctly defined and describes a face with a
cutout defined by this wire. At the same time, there is a function
(ShapeFix_Face::FixOrientation) in the ShapeHealing procedure that corrects the
orientation of the wires, and it starts before the function of adding natural
boundaries (ShapeFix_Face::FixAddNaturalBound). There are many shapes that have
incorrectly oriented wires and this procedure successfully heals them, but on a
correctly specified face with single inner wire on closed surface, we do not get
the entire surface with a cutout, but a part of the surface defined by the wire.
This fix is intended to resolve this ambiguity.

Change:
1. Added function isNeedAddNaturalBound that returns TRUE if face needs to add
 natural bounds.
2. Corrected condition in FixOrientation to ignoring faces that needs to add
 natural bounds.
3. For tests in which one wire was incorrectly oriented on a closed surface,
flag AddNaturalBound was disabled.
5. Test with cutout from torus was created: bugs step bug28414.

Result: By default, it is correct to add natural boundaries, because this case
 is correct from the point of view of the STEP format and others.
2022-10-31 18:10:55 +03:00
gelin
492b09dcae 0032850: Modeling Algorithms - Surface Surface Intersect Lost one line
IntStart_SearchOnBoundaries.gxx - improving tangent criteria
2022-10-31 18:09:15 +03:00
kgv
f55fe3b3f7 0033149: Mesh - misprint in BRepMesh_NURBSRangeSplitter::computeGrainAndFilterParameters() 2022-10-31 18:08:24 +03:00
atereshi
51329afcef 0028024: Data Exchange - create a convenient mechanism for managing shape healing options when reading STEP or IGES file
Problem: There is no possibility to change shape healing options from DRAW without rewriting resource file.
Change: Shape healing parameters from STEP and IGES resource files were duplicated to InterfaceStatic. Resource manager initialize from InterfaceStatic if resource file name is empty.
Result: User can operationally change shape healing parameters from DRAW command using "param" command.
2022-10-31 18:06:02 +03:00
ddzama
13f5da81ad 0033152: Fix searching tbb in 3rdparty directory.
Currently directory containing tbb 3rdparty installation should match the template tbb*.
But after using oneTbb of version 2021.5 standard installation directory is onetbb*.
So, for this 3rdparty modify searching template.
2022-10-31 18:01:27 +03:00
nmanchen
f0049a9599 0028640: Modeling Algorithms - BRepBuilderAPI_Transform builds invalid shape
Adapt test case, the problem is not reproduced any more.
Problem is fixed by the commit: 46478ffe32 (0030008: BRepMesh does not respect angular deflection in internal area of bspline surface)
2022-09-30 10:35:34 +03:00
smoskvin
0b4962a7f0 Update version up to 7.7.0 2022-09-26 20:06:01 +03:00
ddzama
b3284f3ba9 0033117: migration to intel oneTBB 2021.5.0 (c++20 ready)
MSVC 2022/c++20.

After employed c++20 language standard errors of compilation in intel oneTBB occurred.
To get rid of compilation errors proposed moving on actual (2021.5.0) intel oneTBB occ products and occt.

After migration errors of compilation of TKernel and TMath have been occurred...
...Error occurred if using c++20 standard with new oneTBB 2021.5.0.
The error was:
   Error C2672 'tbb::v1::parallel_for_each': no matching overloaded function found TKernel
   could be 'void tbb::detail::d2::parallel_for_each(Iterator,Iterator,const Body &)' TKernel
   'tbb::detail::d2::parallel_for_each': the associated constraints are not satisfied TKernel
Note, that if we use c++14 or c++17, all ok, error does not occures.
To solve the problem, i have to modify `UniversalIterator` class:
`value_type` instead `UniversalIterator` converted to `IteratorInterface*`
`pointer` = `reference` = `value_type`
Method `DownCast` moved into `FunctorInterface` abstract class.
argument `UniversalIterator& item` of the unary fuctions converted to `IteratorInterface*`.
The proposed solution removes compilation error.

Affected projects: TKernel, TMath
Affected sources: src/OSD/OSD_Parallel.hxx, src/OSD/OSD_Parallel_Threads.cxx
Affected classes: class OSD_Parallel, OSD_Parallel::UniversalIterator, OSD_Parallel::FunctorInterface, OSD_Parallel::FunctorWrapperIter, OSD_Parallel:;FunctorWrapperInt.
2022-09-25 01:09:12 +03:00
jgv
b95eefe1c2 0031992: Modeling Algorithms - Offset of closed B-spline edge fails
1. Increase the tolerance of approximation.
2. Update auxiliary Draw command "topoload" for usage of option "-approx".

Add missing comment
2022-09-23 18:31:02 +03:00
atychini
5bde4773f9 0032820: Data Exchange - add VRML reader to XCAF document
Implementing VRML reader into XCAF document.
Updating DE_Wrapper according to VRML Reader.
2022-09-23 18:30:08 +03:00
ona
b0f92d3d5c 0032239: Data Exchange, STEP import - bounding box is too large
- ShapeFix_Face::FixMissingSeam method is fixed in order to handle degenerated torus
- Calculation of degenerated torus bounding box is fixed
- Test reference data is changed
2022-09-21 23:09:17 +03:00
mzernova
b9f787f180 0033114: Visualization - AIS_Animation returns 0 elapsed time after finishing playback
Added -elapsedTime option to DRAW vanim command
2022-09-20 12:03:58 +03:00
oan
a939fd40eb 0031853: Mesh - holes in triangulation with large linear deflection
0030442: Mesh - broken triangulation on pipe shape

Scale down min size parameter for NURBS taking into account its U and V resolution in order to prevent comparison of 2d parameters with 3d value involved in filtering process.
2022-09-16 18:35:32 +03:00
oan
c4ea4ca3d1 0032241: Mesh - wrong shading display of thrusections [regression since OCCT 7.4.0]
0032422: Mesh - Weird rendering
0029641: Mesher produce 'bad' result for extruded spline with given deviation coefficient

Added method BRepMesh_NURBSRangeSplitter::getUndefinedInterval() intended to compute checkpoint parameters for those NURBS surfaces which have no intervals at all. In this case number of poles is used to produce artificial regular grid which can be refined further. Add at least one midpoint for surfaces with one interval and only two poles.

Added BRepMesh_ExtrusionRangeSplitter and BRepMesh_UndefinedRangeSplitter derivatives from BRepMesh_NURBSRangeSplitter intended to handle special cases of extrusion surfaces and general surfaces with undefined parameters.
2022-09-16 18:34:44 +03:00
oan
f3573fb54b 0031449: Mesh - BRepMesh works too long and produces many free nodes on a valid face
Added test cases
2022-09-13 23:30:33 +03:00
knosulko
78aade7569 0033017: Implement an algorithm to find a proximity between a pair of shapes
Extend "proximity" command to be able to compute the proximity value;
Implement classes for calculate proximity value between two shapes;
Add possibility to set up the number of sample points for the input shapes;
Add tests lowalgos/proximity.
2022-09-13 23:29:39 +03:00
kgv
03b0ca59cb 0033142: Configuration, genproj - ExpToCasExe building fails with generated VS projects
Generate executable single MSVC project per-Unit instead of per-source file.
2022-09-13 23:28:49 +03:00
ddzama
d6baf70a93 0032960: Wrong result of BRepExtrema_DistShapeShape after translation.
Add corresponding test.
2022-09-13 10:57:29 +03:00
ifv
526c506cb0 0032859: Modeling Algorithms - BRepLib_FindSurface not return an expect plane
BRepLib/BRepLib_FindSurface.cxx = removing very small values from coordinate of normal
bug32859 - test case added
2022-09-10 17:14:05 +03:00
ddzama
2949b238c1 0033137: Updating minimal supported Microsoft Visual Studio version up to 2015 (VC140).
Microsoft Visual C++ compiler of version 2015 or higher should used to compile OCCT and Products on Windows.
2022-09-10 17:14:05 +03:00
oan
dfb5aebd35 0032982: [Regression to 7.3.0] Mesh - Meshing the shape takes too long and visualization is bad
New formula to calculate number of points along V axis of a cone depending on ratio of its size along V and U.
2022-09-08 22:06:40 +03:00
atychini
8da2801496 0033058: JT Import - perform XT translation in multiple threads
Creating mutex for proper parallel processing.
2022-09-06 20:10:58 +03:00
ddzama
e92d322d40 0032921: Configuration, CMake - allow selecting C++ standard.
Make C++ standard to be enable from cmake settings:

User will be able choosing C++ language standard by selecting cmake variable BUILD_CPP_STANDARD.
For correct working, CMAKE_CXX_STANDARD cmake built-in variable should be available.
To enable CMAKE_CXX_STANDARD, minimum CMAKE version has been updated to 3.1.

Available next standard items:
C++11
C++14
C++17
C++20
C++23

This issue consists from several steps to achive main goal:
1) Configuratiuon, CMake - allow selecting C++ standard.
2) Require minimum CMAKE version 3.1 (for enabling CMAKE_CXX_STANDARD).
3) More flexible CMAKE_CXX_COMPILER_ID identification (fixups previous commit!)
4) Add description of new CMAKE variable `BUILD_CPP_STANDARD` into documentation.
5) Update CMAKE requirements in documentation.
6) Set C++11 standard for several projects.
2022-09-06 20:06:54 +03:00
jgv
b71cb85f67 0032214: Modeling Algorithms - 2d Offset produces wrong result
Add new option to convert input contours into ones consisting of 2D circular arcs and 2D linear segments only.

Update documentation
2022-09-06 20:04:21 +03:00
abv
05cfce4d83 0031481: Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities
Integration of ExpToCas tool ported to modern state of OCCT:
- new package Express and toolkit TKExpress for EXPRESS data structures and OCCT class generator
- executable ExpToCasExe including lax/yacc parsers, for parsing a Part 21 file and generating classes

Formatting added files from package Express following OCCT Coding Rules

Changes for correspondence generated files to OCCT Code Rules.

Add generation hxx files with declaration of arrays.
If field is a HArray1 method for get length of array and method for get element of array by its index are generated.

Changes for generation parser from Lex and YACC files.

Update description file ReadMe.md
2022-09-06 19:59:09 +03:00
ddzama
d7eefb11bf 0032986: Samples - csharp sample is crashed on compilation with VC++ 2022
While demanding c++ language standard c++20, the error of OCCTProxy compilation is occured:

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

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

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

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

To solve the problem it is proposed to demand by default the highest version of NETFramework - 4.8.
So, demanding NETFramework v4.8 does not crashing compilation of csharp samples with VC++ 2015.
2022-09-06 19:57:24 +03:00
abulyche
80d4753574 0032876: Modeling algorithms - BRepClass_FaceClassifier issue
Modification of checking points for the state "ON" in BRepClass_Intersector.cxx;
Added the test for this ticket;
test case lowalgos/classifier/bug377: BAD -> OK
2022-09-06 19:48:57 +03:00
ifv
ed6a17ef6c 0033104: Modeling Algorithms - Checking for canonical geometry: surface, close to a cylinder, is not recognized
Adjusting parameters of algorithm for recognizing cylindrical surfaces.
Test case added
2022-09-05 19:24:03 +03:00
mzernova
2182812a5b 0033112: Visualization - AIS_InteractiveContext::RecomputeSelectionOnly() may should handle selection tolerance changes 2022-09-05 19:21:50 +03:00
akaftasev
92915edda8 0030955: [Regression to 7.3.0] Modeling Algorithms - Incorrect result of fuse operation
Added test case.
2022-09-01 21:55:21 +03:00
mzernova
06aa200142 0032172: Visualization, TKOpenGl - implement simple shadow mapping for a spot light source
added test: opengl/data/shadows/spotlight
2022-08-31 10:27:30 +03:00
dpasukhi
acac44d571 0033053: Data Exchange, Step Export - Compound with vertex is ignored
Fixed problem with deep compound including with vertex group.
2022-08-26 17:39:36 +03:00
mzernova
7aaed2ce3b 0032547: Visualization, Select3D_SensitiveCylinder - implement picking of a hollow cylinder
Select3D_SensitiveCircle now inherits directly from Select3D_SensitiveEntity.
The sensitive circle sector is created using the Select3D_SensitivePoly class directly.

Added appropriate methods for selecting sensitive circles.
Added parameter myIsHollow to Select3D_SensitiveCylinder class.
It allows you to search for intersections with cylinders without covers.

The Draw vcircle command has been extended with UStart and UEnd parameters
to create a sector of a circle.

Added tests: vselect/cone_cylinder/circle_sector
             vselect/cone_cylinder/circle_wire
             vselect/cone_cylinder/filled_circle
             vselect/cone_cylinder/transformed
             vselect/cone_cylinder/hollow_cone_cyl
2022-08-26 17:38:19 +03:00
ngavrilo
da76ea432b 0032782: Visualization, TKD3DHost - improve robustness of test case opengl/drivers/d3dhost 2022-08-23 18:35:39 +03:00
gka
53152e6dd9 0033101: Data Exchange - STEP reader makes unexpected enormous scaling of some parts
Modification to apply units scale factor for faces based on the triangulation
2022-08-23 18:34:10 +03:00
ddzama
1a1739b200 0032957: Add Standard_Noexcept definition
into Standard_Macro.hxx and
employ Standard_Noexcept.
2022-08-18 11:55:14 +03:00
msv
fd5c113a03 0033100: Modeling Algorithms - XCAFDoc_Editor::RescaleGeometry does not rescale triangulations
Make XCAFDoc_Editor::RescaleGeometry to pass the flag theCopyMesh==true
in call to BRepBuilderAPI_Transform::Perform.

Correct the help of the command XRescaleGeometry.
2022-08-13 13:53:14 +03:00
ichesnok
f74f684b16 0032979: Data Exchange, RWGltf_CafWriter - support multi-threaded Draco compression
'MultiThread' field was added to structure RWGltf_DracoParameters for using multithreading.
Class CafWriter_DracoEncodingFunctor was added for multithreaded compression.
2022-08-12 19:04:03 +03:00
dpasukhi
621ed3bc36 0033095: Data Exchange, Step Import - Wrong PMI values when loading a *.stp file in m
Fixed problem with dimension tolerance values (upper/lower)
 - Update supported type for tolerance measure unit, now we can handle base class
2022-08-11 10:43:32 +03:00
mzernova
81d569625e 0033084: Visualization - Cylindrical prism is selectable only by its base when extruded in some directions
Fixed bounding boxes for Select3D_SensitiveCylinder.

Added display of Select3D_SensitiveCylinder presentation using the "vsensdis" command.
Added test vselect/bugs/bug33084.
2022-08-04 17:50:46 +03:00
ngavrilo
6072d3093c 0032992: Visualization - Font_TextFormatter should wrap words when possible 2022-08-02 17:13:03 +03:00
jgv
e1b097eb67 0033006: Modelling Algorithms - UnifySameDomain raises exception
Correct processing cases where a group of faces lies on U-periodic and V-periodic (torus-like) surface.

Add comments according to the remarks
2022-07-29 19:11:52 +03:00
jgv
92d22d7d62 0033080: Wrong projection point from ShapeAnalysis_Surface
Correct Draw command "projface" so that it really finds only projection points belonging to the face.
2022-07-29 19:10:37 +03:00
dpasukhi
1b423e3287 0033068: Draw Harness, XDEDRAW - improve XGetProperties command to work with all document labels
Upgrade DRAW function XGetProperties to work with all document labels or sequence of labels
2022-07-24 22:33:24 +03:00
kgv
cb8519be19 0033074: Visualization, TKOpenGl - PBR shader compilation error on Mesa OpenGL 3.10033074
Graphic3d_ShaderManager::getPBREnvBakingProgram() - fix setting Graphic3d_ShaderProgram::SetPBR()
before defining GLSL version via defaultGlslVersion() that relies on this property.
2022-07-22 20:30:00 +03:00
kgv
617a2905a9 0033073: Coding Rules, RWGltf_CafWriter - suppress CLang warning coming from Draco library 2022-07-22 20:29:08 +03:00
kgv
18559e93cf 0033072: Configuration - ViewerTest_EventManager.cxx compilation error due to missing header on Emscripten
Added missing `#include <Message.hxx>`.
2022-07-22 20:28:01 +03:00
abulyche
c2e01cc5cc 0024049: Modeling Algorithms - crash in BRepOffsetAPI_MakePipe
Added the test for this ticket.
2022-07-22 20:27:15 +03:00
oan
0acc1ab47c 0033060: [Regression to 7.4.0] Mesh - Sub-precisional links provoke failure on face
Slightly increase exact resolution so to cover links with approximate length equal to resolution itself on sub-resolution differences.
2022-07-19 21:22:41 +03:00
ifv
b315a85dd7 0032940: Canonical Recognition: Some surfaces are not recognized as cylindrical surfaces
New method for recognizing cylindrical surfaces based on analysis Gaussian field of initial surface is added  in
class GeomConvert_SurfToAnaSurf
2022-07-19 21:20:53 +03:00
atychini
411ad1a819 0033055: Data Exchange, RWPly_Provider - remove dependency from BRepLib_PointCloudShape
Removing PointCloud writing feature from the RWPly_Provider class.
Getting rid of Pointcloud-related parameters in the RWPly_ConfigurationNode.
2022-07-18 07:32:54 +03:00
kgv
bbf49a300c 0033066: Visualization - null pointer dereference in MeshVS_ElementalColorPrsBuilder::Build() function
Added missing Boolean flag check.
2022-07-15 18:23:06 +03:00
ona
0bab2704ae 0031080: Data Exchange, STL reader - improve API for reading multi-domain STL files
reading of multidomain stl files into separate Poly_Triangulation objects
2022-07-15 18:22:10 +03:00
azv
33c8a72788 0031479: Modeling Algorithms - exception on geometry transformation of triangulation-only shapes (without geometry surface)
* Avoid crash in BRepBuilderAPI_GTransform algorithm. The crash in BRepBuilder_Transform has been solved by 0032716.
* Move copying modifier to BRepTools package.
* Implement copying of triangulation in BRepTools_NurbsConvertModification.
* Implement transformation of a triangulation in BRepTools_GTrsfModification.
* Update test case bugs/mesh/bug22778 to clean the triangulation after conversion to NURBS (reproduce the same behavior as before).
2022-07-08 19:30:13 +03:00
abulyche
315ed0be41 0032716: Modeling Algorithms - BRepBuilderAPI_Transform discards triangulation
* Implement methods for copying tessellation to BRepTools_TrsfModification to keep the triangulation during transformation.
* Add tests to reproduce the problem.
2022-07-08 19:30:13 +03:00
azv
d74b1e9dd3 0033049: Command 'tclean -geom' does not remove all geometric objects from the shape
Remove unused P-curves when cleaning the geometry
2022-07-08 19:30:12 +03:00
ifv
b47b075ac5 0032995: Modeling algorithms - Interface for checking canonical geometry
GeomConvert_CurveToAnaCurve, GeomConvert_SurfToAnaSurf - geometrical algorithms
for converting geometrical curve and surfaces in canonical geometry with given tolerance.

ShapeAnalysis_CanonicalRecognition - interface for checking canonical geometry.
2022-07-08 19:26:37 +03:00
kgv
7a52478f16 0032952: Coding Rules, Graphic3d_DisplayPriority - rename inconsistent Below2/Above1 enties
Below/Below2/Below3 triplet has been renamed to Below/Below1/Below2
for consistency with Above/Above1/Above2
2022-07-07 19:28:28 +03:00
kgv
9db675b3d6 0033056: Visualization - add front face culling option
Added Graphic3d_TypeOfBackfacingModel_FrontCulled enumeration value.
OpenGl_Context::SetFaceCulling() now supports GL_FRONT in addition to GL_BACK.

Added -faceCulling option to vaspects Draw command.
2022-07-07 19:27:17 +03:00
aml
e1d576bf31 0033046: Modeling algorithms - improve performance of per-facet shape construction
Add new class (BRepBuilderAPI_MakeShapeOnMesh) to reconstruct shape from triangulation on per-facet basis.
2022-07-07 19:26:22 +03:00
ifv
e1f7382910 0028243: Bad result of the canonical recognition
LProp/LProp_CLProps.gxx - minor modification to avoid floating overflow because of multiplication of large values
2022-07-07 19:23:55 +03:00
kgv
dee5eb82b5 0033054: Configuration - link errors due to missing references to new TKXDE toolkit
src/OS/DataExchange.tcl - added missing new toolkits.
TKRWMesh - added missing reference to TKTopAlgo (for using BRepLib_PointCloudShape).
Removed redundant dependency from TKBinXCAF.
DRAWEXE - added missing references for a static build.

THE_CONFIGURATION_SCOPE definition has been corrected to postpoine calling constructor till the first variable usage.
Fixed compiler warning at SelectMgr_Frustum<3>::DumpJson() due to misleading Standard_EXPORT for an inline template method definition.
2022-07-07 19:23:00 +03:00
aml
c2eed2a326 0033048: Foundation Classes - math_ComputeKronrodPointsAndWeights indexation goes beyond the limit
Add test and explanatory comment.
2022-07-06 19:16:55 +03:00
ichesnok
3a2ca49b6d 0032867: Data Exchange - Implement Draco compression for writing glTF
Draco compression added in RWGltf_CafWriter class.
2022-07-06 19:15:56 +03:00
dpasukhi
4f53e7b37c 0033011: Data Exchange - Backward compatibility XBF format
Fixed problem with moving the attribute position.
Made the same positions as version 7.5 with adding to the end.
2022-07-04 18:58:05 +03:00
ona
e01ce0cd52 0029854: XCAF GD&T: Clear contents of reserved labels only
Clear attributes from reserved child labels only
2022-06-30 19:33:37 +03:00
ona
34c407eb34 0029415: Data Exchange - Step reader cannot read the surfaces of the main body of the shape
Test for model reading check is added
2022-06-30 19:33:37 +03:00
aml
ef4e5e3bf1 0033040: Coding - get rid of unused headers [Storage to TopOpeBRepTool] 2022-06-30 19:33:36 +03:00
mgerus
ca1491f88b 0030398: Modeling Algorithms - thrusection produces twisted solid
Change FirstBary to PrevBary to correct Offset calculation relative prev wire instead of first wire
2022-06-30 19:33:35 +03:00
akaftasev
b284dc42dc 0032446: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine
Added test case
2022-06-30 19:33:35 +03:00
akaftasev
a0ffd4a521 0032445: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine
Added test case
2022-06-30 19:33:35 +03:00
jgv
07e803dee1 0032999: Modeling Algorithms - New option in ShapeUpgrade_ShapeDivide algorithm: splitting into N parts, into N*M parts
1. Multiple changes in ShapeUpgrade_ShapeDivideArea, ShapeUpgrade_FaceDivide, ShapeUpgrade_FaceDivideArea, ShapeUpgrade_SplitSurface, ShapeUpgrade_SplitSurfaceArea: new methods NbParts and SetSplittingByNumber, changes in ShapeUpgrade_FaceDivideArea::Perform and ShapeUpgrade_SplitSurfaceArea::Compute concerning new modes of splitting.
2. New Draw command "DT_SplitByNumber" for testing new modes of splitting.
3. New subgroups "split_number" and "split_two_numbers" in the group of tests "heal" for testing new modes of splitting.
2022-06-30 19:33:34 +03:00
aml
ec2d883e53 0033041: Coding - get rid of unused headers [TopTools to Xw] 2022-06-30 19:33:34 +03:00
oan
1593d38b13 0032692: Mesh - In BRepMesh_ModelPreProcessor avoid crashes with problematic topology
Improved the processing for the case where Failure flag for the meshing face is set. Specific tests added.
Check triangulation consistency even for shapes with problematic topology given that they are suitable for keeping it.
2022-06-29 21:32:45 +03:00
atychini
aaa03c1efb 0033029: Warning on Windows 32 and 64 with VC14 after the integration of ticket 32821
Warning has been fixed by adding condition.
2022-06-29 21:32:45 +03:00
aml
b2bce1d928 0033039: Coding - get rid of unused headers [StepData to StlAPI] 2022-06-28 20:23:23 +03:00
azv
581016faeb 0033028: Standard_ConstructionError while using ShapeUpgrade_UnifySameDomain
Additional check if the sequence of circular edges is a closed chain.
2022-06-28 20:22:28 +03:00
aml
6bf38f219b 0033025: Coding - get rid of unused Standard_TooManyUsers class 2022-06-27 07:02:50 +03:00
azv
63fa56bc83 0032915: Geom2dAPI_InterCurveCurve, The algorithm lost an intersection point.
Get rid of strange code: preliminary check of self-intersections is made on a polygonal representation of a curve, it is able to find possible intersections, but after that it filter out segments neighbor to the pair of non-intersected segments.

Test case de step_4 I1 has been marked BAD, because the self-intersection is treated correctly, but the projection algorithm generates such crooked 2D curve.

Reference data in test cases heal split_angle_advanced ZA5 and ZA6 has been updated, because those shapes have self-intersected edges, which are being detected now.
2022-06-23 20:40:07 +03:00
mgerus
a29bae45f9 0032877: Modeling algorithms - Sweeping issue
Add fix at sweeping algorithm: sweeping happens in the opposite direction as expected
Add test case tests/bugs/modalg_7/bug32877
2022-06-23 20:37:37 +03:00
atychini
6d1a049be7 0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files
Implementing DE_Wrapper and its formats
2022-06-23 20:29:00 +03:00
aml
b1970c8a47 0033022: Coding - get rid of unused headers [ShapeBuild to STEPControl] 2022-06-22 19:26:41 +03:00
mpv
f8c45c2f0d 0032894: Application Framework - Regressions on Ubuntu 20.04
Updated corrupted file reading error management, make memory unit-tests more stable.
2022-06-20 17:45:27 +03:00
aml
94748ad20e 0032653: Modeling Data - misprint in Geom2d_Conic.hxx api SetYAxis(const gp_Ax2d& theAY)
Fix misprint.
2022-06-17 19:28:07 +03:00
aml
2e0b684df3 0033019: Coding - get rid of unused classes 2022-06-15 20:46:16 +03:00
aml
a1f027b66e 0033018: Coding - get rid of unused headers [Plugin to ShapeAnalysis] 2022-06-15 20:41:12 +03:00
kgv
88ff1a3834 0033016: Documentation - Draw Harness User Guide mentions removed commands 'meshdispmode'
Updated description of MeshVS commands in User's Guide.
2022-06-14 21:52:44 +03:00
akondrat
fb30026cf1 0033009: Foundation Classes - Bnd_OBB::ReBuild() expects point array starting from 0
Add test. Update OBBTool constructor for any bounds of array of points.
2022-06-14 21:50:31 +03:00
snn
714fb6b516 0032954: Tool for applying transformation to OCAF document
New XCAFDoc classes:
- XCAFDoc_AssemblyIterator: iterator in depth along the assembly tree
- XCAFDoc_AssemblyGraph: assembly graph with iterator
- XCAFDoc_AssemblyTool: provides generic methods for traversing assembly tree and graph

A method for re-scaling (sub-)assembly geometry is added to XCAFDoc_Editor.

New DRAW commands:
- XDumpAssemblyTree: iterates through the assembly tree in depth up to the specified level, if any
- XDumpAssemblyGraph: prints assembly graph structure
- XDumpNomenclature: prints number of (sub-)assembly/part instances
- XRescaleGeometry: applies geometrical scale to (sub-)assembly
2022-06-10 18:56:40 +03:00
aml
bf8b7e08f1 0030492: Foundation Classes - math_BFGS fails if starting point is exactly the minimum
Fix affects BFGS optimization methods by checking convergence as the first step on each iteration. FRPR works well, but it is updated as well since its logic potentially dangerous.
2022-06-09 20:34:57 +03:00
Charlemagne Lasse
24e4b3c83b 0032929: Modeling Algorithms - Crash in PerformIntersectionAtEnd after deletion of surfdata
When creating a fillet, num is calculated via ChFi3d_IndexOfSurfData. If it
returns just the number of entries in surfdata, it can happen that this
value becomes invalid when handling the case "two faces common to the edge
are found". When both components are on an arc, there will be num removed
from the surfdata.

num would then be larger than the number of entries surfdata. The derived
num1 is therefore also incorrect. The subsequent usage of this
value will either:

* Debug build: cause an out of bounds exception in ChangeValue
  (`SeqFil.ChangeValue(num)`)
* Release build: cause a segfault when retrieving it via index num1
  (`SeqFil(num1)`)

num + num1 must be recalculated after the deletion happens to correctly
calculate the fillet.

Signed-off-by: Charlemagne Lasse <charlemagnelasse@gmail.com>
2022-06-03 17:51:01 +03:00
Charlemagne Lasse
10a19b2a75 0032930: Modeling Algorithms - Crash in PerformIntersectionAtEnd when no face was found
The PerformIntersectionAtEnd code is currently not handling all the faces
correctly. If it retrieves Face[0] as F, it can happen that the previously
ran code didn't actually retrieve any faces in this array at all.

For example when:

* "if (nface==3)" is true
  - "if (!findonf1)" is true (doesn't assign any faces to this array)
  - "if (!findonf2)" is true (doesn't assign any faces to this array)
  - "if (state == ChFiDS_OnSame)" is not true (because it is
    ChFiDS_AllSame)
  - "if (findonf1 && !isOnSame1)" cannot be true (see above, but would
    handle faces)
  - "if (findonf2 && !isOnSame2)" cannot be true (see above, but would
    handle faces)
  - "if (isOnSame2)" is false (but would also handle faces)

Since no faces were assigned here, F would be a NULL face. As result, the
function will crash when trying to access the Surface behind the face via
`BRep_Tool::Surface(F);`.

While the best approach would be to identify the implementation bug in the
algorithm behind PerformIntersectionAtEnd, a check + exception is used
instead because the actual algorithm is not known.

Signed-off-by: Charlemagne Lasse <charlemagnelasse@gmail.com>
2022-06-03 17:48:22 +03:00
Charlemagne Lasse
d30f25e6b1 0032931: Modeling Algorithms - Crash in ChFi3d_IsInFront when no face was found
The ChFi3d_IsInFront code is currently not handling all the combinations
correctly. For example, if `if(fd1->IndexOfS2() == fd2->IndexOfS2())` is
true, it can happen that the `TopoDS::Face(DStr.Shape(fd1->Index(jf1)))`
returns a Face with entity == NULL. The subsequent usage of this NULL face
in `BRep_Tool::Parameters( Vtx, face )` will then cause a segfault.

While the best approach would be to identify the implementation bug in the
algorithm behind PChFi3d_IsInFron, a check + exception is used instead
because the actual algorithm is not known.

Signed-off-by: Charlemagne Lasse <charlemagnelasse@gmail.com>
2022-06-03 17:46:28 +03:00
snn
cec41bb93d 0030024: Data Exchange - STEP, IGES export support of BRep shapes based on tessellated geometry
Support of reading and writing tessellated geometry is added for the following STEP entities:
- triangulated face
- complex triangulated face
- tessellated shell
- tessellated solid
- tessellated shape representation

Models without BRep geometry (mesh formats like STL, OBJ and so on) are supported for writing to STEP.

New parameters are added to enable/disable tessellated geometry reading and writing:
- read.step.tessellated (On/Off/OnNoBRep) (On by default)
- write.step.tessellated (On/Off/OnNoBRep) (OnNoBRep by default)

OnNoBRep - tessellation is read/written only for entities for which there is no BRep representation.

Faces with poly triangulation are written in STEP as triangulated face entities with one coordinates list per face.
Only one poly triangulation per face (returned by BRep_Tool::Triangulation) is written to STEP.
2022-06-03 17:44:17 +03:00
kgv
e9c43fee29 0032989: Data Exchange, RWGltf_CafReader - fill in metadata map from asset.extras 2022-05-31 19:26:25 +03:00
kgv
812afe4edb 0032991: Visualization, TKOpenGl - OpenGl_Window::Resize() ignores window virtual flag on macOS
Added handling of Aspect_Window::IsVirtual() flag on macOS platform.
2022-05-30 20:47:07 +03:00
kgv
48e4aad412 0032990: Configuration - compilation errors since Emscripten 3.1.11 due to time_t redefined long->int
Add std::is_same filter to IsEqual(time_t, time_t) definition.
2022-05-29 12:11:24 +03:00
afokin
23c56fc66a 0032974: Configuration - update environment for VS2022
removing a repeating condition in install.bat

add vc143 in .md files
2022-05-27 19:05:24 +03:00
akaftasev
795c0d5d73 0032447: BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine
Added new option '-C' with possibility to set value of Angular and linear tolerances to 'mksweep' command to correct input spine by merging smooth connected neighboring edges
2022-05-27 18:21:34 +03:00
akaftasev
fbf9efb8d5 0025309: Modeling Algorithms - Check of shape validity for BOP takes too long
Simplified condition to allow sampling for curve/surface data with depth == 0
Changed sorting method in MergeSolutions() method
2022-05-27 18:14:04 +03:00
atereshi
9b9aac4a7b 0032922: Data Exchange, STEP - The torus is stored incorrectly in STEP format
Problem: the complete surface of the torus is not stored correctly in STEP format due to the fact that the edges are not properly ordered.
Change: added a mode for reordering edges in the wire with simultaneous use of 2d and 3d information (ShapeAnalysis_WireOrder). The new mode is used for torus-like surfaces before saving to STEP format.
 Result: Torus correctly stored.
2022-05-27 18:14:03 +03:00
kgv
86d6c284c2 0032978: Visualization - AIS_ViewController::PickPoint() includes objects invisible in current View
SelectMgr_ViewerSelector::TraverseSensitives() now takes into account object's view affinity.
AIS_InteractiveContext::moveTo() - dropped code SelectMgr_AndOrFilter::SetDisabledObjects()
as filtering is now done by selector itself.

ViewAffinity property has been moved to PrsMgr_PresentableObject for simplicity.
Removed redundant map Graphic3d_CView::HiddenObjects().
2022-05-21 17:25:43 +03:00
ifv
84d39c06fa 0032973: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape compared with 7.5
BRepExtrema/BRepExtrema_ExtCF.cxx - set correct using BRepAdaptor_Curve in Extrema
tests/bugs/modalg_8/bug32973 - new test case added
2022-05-18 19:18:52 +03:00
mgerus
df69c26472 0026697: BRepFeat_MakePrism returns empty compound
Add fix in direction of prism calculation
2022-05-18 19:14:43 +03:00
kgv
b56df3a60a 0032976: Visualization - AIS_InteractiveContext::FitSelected() includes objects invisible in current View 2022-05-17 20:15:55 +03:00
kgv
dcbd679c8b 0032975: Visualization, TKOpenGl - do not blit inactive Subview 2022-05-17 20:13:42 +03:00
aml
b9280b8b27 0032969: Coding - get rid of unused headers [IMeshData to PLib]
Removed unused exception classes OSD_Exception_FLT_DIVIDE_BY_ZERO, OSD_Exception_INT_DIVIDE_BY_ZERO, OSD_Exception_FLT_DENORMAL_OPERAND, OSD_Exception_FLT_INEXACT_RESULT, OSD_Exception_FLT_INVALID_OPERATION, OSD_Exception_FLT_OVERFLOW, OSD_Exception_FLT_STACK_CHECK, OSD_Exception_FLT_UNDERFLOW.
2022-05-17 20:09:12 +03:00
mgerus
2052b04e5b 0032807: Modeling Algorithms - Bad result of sweep operation when the UEdges has more than one intersect points
Add choosing the intersect point taking into account the tangentCross when prev UEdge and next UEdge has more than one intersect points;
Add exact correction of edge tolerance (it fix problems with edge tolerance on Linux);
Add exact check of edge tolerance in testcase
2022-05-16 21:08:21 +03:00
kgv
6036998511 0032970: Visualization, TKOpenGl - fix compilation on Linux: 'False' was not declared 2022-05-15 01:11:06 +03:00
ifv
33463eef63 0032942: Modeling Algorithms - Boolean operation Common has no result in specific example
IntTools/IntTools_BeanFaceIntersector.cxx - calculation of deflection for surface bnd box is added
tests/bugs/modalg_8/bug32942,bug32943,bug32944,bug32945 - new test cases added
2022-05-06 00:44:14 +03:00
abulyche
84f42008b7 0027081: BRepOffsetAPI_MakeOffsetShape fails on shapes with internal edges
Added the test for this problem.
Added new draw command "mkoffsetshape".
2022-05-06 00:43:27 +03:00
kgv
cb6c7c458c 0032955: Draw Harness, ViewerTest - extend vcolorconvert command to print color in hex format 2022-05-06 00:42:12 +03:00
aml
d2c11b791c 0032961: Coding - get rid of unused headers [IGESAppli to IGESToBRep] 2022-05-06 00:41:19 +03:00
ddzama
73035770f6 0032908: Coding Rules - fix E0349 MSVC compilation error on VS2019/C++20
Get rid of raw C strings in error code to avoid error 0349.
Use std::string instead.
2022-05-04 21:12:54 +03:00
ddzama
1966e6af07 0032919: Coding Rules - suppress useless MSVC warning C26812 on VS2019/C++20 (prefer 'enum class' over 'enum')
CMake and genproj scripts have been updated to suppress this misleading warning that cannot be fixed without breaking existing API.
2022-05-04 21:11:11 +03:00
aml
5dd4cb6e60 0032958: Coding - problem compile OCCT on Debian80-64 and MacOS-x86_64 with debugging mode
Add missing include.
2022-05-04 21:10:02 +03:00
aml
034d1403b1 0032953: Coding - add missing references where applicable 2022-05-04 21:08:16 +03:00
kgv
267738fc40 0032959: Visualization, OpenVR - add Oculus Touch controller bindings 2022-05-04 12:55:59 +03:00
ddzama
e976df2329 0032920: Coding - fix checking of std::stringstream buffer size on VS2019/C++20
Use tellp() instead of in_avail() for testing non-empty std::stringstream state.
2022-04-30 13:22:46 +03:00
aml
82598ec0f2 0032951: Coding - get rid of unused headers [GeomConvert to IGESBasic] 2022-04-29 18:09:58 +03:00
ddzama
7b3f255f23 0032917: Coding Rules - eliminate MSVS warning C26440 on VS2019/C++20 (If your function may not throw, declare it noexcept)
Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Get rid of warning C26440: "If your function may not throw, declare it noexcept"

"If code is not supposed to cause any exceptions,
it should be marked as such by using the 'noexcept' specifier.
This would help to simplify error handling on the client code side,
as well as enable compiler to do additional optimizations."
2022-04-29 18:09:00 +03:00
ddzama
4e1b5fcbf0 0032903: Coding Rules - eliminate MSVC warning C26451 on VS2019/C++20
Put explicit type casting to avoid:
Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte
value and then casting the result to a 8 byte value.
Cast the value to the wider type before calling operator '-' to avoid overflow (io.2).
2022-04-27 00:59:45 +03:00
ddzama
9416ba5fb0 0032907: Coding Rules - eliminate MSVC warning C5054 on VS2019/C++20 (operator &,|: deprecated between enumerations of different types)
operator `&`,`|`: deprecated between enumerations of different types
2022-04-27 00:58:30 +03:00
snn
e9a13cf123 0032914: Data Exchange - Some parts of compound are lost while writing STEP in nonmanifold mode
Code related to supporting of single SDR for a non-manifold group, which prevents writing all translation results except the first one, is removed.
SDRs with null used representation object are excluded from writing.
2022-04-27 00:57:20 +03:00
ifv
a0b4fff17a 0028866: Modeling Data - Problem with GeomAPI_ProjectPointOnSurf
Extrema/Extrema_GenExtPS.cxx - adaptive setting of sample points is implemented
bugs/moddata_3/bug28866 - test case added
2022-04-22 18:51:27 +03:00
jgv
51db8cab7b 0032864: Modeling Algorithms - Normal projection of a wire on a cylinder produces wrong result
Minor correction in method BRepAlgo_NormalProjection::Build: correct mixed up first and last parameters of the projected curve.
2022-04-22 00:29:38 +03:00
ddzama
8af9bbd59a 0032906: Coding Rules - get rid of std::iterator inheritance (deprecated since C++17) 2022-04-22 00:27:47 +03:00
jgv
1f45f21358 0032721: Modeling Algorithms - BOP wrong results on a cone and an extrusion
1. Modify method IntPatch_ALineToWLine::MakeWLine: add correction of end points of each line on 2 surfaces if an end point is a pole on a surface.
2. Modify method IntPatch_WLine::ComputeVertexParameters: adjust a point on curve to corresponding vertex the following way: set 3D point as the point of the vertex and 2D points as the points of the point on curve.
2022-04-19 19:23:10 +03:00
ifv
d7f5072158 0032882: Modeling Data - Extrema curve/curve cannot find all solutions
Extrema/Extrema_GenExtCC.gxx - estimation of Lipchitz constant is improved
Extrema_GlobOptFuncCC.cxx - function value is changed

LocOpe/LocOpe_WiresOnShape.cxx - small correction to fix regression

lowalgos/extcc/bug32882 - new test case is added

some test were updated according new behavior of extrema algo
2022-04-19 19:20:12 +03:00
kgv
7090725e2b 0032935: Visualization, TKOpenGles - use size window within OpenGl_Window::init() 2022-04-19 19:18:42 +03:00
azv
d8bfee7b03 0031437: Modeling Data - Offset surface throws exception when trying to evaluate at singularity point
Add test case to prove the exception is avoided.
2022-04-16 22:29:47 +03:00
kgv
879768fbf2 0032886: Visualization, V3d_View - introduce interface for creating a subview
V3d_View/Graphic3d_CView pair has been extended to define subview within the other V3d_View instance.
The initialization is done in form of V3d_View::SetWindow() taking parent V3d_View instance on input.

Subview definition includes dimensions defined as a fraction of a parent view and offset from a corner.
This scheme allows splitting window into several subviews automatically occupying entire viewport,
like splitting window into two vertial subviews (100%x50% + 100%x50%),
three horizontal subviews (33%x100% + 30%x100% + 30%x100%),
1 + 2 stacked subviews (50%x100% + 50%x50% + 50%x50%),
as well as thumbnail-alike subviews displayed on top of another larger view.

OpenGl_View::Redraw() blits content of subviews into the window within immediate redraw step.

AIS_ViewController::FlushViewEvents() has been extended
to re-calculate mouse input into local subview coordinates.
AIS_ViewController::handleViewRedraw() first redraws subviews and then parent views.
Introduced new callback AIS_ViewController::OnSubviewChanged()
to switch input focus to another subview on mouse click,
implemented by ViewerTest_EventManager (has to be done at application level).

vinit command has been extended with parameters -subview and -parent to create a subview.
In addition, view dimension arguments now can be defined as a fraction of screen size instead of pixels.
2022-04-15 18:23:16 +03:00
atychini
179fb34661 0029435: Data Exchange - Exporting wires consisting of more than one edge results in loss of color data in IGES
Colors wasn't read correctly because of incorrect curve transfers in IGESToBRep_TopoCurve.cxx
I added new calls to SetShapeResult() at the necessary places.
Also in the IGESCAFControl_Writer.cxx I added new condition because of the possible NULL exception.
2022-04-15 18:21:46 +03:00
kgv
1caf5fd317 0032924: Configuration, CMake - export INTERFACE_INCLUDE_DIRECTORIES within targets
Add 'INCLUDES' property within INSTALL targets.
2022-04-15 18:20:01 +03:00
ifv
fc41d3b1c0 0032842: Modeling Data - a regression in conversion of a face to bspline
GeomConvert/GeomConvert_1.cxx - forbid using CheckAndSegment if trim is out of base period when converting
                                trimmed torus

tests/bugs/moddata_3/bug32842 - test case added
2022-04-12 20:50:29 +03:00
kgv
08d9c0ae45 0032926: Coding, StdPrs_ToolTriangulatedShape::Normal() - range of "for" not correspond to the NCollection index which run in "for"
Obsolete method has been removed.
2022-04-12 20:46:27 +03:00
ddzama
7021de2fe7 0032909: Coding Rules - replace (removed from C++17) std::random_shuffle with std::shuffle for random permutation algorithm
Since C++17 the accessible version of permutation function left the function:

template< class RandomIt, class URBG >
void shuffle( RandomIt first, RandomIt last, URBG&& g );

See details and example of use: https://en.cppreference.com/w/cpp/algorithm/random_shuffle
2022-04-08 19:04:34 +03:00
ddzama
e455c54bf0 0032918: Coding Rules - suppress MSVS warnings from 3rdparty rapidjson on VS2019/C++20
Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Disable warning messages, occures in rapidjson library.
2022-04-08 19:02:14 +03:00
ddzama
d31e5dbbb4 0032916: Coding Rules - eliminate MSVS warning C26451 on VS2019/C++20 (Arithmetic overflow: Using operator '+' on a 4 byte value...)
Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Get rid of `Warning C26451 Arithmetic overflow: Using operator '+' on a 4 byte value
and then casting the result to a 8 byte value.
Cast the value to the wider type before calling operator '+' to avoid overflow (io.2)`
2022-04-08 18:55:02 +03:00
ddzama
878ea8cd2b 0032910: Coding Rules - fix uninitialized class fields in constructor initialization block reported by VS2019/C++20
Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Get rid of warnings about uninitialized class fields in constructor initialization block.
2022-04-08 18:52:41 +03:00
azv
ee6581adbe 0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0
Use precision depending on radii of participating circles.
2022-04-08 18:50:30 +03:00
mpv
1fff4ad5a7 0032870: Tests - bugs/caf/bug31918_1 is unstable
# Make the compared values more stable.
2022-04-07 19:21:40 +03:00
azv
a793b75e21 0032809: Sweep algorithm with Round Corner mode failed
Fix indentation within GeomFill_Sweep.cxx

0032809: Sweep algorithm with Round Corner mode failed

Add fix what repair shipping at corner after circle edge at path
Add fix test for bug 24909_3
2022-04-07 19:20:09 +03:00
kgv
5078d0d84e 0032912: Visualization - crash when displaying an OBJ file with missing texture file
Fix NULL dereference within Graphic3d_TextureRoot::convertToCompatible() due to wrong order of checks.
2022-04-06 22:58:16 +03:00
azv
ad3825f821 0030160: DBRep_IsoBuilder builds wrong isolines for planar faces
Add test case
2022-04-06 03:20:38 +03:00
AndreyLA
fe12f15cb4 0024657: 2dintersect returns different number of intersect points in curve intersecting the polygon points is never replaced by line
Test for 2d intersection is added
2022-04-06 03:19:45 +03:00
mgerus
b2ec2f5d42 0031361: Modeling algorithms - An exception arise when building tube
* Add status flag to GeomFill_Pipe
* Add myIsPerform flag to GeomFill_Pipe
* Add checking vectors in GeomFill_CorrectedFrenet
* Add boolean return to SetCurve virtual methods
* Add test case
2022-04-06 03:17:55 +03:00
sshutina
e3fd3d83da 0032861: Visualization - Separate rotate and move the object behavior in AIS_ViewController
Added the flag in Dragging structure that defines perform dragging (ToMove).
2022-04-06 03:16:12 +03:00
ifv
1f37f1d50a 0031661: Modeling Data - Exception when projecting parabola or hyperbola to plane
ProjLib/ProjLib_ProjectOnPlane.cxx - formatting

0031661: Modeling Data - Algorithm crashes when projecting parabola or hyperbola to plane

ProjLib/ProjLib_ProjectOnPlane.cxx - building of analytical parabola and hyperbola is added
bugs/moddata_3/bug31661_* - new test cases are added
2022-04-06 03:15:07 +03:00
AndreyLA
1f000e5974 0031009: Modeling Algorithms - leak reported by Clang address sanitizer in IntCurvesFace_ShapeIntersector
Refactor IntCurvesFace_ShapeIntersector. Use handles and std::unique_ptr instead of raw pointers.
2022-04-06 03:13:47 +03:00
kgv
2491eec38b 0032897: Tests - include elapsed time into test log
Added "ELAPSED TIME" to test case log.
Improved syntax of chrono/dchrono command:
added -elapsed, -userCPU, -sysCPU options printing individual values in seconds.

OSD_Chronometer::IsThisThreadOnly() - added missing accessors to the property.
2022-03-31 21:49:12 +03:00
abulyche
ab279b126b 0029745: Modeling Data - GeomAdaptor_Surface::VIntervals fails on periodic surfaces
Fixed GeomAdaptor_Curve::LocalContinuity() for periodic curves.
Fixed GeomAdaptor_Curve::NbIntervals() for periodic curves.
Fixed GeomAdaptor_Curve::Intervals() for periodic curves.
Improved definition of length in tests.
Update Geom2dAdaptor_Curve to the same behavior.
2022-03-31 21:47:58 +03:00
azv
e4753a7d16 0032863: Cone surface returns wrong v derivative
* Fix error on computing V first derivative on a cone (take into account the slope of the conical generatrix).
* Add DRAW command 'sderivative' to compute certain derivative on a surface.
2022-03-25 20:13:38 +03:00
knosulko
5ae6f08cc6 0024772: Modeling Algorithms - Intersection of cylinder and cone produces incorrect results
GeomInt/GeomInt_IntSS.cxx - handle flat cone case
IntPatch/IntPatch_Intersection.hxx, IntPatch/IntPatch_Intersection.cxx - method for preparing surfaces is added
bugs/lowalgos/intss/bug24772 - test case is changed according new behavior
2022-03-24 19:56:56 +03:00
azv
9b337ad8e5 0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0
Improve tolerance criteria to check values of extremas for equality: use multiplier, which depends on the value, instead of magic number
2022-03-21 19:11:50 +03:00
AndreiLA
3425e83f4b 0023820: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces
The tests are added to verify the correctness of the projection algorithm's work in two cases.
2022-03-21 19:08:57 +03:00
mpv
e720157864 0032442: Application Framework - Problems of testing on MacOS arm64 platform
Fixed the problem of reading XML files on MacOS. 'errno' was not reseted
even the 'strtol' function produced a good value. So, now it is erased
forcibly before the call.
2022-03-18 17:53:47 +03:00
atychini
452ba192d5 0032817: Data Exchange - Step export - writing untrimmed Curve
Incorrect curve handling.
If curve doesn't have trims and vertexes, we handle it such as trimmed curve, but it should be a simple curve.
Curves with only one vertex and one trim should handle by another way, such as a curve that has trims but doesn't have vertexes.
So I added conditions which handles these cases
2022-03-17 18:44:06 +03:00
azv
9140163ba8 0032066: Modeling Algorithms - Incorrect result of Boolean CUT operation
Do not limit the normalization factor of the highly anisotropic parametric space when filtering start points in the algorithm of walking line construction.
Additionally check the knots are in the increasing orders when merging two B-spline curves
2022-03-17 18:42:34 +03:00
mpv
7573a45deb 0032870: Tests - bugs/caf/bug31918_1 is unstable
Improved the test stability: created 10 iterations of measurements and take the minimum to
minimize the affect of other processes and threads; increased the compare range of
the quarter and the whole of the document load.
2022-03-14 19:25:14 +03:00
jgv
802180e1a5 0032719: Modelling Algorithms - UnifySameDomain result has incorrect triangulation
Correct method ShapeUpgrade_UnifySameDomain::UnionPCurves: reparametrize unified pcurves to fit the new range of 3D-curve.
2022-03-14 19:24:17 +03:00
kgv
8ca58a51a7 0032866: Visualization, TKOpenGles - FitAll() is broken when performance counters are displayed
OpenGl_View::MinMaxValues() - added missing theToIncludeAuxiliary check.
2022-03-07 02:13:22 +03:00
vro
acce2c1448 0032796: Modeling Data - Calculation of distance between two circles crashes
Modified:
- Extrema_ExtCC.cxx, the method PrepareParallelResult() - angular tolerance is increased.

Added:
- A test: lowalgos extcc bug32796
2022-03-05 17:33:56 +03:00
kgv
633084b809 0032862: Visualization, Graphic3d_TextureMap - add 3D texture definition
Image_PixMap has been extended to support definition of 3D bitmap (as an array of 2D slices).

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

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

Added Graphic3d_Texture3D class.
vtexture - added argument -3d for uploading 3D texture.
2022-03-05 17:31:39 +03:00
kgv
a9e5f65041 0032837: Documentation, Geom_Surface - add references to GeomLib::NormEstim() for Normal computations
References to GeomLib::NormEstim() have been put to Geom_Surface, Adaptor3d_Surface and BRepAdaptor_Surface.
Improved documentation of GeomLib::NormEstim().
2022-03-03 20:09:35 +03:00
kgv
b9a372bbcd 0032841: Visualization - add 16-bit grayscale pixel format to Image_PixMap
Added Image_Format_Gray16 pixel format definition, which could be uploaded into GL_R16 texture.
Added Image_Format_GrayF_half mapped to GL_R16F texture.
2022-03-03 20:07:53 +03:00
kgv
b5204c6c37 0032860: Coding Rules, Extrema_GenExtPS - add exported destructor
Added eplicit destructors to classes Extrema_GenExtCS, Extrema_GenExtPS and Extrema_GenExtSS.
2022-03-03 20:06:50 +03:00
kgv
75e2ba1695 0032856: Configuration, CMake - SONAME should include minor version in addition to major to reflect ABI compatibility
Added option BUILD_SOVERSION_NUMBERS to manage SOVERSION length.
Default option value is set to 2 (major.minor) instead of previously used 1 (major),
excluding Android/Emscripten/Windows platforms that use 0 by default.
2022-03-01 19:22:48 +03:00
ifv
5c48956f8e 0032849: Modeling Algorithms - Intersection algorithm returns incomplete result.
GeomInt/GeomInt_IntSS.cxx, IntTools/IntTools_FaceFace.cxx - setting deflection 0.01
for case of two bspline surfaces
IntPolyh/IntPolyh_Intersection.cxx, IntPolyh/IntPolyh_Intersection.hxx - status IsParallel is added

BndLib/BndLib_Add3dCurve.cxx, IntTools/IntTools_TopolTool.cxx - fix small bugs

Correction of test scripts according to current behavior of algorithms

lowalgos/intss/bug32849 - test case added
2022-03-01 18:57:09 +03:00
kgv
b9184c2714 0032834: Configuration, CMake - DESTDIR ignored for OpenCASCADECompileDefinitionsAndFlags-${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake
Replace redundant configure_file() with normal file copy for installing OpenCASCADECompileDefinitionsAndFlags- files.
2022-02-26 21:52:21 +03:00
kgv
e61aa824db 0032854: Documentation - minor clean-up of User Guide for XDE module
Applied minor formatting improvements to `xde.md`.
Fixed small misprints and artifacts in text.
Removed redundant section "Working with XDE".
2022-02-25 18:10:52 +03:00
vro
5a846a5d2c 0029219: Application Framework - XML document is written with CRLF on Windows
The last symbol of a line is synchronized with external products.
Also, XML ends by LF now.

Modified:
XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF
BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF
STEP: StepSelect_WorkLibrary::WriteFile() ends by LF
IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF
VRML: VrmlAPI_Writer::write_v2() ends by LF

0029219: Application Framework - XML document is written with CRLF on Windows

The last symbol of a line is synchronized with external products.
Also, XML ends by LF now.

Modified:
XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF
BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF
STEP: StepSelect_WorkLibrary::WriteFile() ends by LF
IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF
VRML: VrmlAPI_Writer::write_v2() ends by LF
STL: RWStl::WriteAscii() ends by CR LF (to synchronize with Blender)

0029219: Application Framework - XML document is written with CRLF on Windows

The last symbol of a line is synchronized with external products.
Also, XML ends by LF now.

Modified:
XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF
BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF
STEP: StepSelect_WorkLibrary::WriteFile() ends by LF
IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF
VRML: VrmlAPI_Writer::write_v2() ends by LF
2022-02-22 20:25:47 +03:00
vro
b91e601442 0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux
The code is simplified - it checks the last character and if it is a folder separator, it removes it.

Modified file:
- CDF_Store.cxx, the method SetFolder().

0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux

The code is simplified - it checks the last character and if it is a folder separator, it removes it.

Modified file:
- CDF_Store.cxx, the method SetFolder().

0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux

The code is simplified - it checks the last character and if it is a folder separator, it removes it.
// Also, variable 'l' is renamed to 'aLen'.
// And a check on the number of characters is added to avoid removal of the root folder ('/').

Modified file:
- CDF_Store.cxx, the method SetFolder().
2022-02-22 20:23:29 +03:00
knosulko
cfde7eebb3 0024418: Modeling Algorithms - Wrong section curves when intersecting analytical surfaces
IntPatch_ALineToWLine.cxx - setting minimal number of points in a WLine depending on step size
IntPatch_WLineTool.cxx - fix WLines connecting check condition
test cases has been changed according to new behavior
2022-02-22 20:07:12 +03:00
jgv
600ee85631 0032814: Modeling algorithms - Unifysamedom produces invalid result
Minor correction in ShapeUpgrade_UnifySameDomain::IntUnifyFaces: correct collecting splitting vertices in the new wire
2022-02-18 18:29:10 +03:00
vro
8dee83b0f3 0032840: Application Framework, copying of a scaled shape fails
A flag not to raise an exception is set for a copying shape. A reason: if a shape is already in the model, the user should have an opportunity to copy it.

Modified files:
TNaming_CopyShape.cxx, the method Translate(). A false-flag is used on copying of location of the shape.
2022-02-18 18:27:59 +03:00
jgv
2d0dd76414 0032715: Modelling Algorithms - UnifySameDomain does incomplete union
Add the case of closed, smooth but not periodic surface (unification of faces lying on it if the flag "myConcatBSplines" is true - modify the underlying surface to make it periodic).
2022-02-17 21:45:44 +03:00
aml
08984eda3d 0032838: Coding - get rid of unused forward declarations (misc) 2022-02-17 21:42:56 +03:00
aml
b66cf6dae5 0032832: Coding - get rid of unused headers [FairCurve to GeomAPI] 2022-02-14 22:07:15 +03:00
Chris Hennes
f91202f3ee 0031585: Access Violation while creating fillet - ChiFi3d_Builder::PerformIntersectionAtEnd
There is one case in PerformIntersectionAtEnd that did not test whether
an array access exceeded the length of the array, in rare cases
resulting in a segmentation fault. That error-handling behavior is
replaced by the exception code used elsewhere in the function. For
consistency, the code is copied exactly as implemented elsewhere. This
code has the same effect as that proposed by the bug submitter.
2022-02-14 22:02:07 +03:00
kgv
072b4d382d 0032831: Documentation - drop misleading "FreeType 2.4.10 - 2.5.3" version range
Removed duplicating information about supported versions of 3rdparty libraries from `building_3rdparty.md`.
2022-02-14 22:00:32 +03:00
kgv
3d21fe1aee 0032827: Configuration - compilation error on Emscripten SDK 2022-02-10 20:40:38 +03:00
kgv
2922a73ea7 0032826: Data Exchange - use OSD_FileSystem within RWStl::ReadAscii() and StepFile_Read() 2022-02-10 20:39:28 +03:00
gka
e2d60d0f7f 0029325: Modeling Algorithms - add tool BRepLib_PointCloudShape for generation point cloud for specified shape
Added PLY writing tools RWPly_CafWriter and RWPly_PlyWriterContext.

Added tool BRepLib_PointCloudShape generating point cloud from shape in two ways:
- random points on surface with specified density;
- points from triangulation nodes.

StdPrs_ToolTriangulatedShape::ComputeNormals() has been moved to
BRepLib_ToolTriangulatedShape for reusing outside of AIS.

Command vpointcloud has been extended to use new generation tool.
Command writeply has been added to write triangulation or point set into PLY format.
2022-02-08 22:15:24 +03:00
oan
ae38730d35 0032813: Units: ToSI and FromSI return cached dimension from previous request when parsing of unit sentence is failed
Cache value only if all necessary preparation steps are done.
2022-02-04 19:25:58 +03:00
dpasukhi
e1f5ac2c9b 0032731: Data Exchange, Step Import - Incorrect PMI text location
Added new complex Entity for representation of PMI
Added moving the presentation with new entity
2022-02-02 18:25:36 +03:00
knosulko
0b6a0adb3a 0032767: Mesh - incorrect splitting of edges of seams leading to hang [since OCCT 7.4.0]
- fix step by parameter of the edge while split curve in case of seam edges
2022-02-02 18:23:59 +03:00
aml
59cfb82b02 0032810: Coding - missing Standard_EXPORT in Standard_ErrorHandler 2022-02-02 18:22:18 +03:00
aml
1eed3c7873 0032812: Coding - problem after integration 32806 2022-01-31 07:01:49 +03:00
aml
7109a4ae58 0032806: Coding - get rid of unused headers [Contap to Extrema] 2022-01-28 18:30:32 +03:00
atychini
ff77ee8103 0032748: Data Exchange, Step Import - xstep.cascade.unit doesn't work [regression since OCCT 7.6.0]
Added new condition in STEPControl_ActorRead::Transfer: if StepData_StepModel is not an initialized Unit - we set unit to this step model
2022-01-28 18:29:12 +03:00
kgv
223ae699c7 0032795: Documentation - clarify indexation range within Poly_Triangulation/Graphic3d_ArrayOfPrimitives classes 2022-01-25 21:56:45 +03:00
ifv
9eee5ab7e4 0032701: Modeling Algorithms - 2d curve has bending near the degenerated edge of the face
ApproxInt_Approx, ApproxInt_KnotTools, BRepApprox_Approx,
GeomInt_IntSS, IntTools_FaceFace:
  Analysis of curvature is added for adjusting ParametrizationType

IntPatch_Intersection.cxx - adding methods for estimation of UV max step depending on used surfaces

GeomInt_IntSS.cxx, IntTools_FaceFace.cxx - using methods for max step estimation

Approx_SameParameter.cxx - adding control against big values.

BOPAlgo_PaveFiller_6.cxx - adjusting position of faces before intersection
2022-01-25 21:54:13 +03:00
kgv
5614b1369a 0032783: Documentation - Doxygen 1.9.3 generates corrupted HTML for dox/samples/ocaf.md
Fix incorrect/fragile Markdown syntax in samples/ocaf and user_guides/modeling_data.
2022-01-19 20:07:55 +03:00
aml
33a4d46b28 0032781: Coding - get rid of unused headers [BRepCheck to ChFiKPart] 2022-01-19 20:05:46 +03:00
Dzmitry Razmyslovich
d7dac7fc36 0032784: BinXCAF fails to load documents containing the shapes with scaled/mirrored location
A flag not to raise an exception is used on reading of an XCAF document. If such a shape with scaling transformation is stored in the document, it should be read.
2022-01-19 20:01:14 +03:00
kgv
ba9548c55b 0032668: Documentation - add tutorial for creating a custom AIS Interactive Object 2022-01-18 21:46:09 +03:00
kgv
2275caec09 0032780: Visualization, TKOpenGl - add smoothing to row interlaced stereoscopic output
Added new option Graphic3d_RenderingParams::ToSmoothInterlacing enabled by default.
Added -smooth   option to vstereo command.
Added -dpiAware option to vinit   command (Windows).
2022-01-17 20:04:30 +03:00
kgv
ddb9ed4810 0032779: Visualization, TKOpenGl - support using a wide color window buffer format (10bit per component / 30bit RGB)
Added new flag OpenGl_Caps::buffersDeepColor disabled by default.
OpenGl_Window now tries to find a RGB10_A2 pixel format using wglChoosePixelFormatARB().
OpenGl_TextureFormat::FindSizedFormat() - added handling of GL_RGB10_A2 internal format.
OpenGl_View::SetWindow() now selects preferred FBO color format basing on parameters.
OpenGl_Context::DiagnosticInformation()/OpenGl_View::DiagnosticInformation() now include
information about window pixel format / FBO texture format.
2022-01-17 20:03:28 +03:00
isn
7073768338 0028642: BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections
1) BRepFill_Generator and BRepOffsetAPI_ThruSections now support 'non-destructive' mode for the input shapes (sections wires). The shape history of this algorithms also has been modified.
2) New test grids (based on the previous ones) have been added. These new cases use locked shapes as input arguments
3) The option '-safe' has been added to 'thrusections' command
2022-01-17 20:02:13 +03:00
achesnok
71943b31f8 0032722: Visualization, TKOpenGl - performance counters disappear at some camera viewpoints
Fixed OpenGl_FrameStatsPrs::Render() to enable depth clamping.
Fixed OpenGl_View::MinMaxValues() to take into account performance overlay.
2022-01-14 18:04:40 +03:00
emv
0101c6febe 0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode "Complete" join type "Intersection"
Add more faces for intersection in rebuilding process basing on the connection of the splits of offset faces (special treatment for the artificially invalid faces).
When rebuilding faces add vertices common for faces for trimming the new intersection edges.

Adjust existing and create new test cases.
2022-01-13 20:52:33 +03:00
kgv
dfa2a6719c 0032763: Coding Rules - eliminate CLang warning -Wbitwise-instead-of-logical in math_FunctionSetRoot.cxx 2022-01-13 20:51:37 +03:00
aml
9ff36dac47 0032768: Coding - get rid of unused headers [BopAlgo to BRepBuilderAPI] 2022-01-12 23:10:09 +03:00
kgv
7e524fcbe1 0032764: Coding Rules - missing include guard in BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx 2022-01-10 19:46:35 +03:00
kgv
d925497360 0032758: Visualization, TKOpenGl - disable shadow-map from transform-persistence objects
OpenGl_View::renderShadowMap() now skips transform-persistent objects.
OpenGl_ShadowMap::UpdateCamera() - removed redundant Z-range expansion for non-rendered objects.
Improved syntax of vdrawtext command.
2022-01-10 19:45:09 +03:00
vro
6cb968fd6f 0032757: Application Framework, scaling transformation - loading of an OCAF XML document fails
A flag not to raise an exception is used on reading of an OCAF document. If such a shape with scaling transformation is stored in the document, it should be read.

Modified files:
XmlMNaming\XmlMNaming_NamedShapeDriver.cxx: not checking of the type of transformation for a read shape
2022-01-10 19:43:48 +03:00
jgv
e2a956a633 0032747: Modeling Algorithms - Exact HLR algorithm gives wrong result
Modify the method IntWalk_IWalking::TestArretCadre: correct the value of scalar product of two vectors according to the tolerances in U and V.
2022-01-10 19:42:11 +03:00
achesnok
16a263dc17 0032606: Visualization - add a shader for sky V3d_View::BackgroundSkydome()
Introduced V3d_View::SkydomeAspect() property for generating skydome cubemap environment.
Skydome features: day/night cycle, 2 types of clouds, atmosphere, water surface, stars, fog.
2021-12-30 00:14:47 +03:00
asuraven
2ac4e1beee 0032744: Modeling Algorithms - Endless loop in GCPnts_UniformDeflection
fixed finish criteria in CPnts_UniformDeflection::Perform()
2021-12-28 19:23:48 +03:00
aml
2f23e4e3a5 0032751: Coding - get rid of unused headers [AppStd to BndLib] 2021-12-27 10:17:16 +03:00
emv
bcecb5832b 0032644: Modeling Algorithms - Empty result of section operation
Use distance criteria additionally to parameter criteria when verifying the extrema solution to belong to the edge boundary.
Refactor the BRepExtrema_DistanceSS class to remove the excessive methods with mirrored parameters.
2021-12-23 19:19:11 +03:00
aml
f32cb549d8 0032742: Coding - get rid of unused headers [Adaptor2d to Approx] 2021-12-20 18:11:59 +03:00
kgv
ce7fe22d97 0032743: Coding Rules - remove unused class friends of Package classes 2021-12-20 18:10:56 +03:00
kgv
1bc34debc1 0032740: Coding Rules, OpenGl_Context.cxx - new warning on macOS after integration fix for #32732 2021-12-19 12:29:47 +03:00
kgv
302ad26bff 0032739: Configuration, scripts - handle ABI list within macOS building script adm/scripts/macos_build.sh 2021-12-17 17:51:40 +03:00
kgv
90eac74988 0032738: Configuration, scripts - handle ABI list within iOS building script adm/scripts/ios_build.sh
Variables "toSimulator" and "anAbi" within "ios_custom.sh"
have been replaced by "anAbiList" which can be defined like "iPhoneOS|arm64 iPhoneSimulator|arm64".
Added "toPackFat" option packing multiple architectures into FAT archives.
2021-12-17 17:48:53 +03:00
kgv
4d476dd2ed 0032732: Visualization, TKOpenGl - do not include system headers within OpenGl_GlFunctions.hxx 2021-12-17 17:43:29 +03:00
kgv
f291ad2528 0032733: Coding Rules - fix misprints in Doxygen tags 2021-12-17 17:41:36 +03:00
ichesnok
468856bf4a 0032452: Data Exchange - IGES reader returns invalid shapes if xstep.cascade.unit property is changed from default
Fixed documentation in 'IGES Translator' and 'STEP Translator' sections (description of the read.maxprecision.val parameter).
2021-12-16 19:26:41 +03:00
kgv
2f195ab915 0032484: Configuration, CMake fails to find EGL and GLES2 include directory on iOS platform
Fixed configuration errors and compilation errors on iOS target due to unexpected EGL usage (non-existing on iOS).
2021-12-16 19:24:31 +03:00
ssafarov
6ba81a695f 0026174: Data Exchange, IGES - Loss of color after the second write of file
A copy of myface is made, where further on the copy the geometry changes. We connect the face, wire, edge of the original shape with the one whose geometry was changed. This is done in order to get the original shape in the TransferWire() and TransferEdge() methods.
2021-12-13 09:36:02 +03:00
kgv
e463b2f685 0032725: Visualization - Graphic3d_Structure::SetDisplayPriority() should use public enumeration Graphic3d_DisplayPriority
Added new enumeration Graphic3d_DisplayPriority.
Graphic3d_Layer now defines a fixed-length array of priorities.
Properties Graphic3d_CStructure::Id, Priority, PreviousPriority have been wrapped into methods.
2021-12-10 01:24:40 +03:00
kgv
e3dae4a9f3 0032723: Draw Harness, ViewerTest - sloppy animation in WebGL
Fixed emscripten_async_call() calls to use requestAnimationFrame() instead of setTimeout().
ViewerTest_EventManager::handleViewRedraw() - fixed queuing new onWasmRedrawView()
before previous one has been processed (leading to multiplying of pending redraws executed at the same time).
RWGltf_TriangulationReader::readDracoBuffer - suppressed CLang compilation warnings.
2021-12-10 01:23:40 +03:00
kgv
f4f9ce4b77 0032727: Coding Rules - eliminate CLang warning -Wshorten-64-to-32 in MessageView_ActionsTest.cxx 2021-12-09 01:28:36 +03:00
kgv
4af354e6ed 0032720: Coding Rules - rename glext.h to OpenGl_glext.h 2021-12-09 01:27:48 +03:00
kgv
8f7159cbaa 0032713: Visualization, OpenGl_GlFunctions - unify OpenGL and OpenGL ES function lists
Including system OpenGL headers has been moved from OpenGl_GlFunctions.hxx to OpenGl_GlNative.hxx.
Added OpenGl_GlTypes.hxx providing basic OpenGL 1.1 types.
Wrappers of system OpenGL 1.1 / OpenGL ES 2.0 functions have been moved to OpenGl_GlFunctions.cxx.
Avoided usage of global OpenGL functions in OpenGl package outside of OpenGl_GlFunctions.cxx.
2021-12-09 01:26:48 +03:00
kgv
bf2884afbe 0032724: Coding Rules, Graphic3d_Structure - remove unused property Graphic3d_Structure::ContainsFacet() 2021-12-09 01:25:41 +03:00
kgv
18c678759e 0032717: Modeling Algorithms - BRepBuilderAPI_Copy should not remove triangulation from surface-less faces
BRepBuilderAPI_Copy now ignores toCopyMesh flag for non-geometric shapes.
2021-12-09 01:22:28 +03:00
kgv
340b2327b6 0032718: Draw Harness, ViewerTest - fix misprint in vanim command description 2021-12-09 01:22:27 +03:00
kgv
7ce8fe052d 0032712: Visualization, OpenGl_Context.hxx - avoid including OpenGL headers 2021-12-07 22:32:15 +03:00
kgv
ccd3858e63 0032711: Coding Rules - new warning in AIS_Shape::Color() after integration fix for 0032704 2021-12-07 22:32:14 +03:00
knosulko
4ec4e4e8a8 0030272: Modeling Algorithms - Incorrect work of gproject
-fix TolU/V for approximation;
-fix cutting tool for approximation;
-add method Adaptor3d_HSurfaceTool::IsSurfG1.
-add test bugs/moddata_3/bug30272
2021-12-07 22:32:14 +03:00
kgv
90da038e9d 0032663: Coding - remove AIS_SequenceOfInteractive 2021-12-07 22:32:14 +03:00
kgv
9a52982920 0032678: Coding Rules, ApproxInt_SvSurfaces - eliminate GCC -fsanitize=undefined error
ApproxInt_SvSurfaces::myUseSolver is now initialized by default constructor.
2021-12-07 22:32:13 +03:00
kgv
68a8b15260 0032714: Documentation - drop VS2010 from minimal requirements 2021-12-07 22:32:13 +03:00
kgv
03eb96038e 0032709: Samples, MFC - remove samples Viewer2d, Viewer3d, Ocaf, Triangulation, Animation, Convert 2021-12-03 18:00:22 +03:00
kgv
44f6e8d5e8 0032694: Documentation, Draw Harness Guide - update ViewerTest commands
Draw Harness Guide now refers to ViewerTest commands description
via @snippet pointing to C++ source code instead of duplicating it.
"help" command now tries to beautify output of command's description.
2021-12-03 17:58:15 +03:00
kgv
4f5e934445 0032704: Visualization, Prs3d_Drawer - do not implicitly create aspects within getters
Prs3d_Drawer getters now return NULL instead of implicitly creating "default" aspects.
Added missing initialization of default properties in AIS_InteractiveContext.
AIS_InteractiveContext::setContextToObject() - added missing propagation of Context to child presentations.
2021-12-03 17:56:37 +03:00
kgv
65acdce54c 0032352: Coding Rules - clean up code from compatibility hacks with pre-C++11 compilers
Removed usage of std::auto_ptr.
opencascade::std workarounds for VS2008 have been dropped, when possible.
OCCT_NO_RVALUE_REFERENCE workaround for VS2008 has been removed.
2021-12-03 17:56:37 +03:00
kgv
30fa5f6713 0032705: Test - name clashes within temporary files within bugs/caf/bug23766_X
Several test cases writing temporary files have been corrected.
2021-12-02 21:14:57 +03:00
kgv
740833a6a8 0032697: Configuration - fix compilation errors with oneTBB 2021
Removed usage of no more existing tbb::task_scheduler_init and tbb::captured_exception.
2021-12-01 20:28:27 +03:00
aml
2009530611 0032696: Coding - get rid of unused forward declarations [StepSelect to Xw]
Packages starting with lower-case (gp and gce) are also processed.
2021-11-30 00:36:15 +03:00
dpasukhi
250ad34d90 0032683: Coding Rules, XCAFDoc_Editor::CloneMetaData() - unexpected bitwise operations
Fixed problem with incorrect bitwise operators.
Removed forced naming via cloning metadata
2021-11-30 00:36:15 +03:00
Dzmitry Razmyslovich
4a837ecec2 0031087: Configuration - make FreeType dependency optional [part 2] 2021-11-26 18:51:36 +03:00
isn
58c0958b50 0029406: Foundation Classes - gp_Ax3 fails setting direction
Avoid exception in gp_Ax3::SetDirection(), SetAxis(): check if XDir of Ax3 is parallel to newly given direction.
2021-11-26 18:50:18 +03:00
nbv
323e88ada7 0030365: Modeling Algorithms - Create tool to compute deviation between any 2D-curve and some its segment
Adds two new overloaded 'ComputeDeviation()' function (approx & exact) to GeomLib_Tool class to calculates the parameter in the curve where the maximum deviation is obtained between the curve and the line segment connecting its points with the specified parameters

Adds new '2ddeviation' DRAW command for 'ComputeDeviation()' functional testing
2021-11-26 18:49:17 +03:00
kgv
d0cf7e8f3c 0032684: Draw Harness - fix Draw_Interpretor::Add() misuse due to overloaded syntax 2021-11-25 19:56:06 +03:00
kgv
4e69a6ac05 0032685: Draw Harness - help output smashes command names without delimiter
"help" procedure now ensures to put space between listed commands.
2021-11-25 19:54:46 +03:00
kgv
b6b55c3d96 0032686: Visualization, Wasm_Window - filter out unexpected pressed buttons state within mouse move / up events
Wasm_Window::ProcessMouseEvent() now ignores not previously pressed mouse buttons within mouse move / up events.
Fixed -Wshorten-64-to-32 compiler warning within cpulimit command on 32-bit Linux.
2021-11-25 19:51:15 +03:00
msv
87b7b496ec 0032679: Data Exchange - STEP writer loses assembly instance name
In STEPCAFControl_Writer::WriteNames, write the names of components
even if the name of the assembly is absent.

In STEPControl_ActorWrite::TransferSubShape, move assembly structure
information to the beginning of the list of results, so that CDSR
information of this assembly became preceding CDSR of any sub shapes.
2021-11-25 00:35:25 +03:00
kgv
e1aa4ee31f 0032682: Draw Harness, ViewerTest - add -rotationMode and -navigationMode to vcamera 2021-11-25 00:35:25 +03:00
kgv
120dec9fb3 0032672: Coding Rules - eliminate GCC9 compiler warnings -Warray-bounds -fsantizize=undefined 2021-11-22 19:05:31 +03:00
kgv
3bbcf114f0 0032680: Visualization, AIS_TextLabel - Bold FontAspect doesn't work
Prs3d_TextAspect now sets Font_NOF_SERIF as default font
instead of confusig Font_NOF_ASCII_TRIPLEX (Times-Bold).
Therefore, default font now uses regular aspect, not bold.

Command vdrawtext does no more set "Courier" font by default.
2021-11-22 19:04:09 +03:00
kgv
d62df471b2 0032677: Coding Rules, Geom_BezierSurface - eliminate GCC warning -Wmaybe-uninitialized -fsanitize=undefined
Fixed initialization of TColStd_Array1OfReal for weights.
2021-11-22 19:02:55 +03:00
kgv
7ac3f543c7 0032675: Draw Harness, ViewerTest - remove command vr
Removed unused commands vr and Draft.
2021-11-22 19:01:19 +03:00
kgv
7c3daf20d1 0032676: Draw Harness, ViewerTest - fix NULL dereference on vanim -remove 2021-11-22 18:59:53 +03:00
aml
a81bd74a38 0032667: Coding - get rid of unused forward declarations [LibCtl to StepRepr] 2021-11-22 18:58:00 +03:00
kgv
c1e15aa538 0023398: Documentation, Shape Healing User's Guide - example does not compile
Fixed some misprints in the documentation.
Removed description of non-existing Message_TraceFile.
2021-11-21 12:42:10 +03:00
msv
519c84b43e 0030054: BRepOffset_MakeOffset fails to build joints in intersection mode
Test case has been added.
2021-11-21 12:42:10 +03:00
kgv
794b3d8936 0032652: Visualization - Select3D_SensitiveCylinder returns wrong 3D point on transformed shape
SelectMgr_RectangularFrustum::OverlapsCylinder() - added missing 3D point transformation.
StdSelect_BRepSelectionTool::ComputeSensitive() - fixed cylinder height computation on TopoDS_Shape with scale transformation.
SelectMgr_AxisIntersector::OverlapsCylinder(),::OverlapsSphere() - added missing computations of surface normal.
2021-11-21 12:42:10 +03:00
kgv
c8365a1c28 0032648: Visualization, TKOpenGles - support MSAA anti-aliasing within WebGL 2.0
OpenGl_FrameBuffer::Init() now creates MSAA render buffer in case if MSAA textures are unsupported.
In this case OpenGl_View::prepareFrameBuffers() creates MSAA render buffer for main content
and non-MSAA FBO for immediate content as blitting of MSAA render buffers into MSAA targets is unsupported by OpenGL ES 3.0.

env.bat.in has been corrected to include path to custom ANGLE (GLES2_DIR)
in front of Qt which might include its own older ANGLE build.
2021-11-21 12:42:10 +03:00
dipts
45143b7a24 0032662: Coding - Missing header file in AIS_DataMapOfSelStat.hxx
Removed obsolete header files AIS_DataMapOfSelStat.hxx and AIS_DataMapIteratorOfDataMapOfSelStat.hxx.
Removed obsolete types AIS_DataMapofIntegerListOfinteractive, AIS_ClearMode, AIS_ConnectStatus,
AIS_IndexedDataMapOfOwnerPrs, AIS_MapOfInteractive.
2021-11-21 12:42:09 +03:00
dipts
9eab1511b0 0032661: Coding - Forward class declaration in ProjLib collides with typeref
Removed redundant forward declarations from ProjLib.hxx.
2021-11-21 12:42:09 +03:00
akaftasev
0ffecc2fc7 0032448: Modeling Algorithms - Provide exact validating (as option) using GeomLib_CheckCurveOnSurface
Add '-exact' option to checkshape command to use exact method to validate edges using BRepLib_ValidateEdge class. Default mode is calculating in finite number of points.
2021-11-21 12:42:09 +03:00
kgv
6eddc28410 0032658: Documentation - add missing GLFW sample to dox/samples/samples.md 2021-11-21 12:42:09 +03:00
Xu Zhongxing
97e80b8c30 0032649: Bug in BRepLib::EnsureNormalConsistency()
Fix a typo in variable name.
2021-11-21 12:42:08 +03:00
rkv
57c5e9e895 0026171: Coding rules - eliminate -Wshorten-64-to-32 CLang warnings 2021-11-21 12:42:08 +03:00
kgv
2b40ee81d1 0032654: Data Exchange - fix misprint in RWGltf_TriangulationReader::readDracoBuffer()
Added missing break.
Fixes reading of glTF files with Normal attributes preceding Position
(and eliminates redundant / erroneous copy when Position attributes precede Normal).
2021-11-21 12:42:08 +03:00
ichesnok
62874fa199 0032096: Data Exchange - Extension for XCAFDimTolObjects_DimensionQualifier
Added XCAFDimTolObjects_AngularQualifier for angles. And added field and methods for dimensions.
2021-11-21 12:42:08 +03:00
kgv
e77bcb6b57 0032655: Configuration, qmake - add missing CSF_Draco
Added CSF_Draco to OccToolkit.pri.
Removed libXmu.so search from genconf.
2021-11-21 12:42:07 +03:00
inv
d4edeaed31 Increment OCCT version up to 7.7.0dev 2021-11-21 12:42:07 +03:00
inv
80ffc5f84d Update version up to 7.6.0 2021-11-01 18:12:14 +03:00
kgv
d1069cad4b 0032156: Documentation, gendoc.tcl - wrong processing of 'mathjax' option
Fixed handling of -s=<search_mode> option.
Fixed handling of -mathjax=<path> option.
2021-11-01 18:12:14 +03:00
akaftasev
0c4931e873 0032444: Modeling Algorithm - BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine
Added checking for null edges in BRepFill_TrimShellCorner::ChooseSection()
2021-10-29 17:18:18 +03:00
btokarev
3ea347e562 0032551: Documentation - Novice user guide for OCCT Documentation
Added novice guide.
Improved structure of Tutorials & Samples.
2021-10-29 17:08:16 +03:00
dpasukhi
510d099d15 0028104: Data Exchange - Extract sub-assembly (XDE)
- Added getting and setting Material, VisMaterial and Props to XCAFDoc_Editor::Expand.
- Added XCAFDoc_Editor::Extract to transfer part to a new location
  - XCAFDoc_Editor::Extract allows to extract a part as a component or simply extract to an empty label with attached colors, layers, materials, vismaterials and props
- Added XCAFDoc_Editor::CloneMetaData to clone shape's attributes to new location
- Added XCAFDoc_Editor::CloneShapeLabel to clone shape to new document
- Added XCAFDoc_DocumentTool::Check*Tool methods to check an existing of an any tool
- Protected against creating a new label for non-existent tools via extract or expand process
2021-10-28 22:04:04 +03:00
ski
5bd54bef32 0024975: Improve of preprocessor directives in header files to be equal to the file name
Preprocessor directives were changed or created by function "check_headers" from script adm/upgrade.tcl (CR24816)
2021-10-27 21:00:02 +03:00
kgv
4f7ad5fb76 0032640: Coding Rules - fix misprints in GeomliteTest_API2dCommands.cxx 2021-10-27 20:58:18 +03:00
aml
f706c128c2 0032641: Coding - get rid of unused forward declarations [IGESAppli to LDOM] 2021-10-27 20:57:19 +03:00
asuraven
209ae313a5 0032031: Analyze Precise HLR behaviour in Draw/AIS
- Set "Algo" as default HLR algorithm in MFC HLR sample
2021-10-26 23:12:30 +03:00
knosulko
81f57d1135 0030046: Modeling Algorithms - Cannot find necessary projection of the curve
move algorithm of obtaining results from function gproject to method ProjLib_CompProjectedCurve::Perform;
fix tolerances in ProjLib_PrjResolve::ProjLib_PrjResolve;
new treatment of myMaxDist;
use extend bounds in approximation;
add test;
test case "bugs modalg_5 bug25980", "bugs modalg_7 bug24185" have been changed according to new behavior.
2021-10-26 23:10:34 +03:00
ifv
9923f08703 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with gaps
GeomConvert/GeomConvert_1.cxx - method CheckAndSegment is added to adjust surface periodic boundaries
bug32557 - test is updated by new cases
2021-10-25 11:18:27 +03:00
aml
5b756182c2 0032630: Coding - get rid of unsused forward declarations [BinMDF to IFSelect] 2021-10-22 20:17:18 +03:00
kgv
5f69cfa70c 0032638: Draw Harness, ViewerTest - HTML input range misbehavior in WebAssembly
ViewerTest_EventManager - added tracking of EMSCRIPTEN_EVENT_FOCUSOUT event.
onWasmMouseCallback() has been adjusted to return FALSE for EMSCRIPTEN_EVENT_TARGET_WINDOW
target to avoid misbehavior of other HTML controls.

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

AIS_ViewController::ProcessFocus() now redirects to AIS_ViewController::ResetViewInput() on focus loss.
This fixes issues when key action (like WASD navigation) keep working even after releasing key if window has been switched.
2021-10-22 19:58:16 +03:00
vro
19da974edc 0032632: Visualization, AIS_ViewCube - the class AIS_ViewCubeSensitive is hidden inside CXX file 2021-10-22 19:58:16 +03:00
kgv
bcb2a742a7 0032631: Draw Harness - add DRAWEXE.evalAsync() to WebAssembly 2021-10-22 19:58:16 +03:00
kgv
005caf39cf 0032633: Draw Harness - extend command incmesh to apply default visualization parameters
incmesh - added -prs option to use StdPrs_ToolTriangulatedShape::GetDeflection() as meshing parameters.
vdisplay, XDisplay - added -autoTriangulation option to manage meshing behavior before displaying a shape.
trinfo - added output of meshing parameters.
Fixed broken incmesh syntax usage in several test cases.
2021-10-22 19:58:15 +03:00
kgv
2c8c4b8086 0032629: Configuration, scripts - add USE_PTHREADS building option to wasm_build.bat 2021-10-22 19:58:15 +03:00
mpv
7e63845c9e 0026981: Application Framework - read a BinOcaf document from С++ stream sequentially
The current version of the document supports partial reading. So, as a result, the shapes section is dispersed into attributes and it becomes easy avoid any seekg call during the reading.
But this will work only in case whole document is opened. For partial reading seekg functions could be naturally called.
2021-10-22 19:58:15 +03:00
jgv
f8d8c3f2bc 0032623: [Regression] Modelling Algorithms - UnifySameDomain invalid result only in release mode
Correct local function ReconstructMissedSeam: use copy of existing pcurve for seam edge reconstruction to prevent possible corruption of another edges.
2021-10-20 20:06:30 +03:00
kgv
4e61131a1c 0032626: Samples - add Qt::WA_NativeWindow attribute to Qt IESample 2021-10-18 20:14:35 +03:00
kgv
4e2151f654 0032624: Configuration, genproj - add support for VS 2022 / vc143 2021-10-18 20:13:10 +03:00
dpasukhi
475da0f135 0032310: Data Exchange - Invalid STEP export/import of backslashes in names [Regression since OCCT 7.5.0]
Fixed a problem with handling slashes and apostrophes
Changed cleaning of the 'TEXT' fields of the step entity to direct order w/o removing operations
Changed converting text locale to covert before cleaning directives and specials symbols (all directives and sp. symbols encoded in ASCII[0-125] and haven't any differ with any locals)
Special case, when directives have two slashes before name changed to don't handle directives value and converts as is (combine two slashes as one and write, for example "\\X2\00C3" as "X2\00C3")
2021-10-15 19:52:25 +03:00
jgv
538700ffa2 0032619: [Regression] Modelling Algorithms - UnifySameDomain ignores shared face
Correct method ShapeUpgrade_UnifySameDomain::UnifyFaces: exclude free boundary edges from unification.
2021-10-15 19:50:25 +03:00
abulyche
eb78d737d4 0030747: Modeling Algorithms - 2d Curves concatenator doesn't properly process closed contours.
Corrected Geom2dConvert_CompCurveToBSplineCurve::Add in Geom2dConvert_CompCurveToBSplineCurve.cxx;
Added the test for this problem;
Corrected "gluing" curves in ProjLib_ProjectedCurve.cxx.
2021-10-14 20:19:22 +03:00
kgv
c1638a8db8 0032622: Draw Harness - writebrep "-version 3" is unrecognized
Fixed version range check.
Added description of -normals argument.
2021-10-14 20:17:11 +03:00
aml
0c9c466e9d CR32614 Coding - get rid of unsused forward declarations [Adaptor2d to GccAna]
Packages from Adaptor2d to GccAna are processed.
2021-10-12 20:11:16 +03:00
kgv
16f9b46dbb 0032612: Data Exchange, RWGltf_CafReader - lost hierarchy of two nested compounds
RWGltf_GltfJsonParser::gltfParseSceneNode() - prevent flattering of Scene nodes
(allow flattering only of Mesh nodes).

Added command XAutoNaming managing XCAFDoc_ShapeTool::SetAutoNaming().
Added comparisons with reference Xdump data to glTF tests.
2021-10-12 20:08:57 +03:00
kgv
34043fc845 0032613: Samples - glfw compilation error on Linux
GlfwOcctWindow - added cast to Aspect_XDisplay*.
Added auxiliary OCCT searching script as alternative to CMake config files.
2021-10-12 09:37:23 +03:00
ifv
56b495d93b 0032607: Modeling Algorithms - BOPAlgo_BOP returns incomplete result
IntPatch/IntPatch_ImpPrmIntersection.cxx - decreasing step for some conditions
tests/lowalgos/intss/bug32607 - test case added
2021-10-08 20:51:50 +03:00
vkuzin
96b92906de 0029405: Modeling Algorithms - Check normal define status in HLRBRep_Data
Fixed exception when trying to calculate line and edge normal in methods HLRBRep_Data::OrientOutLine and HLRBRep_Data::OrientOthEdge, added a check for the existence of the normal before subsequent calculations. A correct check for zero derivative, correction of floating point error and division by zero determinant directly in HLRBRep_EdgeFaceTool::CurvatureValue was set.
2021-10-08 20:51:13 +03:00
kgv
f1c209dc77 0032609: Visualization, Wasm_Window - handle mouse movements outside canvas element
Wasm_Window::ProcessMouseEvent() - removed redundant check on EMSCRIPTEN_EVENT_MOUSEUP event.
ViewerTest and WebGL sample - mouse movements are now tracked on window element
to allow tracking updates when mouse with clicked button is moved outside canvas element.
2021-10-08 20:26:22 +03:00
kgv
f9ae10ed21 0032604: Visualization, AIS_LightSource - improve dragging robustness 2021-10-08 20:24:43 +03:00
achesnok
956d91571c 0032591: Visualization, V3d_View - improve corner gradient
- Added new shader for correct Aspect_GradientFillMethod_Corner mode shading.
2021-10-08 20:22:22 +03:00
aml
c2064b60e7 0032603: Coding - get rid of unsused forward declarations
Packages from Adaptor2d to BRepMesh are processed.
2021-10-04 20:03:10 +03:00
kgv
eba0379cde 0032602: Configuration, genconf - reduce window height with empty error log
Font height is reduced to 1 for empty error labels is empty to win some space.
2021-10-04 19:54:22 +03:00
msv
41fc11b056 0032601: Foundation Classes - Poly_Connect hangs on the given incorrect triangulation 2021-10-04 19:53:12 +03:00
asuraven
0f05f21194 0032539: Modeling Algorithms - Parallelize BRepExtrema_DistShapeShape algorithm 2021-10-01 19:14:13 +03:00
dpasukhi
7d5e26eb2e 0032596: [REGRESSION] Data Exchange, STEP Reader - OCCT 7.6.0dev does not open file correctly
Fixed typo in the StepToTopoDS_TranslateFace.cxx after #29564 issue
2021-10-01 19:08:36 +03:00
btokarev
5c38397303 0032550: Documentation - Proofreading for "Tutorials and Samples -> Tutorial"
New images added for better representation of solid model;
Minor fixes for misprints and old classes;
Proofreading done.
2021-10-01 19:06:33 +03:00
jgv
ca65b1ae37 0032581: Modelling Algorithms - UnifySameDomain produces invalid result
1. Correct local function TransformPCurves of ShapeUpgrade_UnifySameDomain: take into account the case of seam edge.
2. Correct local function ReconstructMissedSeam of ShapeUpgrade_UnifySameDomain: use previously stored seam edge in some cases.
2021-09-30 19:43:06 +03:00
kgv
b4871a3b12 0032595: Documentation - revise "Build OCCT" structure to highlight CMake usage
"Building with CMake tool" subsection has been moved out from "Windows" to a dedicated top-level section.
genproj sections have been merged and restructured.
Added description of some new CMake configuration options.
Updated URL to 3rd-party components on Development Portal.
2021-09-30 19:41:47 +03:00
kgv
ff60d28357 0032597: Coding Rules, Wasm_Window - add missing setter for DevicePixelRatio property 2021-09-30 19:39:45 +03:00
aml
307fef1dcd 0032593: Documentation - get rid of unused file in the documentation. 2021-09-28 20:15:15 +03:00
abulyche
95c380d252 0030148: Modeling Algorithms - exception in BRepOffestAPI_MakePipe for some periodic BSpline spines
This problem was solved by fix for 0030597.
Added the non-regression test for this problem.
2021-09-28 20:12:06 +03:00
ifv
f277dcbbc0 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with errors
BRepTools/BRepTools_NurbsConvertModification.cxx -
 Checking domain of 2dCurves if surfaces are periodic is improved

tests/bugs/moddata_3/bug32557 - test case added
2021-09-28 20:10:04 +03:00
ifv
af0cb16691 0032569: Modeling Algorithm - Section not found
IntPatch/IntPatch_WLineTool.cxx - adding control of maximal ratio of distances between 3 sequential points.
tests/bugs/modalg_7/bug32569 - new test case added
tests/lowalgos/intss/bug29972_1 test case is modified according new behavior of intersection algorithm
2021-09-28 20:06:09 +03:00
emv
f72c595119 0032578: Modeling Algorithms - Splitting face by set of edges fails
Update information about ON/IN sub-shapes for all touched faces when intersection with shapes of lower types (edges and vertices) complete.
Previously only the faces participating in the Face/Face intersection were updated.
2021-09-27 20:12:00 +03:00
kgv
3e9cb80644 0032590: Visualization, V3d_View - improve API for setting Image Based Lighting
Added method V3d_View::SetImageBasedLighting() for managing IBL.
OpenGl_View implementation has been revised to handle IBL updates in a more straightforward way,
2021-09-26 16:44:20 +03:00
achesnok
9af0d66b84 0031039: Visualization - add elliptical gradient background style
Added new elliptical gradient fill method and updated vbackground command.
Renamed enum values of Aspect_GradientFillMethod and defined aliases for old ones.
Changed draw mode in OpenGl_BackgroundArray from triangle-strip to GL_TRIANGLES.
2021-09-26 11:05:34 +03:00
kgv
3be25c1170 0032585: Data Exchange, RWGltf_CafWriter - include OCCT version 2021-09-24 18:34:45 +03:00
kgv
ea99d048d7 0032582: Configuration, genproj - make CSF_OPT_LIB64D configurable by genconf 2021-09-23 19:59:22 +03:00
kgv
c585f731eb 0032579: Draw Harness, ViewerTest - extend vbackground -cubemap syntax to configure sRGB flag
Command vbackground has been refactored to simplify logic and relax syntax.
Added -srgb argument to vbackground and vtexture commands.
2021-09-22 20:11:44 +03:00
kgv
c983176406 0032580: Data Exchange, STL - add option splitting nodes at sharp corners
Added Poly_MergeNodesTool tool for merging nodes within triangulation.
Added RWStl_Reader::MergeAngle() property managing merging behavior.
2021-09-22 20:09:48 +03:00
asemenov
5dd92c395a 0029478: Crash because bSplineSurfaceWithKnots is NULL.
Modified the method void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep
Added processing B spline surface with knots and rational B spline surface with empty data in the name field
Added test
2021-09-20 20:03:49 +03:00
abulyche
296dbe8cc8 0031631: Modeling Algorithms - Invalid result of Pipe builder
Added the ability to operate the algorithm with different types of curves.
2021-09-18 17:07:06 +03:00
dpasukhi
812ee2c9be 0031388: Data Exchange - support kinematics data in STEP format
- add new STEP entities.
2021-09-17 20:08:51 +03:00
asuraven
92c1f9728e 0032552: Modeling Algorithms - BRepExtrema_DistShapeShape algorithm consumes too much memory
Used a new BRepExtrema_DistShapeShape::DistanceVertVert() function to replace DistanceMapMap() to calculate vertex/vertex distance
2021-09-17 20:07:40 +03:00
emv
b878139461 0032566: Modeling Algorithms - Incorrect result of offset operation in mode "Complete" join type "Intersection"
Before removal of the part make sure that it was not filled due to overlapping of opposite parts.
Improve procedure of checking for inverted edges by taking into account that the original edges may not be connected.

Correct test case offset/shape_type_i_c/YL5, as it was working incorrectly - some parts were missing.
2021-09-17 20:07:39 +03:00
kgv
5aa7b61083 0032236: Modeling Algorithms - Exception on calculation optimal bounding box
- BRepBndLib - added VOID box checks to AdjustFaceBox() method.
 - added the test
2021-09-17 20:07:39 +03:00
kgv
eee6a80a90 0032089: Visualization, TKOpenGl - support GL_EXT_sRGB extension to OpenGL ES 2.0 2021-09-17 20:07:39 +03:00
sshutina
58f2990bc5 0032461: Visualization - expensive call of glGetTexEnviv/glTexEnvi in each render of OpenGl_Text
- removed the call of glGetTexEnviv, glTexEnvi
 - replaced on the OpenGl_Sampler::applyGlobalTextureParams/resetGlobalTextureParams
 - added the method in OpenGl_Font returning first texture
2021-09-15 20:12:43 +03:00
akaftasev
7c6fecf9a8 0032330: Modeling Algorithms - Extend Offset algorithm with Progress Indicator and User Break
Add progress indicator to BRepOffset_MakeOffset::MakeOffsetShape().
2021-09-15 20:08:36 +03:00
kgv
13b36bb14f 0032567: Coding Rules - rename Graphic3d_TypeOfShadingModel values to include full enumeration name 2021-09-15 20:07:06 +03:00
ifv
e2421df543 0030422: Random behaviour of BRepAdaptor_CompCurve
BRepTools/BRepTools_WireExplorer.cxx - replace MapOfShape vmap by IndexedMapOfShape
to avoid random behavior of algorithm

bugs/moddata_3/bug30422 - new test case added
2021-09-15 20:07:06 +03:00
jgv
1e6b2065b5 0032561: Modelling Algorithms - UnifySameDomain does nothing while it is expected to union two pairs of faces
Correct method ShapeUpgrade_UnifySameDomain::UnifyFaces: when creating the Edge-Face map of initial shape, count each face only once.
2021-09-15 20:07:06 +03:00
kgv
e2d6f0e37a 0032423: Coding Rules - NSOpenGLContext deprecation warnings during compilation for macOS 10.14+
The warning has been suppressed for building TKOpenGl.
2021-09-15 20:07:05 +03:00
asuraven
9ae883970d 0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces to adapters 2021-09-11 11:15:44 +03:00
asemenov
8019a482b5 0029233: Incorrect result of conversion to the STEP format.
Modified the method TopoDSToStep_MakeStepFace::Init
Added processing of degenerate toroidal surfaces, which are the base surfaces of offset surfaces
Added test
2021-09-10 20:24:53 +03:00
kgv
36d21f1a1a 0032565: Foundation Classes, OSD_FileSystem - expose interface for registering global protocols
Added methods OSD_FileSystem::AddDefaultProtocol()/::RemoveDefaultProtocol()
and fixed misleading description of OSD_FileSystemSelector::AddProtocol().
2021-09-10 20:24:52 +03:00
kgv
8a17a8bb45 0032540: RWGltf_CafReader - optional "scene" parameter encoded as mandatory
First scene is now loaded when default one is undefined.
2021-09-10 20:24:52 +03:00
sshutina
8dcb81ac82 0031337: Inspectors - user guide update
- Modifyed 3D view:
     Added the trihedron, view cube
     Removed the scene manipulation actions (Fit all isn't removed)
 - Added the new MessageView plugin to display content of Message_Report
 - DFBrowser plugin improvements:
     Added the  button to switch ON DumpJson in DFBrowser(OFF by default, for better performance)
     Renamed in DFBrowser "Property Panel" into "Property Panel (custom)
     Removed the selection controls
 - ShapeView plugin improvements:
     Property View content based on DumpJson (columns in tree view for properties are removed),
     Properties for TopoDS_Shape are displayed
 - VInspector plugin imrovements:
      Property View content based on DumpJson (columns in tree view for properties are removed),
      Properties for AIS_InteractiveContext and AIS_InteractiveObject are displayed
      Removed History panel in VInspector as not used
      Implemented the item and actions in VInspector for setting Lights in the view
2021-09-10 20:24:52 +03:00
kgv
cd4977383d 0032092: Visualization, TKService - Image_VideoRecorder writes garbage from Grayscale image
Image_VideoRecorder::writeVideoFrame(), added protection from API misuse.
2021-09-10 20:24:51 +03:00
kgv
801e67bc7b 0032564: Foundation Classes, OSD_CachedFileSystem - allow referring to non-default File System
Linked file system can be now customized within OSD_CachedFileSystem.
2021-09-10 20:24:51 +03:00
sshutina
7d7541ceeb 0032507: Visualization, TKOpenGl - topmost text disappears with Graphic3d_RTM_DEPTH_PEELING_OIT enabled 2021-09-10 20:24:51 +03:00
vro
e8ae1c42a8 0032531: Application Framework - There should be methods to get explanations of PCDM_StoreStatus and PCDM_ReaderStatus values
Documentation is added for PCDM_ReaderStatus enumeration.

Modified:
- PCDM_ReaderStatus.hxx: each value received a short explanation.
2021-09-10 20:24:51 +03:00
emv
74a53b82dc 0030206: Improve API of commands bbop and bapibop
0030620: Tests - perf/bop/buildfaces does not match description (broken)

Allow using meaningful parameters for the commands bbop and bapibop:
* common - for Common operation
* fuse - for Fuse operation
* cut - for Cut operation
* tuc/cut21 - for Cut21 operation
* section - for Section operation

Add description for the commands dealing with Boolean/GF/Split operations.
Validate arguments of these commands.

Correct test case perf/bop/buildfaces to perform GF execution in parallel and serial modes - compare the results.
2021-09-10 20:24:50 +03:00
emv
efac173377 0030151: Modeling Algorithms - Removal of the API level of old Boolean operations algorithm (BRepAlgo_BooleanOperation)
The following classes have been removed as obsolete:
- BRepAlgo_BooleanOperation
- BRepAlgo_Fuse
- BRepAlgo_Cut
- BRepAlgo_Common
- BRepAlgo_Section

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

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

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

Adjustment of the test cases to use the commands for modern algorithm.
2021-09-10 20:24:50 +03:00
kgv
35ad04e78b 0032107: Data Exchange, RWGltf_CafReader - reading glTF document back loses sharing
RWGltf_CafWriter has been fixed to write shared Faces having a different style.
RWGltf_GltfJsonParser::gltfParsePrimArray() now tries to create a shared TopoDS_Face
from the same primitive array definition.

RWGltf_CafReader - improved name generation.
2021-09-10 20:22:59 +03:00
akaftasev
8ab0b859df 0030788: Modeling Algorithms - BRepAlgoAPI_Defeaturing does not propagate progress indicator to underlying algorithms
Added progress indicator to BRepAlgoAPI_Defeaturing
2021-09-08 19:14:11 +03:00
kgv
5e76328243 0032328: Missing include of TopoDS_Edge.hxx in ShapeUpgrade_UnifySameDomain.hxx 2021-09-07 20:03:29 +03:00
abulyche
41e2eed0fc 0030722: Modeling Algorithms - BRepExtrema_DistShapeShape computes wrong distances
Updated the math_DirectPolynomialRoots.cxx
Added the test case "bug30722"
Updated the command "b2dclassify" in the BOPTest_LowCommands.cxx
2021-09-07 20:01:40 +03:00
msv
a1ae05e173 0018170: Modeling Data - crash in TopExp_Explorer::Init if Clear was called after empty constructor
TopExp_Explorer::Clear() now sets myTop=-1 with align to TopExp_Explorer::Init() logic.
2021-09-05 23:13:27 +03:00
asuraven
f26ee38f2a 0029792: Add ::IsParallel method to GeomAPI_Extrema* classes
Add IsParallel() methods for classes:
- GeomAPI_ExtremaCurveCurve
- GeomAPI_ExtremaCurveSurface
- GeomAPI_ExtremaSurfaceSurface
2021-09-03 20:20:20 +03:00
ifv
4391df896c 0026269: Modeling Data - Analytical extrema does not take into account trimmed input data
Treatment of trimmed data is added
Extrema/Extrema_ExtCC.cxx

Test cases added
tests/lowalgos/extcc/bug26269_1
tests/lowalgos/extcc/bug26269_2

Test cases are modified according to new behavior of algorithm
2021-09-03 20:19:56 +03:00
asuraven
872a7e3a7e 0032485: Modeling Algorithms - Add Clone() function for adapters
Provide ShallowCopy() functions for adapters & evaluators of curves, 2d curves and surfaces. This will allow using copies of the same adapter in multi-thread calculations.
2021-09-03 20:19:56 +03:00
asuraven
82bee1621a 0031942: Modeling Algorithms - add possibility to abort the BRepExtrema_DistShapeShape algorithm
- Now available to interrupt the DRAW 'distmini' command by Ctrl/C
- Message_ProgressRange/Message_ProgressScope used in BRepExtrema_DistShapeShape::Perform() to provide user break
2021-09-03 20:19:56 +03:00
akaftasev
d03c08988c 0021264: Modeling Algorithms - Progress indicator for Boolean operations
Update BOP commands to use progress indicator
Deleted wrong usage of progress indicator from bop operations
Added UserBreak() method to break execution boolean operation if progress indicator is used
Added method AnalyzeProgress() to calculate steps of progress indicator
Introduce BOPAlgo_ParallelAlgo which has myRange as a field to be used in parallel vector.
Provide suitable way of keeping the progress steps of operations.
Give meaningful names to progress scopes.
Propagate progress indicator into deeper methods of BOA.
Add progress indicator to BOPAlgo_BuilderFace and BOPAlgo_WireSplitter, BOPAlgo_BuilderSolid and BOPAlgo_ShellSplitter
2021-09-03 20:19:55 +03:00
vro
632deee0b0 0032125: Application Framework, OCAF - need to have adequate message if document cannot be saved due to unrecognized format
A list of storage statuses (PCDM_StoreStatus) is extended for PCDM_SS_UnrecognizedFormat. It is set if
- extension of a document file name is not defined (the extension doesn't correspond to any declared file formats) or
- a storage driver is not found for the document storage format.

Modified:
CDF_StoreList.cxx: the mechanism of raising and catching exceptions is replaced by direct setting the status and error message for each particular error.
PCDM_StoreStatus.hxx: a new enumeration value is added - PCDM_SS_UnrecognizedFormat. Also, a short explanation is added to each enumeration value.
DDocStd_ApplicationCommands.cxx: processing of a new enumeration value by the draw-command.
XDEDRAW.cxx: processed a new enumeration value PCDM_SS_UnrecognizedFormat by saveDoc draw-command.

Deleted:
CDF_MetaDataDriverError.hxx: It is not used anywhere and it seems it will not be used by someone.
2021-09-03 20:19:55 +03:00
dpasukhi
9443cf8ec4 0032556: Data Exchange - A toroidal part of solid is corrupted while writing or reading STEP file
Fix STEP writing Wire for periodic surface
2021-09-03 20:19:54 +03:00
mkrylova
3016a39071 0032495: Coding rules - eliminate CLang UndefinedBehaviorSanitizer warnings
- fixed CLang UndefinedBehaviorSanitizer warnings
2021-09-03 20:19:54 +03:00
kgv
e21db5b80e 0030976: Configuration, CMake - Build failure with static FreeType dependency
Removed linkage with "freetype.lib" with help of pragma lib specific to msvc.
FreeType library should be configured as a normal external dependency via CSF_FreeType
by CMake and genproj, which is already done (information was duplicated).
2021-09-03 20:19:53 +03:00
kgv
e639e9bcdc 0032553: Configuration, CMake - unable to building with ActiveTcl
Removed linkage with "tcl8.6.lib" with help of pragma lib specific to msvc.
Tcl libraries should be configured as normal external dependencies via CSF_TclLibs
by CMake and genproj, which is already done (information was duplicated).
2021-09-03 20:19:53 +03:00
sshutina
0b1fd5909d 0031351: Inspectors - thread in DFBrowser removing
- DFBrowser_Thread and connected are removed from the package as obsolete
2021-09-03 20:19:52 +03:00
jgv
13584d1468 0032502: Modeling Algorithms - BOP wrong result on sphere and cylinder
Modifications in the method IntPatch_ALineToWLine::MakeWLine:
correct setting parameters to vertices on IntPatch_WLine curve.
2021-09-03 20:19:52 +03:00
kgv
c1b3ce202a 0032549: Configuration - fix misprint in adm/scripts/android_build.bat for Draco library name 2021-08-31 20:54:52 +03:00
kgv
ce83709ac9 0032546: Data Exchange, XCAF - mark material as defined XCAFDoc_VisMaterialPBR::IsDefined=true within default constructor
XCAFDoc_VisMaterialCommon and XCAFDoc_VisMaterialPBR default constructors now set IsDefined property to TRUE.
So that it is required to set IsDefined=false explicitly to create an undefined material,
which is done by XCAFDoc_VisMaterial constructor.

Existing application code shouldn't require any modifications in most cases
(IsDefined=true required before to setup material could be now removed).
2021-08-31 20:05:37 +03:00
kgv
19691a22fd 0032545: Configuration, CMake - add BUILD_FORCE_RelWithDebInfo option for generating VS project files with Debug info in Release mode 2021-08-31 19:53:33 +03:00
akaftasev
7e187d6b22 0028687: Offset for open wire is built with incorrect direction
Added new condition to exclude offsetting non closed part of circle as complete circle
2021-08-30 09:47:33 +03:00
akaftasev
55b5d19bd8 0028684: BRepOffsetAPI_MakeOffset produces wire with another orientation in compare with source wire
Added flag to reverse resulting shape, if it was reverse in BuildDomains() to bringing to the same direction as the original shape
2021-08-30 09:47:33 +03:00
kgv
8f70959571 0032464: Draw Harness, ViewerTest - rely on AIS_ViewController within vanimation command
Added AIS_ViewController::ObjectsAnimation() property
similar to AIS_ViewController::ViewAnimation() but designed for objects animation.
2021-08-27 19:11:44 +03:00
mkrylova
9dd8af261f 0032281: Visualization - add Select3D_SensitiveCylinder
- implemented Select3D_SensitiveCylinder class performing an analytical intersection with an untriangulated cone/cylinder
- added tests
2021-08-27 19:09:09 +03:00
kgv
8a77384b0c 0032403: Visualization - RayTracing renders all object as white color in view with white background
OpenGl_Caps::buffersOpaqueAlpha is now set to TRUE by default.
OpenGl_View::runPathtrace - fixed higlighting with PathTracing turned on and buffersOpaqueAlpha=true.
2021-08-27 19:08:14 +03:00
msv
45d498ef1f 0031514: Foundation Classes - Add Base64 encoding function
The class FSD_Base64Decoder has been renamed to FSD_Base64.
The new method FSD_Base64::Encode has been added.
The method Decode has been improved for performance.
2021-08-27 19:08:14 +03:00
dpasukhi
da80ff68f1 0031382: Data Exchange - BinXCAF should preserve length unit information
Possibility for adding LengthUnit info to XCAF document using special class XCAFDoc_LenghtUnit and XCAFDoc_LenghtUnitTool is implemented.
Package UnitsMethods is split: geom methods were placed to new file GeomConvert_Units which is in the toolkit TKXSBase, internal step scale factors was placed to StepData.
Updated UnitMethods to convert scale factor to different unit types.
Now, XSAlgo::XSAlgo_AlgoContainer is used to update unit info from static interface values.
New Draw command "XSetLengthUnit" and "XGetLengthUnit" for set or get XDE attribute.
Upgraded tests for STEP, IGES, OBJ, glTF, VRML formats to check area regressing with used unit.
Upgraded tests\de test cases to use any units in the "loop back" algorithms.
2021-08-20 20:30:11 +03:00
ifv
9592ae247b 0027457: Modeling - Raise exception if scaled transformation is used for shape location
Implementation of raising exception while using scale and mirror transformation in shape location
TopLoc/TopLoc_Location.hxx
TopoDS/TopoDS_Shape.hxx

Implementation of new tools for removing forbidden locations from shapes:
BRepTools/BRepTools_PurgeLocations.cxx
BRepTools/BRepTools_PurgeLocations.hxx
BRepTools/BRepTools.cxx
BRepTools/BRepTools.hxx

Draw commands for transforming shapes are corrected, new draw commands: purgeloc, checkloc added
BRepTest/BRepTest_BasicCommands.cxx

Fixing unstable test bug xde bug24759
StepToGeom/StepToGeom.cxx

All other C++ commits are modification of algorithms used mainly in import/export operations in order to allows these operations if shape locations contains scale and mirror transformations.

New test for command purgeloc added
tests/bugs/moddata_3/bug27457
tests/bugs/moddata_3/bug27457_1
tests/bugs/moddata_3/bug27457_2

Some test corrected according to modifications.
2021-08-20 20:18:06 +03:00
kgv
91428b468b 0032536: Configuration - extend adm/scripts with USE_DRACO option 2021-08-14 18:00:19 +03:00
knosulko
7b5f784419 0026979: Parabola curve intersection with variety of surfaces produces incorrect results.
Method Intf_Tool::ParabBox now properly estimates the number of segments for a 3D parabola.
Fix input arguments of called Bnd_Box::Get method in Intf_Tool::HyprBox method.
2021-08-13 20:43:47 +03:00
abulyche
715fcb5a92 0027884: Modeling Algorithms - Possible improvement for 2d classifier
Added the implementation of bndbox<->line and bndbox<->segment intersections for 2D to Bnd_Box2d
Added the speedup for 2d classification to BRepClass_Intersector.cxx
Added the test for our improvement
2021-08-13 20:22:41 +03:00
kgv
fceeb82917 0032533: Visualization, TKOpenGl - suppress error reported on Intel drivers due to OpenGL 4.5 specs violation
OpenGl_GlCore45 - removed a couple of FFP-related functions introduced by OpenGL 4.5 Compatible Profile, but not Core Profile.

OpenGl_GlFunctions::load() now tries to load a set of functions
from GL_ARB_robustness extension (having ARB suffix) to fill OpenGL 4.5 function table,
and from GL_ARB_indirect_parameters extension to fill missing items in OpenGL 4.6 function table on Intel drivers.
Warning message (trace level) is now reported instead of error in case of fallback usage.
2021-08-12 19:15:44 +03:00
kgv
11c23250dc 0032530: Data Exchange, RWGltf_CafWriter - add option merging Faces within the Part
Added RWGltf_CafWriter::ToMergeFaces() property disabled by default.
RWMesh_MaterialMap - fixed creation of texture folder within working dir ".".
XCAFDoc_VisMaterial::FillMaterialAspect() - added clamping of too small shininess values.

Added options -mergefaces and -splitindices16 to WriteGltf for new feature.
Added -systemCoordSys option to WriteGltf for consistency with WriteObj.
2021-08-12 19:12:23 +03:00
kgv
fd42e7645d 0032527: Data Exchange, RWGltf_CafWriter - make name format configurable
Added properties RWGltf_CafWriter::NodeNameFormat() and ::MeshNameFormat().
2021-08-12 19:07:52 +03:00
kgv
d9d75a845f 0032525: Data Exchange, RWGltf_CafReader - support KHR_draco_mesh_compression
Added new optional dependency - Draco library.
RWGltf_GltfJsonParser now detects KHR_draco_mesh_compression extension,
marks accessor being compressed and redirects to compressed buffer view.
RWGltf_TriangulationReader now handles decoding of buffer view compressed using Draco.

env.bat template for genproj has been modified to allow specifying dedicated folders
with debug versions of libraries (CSF_OPT_LIB64D / CSF_OPT_BIN64D) within custom.bat.
Removed unused CSF_FREETYPE from TKOpenGl.
2021-08-12 19:03:55 +03:00
kgv
aeef9e2c13 0032524: Data Exchange, RWGltf_CafWriter - avoid writing translucent metallic materials
RWGltf_GltfMaterialMap::DefineMaterial() and XCAFDoc_VisMaterial::ConvertToPbrMaterial()
now reset matallic factor to 0.0f in case of transparent color.
2021-08-12 18:59:54 +03:00
achesnok
45fc824bac 0031220: Visualization - remove internal field of viewer selector in context
- Removed myMainSel field from AIS_InteractiveContext and obtained this value from mgrSelector.
- Moved SelectMgr_ViewerSelector3d implementation into SelectMgr_ViewerSelector to get rid of redundant separation and extra DownCast's.
- Declared SelectMgr_ViewerSelector3d as deprecated.
2021-08-12 18:57:05 +03:00
kgv
f227f3dc96 0032523: Draw Harness, ViewerTest - vrepaint -continuous has no effect
ViewerTest_ContinuousRedrawer now explicitly invalidates V3d_View content
in addition to emitting window content redrawing request.

"vrepaint -continuous" now tries to avoid creation of dedicated thread
on Windows platform and relies on AIS_ViewController::SetContinuousRedraw().
2021-08-12 18:53:12 +03:00
achesnok
1b5eb2be23 0026083: Coding Rules - Poor design of Graphic3d_GraduatedTrihedron
- Made class Graphic3d_AxisAspect publicly nested in Graphic3d_GraduatedTrihedron.
- Removed public PtrView field from trihedron and obtained it from OpenGL_Workspace while rendering.
- Made CubicAxesCallback protected and provided corresponding getter/setter.
- Renamed AxisAspect() to AxisAspectAt().
2021-08-09 19:14:26 +03:00
mkrylova
27e64adb38 0032490: Data Exchange - provide OSD_FileSystem::OpenOStream() for output streams
- provided OSD_FileSystem::OpenOStream() for output streams
- replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
2021-08-04 20:13:20 +03:00
kgv
e93008abdd 0032518: Visualization - add AIS_InteractiveContext::SetDefaultDrawer() 2021-08-04 20:11:27 +03:00
jgv
1a75fcddae 0032470: Modeling Algorithms - BOP wrong result on sphere and box
Correct adjusting pcurves on periodic surfaces: take the middle point as a reference point.
2021-08-04 20:08:52 +03:00
kgv
286e9f13f3 0032508: Visualization - OpenGl_FrameBuffer::InitWrapper() should not fail on wrapping textured FBO
OpenGl_FrameBuffer::InitWrapper() now reads viewport from GL_VIEWPORT
and doesn't return error on GL_TEXTURE attachments.
OpenGl_FrameBuffer::Release() assertion is now skipped for wrapped FBOs.
2021-08-01 12:34:41 +03:00
kgv
32f86ef5a3 0032506: Visualization - add AIS_InteractiveContext::ObjectIterator() for iterating over objects in context 2021-07-31 13:14:05 +03:00
kgv
6054db8a29 0032482: Visualization - Object owner isn't removed from picked owner when object is removed
SelectMgr_ViewerSelector::RemoveSelectableObject() now removes object from picking results.
2021-07-31 13:11:27 +03:00
asuraven
bec59435e0 0032492: Coding - New warnings after integration fix for 27814 2021-07-27 14:51:05 +03:00
nds
4e993e4d0d 0027919: Visualization - support multiple transformation persistence groups within single presentation
Added transform persistence property to Graphic3d_Group and Select3D_SensitiveEntity.
SelectMgr_ViewerSelector, Graphic3d_Layer and OpenGl_Structure have been updated
to process per-group transform persistence within picking, ZFit and rendering.

Added zoomable state to Prs3d_ArrowAspect supported by PrsDim_Dimension.

Added gp_GTrsf::SetMat4(), opposite to gp_GTrsf::GetMat4().
2021-07-23 18:31:51 +03:00
mkrylova
ad3f20c684 0032455: Data Exchange - replace OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
- replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
2021-07-23 18:28:23 +03:00
asuraven
000c21fa0c 0027814: Parallelize BRepCheck_Analyzer
Change BRepCheck_Analyzer::Perform algorithm from recursion to 'for' loop
Add parallelization to BRepCheck_Analyzer::Perform
Add '-parallel' option to checkshape command to use parallelization. Default mode is single-thread.

mutex as Handle
2021-07-23 18:15:55 +03:00
oan
f1c034f905 0032471: Mesh - Deflection of the triangulation is not recomputed for planar face
Method EstimateDeflection has been added to BRepLib in order to check and update value of deflection provided by Poly_Triangulation;
Introduction of Poly_TriangulationParameters intended to keep info about initial parameters of mesh stored by Poly_Triangulation;
BRepMesh stores user-specified parameters to Poly_Triangulation via Poly_TriangulationParameters;
Prefer initial parameters of mesh generator stored in Poly_Triangulation during check of mesh consistency.
2021-07-23 18:15:55 +03:00
mkrylova
a3b2aaefac 0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added possibility to turn on/off directional light source dragging
- Added test
2021-07-23 11:28:42 +03:00
emv
b7344f5d72 0032329: Modeling Algorithms - Refactoring of the BRepOffset_MakeOffset_1.cxx to decrease number of static methods
Refactoring of the BRepOffset_MakeOffset_1.cxx - Introduce local class BRepOffset_BuildOffsetFaces to compute splits of offset faces.

Change of tests is caused by the correction of the misprint in the code (incorrect input parameter for CheckEdgesCreatedByVertex method).
2021-07-23 11:28:42 +03:00
kgv
acab849d30 0032479: Application Framework - unnecessary API break within TDocStd_Application::Open()
Added aliases to Open() without theFilter argument for compatibility with old API.
2021-07-15 20:09:58 +03:00
oan
9ee9e5ec34 0032424: [Regression] Mesh - Slow triangulation of a simple shape.
Check links produced by splitting of an initial link by the middle point for MinSize requirement.
2021-07-15 20:05:10 +03:00
kgv
06d40093b7 0032121: Draw Harness, ViewerTest - implement -reset option for vlight command
vlight command has been revised to provide more friendly syntax.
Command now accepts light index or name as first argument.
Added arguments -enable/-disable for managing enabled state.
Added argument -reset to reset light parameters to default values.

V3d_Viewer::SetDefaultLights() now sets names "headlight" and "ambient" to created lights.
Graphic3d_TypeOfLightSource enumeration values have been renamed to avoid shortcuts.
Draw::Atof(), applied corrections to avoid explicit new/delete calls.
2021-07-12 20:50:25 +03:00
abulyche
cb7f92396f 0031047: Modeling Algorithms - BRepExtrema_DistShapeShape gives wrong result
Added map of edges to BrepClass_Edge
Added searching of vertices with high tolerance to BrepClass_Intersector.cxx
Added check for hitting a vertex with high tolerance
Added the creation of a segment for the correct work of the classifier
2021-07-09 19:16:14 +03:00
kgv
7b17aba789 0032473: Visualization, WNT_Window::ProcessMessage() - handle WM_TOUCH
WNT_Window::ProcessMessage() now redirects WM_TOUCH events to AIS_ViewController,
so that it is possible to use multitouch displays in Draw Harness on Windows platform.

_WIN32_WINNT in CMake configuration for MinGW has been raised from 0x0501 to 0x0601.
2021-07-09 19:14:39 +03:00
kgv
0f04bd99d0 0032475: Configuration, qmake - drop "-z defs" linker flag on macOS 2021-07-09 19:14:00 +03:00
jgv
d1b591e580 0031890: Modeling Algorithms - Invalid result of common fuse BOP. Intersection has failed.
Modify the method BOPTools_AlgoTools3D::DoSplitSEAMOnFace: correct processing closed non-periodic surfaces.
2021-07-09 19:14:00 +03:00
mpv
d5c71e2057 0031918: Application Framework - New binary format for fast reading part of OCAF document
Implementation of new format for quick reading and writing parts of the documents (sub-set of labels and sub-set of attributes). It consists in writing shapes and all their contents right in the TNaming_NamedShape attribute placement and skipping the shape section. New format 12 for Binary file types is assigned to this version.

Added PCDM_ReaderFilter class that could be used in Open methods of TDocStd_Application. If it is defined, it allows to read:
- into already opened document in append mode AppendMode_Protect (do not overwrite existing attributes) or AppendMode_Overwrite
- only specified sub-trees of the document using AddPath (const TCollection_AsciiString& theEntryToRead)
- only specified attributes using AddRead (const TCollection_AsciiString& theRead) where theRead could be "TDataStd_Name", for example
- to skip specified attributes read using AddSkipped (const TCollection_AsciiString& theSkipped) where theSkipped could be "TDF_Reference", for example

The current limitations:
- only in Bin format
- if shapes have in the document shared topology, loaded in "append" mode in different "load" operations, they will have no shared topology anymore

Modifications:
BinLDrivers and BinDrivers packages - modifications related to the quick part tree format flag usage, skipping shape section writing and adding labels sizes into the document to be able to pass labels during the reading quickly.
BinObjMgt_Persistent and BinObjMgt_Position - to add possibility to write directly into the stream some data just after the attribute. Before this record a data-size is recorded.
BinMXCAFDoc package modifications to write BinMXCAFDoc_LocationDriver location in the same way as shapes write location data right after the attribute (empty) data in this new format.
BinTools package: creation of ShapeReader and ShapeWriter classes with same root class ShapeSetBase with ShapeSet class. These classes allows to write/read shapes directly to the stream. If some object is already in the stream, write a reference - relative position of the duplicated object. The old format of documents is still supported by Bin_ToolsShapeSet class.
PCDM_ReaderFilter - Allows the user to create a reading filter. It contains algorithm to browse labels tree quickly, without usage of referencing by entry-strings.
TDocStd, CDF and some other packages are changed for supporting reading filters API and options.

Tests, documentation and upgrade information are also added for both issues: 31839 and 31918 related to this commit.
2021-07-09 19:13:59 +03:00
kgv
9e5e4c0c84 0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspector:BOOL=ON - part 2 2021-07-06 16:46:31 +03:00
mkrylova
1f3c5058f2 0032389: Visualization, AIS_Axis - simple ray creation and displaying
- Added constructor to create axis by gp_Ax1
- Added possibility to display axis as ray
- Added function SetDisplayAspect to set required visualization parameters
2021-07-01 22:27:46 +03:00
mkrylova
9749af25ae 0032441: Draw Harness - command readstl doesn't print error message on failure
- added producing error message when passing an invalid file path
2021-07-01 22:26:10 +03:00
kgv
0770d850d6 0032465: Visualization, TKOpenGles - invalid enum on GL_RGBA16F initialization in Edge 92
GL_HALF_FLOAT_OES from OpenGL ES 2.0 extension
is now avoided within OpenGL ES 3.0+ context in favor of GL_HALF_FLOAT.

emscripten_webgl_enable_extension() is now called for all extensions
checked by OpenGl_Context::CheckExtension().
So far this doesn't solve any problem, but looks more logical and provisional.
2021-06-28 23:01:11 +03:00
kgv
16222b8cd2 0032463: Visualization - implement Image_AlienPixMap::Load() via emscripten_get_preloaded_image_data() 2021-06-27 17:32:27 +03:00
kgv
73dee81133 0032460: Coding Rules - eliminate CLang warning -Wunused-but-set-variable
Code has been adjusted to suppress -Wunused-but-set-variable warnings.

DRAWEXE.wasm, compiler flags have been moved to linker flags
to eliminiate -Wunused-command-line-argument warnings.
2021-06-24 23:47:45 +03:00
mkrylova
503374ad84 0032182: Visualization - add Select3D_SensitiveSphere
- created Select3D_SensitiveSphere class
- implemented interfaces for intersection methods
- added tests
2021-06-24 19:52:25 +03:00
kgv
c123c310df 0032459: Draw Harness, ViewerTest - fix description of vrenderparams -oit 2021-06-24 19:50:48 +03:00
kgv
91836c86eb 0032458: Draw Harness, ViewerTest - fix misprint in vaspects -drawSilhouette 2021-06-24 19:49:35 +03:00
asuraven
c9337e33a6 0029059: It is necessary to have a unique way of checking of the validity of the edge and its 2D curves
Add new class BRepLib_ValidateEdge to use for edge checking instead of functions:
- Validate() from BOPTools_AlgoTools.cxx
- Validate() from BRepCheck_Edge.cxx
- ShapeAnalysis_Edge::ComputeDeviation()
2021-06-24 19:47:49 +03:00
osa
51d4a4f9d0 0032390: Visualization, SelectMgr_FrustumBuilder - use camera instead of duplicated methods
Fix incorrect value of axis intersection with segment inside of SelectMgr_AxisIntersector::raySegmentDistance().
Move camera definition to base intersector (it is not possible to set it for axis intersector, is is not applicable).
Add method Graphic3d_Camera::SetIdentityOrientation() to set camera parameters to make current orientation matrix identity one.
Remove all matrices from selection intersectors and frustum builder and use camera instead of them.
Fix missed axis tests in vselect grid.
2021-06-22 11:17:39 +03:00
kgv
4db6d89bc6 0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspector:BOOL=ON 2021-06-18 18:36:57 +03:00
kgv
690757a382 0032453: Documentation - nested multiline comments within BOPAlgo_CellsBuilder.hxx destroy Java wrapping 2021-06-18 18:35:43 +03:00
osa
168c27c69e 0032400: Visualization, TKIVtk - convert VTK camera to OCC
Add new interfaces GetEyePosition(), GetClippingRange(), GetAspectRatio() to IVTK_IView
Add ivtkviewparams command to print current parameters of view
Add ivtkcamera comand to print current camera parameters or manages camera parameters (set ortho or persp projection)
2021-06-18 18:34:02 +03:00
kgv
1790e9f28c 0032430: Coding Rules - eliminate CLang warning -Wdeprecated-copy
Introduced Standard_DELETE alias to C++11 feature "=delete".
2021-06-18 18:23:45 +03:00
bugmaster
42633ff642 0032156: Documentation, gendoc.tcl - wrong processing of 'mathjax' option 2021-06-18 18:23:45 +03:00
Natalia Ermolaeva
1aee888374 0032432: Inspectors - problems with tools test group
Adding __APPLE_ definition for libraries
2021-06-18 18:23:44 +03:00
bugmaster
50174691dc 0032404: Draw - problems with definition of cpulimit in tests
- The maximum value of cpulimit in test cases was limited to 1000 seconds (~ 17 minutes)
- cpulimit 1000 has been added to hlr/begin
2021-06-16 17:10:53 +03:00
kgv
3e6e62d861 0032438: Configuration - add batch files to build OCCT using Mingw-w64 2021-06-13 14:08:59 +03:00
kgv
902b31b6ee 0032437: Coding Rules - eliminate MinGW warning -Wmaybe-uninitialized 2021-06-13 14:08:59 +03:00
kgv
f9ab9f7f1c 0032433: Visualization, TKService - introduce Wasm_Window implementing Aspect_Window interface using Emscripten SDK
Introduced Wasm_Window implementing Aspect_Window interface.

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

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

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

Removed unused Aspect_Convert.hxx.

DRAWEXE targeting Wasm:
- added exposing of FS interface so that it is possible uploading/downloading files to/from emulated file system on JavaScript level;
- added printer redirecting messages to Module.printMessage callback accepting message gravity;
- Run_Appli() now skips std::cin when Module.noExitRuntime is set.
2021-06-12 12:36:24 +03:00
mpv
7b3a032f1e 0032299: Application Framework - Loading OCAF document saved with earlier version fails when using OCCT 7.5.1
Keeping information about the file start instead of calling tellg. This fixes problem with not-seekable streams used for XML files reading and improves performance of XML files reading (about 10%), since tellg is quite long operation.
2021-06-09 19:46:22 +03:00
mkrylova
623e54f9ac 0032417: Coding Rules - clean up public headers gp_Mat.hxx/ gp_Mat2d.hxx from internal macros
Deleted internal macros.
2021-06-09 19:40:22 +03:00
kgv
aa71e826ca 0032428: Documentation, AIS_InteractiveContext - put cross-references between MoveTo() and HighlightStyle()
Added more @sa section between methods.
Deprecated Select() methods have been moved to the section with obsolete methods.
Methods delimiter within @sa listing has been changed from '/' to ',' for proper Doxygen generation results.
2021-06-09 14:44:31 +03:00
kgv
6a920e0243 0032419: Coding Rules - revert Overlaps() methods to SelectBasics_SelectingVolumeManager as deprecated aliases
Deprecated Overlaps() methods have been moved from subclass SelectMgr_SelectingVolumeManager
to the base class SelectBasics_SelectingVolumeManager,
so that they are actually accessible within Select3D_SensitiveEntity::Matches() implementations.

Several methods have been marked as pure virtual in the base interface.
Second SelectMgr_BaseIntersector::OverlapsPolygon() has been dropped from virtual interface
as useless (trivially replaceable).
2021-06-04 19:10:46 +03:00
kgv
1b6b8afcd0 0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file
Unstable test case v3d/memory/bug26538 has been adjusted.
2021-06-03 18:28:45 +03:00
zaphod
ff1f0c9ae2 0032402: Coding Rules - eliminate msvc warning C4668 (symbol is not defined as a preprocessor macro, replacing with '0' for directive)
Make preprocessor expressions consistent with respect to guard expressions.

Fixed usage of macros __QNX__, IRIX, OCCT_DEBUG, DO_INVERSE, DRAW, CHFI3D_DEB by value.
Removed obsolete hack for Sun Workshop 5.0 compiler.
2021-06-03 18:06:46 +03:00
mkrylova
d5477f8c82 0032137: Coding Rules - merge redundant .lxx files into header files within Package gp
- merged .lxx files into header files within Package gp
- fixed code style
2021-06-03 18:02:58 +03:00
kgv
5b441ee1a0 0032406: Configuration, CMake - DRAWEXE build fails on Linux with static libraries
Add missing CSF_dl, CSF_TclTkLibs to DRAWEXE dependencies (static build).
2021-05-31 16:05:43 +03:00
mkrylova
2315a04424 0032279: Draw Harness - protect incmesh from hanging on syntax error
- improved incmesh to raise exception on invalid input parameters
- added possibility to operate multiple objects
- added checking for too small values in BrepMesh algorithm
2021-05-28 18:08:30 +03:00
osa
1e4f29c5af 0032399: Configuration - correct search of VTK bin path by genconf 2021-05-27 21:09:36 +03:00
osa
18a353149e 0032385: Coding - New msvc10 warnings after integration fix for 32338 2021-05-26 20:21:34 +03:00
kgv
3738565abb 0026365: Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface
Removed workaround within GeomLib_CheckCurveOnSurface.
2021-05-26 20:20:38 +03:00
Dzmitry Razmyslovich
793d165af6 0032261: Mesh - some trivial improvements for mesher
BRepMesh_Delaun::decomposeSimplePolygon(): minor change to improve code readability;
Correct test case
2021-05-26 20:09:15 +03:00
Dzmitry Razmyslovich
3326f9238c 0032261: Mesh - some trivial improvements for mesher
BRepMesh_ModelHealer::amplifyEdges use a single instance of EdgeAmplifier
2021-05-26 20:09:15 +03:00
Dzmitry Razmyslovich
ccb3502a56 0032261: Mesh - some trivial improvements for mesher
BRepMesh_GeomTool::IntSegSeg misses one case, when the result is Glued
2021-05-26 20:09:15 +03:00
osa
0038de11f4 0032388: Visualization - provide ray-picking interface with zero tolerance for rectangular frustum 2021-05-26 20:07:41 +03:00
osa
807340d924 0032387: Visualization - use interface of ray-picking for selection/highlighting for XR pose
Fixed regression of SelectMgr_ViewerSelector::SetPixelTolerance(). Removed redundant myToUpdateTolerance flag.

SelectMgr_AxisIntersector::raySegmentDistance() - fixed usage of SquareModulus() instead of Modulus().
SelectMgr_ViewerSelector::TraverseSensitives() now skips both BVHSubset_2dPersistent and BVHSubset_3dPersistent relying on Camera.

AIS_ViewController::handleXRMoveTo() now uses interface for picking by Axis explicitly
instead of emulating axis by point picking.
2021-05-26 20:06:45 +03:00
mkrylova
03c9cc86c6 0032337: Visualization - rename Overlaps() method in selection to more self-describable names
- renamed Overlaps and hasOverlap overloaded methods to self-describable names
2021-05-26 20:02:42 +03:00
kgv
df23a355c4 0032391: Draw Harness - missing syntax validation within vseldump
SelectMgr_SelectionImageFiller, SurfaceNormalFiller - pick results from SelectMgr_SortCriterion
instead of calling redundant Matches().
vseldump - added missing syntax error output on incorrect -type parameter.
2021-05-26 19:26:12 +03:00
vro
604aa3f4b3 0031920: Application Framework - speed up methods of getting label by entry and vice versa
A table for fast access to the labels by entry is implemented in OCAF document. A method TDF_Data::SetAccessByEntries(true) fills-in a table for fast access to the labels. New labels, created later will be added to the table automatically. The method TDF_Tool::Label() will search the entry in the table and then, if not found, will call the old code. Disabling of usage of the table (by calling of TDF_Data::SetAccessByEntries(false)) cleans the internal table of entries - labels. By default, the table is not used.
            This improvement is useful for large documents with a lot of labels, and if the application uses entries to get labels. The application should call TDF_Data::SetAccessByEntries(true) for a document and then, the method TDF_Tool::Label() called inside OCAF and XCAF will use the fast access to the labels and speed-up the application.
            Also, the method TDF_Tool::Entry() is improved (by MPV).

            Modified files:
            - TDF_Data.hxx and cxx: the new methods SetAccessByEntries(bool), IsAccessByEntries() and GetLabel(entry) are implemented. No need to use the method GetLabel() directly. It is called in TDF_Tool::Label().
            - TDF_Label.cxx: adding of a newly created label to the table of entries - labels.
            - TDF_Tool.cxx: the method Entry() is accelerated (by MPV) and Label() is improved to call TDF_Data::GetLabel().
            - DDF_DataCommands.cxx: a new draw-command is added SetAccessByEntry, which sets or unsets usage of the table for fast access to the labels. Usage of the draw-command is illustrated in a new test "bugs caf bug31920".

            Tests:
            - bugs caf bug31920: a new simple test to check TDF_Tool::Label() when fast access to the labels is on.

            Doc:
            - dox\upgrade\upgrade.md is extended for new information
2021-05-22 10:36:40 +03:00
jgv
f0ca3c819f 0032196: Modeling Algorithms - Invalid section curve
Modify the method IntWalk_IWalking::ComputeCloseLine: add condition for check of update of variable containing current solution
2021-05-22 10:36:40 +03:00
osa
0461e7fd03 0032338: Visualization - provide straightforward interface for ray-picking 2021-05-22 10:36:39 +03:00
osa
e1eb39d29d 0032365: Visualization - refactoring of viewer selector
Add SelectMgr_BaseIntersector class as base intersector that can have any geometry not only frustum.
Remove cached static array of selecting volumes from selecting volume manager. Keep only one the latest active selection volume.
Change initialization interface of active volume frustum inside of selecting volume manager: Init*SelectingVolume(), set required parameters, BuildSelectingVolume(). Mark existing BuildSelectingVolume() methods as deprecated.
Use SelectMgr_SelectionType instead of SelectBasics_SelectingVolumeManager::SelectionType (the last one is marked as deprecated).
Add interface GetViewRayDirection() to selecting volume manager to get view ray direction (instead of computation it as vector from near to far point).
Add interface IsScalableActiveVolume() to selecting volume manager to check possibility of scaling of current active selecting volume.
2021-05-22 10:36:39 +03:00
btokarev
77d94fd174 0032340: OCCT Documentation - highlight C++ code snippets
Added {.cpp} highlighting markers to the C++ code blocks in documentation;
Excessive tildes "~~~~~~~" in code block borders are reduced to required minimum of "~~~~" (4);
Removed obsolete space bars after code block borders;
TCL code blocks are now highlighted with {.php} markers;
Removed excessive {.cpp} highlighting markers appended to non-code blocks such as lists, reports and file content or structure examples;
Minor fixes for tests.md and draw_test_harness.md (whitespace removal and structural fix for "Where:" in code examples);
Minimum HDD space for OCCT updated in introduction.md.
2021-05-22 10:36:38 +03:00
kgv
4d67a36952 0032353: Modeling Data - Missing definition of ProjLib_ProjectOnSurface::Load() 2021-05-22 10:36:38 +03:00
kgv
c1ce84dcb3 0032292: Coding Rules - improve HLRBRep_PolyAlgo readability part 3
Use typed collections instead Handle(Standard_Transient) values.
2021-05-22 10:36:38 +03:00
mkrylova
114e7a9022 0032366: Visualization, SelectMgr_ViewerSelector3d::ToPixMap() - add option dumping surface normals
- extended functionality to dump surface normals
- added new option to vseldump command
- added tests
2021-05-21 19:00:57 +03:00
nds
d16ecfe28e 0031362: Inspectors - MessageView plugin for message alerts
- append new MessageView plugin to display content of Message_Report;

- correct DumpJson of TDataStd array attributes to print Lower/Upper values;
- correct remove level of Message_Report to store stop time during removing all levels;
- append DumpJson for TFunction, TPrsStd attributes;
- correct DumpJson of XCAFDoc tools due to simplify performance of it;
- move AttributeInfo functionality from XDEDRAW into a static public method of XCAFDoc to call it outside;
- remove obsolete pane classes in DFBrowser plugin, now we may use DumpJSon panel to visualize this content of attributes;
- add new property panel in DFBrowser (synchronized with the same in other plugins);
- add button to switch ON DumpJson in DFBrowser(OFF by default, for better performance), also there is a context menu item in tree view;
- rename in DFBrowser "Property Panel" into "Property Panel (custom)";
- implement ViewControl_ColorSeletor and setting color in TreeModel_ItemProperties. Use only for light in VInspector now;
- implement setting false for all created AIS_Shape presentation to don't modify source TopoDS_Shape;
- remove not use VInspector_CallBack. It's possible using Message_Report/MessageView to track commands way;
- remove History panel in VInspector as not used, MessageView will be better solution for this;
- implement item and actions in VInspector for setting Lights in the view.
2021-05-18 19:23:10 +03:00
bugmaster
9a5bfc1c07 0032326: Tests - duplicated bottle.brep reference in test data 2021-05-15 12:47:44 +03:00
sshutina
d1b8120b69 0032364: Visualization - Add interface to return global filter from context 2021-05-14 20:44:00 +03:00
jgv
06392edef7 0032291: Modeling Algorithms - General Fuse produces wrong number of solids
Modify method IntWalk_IWalking::ComputeCloseLine: add new flag "isOnDegeneratedBorder" to reach the border successfully.
2021-05-14 20:43:59 +03:00
kgv
44a5aa517b 0032372: Configuration, qmake - define -Wall -Wextra flags for consistency with CMake options 2021-05-14 20:43:59 +03:00
akaftasev
8d52a74d03 0031147: Modeling Algorithms - BRepOffsetAPI_MakePipeShell null access
Added to Draw command 'setsweep ' posibility to change degmax and segmax parameter manually by '-SM' and '-DM' options
Added test
Added new condition to prevent crash
2021-05-14 20:43:58 +03:00
akaftasev
da02839efe 0029645: Hang on making pipe shell using BRepOffsetAPI_MakePipeShell
Added new boolean parameter to GeomLib::FuseIntervals() to select method of defining an element with close values
2021-05-14 20:43:58 +03:00
kgv
f5682e9f78 0032357: Coding Rules - eliminate GCC11 compiler warnings -Wignored-qualifiers 2021-05-12 19:59:21 +03:00
kgv
14ba0bbad7 0032351: Visualization, PrsDim_LengthDimension - add NULL checks for handling non-Line curves
Added several missing NULL-checks.
Reduced restrictions on building Edge-Edge and Edge-Vertex length dimension.
Added empty constructor for more straightforward initialization from vdimension command.
2021-05-11 19:24:10 +03:00
kgv
1220d98e7a 0032349: Visualization, TKOpenGl - move base buffer interface out from OpenGl_VertexBuffer class to OpenGl_Buffer
OpenGl_Buffer - added new class as a base for OpenGl_VertexBuffer, OpenGl_IndexBuffer, OpenGl_TextureBuffer.
OpenGl_TextureBufferArb has been renamed to OpenGl_TextureBuffer.
OpenGl_FrameBuffer - added initializers taking vec2i instead of (int,int) for dimensions.
2021-05-11 19:20:51 +03:00
jgv
11bbf75932 0032332: Modeling Algorithms - Incorrect result of ShapeUpgrade_UnifySameDomain
Method UnionPCurves of ShapeUpgrade_UnifySameDomain is modified: check of the range of new pcurves is added: if the range differs from the 3D-curve's one, the pcurves are being recomputed by projection.
2021-05-11 19:19:37 +03:00
kgv
d82eb9de24 0032270: Configuration - Removing VS 2008 from maintenance
Documentation - updated list of supported platforms.
2021-05-11 19:18:29 +03:00
luz paz
03ca365a6c 0031939: Coding - correction of spelling errors in comments [part 12]
Fix various typos via codespell.
2021-05-10 14:29:42 +03:00
luz paz
2641792e45 0031939: Coding - correction of spelling errors in comments [part 11]
Fix various typos via codespell.
2021-05-10 14:29:40 +03:00
mkrylova
43d09575e1 0032191: Tests - merge duplicated tests/v3d selection cases
- merged duplicated tests vselect cases
2021-04-30 18:43:32 +03:00
anv
2c276f91da 0032331: Visualization - Exception when trying to display some surfaces using iVtk with VTK 9
Updated memory allocation for vtkPolyData to use more suited method for VTK versions after 9.0
2021-04-30 18:42:01 +03:00
kgv
977d3d479e 0032342: Draw Harness - preload basic Tcl scripts into WebAssembly
DrawResources Tcl scripts and $tcl_library (init.tcl) are now preloaded into WebAssembly emulated filesystem for DRAWEXE.wasm.
DRAWEXE now mimics "pload" command for statically linked plugins.
2021-04-30 18:39:33 +03:00
kgv
b04cd5d587 0032341: Coding Rules - eliminate GCC11 compiler warnings -Wmaybe-uninitialized 2021-04-30 10:55:01 +03:00
dpasukhi
36fbf05b15 0032314: Data Exchange - Reading corrupted STEP files crashes
RWAxis2Placement3d:
 fixed problem with reading parameters ( if sub-entity invalid, set has-parameter to false )
2021-04-28 18:38:34 +03:00
emv
62eafa5ac7 0032088: Modeling Algorithms - Empty result of offset operation in mode "Complete" join type "Intersection"
Mark inverted edges located inside loops of invalid edges as invalid as well.
2021-04-28 18:37:28 +03:00
dpasukhi
596e783958 0031949: JT Import - some colors are lost while reading XT representation from JT file
Added checking to style of faces from SHELL and edges from WIRE
RWMesh_CafReader::fillDocument() is virtual now
2021-04-28 18:31:04 +03:00
kgv
cece953cb4 0032334: Visualization - SelectMgr_RectangularFrustum::Overlaps() does not set triangle normal in some cases
Added missing SelectBasics_PickResult::SetSurfaceNormal().
2021-04-28 18:27:56 +03:00
kgv
342bb7fd4d 0032323: Configuration - drop unused dependency from Xmu
Removed unused header Aspect_XWD.hxx.
Removed redundant includes of unused X11 extension headers.
Added missing dependency on pthread to TKDraw.

Added "-z defs" linker flag to qmake projects to detect missing library dependencies.
Removed unused CSF_MotifLibs.
2021-04-28 18:26:58 +03:00
kgv
376d374d1f 0032319: Foundation Classes, OSD_MemInfo - use mallinfo2() instead of deprecated mallinfo() 2021-04-28 18:18:26 +03:00
kgv
fd2efe5428 0032320: Documentation - mention rapidjson-dev and qtcreator within Debian packages 2021-04-23 18:47:36 +03:00
kgv
a34bddcfd6 0032315: Configuration, CMake - fix building Draw Harness plugins as static libraries
DPLUGIN() macros no more defines exported function PLUGINFACTORY when building static libraries.
DRAWEXE executable now pre-loads a set of plugins when building static libraries.
dversion - added WebAssembly info.
2021-04-23 18:46:13 +03:00
bugmaster
d0d9e9375f 0032311: Documentation - Removing obsolete tag COLS_IN_ALPHA_INDEX 2021-04-22 14:50:54 +03:00
kgv
f6651f22e6 0032313: Modeling Algorithms - Missing definition of constructor in GeomFill_NSections 2021-04-22 14:50:54 +03:00
emv
ad3dc75556 0032307: Modeling Algorithms - Empty result of offset operation in mode "Complete" Joint type "Intersection"
Make sure the vertices created by pairwise intersection of edges connected in the same vertex are unified correctly.
2021-04-22 14:50:54 +03:00
nds
b06da8f1f1 0032091: Visualization - possibility to redefine Graphic3d_TransformPers 2021-04-22 14:50:53 +03:00
kgv
e186cf152b 0032292: Coding Rules - improve HLRBRep_PolyAlgo readability part 2
Applied name conventions and dropped tabulation symbols.
2021-04-22 14:50:48 +03:00
luz paz
316ea29318 0031939: Coding - correction of spelling errors in comments [part 10]
Fix various typos via codespell.
2021-04-22 14:50:47 +03:00
kgv
b69e576af0 0032308: Configuration - make Xlib dependency optional
MACOSX_USE_GLX has been renamed to HAVE_XLIB and now configurable on Linux target.

Xw_Window.hxx now export class on non-Linux platforms.
OpenGl_Window now creates an off-screen EGL surface also in case of
window-less desktop setup (e.g. with disabled Xlib on Linux).

Draw_Window - code has been cleaned up.
Class definition has been unified across platforms when possible.
Unusued constructors have been removed.
Internal header files (MainWindow.h, init.h, etc.) have been renamed to .pxx
to avoid their unexpected distribution in "inc".
2021-04-22 14:50:46 +03:00
kgv
e8e157df45 0032306: Draw Harness, ViewerTest - move window message processing to TKService
Aspect_WindowInputListener - basic mouse/keyboard/expose input methods
have been moved out from AIS_ViewController to dedicated base interface.

Added WNT_Window::ProcessMessage()/Xw_Window::ProcessMessage() methods
redirecting Win32/X11 message to Aspect_WindowInputListener.
2021-04-17 15:14:16 +03:00
jgv
1294d5e39e 0031984: Modeling Algorithms - Sweep crashes if Bi-normal is given
Small modification in BRepFill_Sweep: to avoid exception, return status NotDone if construction of pipe surface fails.
2021-04-16 18:29:29 +03:00
jgv
93e453aa02 0032213: Modeling Algorithms - Invalid result of UnifySameDomain
Modify unification of faces: add splitting new wire into several ones.
2021-04-16 18:27:34 +03:00
kgv
57357010a8 0032301: Visualization, TKOpenGl - depth peeling is broken with OpenGl_Caps::buffersOpaqueAlpha option
OpenGl_LayerList::renderTransparent() - color mask is now set to write into Alpha channel of depth peeling FBOs.
OpenGl_View::blitBuffers() - avoid using undefined color for glClear(GL_COLOR_BUFFER_BIT) operation.
2021-04-16 18:19:49 +03:00
kgv
b907cca37e 0032304: Configuration - genproj should not override env.bat in OCC Products 2021-04-15 19:14:25 +03:00
kgv
d85cd274c4 0032302: Visualization, TKOpenGles - do not use window buffer by default
OpenGl_Caps::useSystemBuffer is now set to FALSE on both OpenGL and OpenGL ES.
OpenGl_Caps::buffersNoSwap and OpenGl_Caps::buffersOpaqueAlpha are now set to TRUE by default on WebGL.
2021-04-15 19:11:43 +03:00
kgv
87b68a0fd6 0032232: Draw Harness - make Tk dependency optional 2021-04-15 19:07:50 +03:00
nds
e76471b558 0032205: Visualization - implementing new selection scheme in context - replace extra
- implementation of additional selection scheme, mainly to deselect single selected object.
2021-04-15 19:05:56 +03:00
kgv
d37aef5ccf 0031678: Visualization - add option enabling hinting for textured fonts
Added new rendering parameter Graphic3d_RenderingParams::FontHinting
allowing to enable/disable hinting (default is no hinting preserving old behavior).

Command vrenderparams has been extended with arguments -fontHinting.
2021-04-15 19:03:52 +03:00
kgv
75e1b51170 0032292: Coding Rules - improve HLRBRep_PolyAlgo readability part 1
HLRBRep_PolyAlgo::StoreShell() - removed a couple of redundant variables (pointers to handles) and extra iterators.
Added a couple of missing NULL checks (HLRBRep_PolyAlgo::Normal() now skips CSLib::Normal() in case of no surface).
2021-04-13 20:17:03 +03:00
kgv
9e7cc3ad59 0032297: Coding Rules - merge GCPnts_UniformAbscissa.pxx into GCPnts_UniformAbscissa.cxx 2021-04-12 23:18:52 +03:00
kgv
194c71af96 0032296: Coding Rules - merge GCPnts_QuasiUniformDeflection.pxx into GCPnts_QuasiUniformDeflection.cxx 2021-04-12 23:18:52 +03:00
kgv
24579ecd6e 0032295: Coding Rules - merge GCPnts_AbscissaPoint.pxx into GCPnts_AbscissaPoint.cxx 2021-04-12 23:18:52 +03:00
kgv
de8a63e98e 0032294: Coding Rules - merge GCPnts_QuasiUniformAbscissa.pxx into GCPnts_QuasiUniformAbscissa.cxx 2021-04-12 23:16:44 +03:00
kgv
3d42fbc189 0032293: Coding Rules - merge GCPnts_UniformDeflection.pxx into GCPnts_UniformDeflection.cxx 2021-04-12 13:09:27 +03:00
kgv
a2af24d1a9 0032289: Visualization - add NCollection_Mat3 for 3x3 matrix similar to NCollection_Mat4
Introduced NCollection_Mat3 class similar to NCollection_Mat4.
Added NCollection_Mat4::operator() alias to NCollection_Mat4::Value().
Added NCollection_Mat4::Negated(), ::Subtracted(), ::Added(), ::Divided() operations.
Added a note to NCollection_Mat4::GetData() that matrix values are stored in column-major order.
Removed duplicated operator== operators from NCollection_Mat4/NCollection_Vec4/NCollection_Vec3/NCollection_Vec2 classes.

Removed obsolete and no more used matrix state fields from OpenGl_Workspace.
Removed obsoiete structure OpenGl_Matrix (replaced by OpenGl_Mat4).
OpenGl_ShaderProgram - duplicated methods have been replaced by templates.
2021-04-09 18:12:05 +03:00
kgv
c6aa2a8317 0032285: Coding Rules - get rid of generic methods in GCPnts_TangentialDeflection 2021-04-07 18:39:53 +03:00
kgv
95bdefb201 0032274: Tests - unstable snapshots from test case v3d/bugs/bug24785
Test case has been adjusted to reproduce scenario it was supposed to check.
2021-04-07 18:38:17 +03:00
ifv
c57bf5636c 0032106: Modeling Algorithms - Tolerance of General Fuse result depends on a sequence of arguments
BOPTools_AlgoTools2D::MakePCurveOnFace(...): extension of surface for projection with large tolerance is added.

test/bugs/modalg_7/bug32106 : new test case added
2021-04-07 18:37:19 +03:00
kgv
5c9493b348 0031087: Configuration - make FreeType dependency optional
Added option USE_FREETYPE to CMake configuration, enabled by default.
Added handling of HAVE_FREETYPE macros.

genproj now overrides env.bat/env.sh on template change.
2021-04-07 09:42:45 +03:00
gka
5e4f263d1c 0032264: Data Exchange - STEP exporter generates bad geometry [REGRESSION since 7.4.0]
Location of edge is applied to geom curve before analysis of vertices projections
2021-04-02 20:02:03 +03:00
kgv
ae64fe0119 0032276: Coding Rules - replace IntTools_CArray1OfReal by NCollection_Array1
IntTools_CArray1OfReal has been replaced by TColStd_Array1OfReal.
IntTools_CArray1OfInteger has been removed (unused).
2021-04-02 20:01:35 +03:00
luz paz
5e6e59146f 0031939: Coding - correction of spelling errors in comments [part 9]
Fix various typos via codespell.
2021-04-02 20:01:34 +03:00
akaftasev
00e9052bee 0031190: Modeling Algorithms - progress indication in GeomPlate is inconsistent
Added ability to display progress indicator in plate commands
Added tests
2021-04-02 20:01:34 +03:00
kgv
51c21d1fe4 0032174: Data Exchange - read.step.root.transformation parameter has reversed definition
Parameter definition has been corrected to match other Boolean parameters to map 0=OFF and 1=ON.
2021-04-02 20:01:33 +03:00
kgv
d0b8f0108f 0025845: VIS - Surface normals to be associated with polygonal source
IVtk_IShapeData::InsertCoordinate() has been replaced by IVtk_IShapeData::InsertPoint()
defining vertex position with surface normal.
IVtkVTK_ShapeData now allocates normals array within vtkPolyData.
IVtkOCC_ShapeMesher now fills in vertex positions with surfcae normals.
IVtkTools_SubPolyDataFilter has been corrected to optionally copy normals.

ivtksetboundingdraw command has been merged into "ivtksetdispmode -faceBoundaryDraw".
2021-04-02 20:01:33 +03:00
osa
cb766858b7 0032269: Visualization - update trinfo command with -lods option 2021-03-31 20:44:33 +03:00
kgv
20085dac44 0032262: Samples - JNIViewer sample compilation failure due to usage of removed aliases to Image_Format 2021-03-31 20:44:33 +03:00
kgv
cdcb843ef4 0032251: Documentation, gendoc.tcl - reference manual excludes TKIVtk and other optional modules
gendoc.tcl -refman now temporarily sets HAVE_ environment variables for including optional modules.
2021-03-31 20:44:32 +03:00
kgv
08eda8e30d 0032250: Documentation - pseudographics within gp_Trsf description is not properly escaped
Added @code tags to documentation of several classes in the package gp.
2021-03-31 20:44:31 +03:00
osa
5443dd2ffa 0032248: Visualization - load "false" deferred glTF data immediately 2021-03-31 20:44:30 +03:00
kgv
3483c64453 0032247: VIS, IVtkOCC_ShapeMesher - allow disabling auto-triangulation behavior
IVtkOCC_Shape now stores Prs3d_Drawer object used by IVtkOCC_ShapeMesher and IVtkOCC_SelectableObject.
IVtkOCC_ShapeMesher::internalBuild() made more consistent to AIS_Shape::Compute() in cleaning/triangulating shape.

Added command ivtkdefaults similar to vdefaults managing triangulation default parameters.
2021-03-31 20:44:29 +03:00
kgv
bbc5899a8c 0032242: Configuration, CMake - USE_GLES2 option does not appear in interactive configurator
USE_D3D, USE_OPENGL and USE_GLES2 options declarations have been reordered.
2021-03-27 13:46:04 +03:00
ifv
bff660919f 0032225: Modeling Data - Wrong result of extrema curve-surface
Extrema_GenExtCS.cxx: subdivision on intervals for periodic c curves is added

Extrema_FuncExtCS.hxx: access to fields mySqDist, myPoint1, myPoint2 is added

bug32225: new test case is added
2021-03-27 13:46:04 +03:00
ifv
c69e0e408f 0028196: Modeling Data - Algorithm 'Extrema_GenLocateExtPS' failed to find the extremum in a case
Extrema_GenLocateExtPS.cxx, Extrema_GenLocateExtPS.hxx:

Adjusting tolerances according to surface sizes is added.
Additional methods for searching solution are added for cases if basic method fails.

Extrema_FuncPSDist.cxx - small bug fixing.

BRepFill_TrimShellCorner.cxx - fixing regression

ChFi3d_Builder_CnCrn.cxx setting parameters for Plate algorithm to improve stability of solution

ProjLib_ComputeApproxOnPolarSurface.cxx - code optimization

Some test cases are modified according to current state of Extrema algorithm
2021-03-27 13:46:03 +03:00
kgv
6c2cf030e2 0032234: Configuration, OSD_Process::UserName() - avoid using getpwuid() unimplemented by Emscripten SDK 2021-03-27 13:46:03 +03:00
kgv
285b5189cd 0032246: Tests, Visualization - unstable test case bugs/vis/bug79 reporting memory leak
Test case has been adjusted to check memory trend after the loop.
2021-03-27 13:46:02 +03:00
osa
e816dce36e 0032086: Visualization - support deferred data loading
1) Extend Poly_Triangulation by mesh purpose, possibility to be cleared and late-load deferred data interfaces.
2) Update BRep_TFace to store list of triangulations istead of single one. And also active one. Update getter and setter of single triangulation and add new methods to interaction with whole triangulations list.
3) Update BRep_Tool to get single triangulation of face according to the input mesh purpose or whole triangulations list.
4) Update BRep_Builder to make face by not only single triangulation but whole triangulations list with specified active one.
5) Add new methods to BRepTools to interact with shape triangulations (Load/Unload/Activate/LoadAll/UnloadAllTriangulation(s))
6) Add new 'tlateload'command for shape to load/unload/activate triangulations.
7) Update 'trinfo' command by '-lods' options to print detailaed information about LODs of this shape
8) Support empty triangulations by selection. Use bounding box selection in this case.
9) Add new 'outdisplist' option to XDispaly command to print list of displayed objects to output variable but not to theDI
10) Add new '-noecho' option to vdisplay command to skip printing of displayed objects to theDI
11) Create new RWMesh_TriangulationSource as mesh data wrapper for delayed triangulation loading.
12) Create new RWMesh_TriangulationReader as base interface for reading primitive array from the buffer.
13) Cache nodes/triangles number defined in glTF file
14) Use RWMesh_TriangulationSource class as base of RWGltf_GltfLatePrimitiveArray one and RWMesh_TriangulationReader class as base of RWGltf_TriangulationReader one
15) Add possibilty to support of LODs by glTF reader. It is possible to skip data loading and load them later
16) Add new '-skiplateloading' (to skip triangulation loading), '-keeplate' (to keep information about deferred storage to load/unload triangulation later),
'-toprintdebuginfo' (to print additional debug information) options to ReadGltf command
17) Add new test of glTF late loading
2021-03-27 13:46:02 +03:00
kgv
6387996871 0032243: Tests - unexpected file artifact s.stl at the root of repository
Several test cases have been corrected to avoid creation
of temporary files s.stl, comp_nonmanifold.step, bug31301_1.stp at unexpected location.
2021-03-26 19:48:51 +03:00
kgv
0d828ac838 0032208: Tests - refactor visualization tests to cover several graphic drivers
Removed testgrids 'bugs/vis' and '3rdparty'; tests have been redistributed across other grids.
Moved testgrid 'v3d/ivtk' into dedicated 'vtk/ivtk'.

Added testgrid 'vselect' dedicated to 3D viewer picking/selection functionality
and filled with tests from 'v3d/vertex', 'v3d/face' and similar groups.

Added testgrid 'opengl' dedicated to OpenGL driver low-level functionality (GLSL programs and similar)
and filled with tests from 'v3d/glsl', 'v3d/raytrace', '3rdparty/fonts', 'bugs/vis' (portion) and similar.

Added testgrid 'opengles3' dedicated to OpenGL ES 3.0 driver low-level functionality
and reusing tests from 'opengl' testgrid.
Subgroup 'opengles3/raytrace' is disabled on Windows, as Ray-Tracing currently requires OpenGL ES 3.2.
while ANGLE library implements only OpenGL ES 3.0.

Added testgrid 'opengles2' dedicated to OpenGL ES 2.0 driver low-level functionality
and reusing a limited subset of passing tests from 'opengl' testgrid.
Currently testgrid is activated only on Windows platform when using ANGLE library
(properietary OpenGL ES drivers do not allow creation of restricted 2.0 context).

Test cases have been cleaned out to put bug description into log,
to properly load necessary plugins and to explicitly dump viewer.
2021-03-25 19:14:33 +03:00
kgv
a076535090 0032237: Visualization, TKOpenGl - fix Gouraud shading within perspective camera projection 2021-03-25 19:14:28 +03:00
kgv
1a96d253a5 0032222: Visualization, V3d_Viewer - use Graphic3d_TOSM_FRAGMENT by default instead of Graphic3d_TOSM_VERTEX 2021-03-25 19:14:27 +03:00
kgv
bbd9292784 0032230: Coding Rules - remove class headers Graphic3d_HighlightStyle.hxx deprecated since OCCT 7.2.0
Removed unused Graphic3d_HighlightStyle, Graphic3d_CTexture, Graphic3d_MapOfZLayerSettings,
Graphic3d_TypeOfComposition, Graphic3d_TypeOfComposition, V3d_Parameter, V3d_ViewPointer, SelectMgr_SequenceOfFilter.

Added missing deprecation statements to SelectBasics_SensitiveEntity, SelectMgr_EntityOwner and PrsMgr_Presentation3d.
2021-03-24 18:32:05 +03:00
kgv
ef188756a0 0032235: Foundation Classes, Message_MsgFile - force initialization of global mutex
Initialization of several global variables has been refactored to a function.
2021-03-22 11:34:52 +03:00
pdn
f7ad1e7e37 0025262: Foundation Classes - Poly package improvements
Improvements of functionality of Poly package:
* Add function to intersect a triangulation by an axis.
* Add function to intersect a triangle by an axis.
* Correct the bugs in the methods RemoveDegenerated, RemoveTriangle and ReplaceNodes of the class Poly_CoherentTriangulation.
2021-03-21 19:15:07 +03:00
jgv
0c2517292f 0032140: Modeling Algorithms - unify same domain calls crossed for opposite vectors
1. Correct unification of circular edges: avoid trying to make an axis with null magnitude.
2. New method UnionPCurves: unify existing pcurves of chain instead of projecting the curve of unified edge onto surfaces
2021-03-21 19:15:06 +03:00
kgv
b8ef513c8f 0032206: Visualization, TKOpenGl - move out OpenGL ES support to dedicated library TKOpenGles
Added TKOpenGles and TKOpenGlesTest toolkits built with HAVE_GLES2 macros.
Added CSF_OpenGlesLibs as alternative to CSF_OpenGlLibs.
2021-03-21 19:15:06 +03:00
emv
e22a91ccc9 0032199: Modeling Algorithms - BOP Cut produces invalid shape
Use section tolerance for checking the valid range.
2021-03-17 19:59:48 +03:00
kgv
b8db9379fe 0032203: Draw Harness, ViewerTest - drop dependency from OpenGL
Added TKOpenGlTest and TKD3DHostTest Draw Harness plugins.
TKOpenGlTest is automatically loaded by ViewerTest::ViewerInit().

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

Added new command vdriver for graphic driver selection.
Removed erroneous code from command vstereo.
2021-03-17 19:56:54 +03:00
kgv
655e883cb9 0032221: Visualization, TKD3DHost - fix memory leak within D3DHost_FrameBuffer::Release()
D3DHost_FrameBuffer - added missing color texture release within FBO destruction.
OpenGl_View::RedrawImmediate() - fixed unexpected window buffer swap while rendering into offscreen myFBO.
2021-03-17 19:55:44 +03:00
kgv
9b329b9aa4 0032202: Visualization - XCAFDoc_VisMaterial::FillMaterialAspect() should copy emissive color from PBR definition 2021-03-17 19:54:55 +03:00
kgv
43eddb470f 0032217: Visualization, TKOpenGl - drop propagation of unused FFP functions
OpenGl_GlFunctions no more loads unused FFP functions.
OpenGl_GlCoreXX function tables no more defined two hierarchies with and without FFP functions,
and OpenGl_Context::coreXXback fields have been removed.
Introduced OpenGl_Context::core11ffp as more straightforward naming for obsolete FFP function set.
2021-03-17 19:53:14 +03:00
kgv
b470ebea04 0032200: Visualization, TKOpenGl - unify Phong/PBR light space calculations
Graphic3d_ShaderManager - Phong shading now uses World space calculations.
OpenGl_ShaderManager::pushLightSourceState() - fixed unnormalized direction of headlight source.
2021-03-17 19:53:13 +03:00
kgv
61a05a3658 0032198: Visualization, TKOpenGl - per-vertex lighting ignores back/front material colors
Graphic3d_ShaderManager::stdComputeLighting() now multiplies vertex color by material color.
2021-03-17 19:53:13 +03:00
kgv
941f6cae55 0032201: Visualization, TKOpenGl - unify Phong/PBR material properties getters
Graphic3d_ShaderManager::stdComputeLighting() - implementation has been adjusted
for better consistency between PBR / non-PBR.

OpenGl_Material definition has been modified to join Front/Back pair into a single uniform variable.
Common material definition now occupies 4x2 vec4 instead of 5x2 vec4.

Getters of Common material properties within Declarations.glsl
have been renamed to match PBR material syntax (e.g. take IsFront flag as function argument).
Auxliary macros (like occTextureColor()) has been renamed (like occMaterialBaseColor())
and adjusted to return material property directly instead of taking it as argument.
2021-03-17 19:53:12 +03:00
kgv
a604968547 0032207: Draw Harness, ViewerTest - explicitly close 3D Viewer windows at Tcl interpreter closure 2021-03-17 19:52:22 +03:00
kgv
114db5a5ce 0032218: Visualization - move V3d_View::ShadingModel() property to Graphic3d_RenderingParams 2021-03-17 19:41:25 +03:00
kgv
3ae8c60b87 0032219: Visualization, TKService - drop dependency from OpenGL
Visual selection has been moved out from Xw_Window constructor to OpenGl_GraphicDriver::InitContext().
Default Visual is now stored within Aspect_DisplayConnection.
2021-03-17 19:40:40 +03:00
kgv
442850c032 0032220: Configuration, Aspect_VKeySet - eliminate name collision with X11 macros
Aspect_VKeySet::KeyState::Status field has been renamed to KStatus.
2021-03-17 09:54:47 +03:00
emv
58210e5983 0032136: Modeling Algorithms - Boolean fuse fails and corrupts the argument-shape
Avoid increasing tolerance of the vertex before the check on valid range is passed.
2021-03-05 18:00:28 +03:00
kgv
19ed08fda6 0031794: Visualization - Highlighting of AIS_Shape works incorrectly when AddChild() used
PrsMgr_PresentationManager::Display(), PrsMgr_PresentationManager::Color(),
and SelectMgr_SelectionManager::Activate() now skip children in Erased state.
2021-03-05 17:49:17 +03:00
kgv
e70625d6b1 0030640: Visualization, Graphic3d_Camera - add option creating Projection matrix with [0,1] depth range
Added new property Graphic3d_Camera::IsZeroToOneDepth() and OpenGl_Caps::useZeroToOneDepth
for activating [0,1] depth range instead of [-1,1] range using glClipControl() within OpenGL 4.5+.
2021-03-05 17:41:27 +03:00
mkrylova
395d00e058 0032144: Draw Harness - add -silent option to command Close
- Extended command Close with an option -silent
- Extended command Close to handle */-ALL for closing ALL document
- Replaced catch {Close D} by Close D -silent in tests
2021-03-05 17:31:07 +03:00
kgv
d6e050ac44 0032008: Modeling Algorithms - disallow implicit copy of Extrema algorithms
Extrema_GenExtPS now prefers resizing of Array2 tables instead of managing tables by extra handles.
Removed unsafe casts to Adaptor3d_SurfacePtr/Adaptor3d_CurvePtr in Extrema classes.
Removed unsafe casts to curve adaptors in Extrema_ExtCC, Extrema_ExtCC2d classes.

Extrema_GenExtPS, Extrema_GenExtSS, Extrema_ExtCS -
copies by value are now disallowed;
several unexpected places copying the object have been fixed.

IntTools_Context - maps of void* have been replaced by typed maps.
2021-03-05 17:31:07 +03:00
mpv
6498be7036 0032109: Application Framework: Test case bugs caf bug31546 works extremely unstable
In test it should be taken into account that
  lappend listmem [meminfo h]
  checktrend $listmem 0 0 "Memory leak"
also gets memory (also about 100 bytes per iteration).
2021-03-04 19:49:35 +03:00
kgv
952a0565d7 0032192: Visualization, TKOpenGl - load OpenGL 4.6 functions within OpenGl_Context
glext.h has been updated to include latest fixes and new definitions.
2021-03-04 19:44:57 +03:00
mkrylova
e3d4b87912 0031779: Visualization, AIS_ViewController - controller should handle selection schemes
Added AIS_ViewController::MouseSelectionSchemes() property defining map of selection schemes for mouse+modifier combinations.
IsXOR flag has been replaced by AIS_SelectionScheme in interfaces.

Rubber-band selection with Shift key pressed now applies XOR selection scheme in in Draw Harness.
Command vselect has been extended to specify selection scheme by name.
2021-03-04 19:43:13 +03:00
Chris Hennes (chennes)
329e5df986 0032181: Modeling Algorithms - ChFi3d missing error checking
Throughout the ChFi3d fillet creation functions there are two sets of unchecked
errors that can result in segmentation faults when geometry-creation problems
occur.

The first is that the functions ChFi3d_cherche_* may fail to find the requested
item: they silently return without setting the required reference, which is
then accessed by the algorithms. This can be caught with a conditional at the
end of the function that throws an exception if the required item was not
found.

The second class of unchecked error is the use of BRep_Tool::CurveOnSurface,
which may fail to create the required curve, returning a null handle. In many
cases in the existing fillet code this is not checked. This can be dealt with
by checking the returned handle using IsNull() and throwing an exception
if the call did not result in valid geometry.
2021-03-04 19:42:05 +03:00
kgv
7fd4958d45 0032188: Visualization, Graphic3d_Aspects - define backface culling using Graphic3d_TypeOfBackfacingModel
Graphic3d_Aspects::ToSuppressBackFaces() bool flag has been replaced by
Graphic3d_Aspects::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

Graphic3d_TypeOfBackfacingModel_Auto corresponds to old ToSuppressBackFaces()==TRUE;
Graphic3d_TypeOfBackfacingModel_DoubleSided corresponds to old ToSuppressBackFaces()==FALSE;
Graphic3d_TypeOfBackfacingModel_BackCulled allows enabling back face culling regardless of Graphic3d_Group::IsClosed() flag.

XCAFDoc_VisMaterial::IsDoubleSided() bool flag has been replaced by
XCAFDoc_VisMaterial::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

glTF reader now maps "doubleSided" material flag into
Graphic3d_TypeOfBackfacingModel_BackCulled (forced back face culling) and
Graphic3d_TypeOfBackfacingModel_Auto (e.g. practically doubleSided as there is no closed/open info in glTF).

glTF writer by default writes materials as "doubleSided" save the Graphic3d_TypeOfBackfacingModel_BackCulled property set
(in future, extra logic might written for automatically defining singleSided materials for Solid B-Rep objects).

Removed obsolete unused types V3d_TypeOfPickCamera, V3d_TypeOfPickLight, V3d_TypeOfRepresentation, and V3d_Coordinate.
Deprecated types V3d_TypeOfBackfacingModel, V3d_TypeOfLight, and V3d_TypeOfShadingModel.
2021-03-04 19:40:23 +03:00
kgv
42ddd0028c 0032184: Visualization - remove ambiguous AIS_GlobalStatus constructor
Auxiliary AIS_GlobalStatus constructor has been removed.
AIS_InteractiveContext::setObjectStatus() no more adds
an invalid -1 mode to AIS_GlobalStatus.

Never updated property AIS_GlobalStatus::GetLayerIndex() has been removed;
AIS_InteractiveContext::SetTransformPersistence() has been corrected to use
ZLayer defined within object itself.
2021-03-04 19:39:20 +03:00
kgv
33425a46b8 0032143: Visualization - add option excluding transparent object from sorting
Added option Graphic3d_AlphaMode_MaskBlend combining Mask (no sorting)
and Blend (enable blending with background) behavior.
2021-03-04 19:38:16 +03:00
kgv
ba590cbf15 0032180: Visualization - StdSelect_BRepOwner::SetLocation() does not update selected sub-shape
StdSelect_BRepOwner::SetLocation() now propagates location to sub-shape presentation instead of invalidating it.
2021-02-27 15:36:19 +03:00
osa
bc0711a5c3 0032171: Data Exchange - RWGltf_TriangulationReader doesn't copy cached bounding box
Save cached bounding box in loaded triangulation getting it from "proxy" late-loaded object.
2021-02-26 17:31:02 +03:00
kgv
53219061ca 0032165: Visualization - remove obsolete method AIS_InteractiveContext::PurgeViewer() 2021-02-26 10:56:32 +03:00
kgv
decbff0dfd 0032161: Coding Rules - deprecate obsolete alias PrsMgr_PresentationManager3d 2021-02-26 10:56:31 +03:00
kgv
1507ccda40 0032168: Visualization - Wrong computation of screen axis in V3d_View::SetTwist method
Fixed wrong axis check.
2021-02-26 10:56:31 +03:00
kgv
478862fcc2 0032160: Coding Rules - merge AIS_InteractiveContext_*.cxx into single file
Removed redundant .lxx files from API package.

AIS_InteractiveContext_1.cxx,AIS_InteractiveContext_2.cxx,AIS_InteractiveContext_3.cxx
have been merged into AIS_InteractiveContext.cxx.
V3d_View_2.cxx,V3d_View_3.cxx,V3d_View_4.cxx have been merged into V3d_View.cxx
V3d_View_4.cxx has been merged into V3d_View.cxx.
2021-02-25 18:58:50 +03:00
kgv
39e6123e3b 0032162: Visualization - move AIS_DisplayStatus from AIS_GlobalStatus to PrsMgr_PresentableObject
AIS_DisplayStatus has been renamed to PrsMgr_DisplayStatus
and moved from AIS_GlobalStatus class field to PrsMgr_PresentableObject.

0032167: Visualization, AIS_InteractiveContext - setObjectStatus sets wrong status when AIS_DS_Erased

AIS_InteractiveContext::setObjectStatus() Fixed setting unexpected Displayed status to Erased objects.
2021-02-25 18:58:49 +03:00
kgv
79d49683d6 0032155: Tests - remove broken command OCC280
Command OCC280 and a couple of useless tests have been removed.
Test case bug349 has been updated to reproduce scenario using standard commands.
2021-02-25 18:55:30 +03:00
kgv
72ed06442e 0032154: Tests - include vglinfo into Tests Summary
Command testgrid now includes vglinfo into summary.
Command vinit has been extended by -virtual option creating an offscreen window.
Command vglinfo now splits long values into multiple lines.
Added test case v3d/glsl/glinfo dumping OpenGL context creation info.

OpenGl_Window - fixed initialization of OpenGL 4.6 Core Profile (was limited to 4.5).
2021-02-25 18:55:29 +03:00
kgv
02a2beaad9 0032153: Visualization, Graphic3d_ArrayOfPrimitives - share common allocator
Added method Graphic3d_Buffer::DefaultAllocator(), which is now used across code.
2021-02-25 18:55:28 +03:00
kgv
4bf072e4eb 0032152: Visualization - move out GLSL program generator from OpenGl_ShaderManager to Graphic3d_ShaderManager 2021-02-25 18:55:27 +03:00
kgv
4464c6b591 0032149: Draw Harness, ViewerTest - remove obsolete command vfeedback 2021-02-25 18:55:27 +03:00
kgv
9299697997 0032150: Visualization, TKOpenGl - ignore OpenGl_Caps::ffpEnable when FFP is unavailable
OpenGl_Workspace::Activate() now implicitly disables OpenGl_Caps::ffpEnable when it is unsupported.
OpenGl_AspectsSprite::build() now ignores OpenGl_Caps::pntSpritesDisable when Display Lists are unsupported.
2021-02-24 20:59:43 +03:00
kgv
93cdaa76da 0031196: Visualization, TKOpenGl - enable Ray-Tracing using OpenGL ES 3.2
OpenGl_Context now activates Ray-Tracing and arbTboRGB32 for GLES 3.2.
Removed initialization of some uniforms from GLSL code.
Fixed implicit casts within Ray-Tracing shaders.
2021-02-24 20:58:38 +03:00
kgv
127330f9d7 0032147: Documentation - drop mentioning of WOK from build_3rdparty 2021-02-20 19:00:34 +03:00
kgv
374dffea0b 0032139: Visualization - support single-precision floating point data within Poly_Triangulation
Introduced NCollection_AliasedArray collection defining a general byte array
to be aliased as array of elements of mutable type.

Poly_ArrayOfNodes specializes this interface for collecting 2d/3d points with single/double precision.
Poly_Triangulation relies on this new class for definition of 3D nodes and UV coordinates
using gp_Pnt and gp_Pnt2d by default as before.

RWGltf_CafReader now fills in triangulation using single precision by default (as stored in the file).
2021-02-20 18:58:56 +03:00
kgv
e44b849de9 0032145: Coding Rules - move GL functions loading to OpenGl_GlFunctions.cxx 2021-02-20 18:57:49 +03:00
asuraven
a13df0fee0 0031990: Coding, Draw Harness - Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
Save/Restore interface has been moved to Draw_Drawable3D base class.
Create a singleton Draw_Params class for DRAW parameters
2021-02-20 10:43:32 +03:00
dpasukhi
930b466c9b 0032087: Data Exchange, STEPCAFControl_Reader - NULL representation of shape for DGT
- Fixed problem with find a Path for the DimensionType_Location_WithPath
- Added check for the null object within FindShapeIndexForDGT
2021-02-20 10:43:17 +03:00
vro
a8b605eb5e 0032133: Modeling Data - Restriction of access to internal arrays for Poly_Triangulation, revision of API
Removed methods from Poly_Triangulation/Poly_PolygonOnTriangulation giving access to internal arrays of 2d and 3d nodes, triangles and normals.
2021-02-18 18:55:21 +03:00
kgv
008210c3e2 0032129: Visualization, TKOpenGl - shadowmap is broken for ZLayer having non-zero origin
OpenGl_LayerList::renderLayer() - fixed usage of wrong camera while rendering shadowmap,
and apply Z-Layer origin shift to shadowmap matrix while applying shadow.
2021-02-14 01:11:37 +03:00
osa
92f8ec2f01 0032099: Visualization - define OSD_FileSystem class managing opening of file streams
1) Remove unnecessary includes of "Standard_OStream.hxx" file and add it only into files where it is really used.
2) Create the base interface for a file stream provider OSD_FileSystem and its inheritor OSD_CachedFileSystem that keeping last stream to be reused for opening a stream with the same URL.
3) Use OSD_CachedFileSystem object instead of RWGltf_GltfSharedIStream during Gltf reading.
2021-02-13 11:04:19 +03:00
kgv
9ee2481598 0032124: Visualization, AIS_Shape - setting color will cause Iso Lines to appear due to misprint in Prs3d_Drawer::SetOwnLineAspects()
Fixed misprint myUIsoAspect -> myVIsoAspect.
2021-02-11 20:06:15 +03:00
emv
8d55cb22a8 0031974: Modeling Algorithms - Strange behavior of boolean operations on this BREP
Problem is fixed by #0031995. Integrating test case only.
2021-02-11 20:06:14 +03:00
mkrylova
2daa5d95a5 0031704: Visualization - add an interactive object AIS_LightSource representing a light source
Added new class AIS_LightSource representing a light source presentation.

Graphic3d_TMF_CameraPers - added new mode to Graphic3d_TransformPers
defining 3D point relative to camera Eye position
2021-02-11 20:06:14 +03:00
kgv
9779ff75fd 0032095: Tests - drop comparison in unstable perf/ncollection group
Mark performance deviations compared to STL collections as warnings instead of errors.
2021-02-11 20:06:13 +03:00
dpasukhi
830616a60b 0032119: Coding Rules - eliminate msvc warning C4800 (implicit cast to bool) after fix for 32115
Fixed incorrect comparison and forcing cast
2021-02-10 20:45:26 +03:00
kgv
e03a03fdc2 0032122: Samples - handle WASD keys in WebGL sample 2021-02-10 20:44:31 +03:00
kgv
1ff3663c91 0032118: Visualization, Graphic3d_MarkerImage::StandardMarker() - return marker with pre-defined id 2021-02-10 20:42:57 +03:00
kgv
665dc9e50b 0032117: Visualization, TKOpenGl - assert in OpenGl_AspectsSprite due to implicit destruction of existing resource
RGBA and Alpha markers are now handled independently within OpenGl_AspectsSprite::build().
2021-02-10 20:42:57 +03:00
dpasukhi
00a72254dc 0032115: Data Exchange, STEP reader - Incorrect full path to file is not caught
Fixed a checking for a non-existent step file
2021-02-06 14:09:56 +03:00
dpasukhi
0c38be8f8d 0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible
- Upgraded files using new version of WinFlexBison
 - Removed global variables within StepFile_Read.cxx
 - Upgraded error message during bison analyzing ( added a expected expression information )
 - Used 'Interface_ParamType' as argument type for the StepFile_ReadData::Argument
 for a compatibility with the StepData/StepData_StepReaderData
 - Added handling parse errors and transferring it to the StepData_StepReaderData
 - Now parsing and referencing errors save in the check and non output by default
 - Step_file's and Step_Data's output info prints according by trace level of printer
 - Removed useless location.hxx
 - Removed TraceLevel for the StepFile_Reader ( now it useless,
  it is 0 by default and newer and nowhere change )
 - Translate error message into English within StepData_StepReaderData
 - Replace "Error" word in the output messages
2021-02-05 20:35:19 +03:00
kgv
1ac837b2c2 0032114: Visualization, TKOpenGl - broken PBR LUT on OpenGL ES 2.0
Added image formats Image_Format_RGF_half/Image_Format_RGBAF_half
with manual conversion between 32-bit float and 16-bit half-float values.

PBR LUT table is now converted into GL_HALF_FLOAT_OES data format in case of OpenGL ES 2.0.
2021-02-03 18:40:34 +03:00
kgv
75642c1489 0032110: Visualization, TKOpenGl - allow incomplete PBR on OpenGL ES 2.0 without GL_EXT_shader_texture_lod
textureCube() is now used as fallback when textureCubeLod() is unavailable.
2021-02-03 18:38:50 +03:00
kgv
7106e4c8b1 0032113: Visualization, TKOpenGl - broken PBR diffuse map within OpenGl_Caps::buffersOpaqueAlpha() on OpenGL ES 2.0
Fixed enabling of alpha channel writes while baking PBR environment.
2021-02-03 18:34:25 +03:00
emv
a36a30b724 0032108: Modeling Algorithms - BRepAlgoAPI_Section is too slow
Fixed by 0029711. Integrating test case only.
2021-02-03 18:32:55 +03:00
luz paz
4551e1be75 0031939: Coding - correction of spelling errors in comments [part 8]
Fix various typos

Fixed via codespell v2.1.dev
2021-02-03 18:31:42 +03:00
kgv
8df3104cd2 0032105: Visualization, TKOpenGl - PBR flat shading GLSL program compilation error on OpenGL ES 2.0
OpenGl_ShaderManager::defaultGlslVersion() - fixed combining two extensions in header.
2021-02-03 18:28:17 +03:00
kgv
e1d17cebe2 0032101: Visualization, TKOpenGl - use GL_UNPACK_ROW_LENGTH within OpenGL ES 3.0 / WebGL 2.0
Added OpenGl_Context::hasUnpackRowLength property for using GL_UNPACK_ROW_LENGTH in runtime.
OpenGl_Texture now uses GL_UNPACK_ROW_LENGTH on OpenGL ES 3.0 when necessary.
OpenGl_Texture::InitCubeMap() now allows uploading vertically-stacked cubemaps
without GL_UNPACK_ROW_LENGTH requirement.
2021-02-03 18:26:28 +03:00
kgv
82b856b880 0032079: Coding Rules - rename AIS_KindOfInteractive enumeration values with fully-qualified name
In addition, several ViewerTest command have been cleared out from duplicated checks.
2021-01-30 20:22:29 +03:00
kgv
4ad4054c90 0032094: Visualization, TKOpenGl - OpenGl_VertexBuffer::bindAttribute() silently does nothing without active GLSL program
OpenGl_VertexBuffer::bindAttribute() now prints an error message indicating a possible VBO misuse.
2021-01-29 19:54:31 +03:00
kgv
a0073def2d 0032081: Visualization - WebGL sample errors when run in Safari browser with WebGL 1.0
"MAX_WEBGL_VERSION=2" Emscripten option is now used for building sample instead of deprecated "USE_WEBGL2=1".
2021-01-29 19:51:18 +03:00
kgv
8f8fe4a97c 0032083: Visualization, TKOpenGl - PBR rendering is unavailable on Apple A12 Bionic (iPad)
Added "#define occLight_Index(theId) 0" workaround allowing to compile
a single light source PBR shading program on OpenGL ES 2.0,
as it disallows non-constant index expressions (even trivially deducable at compile-time).

PBR lookup table is now automatically resized to RGBA format
when RG texture format is unsupported (OpenGL ES 2.0).

OpenGl_ShaderManager now allows compiling PBR shaders
using WebGL 1.0 + GL_EXT_shader_texture_lod extension.

PBR IBL baking GLSL program has been redisigned to use
if/else to avoid non-constant index expressions.
Diffuse baking implements packing float values into a temporary RGBA8 texture
as a fallback solution on WebGL 1.0 implementations supporting float textures
but not as FBO render targets.

OpenGl_PBREnvironment now uses GL_FRAMEBUFFER instead of GL_DRAW_FRAMEBUFFER
for compatibility with OpenGL ES 2.0.
2021-01-29 19:51:18 +03:00
kgv
776302d46b 0032093: Visualization, TKOpenGl - loading texture in BGR format fails in OpenGL ES
Graphic3d_TextureRoot::convertToCompatible() - fixed handling of
Image_Format_BGR and Image_Format_BGRA formats.

OpenGl_Texture - added error message for unsupported pixel format;
error messages have been extended by resource id.
OpenGl_Texture::InitCubeMap() now does not release cubemap
on mipmaps generation failure.

Image_PixMap::ImageFormatToString() - added method returning name of pixel format.
2021-01-29 19:51:17 +03:00
emv
961c002c46 0031912: Modeling Algorithms - Boolean Cut can't build resulting shape
Problem is fixed by #0032058. Integrating test case only.
2021-01-29 19:44:58 +03:00
osa
538ab5dd8a 0032078: Visualization, Poly_Triangulation - add cached bounding box.
1) Add empty constructor for Poly_Triangulation(),
2) Add Poly_Triangulation::HasGeometry() method to check that triangulation has any geometry.
3) Add possibility to cache bounding box in Poly_Triangulation and use it later in case of empty triangulation.
4) Add Poly_Triangulation::MinMax() to extends input box with bounding box of triangulation.
5) Add Poly_Triangulation::UpdateCachedMinMax() to cache min - max range of this triangulation with bounding box of nodal data.
6) Add virtual Poly_Triangulation::computeBoundingBox() to calculate bounding box of nodal data.
7) Update BRepBndLib::Add/AddOptimal/AddOBB algorithms to check empty triangulation and use cached box in this case.
8) Update BRepGProp::roughBary/surfaceProperties/volumeProperties to skip empty triangulation.
9) Remove additional myBox from RWGltf_GltfLatePrimitiveArray and some hack to save this box as nodes of base Poly_Triangulation.
10) Cache min-max range from JT file during its parsing
2021-01-27 21:21:32 +03:00
kgv
a46ab511c5 0032082: Visualization, TKOpenGl - improve formatting of error messages
Error messages in TKOpenGl package have been improved to format
GLenum values as string constants or hex values.
OpenGl_VertexBuffer::init() now logs a message with error details
instead of just returning Boolean flag.
2021-01-24 23:48:10 +03:00
jgv
8948e18df8 0031845: Modeling Algorithms - BRepOffsetAPI_MakeThickSolid fails
Multiple changes in BRepOffset_MakeOffset algorithm:
- correct fusing vertices;
- correct building intersection edges;
- correct intersecting new edges in 2D;
- correct building wire on a new face;
- correct building history.
2021-01-22 19:09:02 +03:00
mkrylova
5634c81a9b 0031547: Visualization - V3d_View creates V3d_Trihedron instance
- moved creating of V3d_View::myTrihedron from constructor to first attempt of displaying or calling it;
- moved creating of V3d_Viewer::myRGrid and V3d_Viewer::myCGrid to to first attempt of displaying or calling them;
- renamed V3d_Viewer::IsActive() to V3d_Viewer::IsGridActive();
- redefined V3d_View::Trihedron() and V3d_Viewer::Grid() by adding new argument toCreate
for opportunity to check the existence of the objects without their recreating.
2021-01-22 19:04:25 +03:00
kgv
5de4b704fe 0032065: Samples - use MODULARIZE within WebGL sample
Fixed multitouch input.

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

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

Standard_ASSERT_DBGBREAK_() is now defined using emscripten_debugger().
2021-01-22 19:03:14 +03:00
dpasukhi
96049f2e3d 0032049: Data Exchange - STEP file import problems
- Added checking for null objects
- Added support to find layers according to visible attr
- Fixed problem with same names of layers:
 Now, layers are grouped by names and visibility parameter
2021-01-22 13:16:22 +03:00
ifv
b007889efd 0032058: Modeling Data - Extrema curve-surface gives wrong result for planar surface of revolunion and circle
Extrema_GenExtCS.cxx : added solution refinement, if solution seems to be "bad" according to special criteria.
Extrema_FuncExtCS.cxx : "cosmetic" modifications
BOPAlgo_PaveFiller_3.cxx : adding control of shape index to prevent exception in ShapeInfo
bugs/moddata_3/bug32058 : new test
2021-01-21 20:36:28 +03:00
kgv
fe2a8faab6 0032067: Visualization, TKOpenGl - shadowmap GLSL compilation error on WebGL 3.0
Shadowmap sampler is now passed as a dedicated argument
to occDirectionalLightShadow() to workaround strict GLSL syntax validator.
Fixed texture coordinates clamping range.

Shadow antialiasing is disabled on OpenGL ES 2.0.
2021-01-20 21:30:27 +03:00
luz paz
7b5e532f83 0031939: Coding - correction of spelling errors in comments [part 7]
Fix various typos

Fixed via codespell v2.1.dev
2021-01-20 21:27:44 +03:00
kgv
5be130de06 0032064: Coding Rules - make RWGltf_GltfJsonParser non-private 2021-01-20 21:26:36 +03:00
akaftasev
5bae0bebe4 0028026: Modeling Data - BRepTools::Clean() does not clean all triangulation from shape
Added flag for force clean triangulation and treatment for it
Command "trinfo" now show number of polygons on triangulation
2021-01-20 21:25:44 +03:00
kgv
4925946065 0032061: Data Exchange, RWGltf_CafWriter - exporting XBF file produces an invalid glTF document
Empty Nodes are now skipped while filling in Scene node map.
2021-01-20 21:24:17 +03:00
kgv
78c4e836b1 0031571: Visualization, TKOpenGl - provide depth peeling OIT option
Graphic3d_RenderTransparentMethod has been extended by Graphic3d_RTM_DEPTH_PEELING_OIT,
which is handled by OpenGl_LayerList::renderTransparent().

OpenGl_FrameBuffer::Init() now does not silently ignore unknown color attachment format and return failure.
OpenGl_FrameBuffer::InitWrapper() - added constructor wrapping existing color textures.

v3d/transparency/oit: test case added
2021-01-20 21:21:59 +03:00
asuraven
9f45d35b6b 0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
Versions of formats have been changed (11 for TDocStd, 4 for BRep Shape and 3 for Binary BRep Shape)
theWithNormals parameter added to BRepTools::Write()
IsWithNormals()/SetWithNormals() function added to BRepTools_ShapeSet
-normals/-noNormals option added to StoreTriangulation DRAW command
-normals/-noNormals option added to writebrep DRAW command
Tests for writing to brep/binary brep/BinXCaf/XmlXCaf added
Test for StoreTriangulation options -normals/-noNormals added
2021-01-20 21:20:43 +03:00
aavtamon
6fab0b3428 0031172: Unexpected result of BRepTools::OuterWire()
In BRepTools::OuterWire() compare of parameters was rewritten using Precision.
The test case bug31172 has been created
2021-01-15 18:52:11 +03:00
kgv
f4e7c30785 0032056: Coding Rules - remove package MMgt and other types deprecated since OCCT 7.2.0
Removed functionality deprecated since OCCT 7.1.0:
- 0027834 built-in iterator in class SelectMgr_ViewerSelector;
- 0027900 obsolete constructor of V3d_Viewer class;
- 0027816 obsolete clipping plane setters V3d_View/PrsMgr_PresentableObject:SetClipPlanes();
- 0027860 obsolete transformation persistence methods from class PrsMgr_PresentableObject;
- 0027756 obsolete methods Prs3d_Text::Draw();
- 0024393 obsolete enum Graphic3d_ZLayerSetting;
- 0025180 obsolete method Graphic3d_Structure::Transform().

Removed functionality deprecated since OCCT 7.2.0:
- 0028832 obsolete class MMgt_TShared;
- 0026937 obsolete property Standard_Failure::Caught();
- 0028799 obsolete types defined within Quantity package;
- 0028441 obsolete nested enum Image_PixMap::ImgFormat;
- 0025695 obsolete method PrsMgr_PresentationManager::Unhighlight();
- 0028205 obsolete class MeshVS_ColorHasher;
- 0027958 obsolete methods from Prs3d_DatumAspect class;
- 0025695 obsolete class Graphic3d_HighlightStyle;
- 0027954 obsolete BRepOffsetAPI_MakeOffsetShape,BRepOffsetAPI_MakeThickSolid constructors.
2021-01-14 19:38:24 +03:00
kgv
92cc34d702 0032057: Coding Rules - eliminate CLang warning -Wunused-parameter when targeting iOS
Cocoa_Window::Cocoa_Window()/OpenGl_Context::SetSwapInterval() have been corrected to suppress warning.
2021-01-14 19:37:19 +03:00
kgv
ff6122e008 0032055: Draw Harness, ViewerTest - add more vmanipulator position adjusting options
Draw::ParseOnOffIterator() - added auxiliary wrapper over Draw::ParseOnOff() for more compact syntax.
strncasecmp() definition for msvc compilers has been moved to Standard_CString for consistency with strcasecmp().
vmanipulator command has been refactored to use more straightforward parser.

vmanipulator now accepts "-adjustPosition {0|center|location|shapeLocation}" options
adjusting position to object's AABB center (existed before), object's local transformation or TopoDS_Shape location.
2021-01-14 19:21:54 +03:00
akaftasev
607f045954 0025055: Modeling Algorithms - Incorrect shape copying in BRepBuilderAPI_Copy
Correct test case: exclude "fixshape" calls
2021-01-13 17:18:49 +03:00
kgv
be8c9f2bde 0032050: Configuration - define fallback Android API version within auxiliary batch files
Script now defines a minimal Android API version when %anNdkApiLevel% is set to empty value
as 16 for 32-bit targets and 21 for 64-bit targets.
Added clearing of destination folders.
Added better handling of errors.
2021-01-13 17:10:27 +03:00
kgv
85381cfaf2 0032048: Configuration - Extend batch files to build OCCT with Emscripten
Added option USE_RAPIDJSON.
Added option toPack creating a .7z archive.
Added option toBuildSample building WebGL sample.
Improved aborting on error.
2021-01-13 17:10:27 +03:00
kgv
c0efce7c3b 0032045: Visualization, TKOpenGl - move light source functions from OpenGl_ShaderManager.cxx to Shaders 2021-01-13 17:10:27 +03:00
kgv
d84e866973 0032039: Visualization, TKOpenGl - implement simple shadow mapping for a direct light source
Graphic3d_CLight::ToCastShadows() - added new property defining if light should cast shadows (ignored by Ray-Tracing).

OpenGl_ShaderManager::stdComputeLighting() now implements shadow mapping for directional lights.
OpenGl_ShaderManager::prepareGeomMainSrc() now handles copying of arrays.
OpenGl_Context::ShadowMapTexUnit() - added property defining an offset for shadow map texture units.
OpenGl_ShadowMap - added new class storing shadow map FBO with parameters.
OpenGl_View::prepareFrameBuffers() - added resizing of shadow map FBOs.
OpenGl_View::Redraw() - added section redrawing scene into shadow map FBOs via OpenGl_View::renderShadowMap() method.

vrenderparams - added new parameters -shadowMapResolution and -shadowMapBias.
2021-01-13 17:10:26 +03:00
kgv
37f80e163c 0032042: Visualization, TKOpenGl - pre-multiply headlight flag into light source position
OpenGl_ShaderManager::pushLightSourceState() now pre-multiplies headlight transformation.
Built-in shading GLSL programs have been updated to remove special handling if headlight flag;
also removed redundant pre-normalization of light source direction
(already normalized implicitly by Graphic3d_CLight interface).

Graphic3d_CLight::SetHeadlight() now raises exception in case of ambient light type.
OpenGl_ShaderManager::SetLastView() - removed unused property.
2021-01-12 16:41:38 +03:00
kgv
0f26ed5476 0032044: Foundation Classes - NCollection_Array2::Resize() does not allocate pointer array
NCollection_Array2::Resize() has been fixed to set myDeletable before calling Allocate().
2021-01-12 16:07:23 +03:00
kgv
4b52faa56f 0032036: Visualization, TKOpenGl - broken Cubemap background on GeForce 320M
Enable GL_DEPTH_CLAMP while rendering skybox to workaround unexpected clamping issue on some GPUs.
2021-01-12 13:51:20 +03:00
dpasukhi
ab80de54da 0032028: Coding Rules, StepFile - eliminate CLang warning -Wmisleading-indentation
Regenerated the StepFile/lex.step.cxx using the latest version of WinFlexBison
- Fixed [-Wmisleading-indentation] warning
- Removed empty lines
2021-01-12 13:48:44 +03:00
luz paz
54adc5e979 0031939: Coding - correction of spelling errors in comments [part 6]
Fix various typos

Fixed via `codespell v2.1.dev
2021-01-12 13:32:43 +03:00
kgv
83746de803 0032041: Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
Added missing NULL-checks to Geom_BezierSurface::ExchangeUV() and Geom_BSplineSurface::ExchangeUV().
2021-01-12 13:30:35 +03:00
kgv
cfb54c0c0a 0032040: Visualization, OpenGl_View - merge OpenGl_View_Redraw.cxx into OpenGl_View.cxx 2021-01-12 13:29:22 +03:00
kgv
4b7fee8f47 0032038: Visualization, OpenGl_View - move out framebuffer initialization from ::Redraw() to ::prepareFrameBuffers() 2021-01-12 13:29:21 +03:00
kgv
f3a53980a8 0032037: Visualization - move V3d_View::FitMinMax() to Graphic3d_Camera::FitMinMax() 2021-01-12 13:29:21 +03:00
kgv
d723356fca 0032027: Visualization, Prs3d_Drawer - unable to unset HasOwnFaceBoundaryDraw() property
Added missing Unset methods to Prs3d_Drawer properties.
2020-12-29 15:22:50 +03:00
vro
894133a5ad 0029750: Samples - function arrows are not updated by moving a node in FuncDemo qt sample
The visual links between functions are recovered.
The demo is synchronized with a corresponding demo from Qt (qt486-vc10-32\examples\graphicsview\elasticnodes). It may be successfully compiled by any further versions of Qt including 5.10.1
Also, because Open CASCADE (and OCAF in particular) is improved for usage in multi-threading mode, usage of mutexes is added in this sample (for access to the sharing TNaming_UsedShapes attribute, for example).
2020-12-25 17:08:25 +03:00
kgv
41046145c4 0032009: Coding Rules, TKQADraw - suppress msvc10 compilation warning C4748
Added a workaround for msvc10 misbehavior.
2020-12-25 12:34:20 +03:00
kgv
b2a63f9b6f 0032013: Samples - iOS sample compilation errors
Added missing includes.
Fixed usage of obsolete Standard_Failure interface.
Fixed file headers.
2020-12-23 19:45:33 +03:00
kgv
8d8971e7b8 0032011: Configuration - add batch files to build OCCT for macOS and iOS targets
Added script adm/scripts/macos_build.sh and template macos_custom.bat.template
intended for automating building routines targeting macOS platform.

Added script adm/scripts/ios_build.sh and template ios_custom.bat.template
intended for automating building routines targeting iOS platform.
2020-12-23 19:45:32 +03:00
kgv
ba562b2b7a 0031999: Tests - request Core Profile on macOS for Ray-Tracing tests 2020-12-23 19:45:32 +03:00
kgv
73dc2d3ae5 0032015: Visualization - Select3D_SensitiveTriangulation::myDetectedIdx is inaccessible
Added Select3D_SensitiveTriangulation::LastDetectedTriangle() property.
2020-12-23 19:42:48 +03:00
luz paz
b81b237fa4 0031939: Coding - correction of spelling errors in comments [part 5]
Fix various typos

Fixed via `codespell v2.1.dev
2020-12-23 19:30:48 +03:00
asuraven
3b1129a546 0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
Default BinTools_ShapeSet format version has been changed from 3 to 1.
BinMNaming_NamedShapeDriver (Bin OCAF) now writes shapes in 1st version of Binary format instead of 3rd.
XmlMNaming_NamedShapeDriver (Xml OCAF) now writes shapes in 1st version of ASCII  format instead of 2nd.

writebrep now by default writes into 1st binary format version instead of 3rd.
2020-12-23 19:30:48 +03:00
dpasukhi
2057c37b67 0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter
- Parser is corrected to handle case of missing arguments properly (report error without corruption of the next entity)
- Added counter of entity arguments for appropriate error messages
- Plain C tools and data structures (recfile.*, stepfile.*) are converted to C++ class (StepFile_ReadData) to avoid use of static variables, so that reader can be safely used in a multi-threaded environment
2020-12-23 19:30:47 +03:00
luz paz
3273937d01 0032004: Foundation Classes, UnitsAPI - misprint in "ACCOUSTIC INTENSITY" unit name
Found using `codespell 2.1.dev0`
2020-12-21 20:30:07 +03:00
mkrylova
d45edf248c 0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
- Added comment to the method
- Added Boolean argument indicating the need for a strict
- Extended OCC11758 command in QABugs_19.cxx to verify IsRealValue()
- Updated existing places of IsRealValue() usage in ViewerTest to use new flag
2020-12-21 20:30:06 +03:00
vro
5fd0b80027 0029822: Make TDocStd_Document extensible
Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted.

Modified files:
- CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document.
- TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application.
- BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx: a virtual method CreateDocument() is deleted.
- TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied.

Documentation:
- upgrade.md is modified.
2020-12-20 11:41:33 +03:00
nds
04114fd201 0031945: Foundation Classes - unique names of alerts of message report in DumpJson
- add OCCT_DUMP_FIELD_VALUE_NUMERICAL_INC and OCCT_DUMP_FIELD_VALUES_DUMPED_INC - to increment key Value;
- add OCCT_DUMP_STREAM_VALUE_DUMPED - to give stream as a parameter of the DumpJson;
- correct Message_Report, Message_CompositeAlerts to increment keys;
- correct Message_AttributeMeter to have in result start and stop values united in value block: [start stop]. It's better for parsing;
- correct result of Message::MetricToString output for updated in 29451 Message_MetricType enum;
- correct Standard_Dump::AddValuesSeparator to avoid adding ',' in additional case;
- correct Standard_Dump::FormatJson to add opening/closing brace for the whole result (for valid parsing);
- correct Standard_Dump::FormatJson to ignore '\n' in value.
2020-12-18 19:48:03 +03:00
nds
983aaaeb03 0032001: Visualization - moving dump of selection owner from sensitive to selection manager 2020-12-18 19:48:03 +03:00
asuraven
e529b67d19 0031998: Tests - unexpected file artifact at the root of repository
Saving path for .obj file changed
2020-12-18 19:48:03 +03:00
nds
39b707a6d2 0031350: Foundation Classes - Dump improvement for OCAF classes
- do not dump document in CDM_MetaData, just pointer text;
- move ID dump in to TDF_Attribute;
- extend TDF_Attribute with other important states(obtained by methods);
- extend TDocStd_Document  with other important states;
- avoid dumping of shapes in TNaming_UsedShapes (it takes much time);
- extend XCAFDoc, XCAFDimTolObjects dump to json;
- correct XCAFDoc_ColorTool, XCAFDoc_MaterialTool, XCAFDoc_LayerTool to dump only connected to the object information;
- correct XCAFDoc_Material to dump name and density value only if it exists;
- add check on correct direction in gp_Ax3.
2020-12-18 19:48:02 +03:00
nds
9283bba22f 0032000: Foundation Classes - collect OSD_Timer time in message report
Added Message_MetricType_WallClock metric type handled by Message_AttributeMeter.
Added public OSD_Timer::GetWallClockTime() method.
2020-12-18 19:48:02 +03:00
mpv
53f46612d9 0031983: Samples - CSharp cannot be compiled "atomic<> is not supported by C++/CLI"
Removed includes-dependency of the CSharp sample from TDF_Label.hxx
2020-12-17 21:17:45 +03:00
ifv
2fda738623 0031995: Modeling Data - Bounding box wrong for face
BndLib/BndLib_AddSurface.cxx : algorithm of building bounding box for BSpline surfaces is improved

Test cases are modified according to current state of algorithm
Test case bug31995 added
2020-12-17 21:17:44 +03:00
nds
38b336df80 0031944: Foundation Classes, Message_Report - add missing mutex locks for message level 2020-12-17 21:17:44 +03:00
luz paz
0177fe2617 0031939: Coding - correction of spelling errors in comments [part 4]
Fix various typos

Fixed via `codespell v2.1.dev
2020-12-17 21:17:43 +03:00
kgv
7fb9d6d573 0030762: Foundation Classes - include backtrace within OSD_SIGSEGV
Standard_Failure now holds an optional stack trace dump.
Added function Standard::StackTrace() dumping backtrace to the string.
SegvHandler within OSD_signal now appends backtrace to the message
if OSD::SignalStackTraceLength() is set to non-zero value
or environment variable "CSF_DEBUG_MODE" is set for debugging.

Added auxiliary macros Standard_NOINLINE disallowing function inlining.

Command "dsetsignal" has been extended by -strackTraceLength argument
for defining stack trace length within signals redirected to C++ exceptions.
Added "ddebugtraces" command for debugging purposes (adding stack traces to all exceptions).
2020-12-17 21:17:43 +03:00
asuraven
14eea8293d 0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools
Added enumerations BinTools_FormatVersion & TopTools_FormatVersion for more clear version tracking in the code.
Added new BinTools::Write() & BRepTools::Write() overloaded functions with version & isWithTriangles parameters.

Added new "readbrep"/"writebrep" DRAW commands handling reading and writing of both Binary and ASCII .brep formats
and providing arguments to setup writing of triangulation data and of format version.
"binrestore" is made an alias to new command "readbrep".
"binsave" now is an alias to new "writebrep" saving into binary format by default ("writebrep" writes into ASCII format by default).
2020-12-17 21:17:42 +03:00
kgv
1e1158c78b 0031997: Visualization, TKOpenGl - phong shader compilation error with normal texture map enabled
OpenGl_ShaderManager::defaultGlslVersion() now defines GLSL 120 for normal map texture.
2020-12-17 21:05:06 +03:00
kgv
fccc168a6f 0031994: Draw Harness - dversion prints "Architecture: unrecognized" on ARM host
Added handling of __aarch64__ macros.
2020-12-17 21:05:06 +03:00
kgv
6169ae2d3d 0031996: Visualization - PhongShading.fs compilation error on OpenGL drivers for AMD Radeon
Fixed occLight_IsHeadlight() misuse in sample GLSL program.
2020-12-17 21:05:05 +03:00
mkrylova
6eb502b27b 0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
RWGltf_CafWriter::ToEmbedTexturesInGlb() - added option embedding textures
into GLB file enabled by default.
Fixed uninitialized class field RWGltf_CafWriter::myIsForcedUVExport.

Image_Texture::MimeType() - added method returning MIME type based on image file format.
Image_Texture::WriteImage() - added method writing image into stream.
2020-12-17 21:05:05 +03:00
ifv
a2cb8561eb 0029441: Modeling Algorithms - Incorrect intersection curves between faces
ApproxInt/ApproxInt_SvSurfaces.hxx : adding field myUseSolver in order to manage calculations of characteristics of intersection points.
ApproxInt/ApproxInt_MultiLine.gxx : implementation of using myUseSolver for treatment points of MultiLine.
ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx : implementation of using myUseSolver for case intersection of implicit and parametric surfaces.

Test cases added
2020-12-17 21:05:04 +03:00
mkrylova
59500bb229 0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
Built-in markers definition has been moved from OpenGl_AspectsSprite to Graphic3d_MarkerImage and generalized.
RGBA8 pixel format is now preferred over BGRA8.
Fallback OpenGL 1.1 rendering code now supports drawing of colored markers using glDrawPixels().

Added function Image_PixMap::FlipY() flipping image rows.
2020-12-17 21:05:04 +03:00
vro
a8d3a0b102 0029901: Support save to and restore from Stream interface in TObj package
Storage and retrieval of a document by means of a stream is distributed to TObj model.
Modified files:
-TObj_Model.hxx, cxx - the virtual methods Load() and SaveAs() obtained a stream as an argument instead of a file name.
-TObj_Application.hxx, cxx - same extension: the virtual methods LoadDocument() and SaveDocument() use a stream to open and save a document.
-TObjDRAW.cxx - draw-commands TObjSave and TObjLoad are extended for -stream parameter, which allows usage of a file input or output stream instead of a file name.

A new test:
- bugs caf bug29901 - it creates a simple TObj-model, saves it on disk using a file stream, loads it by means of a file stream and checks the content.

Modified test:
- bugs caf bug28425 - just improved to proper manipulate a test-file on disk.
2020-12-17 21:05:03 +03:00
vro
c6685c65fd 0027426: FSD_BinaryFile: Assignment to a temporary handle variable
A reference is added to the returning object of the method Storage_InternalData::ReadArray().
Modified files:
- Storage_InternalData.hxx

OCCT: CR27426
Products: nothing
2020-12-17 21:05:02 +03:00
kgv
31174e1a58 0031597: Visualization, TKOpenGl - allow disabling Alpha component writes within OpenGl_Context::ColorMask()
Added OpenGl_Caps::buffersOpaqueAlpha option allowing to disable writes
into alpha component of color buffer and keep it opaque.
Added OpenGl_Context::SetColorMaskRGBA() method overriding each color component deliberately.

New option is set within WebGL sample.
2020-12-17 21:05:02 +03:00
dpasukhi
465ffe2840 0031000: Data Exchange - STEP file cannot be opened due to lower-case special token End-ISO-10303-21
Update flex lexical scanner (step.lex lex.step.cxx) to parse special tokens in a case insensitive manner
2020-12-14 18:39:00 +03:00
luz paz
a25d5aaa30 0031939: Coding - correction of spelling errors in comments [part 3]
Fix various typos

Fixed via `codespell v2.1.dev0`
2020-12-11 19:19:10 +03:00
vro
65cec1a6ef 0031985: Documentation - description of TDocStd_FormatVersion is excessive
Description of TDocStd_FormatVersion enum is simplified and formatting for good rendering in HTML
2020-12-11 19:13:17 +03:00
kgv
c22b52d60e 0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes
Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface now inherit Standard_Transient.
Interfaces Adaptor2d_HCurve2d, Adaptor3d_HCurve, Adaptor3d_HSurface and their subclasses
are now aliases to Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface.
Removed numerous unsafe reinterpret casts.

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

Removed obsolete adaptor classes with H suffix.
2020-12-11 19:12:48 +03:00
age
266877a7c3 0031987: Visualization - Slow rectangular selection on models with big number of sensitives
SelectMgr_SensitiveEntitySet now stores a map of registered owners with a counter of registered entities.
SelectMgr_ViewerSelector::traverseObject() now reads the number of sensitive entities for specific owner
from SelectMgr_SensitiveEntitySet instead of re-computing it every time.
2020-12-10 19:03:12 +03:00
kgv
c74e3dc300 0031986: Visualization - Regression in StdPrs_WFDeflectionRestrictedFace::Add()
Fixed misplaced closing bracket after #0030146 fix.
2020-12-08 19:50:46 +03:00
abv
954caad094 0031977: Modeling Algorithms - useless static variable in BRepFill_OffsetWire::Init() preventing its parallel usage
Removed useless "static" before local variable and some commented code
2020-12-08 19:49:20 +03:00
dpasukhi
c026141bb6 0031923: DXF import - add support of code page DOS850
- Add support for converting from CP850 to UTF-8 and UTF-8 to CP850;
- Add support for reading STEP file encoding by cp850 code page.
2020-12-08 19:45:50 +03:00
aavtamon
1e08a76f1e 0031402: Modeling Data - Geom_BSplineSurface::Segment() produces wrong result
In the method Segment() index1 needs to be checked as well as index2 in Geom_BSplineSurface and Geom2d_BSplineCurve
(Geom_BSplineCurve already has this check).
New test cases bug31402_1, bug31402_2 has been added.

The unnecessary code block in Geom2d_BSplineCurve has been deleted,
and checking index2 block has beed extended.
2020-12-04 19:00:48 +03:00
emv
1aa38057ef 0031976: Foundation Classes, BVH_IndexedBoxSet - access members of base class via this pointer 2020-12-04 19:00:12 +03:00
nds
75cf82505b 0030737: Visualization - implementing new selection schemes in context
AIS_SelectionScheme enumeration is defined to set which selection behaviour is used in Select of context
AIS_InteractiveContext is corrected to use single Select method instead of combination of Select/ShiftSelect methods with a selection scheme parameter.
Upgrade: Select() -> SelectDetected/Rectangle/Polygon(AIS_SelectionScheme_Replace), ShiftSelect -> SelectDetected/Rectangle/Polygon(AIS_SelectionScheme_XOR)
2020-12-04 18:50:20 +03:00
skl
b735354545 0030075: [REGRESSION] Shape Healing - Regression after implementation of fix for bug 28694.
Detect situation when U or V parameter has a big jump between two neighbour 2D points (diffX > 0.95*(Umax-Umin) or diffY > 0.95*(Vmax-Vmin)).
Additionaly surface must BSpline and distance between corresponding 3D points must be less than given precision.
For set of 2D points contains such jump method InsertAdditionalPointOrAdjust() is performed.
2020-12-04 18:50:19 +03:00
kgv
6078550944 0031972: Application Framework, FSD_CmpFile - exception on reading file in old persistence format with Windows EOL
FSD_CmpFile::ReadLine()/FSD_CmpFile::ReadString() now use TCollection_AsciiString::Trunc()
instead of ill-formed character assignment to '\0'.
2020-12-03 18:51:47 +03:00
vro
716cf4d96b 0029217: Application Framework - nonsense API method XmlLDrivers::SetStorageVersion()
1. Unification of usage of a storage version of an OCAF document by XML and binary file formats.
2. A new format version enumeration in TDocStd package: TDocStd_FormatVersion.
3. Removal of unnecessary methods for storage version like XmlLDrivers::StorageVersion() and BinLDrivers::StorageVersion().
4. Support of old documents (storage version <= 9) in binary file format (came from ESA).

New files:
- TDocStd_FormatVersion.hxx: a new storage format version enumeration for an OCAF document.

Modified files:
- CDM_Document.hxx and cxx: removal of storage format version property (moved to TDocStd_Document).
- TDocStd_Document.hxx and cxx: a storage format version property (moved from CDM_Document).
- BinLDrivers_DocumentSection.hxx and cxx: support of old document storage version in binary file format.
- BinDrivers_DocumentStorageDriver.hxx and cxx,
- BinLDrivers_DocumentStorageDriver.hxx and cxx,
- BinLDrivers_DocumentRetrievalDriver.cxx,
- XmlLDrivers_DocumentRetrievalDriver.cxx,
- XmlLDrivers_DocumentStorageDriver.cxx: usage of document storage version from TDocStd_Document in storage and retrieval drivers.
- DDocStd_ApplicationCommands.cxx: draw-command name StorageVersion is replaced by StorageFormatVersion (to be the same everywhere). A corresponding script is corrected too.

New test:
- bugs caf bug29217: a test case for old document storage version in binary file format. It checks several attributes saved by the version TDocStd_FormatVersion_VERSION_7 (old) and the latest version.

Modified test:
- caf presentation M1: the test used a file in the current folder, not in {imagedir} like all other tests.
- bugs caf bug28691

Documentation:
- dox/upgrade/upgrade.md

// All remarks are fixed.
2020-12-03 18:51:08 +03:00
kgv
4268c64672 0031965: Visualization - AIS_InteractiveContext::HilightWithColor() ignores passed highlight style
AIS_InteractiveContext::highlightGlobal() now passed through Style argument to highlightOwners().
Added OCC31965 command for testing AIS_InteractiveContext::Hilight() behavior.
2020-12-03 18:46:25 +03:00
luz paz
a110c4a377 0031939: Coding - correction of spelling errors in comments [part 2]
Fix various typos

Fixed via `codespell v2.0.dev`
2020-11-30 14:04:03 +03:00
skl
d66f7c0fa2 0029564: STEP Import and Export failure
In the result of translation one face lying on the spherical surface converted to the two separate faces due to method IsSurfaceUVPeriodic returned false for spherical surface.
Now method IsSurfaceUVPeriodic returns true for spherical surface in order to natural bounds can be added for spherical surface too.
Method ShapeFix_Face::FixOrientation was corrected to avoid reversing inner wire for case when spherical face has only one inner bound without outer bound.
Check that wire has bounding box equal to bounding box of surface was added in the method ShapeFix_Face::FixAddNaturalBound in order to avoid addition of the natural bounds ( test bugs xde bug22535_2 1 for face 2 lying on the torus)

In order to avoid regressions fix for translation "VERTEX_LOOP" entities was added. Natural bounds for "VERTEX_LOOP" lying on the Spherical and BSpline surface is added only if face does not have any other bounds.
In other case natural bounds were added during ShapeFix operation after translation in order take into account mutual position of the all bounds in the UV space of the face.
2020-11-28 12:36:49 +03:00
kgv
59069d3fd8 0031958: Tests - testdiff shows empty Total Image difference
stat(img1) counter is now incremented in case of total log.

Renamed "Total Image difference" -> "Total IMAGE difference" for consistency with other output.

Regexp inserting links to images now looks for "IMAGE ..." at the start of line
to avoid misdetection on "Total IMAGE difference" line.
_diff_show_positive_ratio() now prints image difference percents
without leading empty space to highlight large deviations in RED.

Image files having no match are now added to statistics as differences.
2020-11-28 12:36:07 +03:00
kgv
90e0d12d8f 0031940: Foundation Classes - TCollection_ExtendedString::Print() corrupts UNICODE strings and does not compile with C++20
TCollection_ExtendedString::Print() now converts string into UTF-8
instead of printing character indexes.
2020-11-28 12:36:06 +03:00
mpv
b84b672185 0031921: Application Framework - reading OCAF data from several threads is not possible
Make myLastFoundChild field of TDF_LabelNode that can be changed during accessing to different sub-labels in different threads as atomic (only for newer versions of compilers which support this "atomic").

Added definition of Standard_ATOMIC macro to the Standard_Macro.hxx
2020-11-28 12:36:06 +03:00
emv
9d9edcf49d 0031913: Modeling Algorithms - Invalid result of cut operation
Fixed by 0029711. Integrating test case only.
2020-11-28 12:36:05 +03:00
ifv
9a640cbe72 0030703: Modeling Algorithms - Intersector returns overlapping curves
IntPatch/IntPatch_ImpPrmIntersection.cxx - calculation of step depending on resolution of surface

IntWalk_IWalking_6.gxx - calculation of point-line coincidence is improved

Correction of tests according to current results

lowalgos/intss/bug30703 - new test case added
2020-11-28 12:36:05 +03:00
akaftasev
9ab58ebf65 0029392: Modeling data - Exception when getting UIso of offset surface of surface of linear extrusion
Added treatment for Geom_OffsetSurface::UIso() if basisSurface is Geom_SurfaceOfLinearExtrusion
2020-11-25 18:48:38 +03:00
dpasukhi
65eed8ff8e 0026047: Data Exchange - Lost colors for IGES export
- Fix problem with write shape with locations ( IGESCAFControl_Writer.cxx )
- Add support for adding sub-shapes (labels) together with sub-shapes without location ( XCAFDoc_ShapeTool.cxx )
2020-11-23 11:43:57 +03:00
aavtamon
0f5a1a9485 0028572: Modeling Algorithms - Wrong result of the mkface command
- Added note to BRepBuilderAPI_MakeFace(const Handle(Geom_Surface)& S,
										const TopoDS_Wire& W,
										const Standard_Boolean Inside = Standard_True)
in BRepBuilderAPI_MakeFace.hxx;
- Modified subsubsection occt_modalg_3_5_2 in dox/user_guides/modeling_algos/modeling_algos.md
2020-11-21 12:26:06 +03:00
mzernova
4552cb8552 0027130: Visualization, Ray tracing - skip structures with transformation persistence flag
Objects with transform persistence are detected as non ray-tracable and redered using the rasterization approach.
The renderFiltered() method moved to the OpenGl_Group class.

v3d/raytrace/bug27130: test case added
2020-11-21 12:19:50 +03:00
luz paz
21c7c45701 0031939: Coding - correction of spelling errors in comments
Fix various typos

Fixed via `codespell v2.0.dev`
2020-11-21 12:19:49 +03:00
kgv
81ff49158a 0029642: Foundation Classes - deprecate TCollection classes except strings
Removed remnants of generic templates in TCollection package.
2020-11-21 12:19:49 +03:00
kgv
d99673cf22 0031943: Foundation Classes, TColStd_PackedMapOfInteger - get rid of TCollection_BasicMap
TCollection_BasicMap has been merged into TColStd_PackedMapOfInteger.
TColStd_PackedMapOfInteger has been cleaned up from redundant type casts.
2020-11-21 12:19:48 +03:00
akaftasev
6e01c25ad1 0029827: Modeling Data - TopoDS_Shape::Nullify() does not reset location
TopoDS_Shape::Nullify() nullify not only myTShape but myLocation and myOrient.
Nullified shapes are equal and same now.
Added test.
2020-11-21 12:19:48 +03:00
kgv
026aec1860 0031922: Configuration - unresolved external symbol NCollection_Lerp<Handle(Graphic3d_Camera)>::Interpolate()
A normal method Graphic3d_Camera::Interpolate() is now exported instead of
template method NCollection_Lerp<Handle(Graphic3d_Camera)>::Interpolate().
2020-11-21 12:19:47 +03:00
skl
ad2ef2599a 0029855: Data Exchange, XCAF GD&T - PMI objects copy constructors ignore presentation
Add all missing values.
2020-11-21 12:19:46 +03:00
akaftasev
c5b42a1afe 0030342: Modeling Data - Successively trimming surface in both directions lose the first trim
Added trim for U and V directions when trimming happens sequentially in these directions.
Added possibility to set sense to trim command.
2020-11-21 12:19:46 +03:00
kgv
e89202ea02 0031815: Visualization, TKOpenGl - avoid XResizeWindow() within OpenGl_Window::Resize()
OpenGl_Window::Resize() no more calls XResizeWindow() and relies only on dimensions returned by Aspect_Window.
Xw_Window::Size() now ignores Window in case of virtual window in similar way as WNT_Window does.
2020-11-21 12:19:45 +03:00
kgv
0aeb898418 0031729: Visualization, Prs3d_DatumAspect - provide per axis text aspects
Prs3d_DatumAspect::TextAspect() now takes Prs3d_DatumParts argument
and defined separately for Prs3d_DatumParts_XAxis/Prs3d_DatumParts_YAxis/Prs3d_DatumParts_ZAxis.
The method without arguments has been marked as deprecated.

V3d_Trihedron now stores per-label text attributes.
Added method V3d_View::Trihedron() returning V3d_Trihedron object for more straightforward definition.
V3d_Trihedron::SetWireframe() - added missing invalidation.

AIS_Trihedron::setOwnDatumAspect() implementation has been moved to Prs3d_DatumAspect::CopyAspectsFrom()
and now used by Prs3d_Drawer::SetOwnDatumAspects().
OpenGl_Text::render() - added NULL-check.

AIS_Trihedron::computePresentation() now takes into account Prs3d_Datum*Arrow shading/line aspects.

Command vtrihedron has been extended by "-textColor XAxis|YAxis|ZAxis Color" syntax.
Command vviewcube has been extended by "-xAxisTextColor|-yAxisTextColor|-zAxisTextColor" arguments.
2020-11-21 12:19:45 +03:00
kgv
24f9d04c72 0031909: Visualization, AIS_Trihedron - replace maps with arrays
Prs3d_DatumAspect, AIS_Trihedron - redundant maps have been replaced by explicitly sized arrays.

AIS_Trihedron::myHasOwnDatumAspect - removed unused class field.

Prs3d_DatumAttribute, Prs3d_DatumParts, Prs3d_DatumAxes - enumeration values
have been renamed to have full name prefix.

vzbufftrihedron - fixed no more necessary Quantity_Color -> Quantity_NameOfColor convertion.
2020-11-21 12:19:44 +03:00
asuraven
84d0342cef 0031908: Draw Harness, TKTopTest - wavefront file path length is limited to 100 characters
* Change file path variable in wavefront function from char[100] to TCollection_AsciiString
2020-11-21 12:19:43 +03:00
skl
5ae53d4986 0030421: Data Exchange - Standard_RangeError exception while reading VRML files with polygons
Import of arbitrary polygon is implemented in VrmlData_IndexedFaceSet.
Class IFCCAFControl_Triangulator has been moved to BRepMesh_Triangulator.
New Draw test /bugs/stlvrml/bug30421 is added.
2020-11-21 12:19:43 +03:00
bugmaster
0d7753d266 Update version up to 7.6.0.dev 2020-11-12 10:49:58 +03:00
bugmaster
628c0211d5 Increment OCCT version up to 7.5.0 2020-11-02 19:52:44 +03:00
kgv
dbecff5fab 0031898: Coding Rules - extend Standard_WarningsDisable.hxx with -Wreorder 2020-11-02 19:41:29 +03:00
asuraven
7a88ce5b98 0029108: Crash writing STEP file
* Wrapped a try / catch block on creating objects in TopoDSToStep_MakeStepFace::Init()
2020-11-02 14:32:39 +03:00
Xu Zhongxing
2b7fd8c81c 0031887: IntTools_Context::IsPointInFace always return TRUE
If aDist >= aTol, bIn is never updated to false, and the function
always returns TRUE.
2020-10-30 18:25:19 +03:00
kgv
a8b9d7eb27 0031888: Configuration, qmake - linkage error due to missing .cpp file in TKMesh
OccToolkit.pri now handles also .cpp file extension.
2020-10-29 19:04:46 +03:00
dpasukhi
71af3370c4 0031878: DXF import - support Windows and ISO 8859 code pages in DXF import
Add support of converting Big5 and GBK code pages to Unicode within Resource_Unicode::ConvertFormatToUnicode
2020-10-29 19:01:54 +03:00
asuraven
40858cc79c 0030921: Data Exchange - STEPCAFControl_Reader incorrectly reads the specified stp file -- refactoring
File StepToGeom_MakeBSplineCurve.pxx is removed, relevant code is converted to C++ template and merged to StepToGeom.cxx
2020-10-29 18:55:37 +03:00
asuraven
3940436ae2 0030921: Data Exchange - STEPCAFControl_Reader incorrectly reads the specified stp file -- fix
The number of weights is adjusted to the number of poles in StepToGeom::MakeBSplineCurve(2d).
2020-10-29 18:55:36 +03:00
kgv
c3da64a686 0031884: Data Exchange - NULL de-reference within STEPCAFControl_Reader::SetSourceCodePage()
Removed methods with unclear usage rules.
2020-10-28 22:19:23 +03:00
mzernova
4065c66c24 0031808: Visualization - NULL dereference in Graphic3d_Structure::IsDisplayed() on Removed presentation
Added a NULL check for IsDisplayed(), IsHighlighted(), IsTransformed(), IsVisible(), etc.
2020-10-28 22:18:12 +03:00
abv
94f16a8961 0014673: Provide true support for Unicode symbols
Construction of TCollection_ExtendedString from plain C string is fixed to consider input string as UTF-8 in several places (identified as described in notes to #31113).

Message_MsgFile is corrected to load resource file as UTF-8 (unless it has BOM indicating use of UTF-16).

Added tests for use of Unicode in some DRAW commands (bugs demo bug14673_*)
2020-10-28 22:18:11 +03:00
kgv
aa7e9f8d78 0031881: Coding Rules - OpenGl_HaltonSampler::initRandom() uses deprecated in C++14 function std::random_shuffle
Unused function has been removed.
2020-10-28 19:24:00 +03:00
akaftasev
5445eaeed5 0030003: Construction of pipe by two circular sections and spine curve leads to crash
GeomFill_NSection.cxx  : setting of UPeriodic flag while call constructor of BSpline surface is added

bug3003 : Test cases added
2020-10-27 19:46:14 +03:00
asuraven
07bc68e8d8 0031873: Samples, Qt OCCT Overview sample - Problems of compilation and launch in 32 bit mode on Windows 2020-10-26 19:47:54 +03:00
kgv
ec4128df29 0031876: Configuration - Prs3d_Arrow::DrawShaded() crashes in msvc10 win32 Release build
Use longer code syntax to workaround compiler bug.
2020-10-26 19:45:16 +03:00
abv
f41fd243b6 0031877: DRAW - some Visualization commands are not protected against uninitialized viewer
Added protections in DRAW commands against accessing Null context

Added test bugs demo bug31877
2020-10-25 08:46:49 +03:00
kgv
9f9490e1ae 0031875: Draw Harness, ViewerTest - command vaspects -mostContinuity lacks g1 and g2 options
vaspects -mostContinuity now accepts g1 and g2 values.
2020-10-23 19:58:51 +03:00
emv
0612bb7010 0031858: Modeling Algorithms - boolean operation crash between the given cylinder and torus.
Integrating test cases only, as the problem is not reproduced.
2020-10-23 19:57:30 +03:00
ifv
7ccfd41fa2 0031782: Modeling Algorithms - Regressions on VS 2019 (vc142) on fillet tests
ChFiKPart_ComputeData_FilPlnCyl.cxx - rewriting some code to avoid "extra" optimization
2020-10-23 19:56:03 +03:00
dpasukhi
692decba26 0031825: Data Exchange, STEP - NULL dereference while re-exporting model with empty Datum description
Fix adding name and description of the datum
2020-10-23 19:54:58 +03:00
dpasukhi
1b9cb073b9 0028454: Data Exchange, STEP reader - names with special characters cannot be read
- Add support of the control directives ( "\X2\" "\X4" "\X\" "\P*\" "\S\");
- Make param "read.stepcaf.codepage" base for conversion inside StepData instead of CAF;
- Rename "read.stepcaf.codepage" to "read.step.codepage".
- Add ISO 8859-1 - 9 code pages for conversion
- Add Resource_FormatType_NoConversion format type, that indicates non-conversion behavior
- Update old test cases that contain control directives
2020-10-22 17:54:29 +03:00
ifv
380748c340 0027469: Modeling Algorithms - Regression vs 6.9.1: Wrong result of Edge/Face intersection
IntTools/IntTools_BeanFaceIntersector.cxx - decreasing parameter aDeltaRestrictor in method ComputeRangeFromStartPoint(...) to avoid "jumping" across the common part boundary.

IntTools/IntTools_EdgeFace.cxx - method IsCoincident() - improving criteria of coincidence between edge and face.
2020-10-22 17:49:17 +03:00
kgv
a966542b8a 0031866: Documentation - add description to Graphic3d_NameOfMaterial enumeration values
Enumeration values have been renamed to use complete prefix Graphic3d_NOM_ -> Graphic3d_NameOfMaterial_
and to match string names (with old values preserved as aliases).
2020-10-22 17:40:42 +03:00
asuraven
8833fd4dc5 0031827: Samples - Qt OCCT Overview sample is not compiled with VS 2010
* Menu storage changed from json to XML (because Qt 4 does not support json)
 * C++11 for(object : container) construction changed to OCCT iterators / Qt foreach
 * enum type::name changed to type_name
 * non used class members removed
 * Qt connect functions changed to macros version
 * warning 4127 disabled for Q_INIT_RESOURCE in VS2010 / Qt 4 case
 * widgets parent problem on Qt 4 fixed
 * QRegularExpression changed to QRegExp
2020-10-22 17:35:37 +03:00
kgv
1877dc98c9 0031856: Draw Harness - ReadStep should propagate progress indicator
Added progress indication to commands ReadStep, WriteStep, ReadIges, WriteIges, XOpen, XSave.

Draw_ProgressIndicator::Reset() now backups Tcl result string before evaluating command,
so that Draw_ProgressIndicator destructor will not eat error/result message in main command.
2020-10-20 18:16:09 +03:00
jgv
3e98579a83 0031855: Modeling Algorithms - regression of the unifysamedom command.
Transformation of 2d-curves on elementary surfaces has been corrected.
2020-10-20 18:13:49 +03:00
kgv
16ed73bec5 0031790: Configuration, CMake - add optional OpenVR dependency 2020-10-17 18:07:29 +03:00
abv
ae9f4b64ca 0031851: Data Exchange, STEP - enable Unicode symbols in STEP export
Class STEPCAFControl_Writer is corrected to avoid replacing non-Ascii symbols by question marks, and spaces by underscores, on export to STEP.

Related: DRAW commands dealing with strings in OCAF documents are corrected to pass Unicode symbols as UTF-8.

Off-topic: code saving names of external STEP files in XDE and fetching them back is corrected to preserve Unicode symbols as UTF-8.

Added test bugs xde bug31851

Test de step_4 E7 corrected (no more replacement of spaces by underscores in names of layers)
2020-10-14 19:28:58 +03:00
emv
870ae593c3 0031850: Modeling Algorithms - boolean cut and common generate unexpected result
IntPatch_WLineTool::JoinWLines(): using correct point for the check if WLines may be joined.
2020-10-14 19:25:45 +03:00
emv
135c2bd908 0031835: Modeling Algorithms - step by step Boolean common produces bad shape on given three cylinders
Fix inconsistency between IntAna_QuadQuadGeo(gp_Cylinder,gp_Cylinder) and AxeOperator::Coplanar().
2020-10-14 19:23:26 +03:00
kgv
6eeb528cd1 0031848: [REGRESSION] Visualization - MoveTo() triggers exception "gp_Dir() - input vector has zero norm"
SelectMgr_RectangularFrustum::Overlaps() - added zero magnitude check.

Commands vsphere,vcylinder,vtorus have been corrected to provide missing parameters defining number of stacks and slices.
2020-10-14 19:17:33 +03:00
emv
815f039bd2 0031836: Modeling Algorithms - Boolean cut failed between a Cone and a Torus
BOPAlgo_PaveFiller::UpdateExistingPaveBlocks: Add check for closed edge when updating pave block.
2020-10-13 19:18:02 +03:00
abv
81f2078cdb 0031575: Tests - make location of source test folder available in test
Documentation of global variables available for the test script during test execution is improved.

Off-topic: mark-up error is fixed in DRAW user guide
2020-10-13 19:15:39 +03:00
ifv
794aa3390c 0029722: Modeling Algorithms - checkshape modifies UV points of parametric curve
removed updating uvpoints from WireExplorer
2020-10-13 19:09:44 +03:00
kgv
d922149528 0031842: Coding Rules, BOPAlgo - eliminate CLang warning -fsanitize=undefined reference binding to null pointer
Added NULL checks before Progress Scope pointer dereference.
2020-10-13 19:07:42 +03:00
mpv
2958b91f62 0031841: Coding Rules, LDOM_XmlReader - eliminate new CLang compiler warning -Wtautological-overlap-compare 2020-10-13 19:06:40 +03:00
kgv
cdfcd39b69 0031833: Visualization - dynamic highlighting does not appear within ImmediateRedraw()
AIS_ViewController::contextLazyMoveTo() now undoes Z Range changes after MoveTo().
2020-10-09 18:29:52 +03:00
vsv
c4d4fceaa7 0031824: Samples - Code is not displayed in Qt OCCT Overview sample after compilation by CMake 2020-10-09 18:28:27 +03:00
abv
d730835599 0031095: Debugging - add code for display of TCollection_AsciiString as UTF-8 in Visual Studio debugger visualizer 2020-10-09 18:26:03 +03:00
kgv
a84f14abee 0031830: Documentation - broken reference 14 in pbr_math document
References to literature are simplified to reduce duplication of names.
List of references is converted to table for better presentation.
2020-10-09 18:24:24 +03:00
bugmaster
278da162dc Increment OCCT version up to 7.5.0beta 2020-10-06 20:40:27 +03:00
dpasukhi
baf60a870c 0031670: Data Exchange - cp1251 Cyrillic characters in STEP file
Add support for converting pages from Windows encoding to Unicode
2020-10-06 20:40:26 +03:00
jgv
99c9a82021 0031735: Modeling Algorithms - BRepOffset_MakeOffset works slowly and produces wrong result
Modify method IsPlanar of BRepOffset_MakeOffset: try to make planar all possible faces to simplify the input shape.
2020-10-06 20:40:25 +03:00
ifv
bf46352772 0031700: Modeling Algorithms - Regression in 0029580 after integration 0029839
BOPAlgo_PaveFiller_6.cxx: protection against creation of thin faces is added
bug29580_1: reverting in original state

dimensions.tcl: correction according to current state of BO algorithm
2020-10-06 20:40:24 +03:00
asuraven
a2176e6524 0031570: Samples - add Qt samples similar to standard MFC samples
Added Qt sample OCCTOverview providing examples of use of OCCT API with relevant code and demonstration of results in the viewer.

Off-topic: some unused images are removed from dox/introduction/images/
2020-10-06 20:40:23 +03:00
tiv
50ae6dad80 0031821: Coding - Uninitialized variables in TKFillet project
Some variables that remain uninitialized in the project TKFillet received proper initializers.
2020-10-06 20:40:22 +03:00
gka
809a2e13f8 0031812: IGES import - NURBS patches lost in the import process - 720
Correction for case invalid color definition to avoid considering an entity that has a number corresponding to the color field as erroneous if entity is not a color entity.
2020-10-06 20:40:21 +03:00
abv
b81a7e3160 0030378: Data Exchange - extract of subset of model entities fails (regression)
Field theflags in class Interface_BitMap is always initialized to avoid exception on operations with the class.

Added test bugs step bug30378
2020-10-06 20:40:20 +03:00
kgv
afe3ff9aaa 0031820: Tests - "dlog get" skips last exception when calling 'test" with echo OFF
Added missing puts to "test" command.
2020-10-05 13:29:54 +03:00
abv
b9ec690a2f 0031819: Documentation - add references to Flex and Bison
References to Flex and Bison added

Related:
- table of third-party tools in Requirements section is reorganized to be more clear
- sections Acknowledgements and Installation are updated
2020-10-03 16:07:52 +03:00
abv
d430d12909 0030800: Foundation Classes, UnitsAPI - poise dynamic viscosity unit is not defined correctly
Definition of Poise unit corrected.

Added test bugs fclasses bug30800
2020-10-03 16:06:35 +03:00
nds
6522304c17 0029451: Information Message Alert to debug an algorithm or object functionality
- Added possibility to send stream information and transient object into Message_Messenger. Message_Printer will process it if needed.
- Add Message_PrinterToReport to send messenger information into Message_Report.
- Extended Message_Report to collect hierarchical alerts, to be able to collect some metrics during alerts processing.
- Added Message_AlertExtended to prepare hierarchical alerts with custom attributes. One attribute for one alert.
- Added Message_CompositeAlerts class to handle a container of alerts.
- Added Message_Level to start a new hierarchical level by creating an instance, stop by destricting.
- Added Message_Attribute and inheritors to store custom information about alert like object, stream, shape, some metrics.
- Implement Message_AttributeAlert to collect start/stop information about active metrics of Message_Report. This kind of attribute is created if at least one metric is active in the report.
- Add Message_MetricType enumeration with possible kinds of metrics in report.
- Implement DumpJson for Message_Report to store all collected alerts into stream.
- Added draw commands for Message_Report, Message_Messenger.
2020-10-02 20:45:29 +03:00
kgv
dba9887351 0031816: Data Exchange - RWMesh_MaterialMap::CopyTexture() copies glb file instead of a texture inside it
Image_Texture is now checked if it defines an additional offset within the file
to avoided copying an old glb file with embedded image files instead of extracting them.
2020-10-02 19:13:47 +03:00
Vera Sdobnova
e6c8fcfed4 0027191: Documentation - redesign of information architecture -- revision (user guides)
Revision of User Guides

- Changes in User Guides Section to correspond with OCCT Overview structure: Mesh became a direct subsection of User Guides (it was a part of Modeling Algorithms).
  TObj is included into OCAF.
- Changes in User Guides – Modeling Algorithms section: Fillets and Chamfers, Offsets, Drafts, Pipes and Evolved shapes, Sewing, Features, 3D Model Defeaturing, 3D Model Periodicity,
  Object Modification are moved into The Topology API section.
- Changes in User Guides – Modeling Data section: Naming shapes, sub-shapes, their orientation and state section is renamed to Shape content. Shape Location is moved into Shape content section.
  Storage of Shapes is moved into BRep Format section of Specification. Lists and Maps of Shapes subsection is moved into Topology - Exploration of Topological Data Structures.
- Some pictures in User Guides (Foundation Classes, Modeling Data, Modeling Algorithms) and Tutorial are updated to improve quality and correct mistakes.
2020-10-02 18:11:24 +03:00
Vera Sdobnova
0a6d974274 0027191: Documentation - redesign of information architecture -- revision (overview and samples)
Revision of Introduction, Overview, Samples, Tutorial

- Technical Overview is incorporated into Introduction
- Samples (from Overview) and Tutorial are moved into new section Tutorials and Samples
- Content of Getting Started section (Draw Test Harness and Experimenting with Draw Test Harness) is moved into Tutorial and Samples section.
- Content changes: links to Open Cascade website promoting paid training and support are deleted.
- Some pictures in User Guides (Foundation Classes, Modeling Data, Modeling Algorithms) and Tutorial are updated to improve quality and correct mistakes.
2020-10-02 17:46:31 +03:00
Vera Sdobnova
06ce029fb9 0027191: Documentation - redesign of information architecture -- revision (build)
Revised documentation of building OCCT and third-parties; some related tags updated
2020-10-02 16:28:52 +03:00
abv
6b6d06fa08 0027191: Documentation - redesign of information architecture -- renaming (4)
Move documents describing BREP format, Boolean operations, and PBR math to dox/specification
2020-10-02 16:18:37 +03:00
abv
825c3a4a4b 0027191: Documentation - redesign of information architecture -- renaming (3)
Move guides on documentation, tests, coding rules, contribution workflow to dox/contribution
2020-10-02 16:17:08 +03:00
abv
5dab9b575b 0027191: Documentation - redesign of information architecture -- renaming (2)
Move debug and upgrade user guides to corresponding folders on upper level

Related: remove "debug" pattern from .gitignore to avoid ignoring relevant folder in dox
2020-10-02 16:16:51 +03:00
abv
2d863ff7bd 0027191: Documentation - redesign of information architecture -- renaming (1)
Move / rename overview to introduction
2020-10-02 16:16:33 +03:00
iko
27ce25199f 0031645: Documentation - provide external article references to PBR developer guide
References have been added.
2020-10-02 16:15:01 +03:00
kgv
28828566e9 0031813: Data Exchange, RWGltf_GltfJsonParser - debug assertion in progress scope on reading glTF1.0 files
RWGltf_GltfJsonParser::gltfParseSceneNode() - removed redundant progress indication on sub-meshes list level.
2020-10-02 16:12:51 +03:00
bugmaster
7e6da17b9f 0027922: Samples - Qt sample document window display problem 2020-10-02 16:12:51 +03:00
nds
ac5b3cbc0a 0030911: Visualization - Font_BRepFont using as a usual Standard_Transient
- StdPrs_BRepFont inherits Standard_Transient;
- StdPrs_BRepFont contains Font_FTFont in internal field;
- StdPrs_BRepFont implements FindAndCreate;
2020-10-02 16:12:50 +03:00
kgv
6183f3fead 0031762: Visualization, Font_TextFormatter - tabulation length is respected with one extra symbol shift
Integrate test case for checking various scenarios with tabulation symbol.
2020-10-02 16:12:50 +03:00
mkrylova
4945e8be99 0031789: Coding Rules - remove redundant Standard_EXPORT from TKMesh
- Standard_EXPORT which were specified for inline methods were deleted.
- ALL occurrences of DEFINE_STANDARD_RTTI_INLINE were replaced by DEFINE_STANDARD_RTTIEXT in header files and IMPLEMENT_STANDARD_RTTIEXT in source files
- ALL occurrences of "inline" keyword were deleted where it didn't not cause a linkage errors
- Added source files for classes that were without them for IMPLEMENT_STANDARD_RTTIEXT
2020-10-02 16:12:49 +03:00
kgv
42624fdc75 0031799: Configuration - compilation errors with Android NDK r12
Added missing <stdarg.h> include (va_list) to Standard_CString.hxx.
Do not include <search.h> in delabella.cpp when using gcc 4.9 from Android NDK.
2020-10-02 16:12:49 +03:00
mzernova
e2409d34b5 0031793: Draw Harness, vmanipulator - disable sorting picking result workaround
AIS_InteractiveContext::SetPickClosest() has been removed from vmanipulator command,
and test cases using the manipulator have been updated.
2020-09-29 18:11:03 +03:00
kgv
9211c8ffbc 0031795: Documentation - OCCDoc_ProcessSvg uses syntax incompatible with Inkscape 1.0
Detect old/new Inkscape version and pass arguments correspondingly.
2020-09-29 18:09:40 +03:00
imn
68922bccc4 0027342: STEP - support C++ streams for import / export
- STEP low-level parser is converted to C++; required minimal version of flex is elevated to 2.5.37.
- Added possibility to import STEP from stream, see new method XSControl_Reader::ReadStream() (now implemented in STEP only).
- Parsers ported to win_flex_bison 2.5.23 (flex 2.6.4, bison 3.7.1)
- Added support of C++ flex and bison scanners in in CMake scripts
- Some code clean-up in StepFile and around (unused files and functions are eliminated)
- Option to read from stream is added in DRAW command testreadstep for testing ReadStream() function
- Added test bugs step bug27342
2020-09-28 10:46:04 +03:00
sshutina
ed75148574 0031786: Data Exchange - After the importing STEP file the free shape is empty
- Fixed the exception
 - Added the test
2020-09-28 10:46:03 +03:00
kgv
8c36926a54 0031701: Visualization, SelectMgr_ViewerSelector - make depth tolerance configurable
SelectMgr_ViewerSelector::SetDepthTolerance() - added property defining depth tolerance type and value.
Default value remains the same (SelectMgr_TypeOfDepthTolerance_SensitivityFactor),
while new values (SelectMgr_TypeOfDepthTolerance_Uniform, SelectMgr_TypeOfDepthTolerance_UniformPixels) change behavior.

AIS_Manipulator - removed obsolete suggestion to use AIS_InteractiveContext::SetPickClosest()
for issue fixed long time ago by #0027797.
2020-09-28 10:46:02 +03:00
dpasukhi
14abc514ed 0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE
- Fix incorrect sharing DatumTargetType_Area
- Add check for null object
2020-09-28 10:46:02 +03:00
abv
8a39adb7d8 0031785: [REGRESSION] Application Framework - application crashes on reading XBF document in background thread
Class CDF_Session is removed.

Integrated previously but not described:

0029195: OCAF - ensure thread safety for different documents.

Static local variables are eliminated in PCDM package.
Global documents metadata look-up table and directory of opened documents are removed.
Look-up table is maintained now as field in instances of the CDM_Application class.
Methods providing iteration by components are removed from class CDF_Store; signature of methods returned Standard_ExtString is changed to return Handle(TCollection_HExtendedString).
Support of different "Presentations" of documents is eliminated.
2020-09-28 10:46:01 +03:00
mkrylova
0e57793fc6 0031688: Visualization - Wrong ISO lines for a face created from BSpline
Added a check to see if the ISO line intersects the bounding contour.
2020-09-27 12:00:08 +03:00
kgv
9df0497931 0031765: Coding Rules - eliminate GCC compiler warnings -Wcatch-value in IVtk
Catched exceptions are now passed by reference and error message is printed.
Added Standard_FALLTHROUGH to IVtkOCC_ShapePickerAlgo::SetSelectionMode().
2020-09-27 12:00:07 +03:00
oan
f2006a6f19 0028089: Mesh - New algorithm for triangulation of 2d polygons
Added custom meshing core algorithm to generate base mesh using Delabella library,
which can be enabled via IMeshTools_Parameters::MeshAlgo option or CSF_MeshAlgo environment variable.

Do not fill cirles filter upon explicit initialization.
Call base postProcessMesh functionality after initialization of circles in BRepMesh_CustomDelaunayBaseMeshAlgo.

Added Vsprintf() wrapper for vsprintf() preserving C locale.
2020-09-27 12:00:07 +03:00
mpv
689dc3b1c9 0031323: OCAF, TObj - TObj_OcafObjectIterator does not go recursively to children if type argument is used
Added theAllSubChildren flag to the TObj_OcafObjectIterator to iterate all sub-children.
By default it still iterates only the first level of children.
2020-09-27 12:00:06 +03:00
tiv
0b55d29b6a 0031628: Configuration - Visual Studio 2019 compiler hangs on building 32-bit target
The workaround for a bug occurred in MS Visual Studio 2019 / Win32 / Release configuration with disabled Whole Program Optimization is implemented.
The problem was at the line "std::stable_sort(aPairList.begin(), aPairList.end(), BRepExtrema_CheckPair_Comparator);" of BRepExtrema_DistShapeShape.cxx source file,
and linked to NCollection_Vector::Differ() method.
This workaround was suggested by MSFT team.
2020-09-27 12:00:05 +03:00
bugmaster
99178701db 0031738: Samples: Update of samples for public release 7.5.0
- Adding VS 2019 redefinition
- Update sln files for vc14,141,142
2020-09-27 12:00:05 +03:00
emv
d476fc37f8 0030559: BOP Fuse: result is inconsistent
Implement alternative approach for making the edge seam (closed) on the face. This approach is useful for non-periodic surfaces (e.g. tore-like surface of revolution is periodic in U direction only).
Avoid internal faces in the affected solids of the result of BOP Fuse.
2020-09-27 12:00:04 +03:00
nds
b3bf8485a2 0031379: Configuration - using defined variable of THIRDPARTY_DIR 2020-09-23 18:49:14 +03:00
mzernova
113bda7072 0031773: Visualization - add Prs3d_ToolTorus
Added Prs3d_ToolTorus tool to create a torus

Added DRAW commands:
- vtorus
- vcylinder
- vsphere

Added test cases:
- v3d/quadric/torus
- v3d/quadric/cylinder
- v3d/quadric/sphere
2020-09-21 12:36:27 +03:00
ika
b0b7668261 0027185: Data Exchange - IGES - incorrect reading of DE for undefined entity
Fix reading of pointers to color entity.
2020-09-18 18:17:21 +03:00
dpasukhi
4661dcadd4 0025171: Data Exchange - STEP Lexer - the strings with quote sign inside can't be properly lexed
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:15:09 +03:00
dpasukhi
3d46ce87d7 0030014: Data Exchange - Step File import does not create shapes, after transfer roots
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:15:01 +03:00
dpasukhi
ebfd071c3c 0031191: Data Exchange - STEP import returns empty shape for a file written by SolidWorks 2018
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:10:03 +03:00
dpasukhi
c6d45aceb8 0030539: Data Exchange - Step file can't be imported (ADT.step)
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:10:03 +03:00
dpasukhi
87cf7029c3 0025440: Data Exchange - STEP file with Japanese unicode symbols cannot be read
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:10:02 +03:00
jgv
06f68996cf 0031766: Modeling Algorithms - Instability on pipe bugs bug26088 test case
Correction in GeomFill_Sweep: set the flags "myExchUV", "isUReversed", "isVReversed" to FALSE (initial state) after failure of BuildKPart method.
2020-09-18 17:47:03 +03:00
ika
ba98b079eb 0031491: Data Exchange, STEP Import - Regression due to patch 29068
Add parameter read.step.root.transformation to switch on/off using transformation placed in the root shape representation.
2020-09-18 17:47:02 +03:00
dpasukhi
16bb5630bc 0031675: Data Exchange - Error opening the STEP-file
Add a check for null array object ("Elements") within StepShape_GeometricSet.cxx
2020-09-18 17:47:01 +03:00
emv
ce97cd9708 0025113: Mesh - Progress indication and user break functionality for BRepMesh component
Added Progress Indicator to BRep_Mesh
2020-09-18 17:47:01 +03:00
abv
99ca2eec6b 0031595: Foundation Classes - make methods Message_Report::SendMessages() virtual 2020-09-18 17:47:00 +03:00
jgv
9390642d49 0025495: Documentation - Enumeration Approx_ParameterizationType is not documented 2020-09-18 17:46:59 +03:00
kgv
df9f66149b 0031513: Data Exchange - FSD_Base64Decoder::Decode() returns buffer with wrong length 2020-09-18 17:46:58 +03:00
age
6a2fb7a1d1 0031757: Visualization - Prebuild BVH for Select3D_SensitiveEntity in separate threads
- Added a new mode in SelectMgr_ViewerSelector for computing BVH for Select3D_SensitiveEntity in background which can be activated via method SelectMgr_ViewerSelector::SetToPrebuildBVH(). Default behavior has not been changed.
- New class SelectMgr_BVHThreadPool manages background processing of BVH building queue.
- Added Select3D_SensitiveEntity::ToBuildBVH() method that checks if BVH (if it used) is in invalidated state. Defined this method for all standard classes inherited from Select3D_SensitiveEntity.
2020-09-18 17:46:57 +03:00
mpv
ee3280a94f 0031769: Application Framework - regression : can not initialize two kinds of application in one thread 2020-09-18 17:46:56 +03:00
emv
296f017a16 0029789: Modeling Algorithms - General Fuse produces invalid shape for valid arguments
Integrating test case for the issue.
2020-09-18 17:46:56 +03:00
emv
242af8c222 0025462: BRepAlgoAPI_Fuse not work correctly for a planar face
Fixed by 0028747. Integrating test case only.
2020-09-18 17:46:55 +03:00
mpv
74fdb82c73 0031770: Application Framework - To add tests of Abort command to 31748 2020-09-18 17:46:54 +03:00
vro
8fde921fbe 0031759: Application Framework - regression: support of old versions of OCAF document fails 2020-09-18 17:46:53 +03:00
kgv
48cbe5f797 0031768: Foundation Classes - use usleep within OSD::MilliSecSleep() 2020-09-18 17:46:52 +03:00
agv
97454ee0cb 0031173: Point Cloud Rendering - Enable remote file systems as input and output for the Point Cloud converter
Make RWStl_Reader::IsAscii() accepting optional argument pointing how to rewind the input stream, using unget() or seekg(). This allows writing a reader that uses a stream supporting seekg but not supporting unget.
2020-09-18 17:46:51 +03:00
emv
cd0705f660 0024789: BOPAlgo_Builder produces invalid result on planar, conical and spherical surfaces
BOPAlgo_PaveFiller::MakeBlocks() - Improve Face/Face post treatment procedure by:
* Adding more existing edge for intersection with section edges to resolve all possible intersections.
* Using tree for edges selection.
* Avoiding intersection of the existing edges among themselves.

IntPatch_ImpImpIntersection::CyCyNoGeometric - add more points to wline to make it more smooth.
2020-09-18 17:46:50 +03:00
gka
65da6e2e3e 0031452: Impossible to get Backup of the attribute and status that attribute was modified before commit transaction
Method TObj_Object::HasModifications() was added to get flag that object or it's children was modified in the current open transaction
2020-09-18 17:46:50 +03:00
emv
7f7d121f90 0030786: BOP Cut: artifacts with enabled nondestructive flag
Avoid PaveBlocks initialization on vertex update.
Test case for the issue.
2020-09-18 17:46:49 +03:00
dpasukhi
2547d97917 0031711: Data Exchange - STEPCAFControl_Reader hangs on attached file in an infinite loop
Add check if .step external file is the same main file.
2020-09-18 17:46:48 +03:00
bugmaster
2fa0e902f0 0030308: OCCT Qt Tutorial Sample Cannot Be Built on Linux 2020-09-18 17:46:48 +03:00
gka
8b77b2fc99 0031219: Application Framework - TObj_Object::SetName(const Standard_CString theName) should use conversion to TCollection_HAsciiString
In the method TObj_Object::TObj_Object::SetName(const Standard_CString theName) conversion to the HAsciiString was used instead of the conversion to the TCollection_HExtendedString. -
2020-09-18 17:46:47 +03:00
emv
6c9f3cf15c 0030792: Modeling Algorithms, BOP Fuse - some parts of the shape are dropped
Integrating test case for the issue.
2020-09-16 19:32:57 +03:00
abv
7a3e8aad74 0031763: Foundation Classes - reporting of progress within parallel algorithms
Classes Message_ProgressRange and Message_ProgressScope are improved to store start point of the range.
Method Message_ProgressScope::Value() is improved to compute the value in the current scope from the actual current value of the global progress.
Description of Message_ProgressScope class is improved.

Off-topic:
- method Message_ProgressScope::Relieve() is renamed to Close() for semantic consistency
- article in Upgrade Guide is revised and corrected
2020-09-16 19:32:57 +03:00
gka
88610dfc0e 0031228: It is impossible switch off setting default names for objects inherited TObj_Partition
In order to switch off setting default names for objects of the type TObj_Partition argument "theSetName" defining addition of the default names was added
2020-09-12 20:42:26 +03:00
kgv
0784d6e3cb 0030662: Documentation - update programming example in Visualization user guide
"A programming example" section has been updated to provide a working code.
2020-09-12 20:42:25 +03:00
sshutina
897aeb207f 0031221: Visualization - selection filter in context
- Added the new filter SelectMgr_AndOrFilter which allows to define the context filter. By default OR selection filter is used
 - Added the enumeration SelectMgr_FilterType provides filter types
 - To define behavior SelectMgr_AndOrFilter use  SetFilterType in AIS_InteractiveContext
 - Added the test
 - SelectMgr_OrFilter don't store the disabled objects, it's stored in SelectMgr_AndOrFilter
2020-09-12 20:42:24 +03:00
ika
b95caec47d 0031466: Data Exchange - Cannot import layers from STeP file (7.4.0 regression)
Return possibility to find layers fir subshapes.
2020-09-12 20:42:23 +03:00
msv
7e785937b3 0025748: Parallel version of progress indicator
Progress indication mechanism is refactored to support incrementing progress within multithreaded algorithms.

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

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

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

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

Added new test case 'perf fclasses progr_par' for testing of parallel work of the progress.
2020-09-12 20:42:22 +03:00
mkrylova
99289bed0a 0031683: Visualization - V3d_View::SetBackgroundImage() should accept Image_PixMap
Added V3d_View::SetBackgroundImage() accepting Graphic3d_Texture2D on input.

Graphic3d_CView/OpenGl_View have been modified to merge Graphic3d_CView::SetBackgroundImage()
and ::SetBackgroundCubeMap() implementations into a single method.
2020-09-12 20:42:21 +03:00
dpasukhi
bf0114a372 0030848: Data Exchange - Problem load step file
Update .step scanner rules to read anything within the text, including nested apostrophes
2020-09-12 20:42:20 +03:00
dpasukhi
183c99caf8 0030053: STEP read fails due to comment string
- Update .step scanner:
  - add rules to read anything within the comment
  - add a function to initialize of lexical scanner
  - add states for Commit & End instead of global variables modcom & modend
2020-09-12 20:42:19 +03:00
dpasukhi
e0a25f3d93 0030397: Data Exchange - STEP Reader extension to support entities which have a text description field with not supported symbols
STEP file is now opened in binary mode (instead of text mode) to avoid unexpected handling of control symbols inside string constants.
2020-09-12 20:42:19 +03:00
mpv
c99ad5d760 0030773: Application Framework - To allow to inherit existing attributes to reuse persistence mechanisms
Added possibility to inherit existing attributes if the same persistent fields are used. All methods that allow controlling the data model changes or getting some callbacks may be overridden in successor. They may have same GUIDs as a base class or new ones.

Special macros IMPLEMENT_DERIVED_ATTRIBUTE and IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE must be used instead of standard Handle macro definition IMPLEMENT_STANDARD_RTTIEXT to register new derived attributes.

Using this improvement several existing attributes from TDataStd, TDataXtd and XCAFDoc packages become inherited from other base attribute-classes. XML and Bin drivers of these attributes are removed. New base attribute classes are added: TDataStd_GenericEmpty and TDataStd_GenericExtString.

This improvement does not change both present formats Bin and XML documents. The obsolete Standard scheme is not changed at all.
2020-09-12 20:42:18 +03:00
vro
59e11a2f75 0031310: Application Framework - A document with a reference array attribute crashes on attempt to save on disk 2020-09-12 20:42:17 +03:00
mpv
dbab9c538c 0031748: Application Framework - Efficient OCAF transactions in OCCT 2020-09-12 20:42:16 +03:00
mpv
d9d03f10c3 0029195: OCAF - ensure thread safety for different documents.
OCAF persistence architecture modification to satisfy multi-threading criteria.
2020-09-12 20:42:02 +03:00
jgv
c3e0e1de43 0031736: ShapeUpgrade_UnifySameDomain algorithm does not unify all possible faces
1. Correct processing faces that can be converted into planar ones.
2. Correct processing faces based on V-closed surfaces.
2020-09-10 18:16:44 +03:00
nds
ed753e10df 0031658: Inspector - using AIS_ViewController in View package
- View: using AIS_ViewController, AIS_ViewCube.
2020-09-10 18:15:06 +03:00
nds
630ab53881 0031656: Visualization - drag item to handle in AIS_ViewController
ProcessDragging method in AIS_InteractiveObject. Empty by default. Should be implemented if drag is used for the object.
2020-09-09 19:48:49 +03:00
osa
bbbb6bff1f 0031758: Visualization, AIS_InteractiveContext - unify clearDynamicHighlight() method 2020-09-09 19:46:14 +03:00
nds
6b63dc83c3 0031326: Foundation Classes - Init from Json for base OCCT classes
InitFromJson method implementation for some simple classes.
OCCT_INIT_* defines introduction to do automatic parsing of the stream into values.
Inspector is extended to visualize objects created on the dump stream if it might be created.
2020-09-09 19:36:06 +03:00
nds
b19cde437e 0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using 2020-09-09 19:34:18 +03:00
dpasukhi
4637000015 0031489: Data Exchange - STEP Reader can't read a big file
- Add checking for null object for edge_curve within TranslateEdgeLoop;
- Update STEP parser rule allowing empty element in the list of entity parameters;
- Update test case of bug26451 for a new scanner rule;
- Update test case of bug30273 for a new added check for null object
2020-09-09 19:32:00 +03:00
nds
60f7b22536 0030537: Visualization - wrapping text in font text formatter
Font_TextFormatter inherits Standard_Transient, now it is given as a handle in functions.
Graphic3d_Text - extended with Font_TextFormatter to be able to have it filled out of text render. If it is not defined here, the default text formatter of context is used.
OpenGl_Context - has default Font_TextFormatter for rendering OpenGl_Text.
AIS_TextLabel extending with Font_TextFormatter to prepare test case for text wrapping.
Prs3d_Text returns created graphic text to be able to manage it outside.
2020-09-07 11:10:32 +03:00
sshutina
a516227511 0031354: Visualization - Dump improvement for V3d, Graphic3d, Aspect
- do not dump light in view as it's dumped in the viewer
2020-09-04 18:14:24 +03:00
mzernova
f0da497005 0031733: Visualization, Prs3d_ToolQuadric - create indexed arrays
Prs3d_ToolQuadric has been modified to return an indexed triangulation.
Added methods Prs3d_ToolQuadric::CreateTriangulation() and Prs3d_ToolQuadric::CreateTriangulation()
as more straightforward API returning generated triangulation.
Added missing const to constant methods.

Confusing method Prs3d_ToolQuadric::FillArray() filling both
Graphic3d_ArrayOfTriangles and Poly_Triangulation at once has been marked deprecated.

V3d_Trihedron, AIS_ViewCube and AIS_Manipulator
now set Closed flag to groups with shaded sphere and arrows.
2020-09-04 18:14:23 +03:00
emv
ba8175dd5d 0027973: Result of Common operation contains a face with an open wire
Integrating test case only as the problem is not reproduced anymore.
2020-09-04 18:14:22 +03:00
emv
129d6e8cc4 0026534: Boolean Cut returns empty result
Integrating test case only as the problem is not reproduced anymore.
2020-09-04 18:14:21 +03:00
mpv
59af6f852a 0029838: Application Framework - TObj.msg defines unused messages 2020-09-04 18:14:21 +03:00
mpv
8f34d47e21 0031340: LDOM fails to read XML file starting with BOM
Added support of BOM (byte order mask) characters at the start of an XML stream or file and provided information about found BOM in LDOMParser.
2020-09-04 18:14:20 +03:00
emv
b3df3dcd82 0026452: Infinite loop in Edge/Edge intersection.
Integrating test case only as the problem is not reproduced anymore.
2020-09-03 20:02:44 +03:00
akaftasev
992876e98f 0030795: BRepOffsetAPI_MakePipeShell: hangs on the attached model and produces infinite rails
Added new condition to catch bad shape
2020-09-03 20:00:47 +03:00
kgv
eca6e7c547 0031744: Configuration - add batch files to build OCCT for Android target
Added script adm/scripts/android_build.bat and template android_custom.bat.template
intended for automating building routines targeting Android platform.

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

The files build.bat and install.bat are copied to the build directory by cmake configure procedure to enable batch building and installation on Windows platform.
2020-09-02 19:58:07 +03:00
osa
b3da9c3ede 0031737: Configuration - Add batch files to build OCCT with Emscripten
The scripts occ_build_wasm.bat and occ_build_wasm.sh have been added
to simplify batch building of OCCT with Emscripten (Web Assembly packages) correspondingly on Windows and Linux platforms.
These scripts are configurable through calling files with custom environment wasm_custom_env.bat and wasm_custom_env.sh.
2020-09-02 19:51:56 +03:00
mpv
17a5b56767 0031320: TObj - method TObj_Object::GetFatherObject() is not protected against deleted object 2020-09-02 19:42:39 +03:00
kgv
f5e758d239 0031728: Visualization, Font_FontMgr - provide function to register fallback fonts in application level
Added public method Font_FontMgr::AddFontAlias() for registering custom aliases and fallback fonts.
vfont command has been extended with arguments -aliases, -addAlias, -removeAlias, -clearAlias and -clearAliases.
2020-09-02 19:38:48 +03:00
ifv
cdddd079cc 0026088: Modeling Algorithms - Exception in pipe algorithm
GeomFill_Sweep.cxx: treatment KPart for sphere is improved
bug26088: test case is corrected - TODO is removed
2020-09-02 19:37:14 +03:00
abv
fba34cf8ba 0031740: Configuration - recover support of Yacc and Lex generation
Scripts adm/cmake/bison.cmake and adm/cmake/flex.cmake are refactored to enable actual search for bison and flex.
Apart of standard locations, also sub-folders of 3RDPARTY_DIR whose names contain "bison" and "flex", respectively, are added to search.
Cache variables 3RDPARTY_BISON_EXECUTABLE and 3RDPARTY_FLEX_EXECUTABLE are removed to avoid confusion (they duplicated similar variables without "3RDPARTY_" prefix).

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

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

Scanners and parsers are regenerated from updated source files with modified options.
Note that lex.ExprIntrp.c is regenerated with multiple differences because option -f (fast scanner) was used for generation of previous version (by WOK).
2020-09-02 19:25:24 +03:00
kgv
dda9303c69 0031743: Draw Harness - fix misprint in Draw_Interpretor::SetToColorize() 2020-09-02 18:54:31 +03:00
kgv
7d47ebdbcd 0030617: Coding - using reinterpret_cast instead of static_cast for downcast
Several reinterpret_cast have been replaced by static_cast when applicable.
2020-09-02 18:48:56 +03:00
kgv
d6c489212b 0028990: Coding Rules - deprecate redundant class Prs3d_Root
Prs3d_Root usage has been replaced by direct calls to Prs3d_Presentation methods.
2020-08-30 19:04:53 +03:00
kgv
68a2329305 0031369: Foundation Classes, Standard_ReadBuffer - access violation on second ::ReadChunk() call after read failure
Standard_ReadBuffer::readRawDataChunk() - do not increment NULL pointer and return invalid address.
2020-08-28 18:13:36 +03:00
kgv
90bc1adb77 0031086: Coding Rules - STEPCAFControl_Reader has virtual functions, but no virtual destructor
Added missing virtual destructor.
2020-08-28 18:11:58 +03:00
kgv
af7fa1438e 0031706: Data Exchange, RWGltf_CafReader - imports model with incorrect transformation
RWGltf_GltfJsonParser::bindNamedShape() - shape location is now multiplied not just overridden.
2020-08-28 18:00:22 +03:00
emv
6f04cbb1fb 0031734: Modeling Algorithms - Incorrect result of offset operation in mode "Complete" join type "Intersection"
BRepOffset_MakeOffset_1::IntersectFaces - Build intersection pairs for rebuilding process basing on the intersection results and removed faces.
2020-08-28 17:53:40 +03:00
kgv
d99f0355e3 0031731: Draw Harness - colorize errors and exception messages
Draw_Interpretor, CommandCmd() - catched exceptions and messages put into Tcl string result
before throwing a Tcl exception (return 1) are now print in intense red (using Message::SendFail()).
Duplication of exception message in std::cout and Tcl output has been removed.

Draw Harness plugins have been updated to use either Message::SendFail() or theDI instead of std::cout/std::cerr
for printing colored error message before throwing a Tcl exception.
2020-08-25 09:44:15 +03:00
kgv
1d99a2baaa 0031720: Visualization, Font_FontMgr - register one more CJK fallback font available on newer Android devices 2020-08-22 12:13:14 +03:00
kgv
4c99a1f80a 0031727: Samples, JNI Sample - JNI DETECTED ERROR on calling OcctJniRenderer.postMessage()
Use CallVoidMethod() instead of CallObjectMethod().
2020-08-22 12:13:13 +03:00
osa
fe3dbc63fc 0031715: Visualization - add access to proxy shader program 2020-08-22 12:13:12 +03:00
kgv
8e16477b50 0031582: Configuration, CMake - OCCT fails to build with VTK 9.0
Handle "VTK::" prefix instead of "vtk" used by previous VTK versions for targets.
Corrected unexpected location of endif() and broken indentation.
Obsolete $VTK_USE_FILE is no more included (basing on VTK version check).

Standard_WarningsDisable.hxx/Standard_WarningsRestore.hxx pair is now used to suppress VTK warnings instead of partial disabling.
2020-08-22 12:13:11 +03:00
ifv
ce9aefc8aa 0026568: Modeling Algorithms - Exception when creating pipe
BRepFill_Pipe.cxx:  protection against wrong shape type is added
GeomFill_Sweep.cxx:  protection against using 0-vector to create Direction is added

bug26568: test script is corrected: "TODO ..." is removed
2020-08-22 12:13:10 +03:00
age
f3269ef5f1 0031716: Visualization, Select3D_SensitiveSet::matches() - avoid building BVH in case of full overlapping by the volume 2020-08-22 12:13:10 +03:00
kgv
63e5cfcaab 0031714: Draw Harness - print command name with intense within help output
Added command "dputs" similar to "puts" but with extra arguments modifying text color/intensity.
Command "help" now prints the name of command with intense style.
2020-08-22 12:13:09 +03:00
mpv
0fb210edbf 0031681: Foundation Classes - Shared Libraries Cannot Be Loaded
Standard_ErrorHandler now accesses global mutex via proxy function
instead of a global variable to avoid initialization order issues.
2020-08-22 12:13:08 +03:00
kgv
4254e74196 0031324: Data Exchange - Cannot read BinOcaf document with colour
BinMDataXtd_PresentationDriver and XmlMDataXtd_PresentationDriver have been corrected
to convert old (OCCT 7.4.0) Quantity_NameOfColor enumeration values to new ones.
2020-08-22 12:13:08 +03:00
kgv
12e6d49993 0031713: Draw Harness, IVtkDraw - add commands ivtksetcolor, ivtkaxo, ivtkclose, ivtksettransparency
Added missing NULL checks before accessing GetInteractor().
Errors are now reported using Message::SendFail().
Not found actor names are now reported as syntax error instead of silently skipping them.

ivtkinit now accepts aguments -srgb and -msaa for overriding defaults.
Default MSAA settings have been changed from 8 to 0 to match vinit behavior.
Added command ivtkclose closing a Vtk view.

Added commands ivtkaxo, ivtkfront, ivtkback, ivtkleft, ivtkright,
ivtktop and ivtkbottom assigning view projection similar to sonamed commands in ViewerTest.

Added commands ivtksetcolor and ivtksettransparency assigning
color properties to shaded presentation.
2020-08-14 13:30:05 +03:00
kgv
dae2a92241 0031709: Draw Harness - move methods ViewerTest::ParseOnOff()/ParseColor() to package Draw
Methods ParseOnOff()/ParseColor() have been moved from package ViewerTest to Draw.
Command "vlight -color" now accepts RGB values, not only name.
Implementation of pload command has been cleaned up.
2020-08-14 13:30:04 +03:00
kgv
76fada6839 0031702: Visualization, TKOpenGl - hatching interior is ignored in second View within the Viewer
Current state variables have been moved out from OpenGl_LineAttributes to OpenGl_Context.
2020-08-14 12:46:34 +03:00
szy
5980a9fb23 0031049: OCAF - Error message during Ascii file (std) opening. 2020-08-14 12:44:54 +03:00
ifv
1bf23e5bb6 0031697: Foundation Classes - Expr_GeneralExpression::Derivative does not seem to work (691 & 720)
Expr_NamedUnknown.cxx - wrong comparing of named unknown is fixed

QABugs_20.cxx - new QAcommand is created
QABugs_11.cxx - wrong command is corrected
bug902 - wrong test is corrected
bug31697 - new test is added
2020-08-07 18:49:38 +03:00
kgv
e0b2443737 0031698: Visualization, Graphic3d_Aspects - provide stipple line factor parameter
Added Graphic3d_Aspects::LineStippleFactor() property.
Adjusted help for vaspects command suggesting a shorter syntax.
2020-08-07 15:17:53 +03:00
kgv
148820b2a9 0031689: Coding Rules - including STEPCAFControl_Writer.hxx produces compilation error
Added missing #include <NCollection_Vector.hxx>.
2020-08-07 15:08:55 +03:00
ifv
9c4214b416 0030944: [Regression to 7.0.0] Modeling Algorithms - Intersection curves between pair of faces are not found
IntPatch_ImpPrmIntersection.cxx: treatment of coinciding lines is improved
IntWalk_IWalking_1.gxx: bug correction
bug30944 : test case added
2020-08-03 10:52:59 +03:00
kgv
4c7a3faef5 0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating viewer defaults
SelectMgr_ViewerSelector3d::ClearSensitive() - fixed crash on removing presentations (via command vsensera).

Added new parameters -sync and -reset to vrenderparams command synchronizing parameters across Views.
Parameters -raster and -rayTrace now accept optional on|off values.
Improved command description.
2020-07-24 19:20:33 +03:00
kgv
9f013fee98 0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with Graphic3d_TOSM_UNLIT shading model
Prs3d_ShadingAspect::SetTransparency() now sets transparency also to interior color.
AIS_RubberBand now uses Graphic3d_TOSM_UNLIT.
2020-07-23 16:14:57 +03:00
akaftasev
6d8f9f4a49 0031353: TDocStd_Application does not have api to set progress indicator
Add support of Message_ProgressIndicator in BinTools classes.

Add support of Message_ProgressIndicator with possibility of user break in methods of opening and saving TDocStd_Application.

Add tests of ProgressIndicator in TDocStd_Applacation.
2020-07-23 16:08:23 +03:00
Benjamin Bihler
d27293d9bf 0031677: Configuration - Allow Optimization Level O3 When Compiling With G++
Removed suppression of optimization level O3 with using Mingw64.
2020-07-23 16:08:22 +03:00
mkrylova
b011420f28 0031618: Data Exchange, RWGltf_CafWriter - exporting some models produces glTF files not passing validation
Added a check for non-empty mesh and new warning
that notifies about skipping an empty node
2020-07-23 16:08:22 +03:00
mkrylova
d533dafb56 0031035: Coding - uninitialized class fields reported by Visual Studio Code Analysis
Added initialization of fields that had not initialization
Added default constructors to classes without constructors
2020-07-23 16:08:20 +03:00
dpasukhi
078f916446 0028345: Data Exchange - Reading STEP model using STEPCAF crashes
# Add test to verify import
* Note: Each layer contains a valid name, but only one contains a link to the shape, so .step file contains only one valid Layer.
2020-07-23 16:08:19 +03:00
jgv
c28d4a89d4 0031617: Export STEP in nonmanifold mode corrupts the shape
Modify method XSControl_TransferWriter::TransferWriteShape: add removal of locations before writing the shape.
2020-07-23 16:08:19 +03:00
Benjamin Bihler
6531dfeacd 0031680: Configuration - Compilation Fails With G++ 10.1, LD 2.34 and Link-Time Optimization
Added a non-inline empty virtual destructor to LDOM_OSStream to force vtable generation in one
translation unit only.
2020-07-23 16:08:18 +03:00
kgv
dbc8becff4 0031673: Draw Harness, ViewerTest - command vlocation applies transformation in opposite order
gp_Trsf::SetRotationPart() - added method replacing rotation matrix without reseting other components,
similar to existing SetTraslationPart() and SetScaleFactor().

Transformation multiplication order has been fixed
for vlocation arguments -rotate, -translate, -mirror and -scale.
Added -prerotate, -pretranslate, -premirror and -prescale options following previous behavior.

vlocation -setRotation now uses new method gp_Trsf::SetRotationPart()
for consistency with methods -setLocation and -setScale.
2020-07-23 16:08:17 +03:00
kgv
99ee8f1a83 0031671: Coding Rules - eliminate warnings issued by clang 11
Fixed -Wdeprecated-copy warning by removing trivial operator=.
Fixed formatting issues in places producing -Wmisleading-indentation warning.
2020-07-23 16:08:17 +03:00
kgv
7465bfa65e 0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
OpenGl_Context now skips loading functions related to mapping buffer,
which are required by OpenGL ES 3.0 specs but not provided by WebGL 2.0.
Message_PrinterSystemLog does not use a broken emscripten_log() anymore, which corrupted UNICODE strings.

WasmOcctView::initWindow() - callbacks now set using EMSCRIPTEN_EVENT_TARGET_WINDOW
instead of 0 used by older Emscripten API.

Mouse callbacks now track canvas element and use
EmscriptenMouseEvent::targetX/targetY instead of ::canvasX/canvasY
as the latter was broken.

Added emscripten_set_main_loop() setup to shut up eglSwapInterval() error message.
Fixed missing \0 at the end of string converted by toUtf8Array().
2020-07-22 19:24:38 +03:00
azv
b939a13923 0031016: Projection of an ellipse is a B-spline in some cases
Improve projection of ellipse and circle on a plane in case of the same parametrization of the original curve and the projected one is not necessary. Now the projection is a canonical curve instead of B-spline.
2020-07-20 16:57:29 +03:00
emv
41ccce129d 0031662: Modeling Algorithms - Incomplete result of section operation
Integrating test case for the issue as the problem is not reproduced.
2020-07-11 11:35:18 +03:00
emv
529444be92 0031655: Modeling Algorithms - Invalid result of General Fuse operation
IntTools_BeanFaceIntersector: Perform exact intersection range search in case there are few intersection points.
2020-07-11 11:26:31 +03:00
mkrylova
210914d562 0030277: Coding Rules - avoid extremely long class names in STEP packages
Has changed the names of classes that are too long
and fixed names in files where these classes are used
2020-07-11 11:26:30 +03:00
akaftasev
3e85dfc5e5 0026555: Modeling Algorithms - Exception-safe status reporting in BRepOffset_MakeOffset
Set safe exit status for:
Standard_NullObject exception,
Standard_NullObject: BRep_Tool:: TopoDS_Vertex hasn't gp_Pnt,
BRep_Tool: no parameter on edge,
BRepOffset_MakeOffset::TrimEdge no projection
2020-07-11 11:26:29 +03:00
kgv
453103d191 0031637: Documentation - minor clean-up of User Guide for Visualization module
Fixed a couple of misprints, usage of changed classes / methods.
Added references to other supported 3d displays.
Added reference to PBR metallic-roughness material properties in addition to Common.

Cosmetics: removed numerous trailing spaces, double spaces.
Added missing {.cpp} language qualifier to code quotations.
Sentences within paragraphs have been split into multiple lines in source file.
2020-07-10 15:22:15 +03:00
akaftasev
3f54cc41a8 0027909: Modeling Algorithms - Exception during offset computation
Added function ChFi3d::IsTangentFaces for more accurate definition of connection type.
Test cases have been changed according to the current behavior.
2020-07-08 16:03:42 +03:00
ifv
e8e8b273bb 0029839: Modeling Algorithms - Unexpected Circle to BSpline surface extrema behavior
Extrema_ExtCS.cxx: treatment of small line segments is added;
Extrema_GenExtCS.cxx: treatment of particular cases curve-quadric and conic-surface are added
Extrema_GlobOptFuncCQuadric, Extrema_GlobOptFuncConicS: new distance functions for particular cases are added

BOPAlgo_PaveFiller_5.cxx : treatment of large common parts edge-face is improved
ElSLib.cxx : method TorusParameters(...) is modified to avoid divide by zero
math_PSOParticlesPool.cxx : initialization of array is added
2020-07-08 16:03:10 +03:00
emv
2a6b7c2306 0031604: Wrong result of Boolean Operation Cut
BOPAlgo_WireSplitter::Path - continue building the next loop with the last edge not included into found loop.
2020-07-08 16:03:10 +03:00
kgv
cdc54fb017 0031649: Visualization, TKOpenGL - broken skybox in VR output
OpenGl_ShaderManager::GetBgCubeMapProgram() and OpenGl_BackgroundArray::createCubeMapArray()
have been corrected to draw cube in straightforward way instead of a screen-quad.

Graphic3d_Camera::SetCustomStereoProjection() now recieves decomposed projection + head-to-eye matrices.
Added method Graphic3d_Camera::StereoProjection() returning projection matrix without translation part.
OpenGl_BackgroundArray::Render() now applies stereoscopic projection matrix in case of VR output,
but keeps using mono projection matrix in case of common 3D displays.
2020-07-08 15:53:32 +03:00
kgv
6d1d35e4b8 0031652: Visualization - crash on highlighting HLR Computed presentation displayed with Shaded display mode
PrsMgr_PresentationManager::displayImmediate() now uses proper ZLayer for a shadow presentation
of computed presentation (fixes dynamic highlighting on mouse move).
Graphic3d_CView::SetComputedMode() - added invalidation of bounding box on turning OFF compute mode.
AIS_ViewController::contextLazyMoveTo() now ignores MoveTo() while rotating
view with temporary disabled compute mode (leading to undefined results and crashes).

Graphic3d_Structure::Graphic3d_Structure() - do not copy Graphic3d_TOS_COMPUTED visual
from linked structure, as Graphic3d_CView::SetComputedMode() does not compute such structures.
2020-07-08 15:53:31 +03:00
kgv
72e9e86732 0031650: Visualization - invalid picking of object with local transformation and per-object clipping plane
SelectMgr_SelectingVolumeManager::SetViewClipping() now updates clipping range
using picking ray in world coordinates, as clipping planes are always defined in world space.
2020-07-06 18:31:14 +03:00
mzernova
3e9c1d1e5a 0029993: Visualization - AIS_TextLabel computes selection primitive only for attachment point
The text label is selected as a rectangle (adds a sensitive object - Select3D_SensitiveFace).
The bounding box has been resized to fit the sensitive rectangle.
Transform persistent has been added to AIS_TextLabel to correctly position the sensitive rectangle.
The findConnectedObject function has also been changed to correctly set transform persistence.
2020-07-06 18:31:13 +03:00
kgv
8f5760bc16 0031588: Visualization, TKOpenGl - display immediate updates in brackets within frame stats 2020-07-03 17:34:54 +03:00
kgv
6bd5d0a26d 0031647: Samples - do not enable floating point exceptions in MFC samples 2020-07-03 11:03:09 +03:00
emv
bea1065693 0031639: Modeling Algorithms - Offset algorithm incorrectly fills one of the holes
Check if unclassified edge may be added as neutral (invalid in one split, valid in other) by checking the SD faces in which the edge was classified.
2020-07-03 11:03:08 +03:00
kgv
8b742dc132 0031635: Documentation - minor clean-up of User Guide for Foundation Classes module
Changes in Technical Overview:
Corrected reference of "Mesh" as dedicated module, which is actually a Toolkit within "Modeling Algorithms" module.
Reduced references to "Configurable optimized memory manager",
which has not been updated for a long time and no more encouraged to be used as replacement of standard memory allocator of C library.
VRML/STL converters have been moved from section Mesh to Data Exchange.
Visualization chapter has been slightly reworded and reordered;
added references to PBR metallic-roughness material model.
Data Exchange chapter - reworded sentence "The exchanges run smoothly regardless of the quality of external data..."
to "This module handles various problems of interoperability between CAD systems...";
added AP242 to the list of STEP capabilities.

Changes in User Guide for Foundation Classes:
Removed references to "physical quantities" in package Quanity, deprecated since #0028799 and not actually used anywhere.
Adjusted description of string classes to avoid duplicated statements.
Collections section has been refactored to replace obsolete TCollection references by NCollection.
Remove obsolete statement "furthermore *catch()* statement does not allow passing exception object as argument".

Fixed broken nested enumeration in a couple of places.
Fixed usage of inappropriate quote symbols in code snippets.
Fixed references to non-existing classes like ZeroDivide instead of Standard_DivideByZero.
Removed suggested usage of Standard_Failure::Raise() instead of "throw Standard_Failure()" following #0026937.
Code snippets now suggest "catch(const Standard_Failure& )" instead of "catch(Standard_Failure )" (#0026937).
Fixed broken code snippets with lost symbols like <<.

Cosmetics: removed numerous trailing spaces, double spaces.
Added missing {.cpp} language qualifier to code quotations.
Sentences within paragraphs have been split into multiple lines in source file.
2020-07-03 11:03:07 +03:00
kgv
dad7fede39 0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying edge in AIS_Shape
Fixed unexpected calling of PrsMgr_Presentation::Erase() from Graphic3d_Structure::SetVisual().
2020-07-03 11:03:07 +03:00
kgv
7e251883e1 0031643: Visualization - Graphic3d_Camera::Copy() raises exception on copying ZNear < 0.0
Graphic3d_Camera::CopyMappingData() now copies ProjectionType at first.
2020-07-03 11:03:06 +03:00
kgv
d6fbb2aba4 0031632: Draw Harness - handle 3d mouse Raw HID input on Windows
WNT_HIDSpaceMouse - added auxiliary class for processing 3d mouse Raw HID input.
AIS_ViewController::Update3dMouse() - added default processor for 3d mouse input event.
ViewerTest now redirects WM_INPUT to AIS_ViewController::Update3dMouse().
Aspect_VKey enumeration has been extended by 3D view buttons.
WNT_Window::RegisterRawInputDevices() has beend added as a small wrapper
over WinAPI RegisterRawInputDevices() for common HID input devices.

AIS_ViewCube now stores animation duration within AIS_AnimationCamera instead of dedicated duplicating class property.
2020-07-03 11:03:05 +03:00
ifv
79e9ba31d2 0031616: Modeling algorithm - Section between two shells returns wire with gaps (720)
Adaptor3d_TopolTool.cxx, IntTools_TopolTool.cxx:

Anisotropy of BSpline surface along U and V direction is taken in account for calculation of numbers of sample points;

bug31616: test case added
2020-07-01 17:50:56 +03:00
mzernova
832a6f4412 0031279: Visualization, TKOpenGl - environment background is misplaced within Ray-Tracing
Fixed problem with misplacing background texture in Ray-Tracing.

An environment background is always drawn using a perspective matrix.
2020-06-26 15:07:40 +03:00
iko
4e8371cb1f 0031370: Documentation - provide information about PBR implementation
PBR documentation (math) has been added as developer guide.
2020-06-25 19:25:52 +03:00
kgv
d22962e4e0 0031621: Draw Harness - handle navigation keys
AIS_ViewController::handleNavigationKeys() - added an interface for processing navigation keys.
ViewerTest_EventManager now maps WASD+Arrows navigation keys.
Axonometric view hotkey A has been replaced by Backspace.
Shaded/Wireframe are now mapped with hotkeys W+Ctrl/S+Ctrl.
Hotkey D (reset view to undefined default state) has been removed.
2020-06-25 19:24:58 +03:00
mzernova
2ff1d580f1 0031412: Visualization - entity behind is returned as topmost at the edges
SelectMgr_RectangularFrustum now handles degenerated triangle as a segment or a point.
Triangle orthogonal to view direction is now handled as a segment.
myViewRayDir field is now defined as normalized vector to avoid confusing math.

For the case when the segment and myViewRayDir are almost parallel,
the segmentSegmentDistance function may set the depth to zero, although this will not
be the correct value, therefore it is better to pass a segment that will not
be parallel to myViewRayDir as an argument to the function.

vpoint command has been extended by arguments -2d and -nosel
for displaying picking mouse position as on-screen point in pixels.
Fixed double-binding-map error in case of displaying point with already used name.

bugs/vis/bug31412: test case added.
2020-06-25 19:09:04 +03:00
kgv
64f128c111 0031622: Samples - update MFC Animation sample with proper frame updates
Animation sample has been updated to:
- use reuse AIS_ViewController for general viewer manipulations;
- update animation using elapsed time;
- do not block camera manipilations;
- get rid of redundant controls.
2020-06-25 19:09:03 +03:00
kgv
08b7a39f75 0030939: Draw Harness, ViewerTest - AIS_ViewCube animation does not work on Linux and macOS
ViewerTest_EventManager::handleViewRedraw() now starts ViewerTest_ContinuousRedrawer
working thread to workaround Tcl event loop invalidation issue.
2020-06-25 19:09:02 +03:00
kgv
ceddb5ca9a 0031620: Samples - update Android JNI sample to use AIS_ViewController
Multi-touch input is now redirected to AIS_ViewController.
GLSurfaceView.RENDERMODE_WHEN_DIRTY is now used by 3D Viewer.
AIS_ViewCube is now displayed instead of trihedron.
2020-06-22 11:53:57 +03:00
kgv
bbe85f2b40 0031619: Samples - update JNI sample to use Android Studio
Project structure and project files have been updated to use Android Studio 4.0, gradle and CMake.
Redundant OcctJni_Window has been replaced by Aspect_NeutralWindow.
SD Card permissions are not dynamically requested for compatibility with Android API level 26+.
2020-06-22 09:19:06 +03:00
mpv
ef779ae0da 0031075: Application Framework - reading STEP file into TDocStd_Document leads to memory leaks
In the TDocStd_Owner keep simple pointer to TDocStd_Document instead of Handle. This causes automatic destruction of the document without explicit call of Close.
In Standard_Type added a static variable theType that initializes theRegistry map earlier. Otherwise exit from Draw interpreter crashes in many test-cases because not-closed transactions are aborted on document handle release from Draw theVariables map.

Corrected method for test OCC159bug due to the fact that Owner does not add a ref count now
Close the document in the end of bugs xde bug22776 otherwise double remove of visualization objects (on library exit and on visualization attributes remove from the document) causes crash on exit from draw
Added a new test bugs caf bug31075
2020-06-19 19:08:46 +03:00
ifv
003c363cf4 0031615: Coding - New warnings after integration fix for 0031552 2020-06-18 20:00:39 +03:00
ifv
dccf867561 0031602: [Regression vs 7.0.0] Modeling Algorithms - Invalid result of boolean operation
IntPatch/IntPatch_ImpImpIntersection_4.gxx : adding tolerance in comparison surface range and surface period
bug31602: test case added
2020-06-18 19:59:49 +03:00
ifv
5d904c3454 0031611: Modeling Algorithms - BRepOffsetAPI_NormalProjection - can't build wire in 720 but it was possible in 691
BRepLib_MakeWire.cxx:
in method BRepLib_BndBoxVertexSelector::Accept() accepting tolerance criterion is changed

BRepLib_MakeWire.hxx:
correctionof class field name

bug31611: test case added
2020-06-18 19:57:46 +03:00
mzernova
9a31c01064 0030922: Visualization - OpenGl_Text wrong local transformation if text has not own attach point
bugs/vis/bug30922: test case added
2020-06-16 14:29:41 +03:00
kgv
32b723d5c6 0031606: Configuration, CMake - build fails with Android NDK + CLang compiler + MinGW Makefiles
CLang is now checked before MINGW within occt_defs_flags.cmake.
Added "-Wl,-s" linker flag when using CLang for stripping symbols consistently to GCC builds.
2020-06-13 17:17:53 +03:00
jgv
36cc58f85d 0031485: Data Exchange - Export STEP in nonmanifold mode looses all faces except one
Small correction in STEPControl_ActorWrite::TransferCompound - take into account the case when a subshape has type TopAbs_FACE.
2020-06-10 20:41:40 +03:00
emv
09543c2d99 0031587: Modeling Data - add BRepTools::RemoveInternals() removing internal sub-shapes from the shape 2020-06-09 20:01:06 +03:00
kgv
a7400019ce 0031599: Visualization - when using AIS_Manipulator, the scene rotates at the same time
AIS_ViewController::HandleViewEvents() - reverted order of handleMoveTo() and handleCameraActions() events.
2020-06-09 19:53:08 +03:00
akaftasev
1fc1a207b0 0031504: Data Exchange - Wrong output of progress indicator when writing to stl
Added new condition for first indicated element at Draw_ProgressIndicator::Show(),
because it’s more logical that at start progress starts at 0
Changed usage of Next() to Next(step) for increment progress to IND_THRESHOLD in RWStl::writeASCII() and RWStl::writeBinary()
Changed condition for continuation of writing and add interrupt to this function
Added possibility to use Progress indicator in writestl
Changed paremeter in constructor Message_ProgressSentry aPS() IND_THRESHOLD to 1
Changed test
2020-06-09 19:53:08 +03:00
kgv
59ec2ccec9 0031596: Visualization, OpenGl_Context - take GL_OES_texture_float extension into account for arbTexFloat flag 2020-06-09 19:53:07 +03:00
kgv
d4cefcc0da 0031477: Visualization, TKOpenGl - fetch/wrap getBufferSubData() function from WebGL 2.0
Added OpenGl_Context::GetBufferSubData() implementing getBufferSubData() based on capabilities of various APIs.
Added OpenGl_VertexBuffer::GetSubData() similar to OpenGl_VertexBuffer::SubData().
2020-05-29 19:40:57 +03:00
kgv
872f98d9ef 0031583: Visualization, OpenGl_Context - load OpenGL ES 3.0 functions
OpenGl_Context now retrieves complete functions sets of OpenGL ES 3.0, 3.1 and 3.2.
2020-05-28 10:24:35 +03:00
vsv
2ba1172b73 0031573: Visualization - Do not show seam edge for shading presentation with boundary edges in VTK 2020-05-28 10:22:54 +03:00
kgv
e4e3254a35 0031580: Visualization, TKOpenGl - cubemap initialization error on OpenGL ES 2.0
OpenGl_Texture::InitCubeMap() now avoids using sized internal format in case of GLES2.
OpenGl_Sampler::applySamplerParams() now checks OpenGL version before setting GL_TEXTURE_WRAP_R.
2020-05-28 10:21:03 +03:00
mkrylova
04c5a696e4 0029917: Foundation Classes - OSD_FileNode AccessMoment and CreationMoment return the same date on Windows
fAccess in CreationMoment() function for Windows has been modified from TRUE to FALSE
2020-05-28 10:18:56 +03:00
ika
ae58f70718 0031568: Data Exchange - invalid model produced after STEP import
Add protection against reference to reference in STEP import.
2020-05-22 19:32:21 +03:00
kgv
faff37677c 0031478: Visualization, TKOpenGl - allow uploading Cubemap in compressed DDS format when supported by GPU
Graphic3d_TextureRoot::GetCompressedImage() - added new interface for fetching compressed texture image.
Default implementation detects DDS image files using Image_DDSParser parser.

Graphic3d_TextureRoot::GetImage() has been extended with new parameter
- the list of image formats supported by OpenGL driver.
Graphic3d_TextureRoot::convertToCompatible() implicitly converts
BGRA image to RGBA on OpenGL ES, which normally does not support BGR formats.

OpenGl_Caps::isTopDownTextureUV - new property defines how application defines
UV texture coordinates in primitive arrays.
OpenGl_Context::SetTextureMatrix() compares this flag with OpenGl_Texture::IsTopDown()
and automatically flips V coordinate in case of mismatch.

OpenGl_Texture now holds exact number of mipmap levels
instead of Boolean flag indicating that they are defined.
This allows loading DDS files with incomplete mipmap level set
by setting GL_TEXTURE_MAX_LEVEL to appropriate value instead of default 1000
(causing black textures in case if mipmap levels are not defined till 1x1).

Fixed order of texture coordinates transformation within GLSL program to match FFP matrix:
Rotate -> Translate -> Scale (previously Rotation was applied afterwards).
2020-05-22 11:08:34 +03:00
Igor Khozhanov
691711cd3e 0031550: Data Exchange, STEP Import - surface transparency is ignored (SURFACE_STYLE_TRANSPARENT)
Implemented reading and writing transparency to/from step files
2020-05-22 11:07:37 +03:00
ifv
8189cc72d0 0028229: BRep_Builder::Transfert must not raise exception if the input edge is Locked
BRep/BRep_Builder.cxx : raising exception is removed
2020-05-22 11:07:36 +03:00
jgv
c6f14a5213 0031558: BRepOffsetAPI_MakeFilling algorithm makes turned inside out face
1. Modification in method BRepFill_Filling::Build - correction of building the wire.
2. Create new subgroup "filling" in the group "bugs".
2020-05-22 11:07:35 +03:00
vsv
4db6748cc5 0031544: Visualization - show boundaries of faces in shading mode of VTK presentation 2020-05-15 18:39:31 +03:00
kgv
158f2931a7 0031004: Coding - eliminate warnings issued by gcc 9.1.0
Fixed -Wrestrict warning within OSD::SetSignal().

Fixed -Wdeprecated-copy warning by adding missing counterpart
in pair copy constructor / assignment operator or by removing trivial constructor.

AdvApp2Var_Node, AdvApp2Var_Patch are now declared as Handle.
AdvApp2Var_Iso is now passed by Handle.

Disabled operator= for TDF_Transaction and TDF_IDFilter.

Standard.cxx - fixed GCC version mischeck causing building failure with experimental GCC versions.

TopOpeBRepDS_EXPORT.cxx - fixed -Wmaybe-uninitialized warnings.
2020-05-15 18:08:07 +03:00
emv
4b59685af1 0031542: Modeling Algorithms - Offset algorithm produces incomplete result in mode "Complete" join type "Intersection"
Mark unchecked edges originated from vertices as invalid if they are contained in invalid faces.
2020-05-15 18:05:59 +03:00
emv
9e9b826aa1 0031307: Modeling Algorithms - Offset algorithm produces incorrect result in mode "Complete" join type "Intersection"
Do not classify edges originated from combination of edges and vertices as the classification will likely be unstable.
Mark faces containing valid inverted edges as invalid but do not remove them from valid splits.

Extend the debug command DBRep_SetComp to allow different containers for creating the TopoDS_Compound.
2020-05-15 18:05:58 +03:00
ifv
64e8b010af 0031552: Bad performance of intersection of cylindrical surfaces
Adjusting parameters of algorithm depending on axes and parameters of cylinders is added in order to reduce computation time

Test case added: tests/lowalgos/intss/bug31552

tests/perf/modalg/bug26310_1: test case corrected according to current state of algorithm
2020-05-15 18:00:48 +03:00
jfa
1b6e8b9f09 0031565: Visualization - SIGFPE, Arithmetic exception if SelectMgr_TriangularFrustumSet::Build() is called with single point 2020-05-15 18:00:47 +03:00
dpasukhi
b04decfaae 0029240: Data Exchange - Crash during reading STEP file
- Issue is done in previous version OCCT
- Add test to verify import
2020-05-14 20:28:22 +03:00
ifv
79aa9b5cf6 0027087: [Regression to OCCT 6.7.1] BRepExtrema_DistShapeShape gives wrong result
Extrema_ExtCs.cxx: number of subdivision is incresed for curve;

Modifications to fix regressions of some tests
IntTools_BeanFaceIntersector.cxx: restriction of curve, which is used in Extrema_ExtCS
ProjLib_CompProjectedCurve.cxx: tolerance is reduced for Extrema_ExtCS
BRepOffset_Tool.cxx: checking common vertex if it is Null

tests/bugs/modalg_7/bug27087 : test case added.

tests/bugs/modalg_5/bug25232_8 : test is modified according to new behavior of algorithms
2020-05-14 20:24:45 +03:00
dpasukhi
72e6020d50 0026925: Data Exchange - Exception can be raised if assembly is empty
- Issue is done in previous version OCCT
- Add test to verify the creating of the label structure using plain OCAF/XDE API
- Situation when the assembly label has no shape attached is correct
2020-05-12 19:51:12 +03:00
kgv
a87b1b3738 0031501: Foundation Classes, Message_Printer - remove theToPutEndl argument -- use shortcuts
Message::DefaultMessenger()->Send() have been replaced by shortcuts Message::Send().
2020-05-09 17:22:15 +03:00
kgv
fa8a462827 0031501: Foundation Classes, Message_Printer - remove theToPutEndl argument
The argument putEndl has been removed from Message_Messenger::Send() and Message_Printer::Send() methods.

Message_Printer interface has been changed, so that sub-classes have to implement new method
Message_Printer::send() accepting TCollection_AsciiString.
Old three Message_Printer::Send() methods remain available without putEndl argument
and redirecting to new send() method by default.

Removed dummy Message_PrinterOStream::GetUseUtf8() property.
Message_PrinterOStream, Message_PrinterSystemLog and Draw_Printer
now implement single method Message_Printer::send() instead of triplet.
2020-05-09 17:22:14 +03:00
abv
0ebe5b0a7f 0031501: Foundation Classes, Message_Printer - remove theToPutEndl argument -- preparation
Operators << for Handle(Message_Messenger) are removed; their use is replaced by use of Message_Messenger::StreamBuffer
Message_Messenger has been replaced by Standard_OStream within Interface_InterfaceModel,IFSelect,IGES,STEP dump interfaces.
2020-05-09 17:22:13 +03:00
abv
39c8dc708f 0031546: Application Framework - Memory leak (100 bytes) on Load / Close OCAF document
Class Standard_BaseDriver is inherited from Standard_Transient, its descendants are updated accordingly.
Handle is used to manipulate objects of this class and its descendants (instead of references or raw pointers) to ensure automatic destruction.

Added test bugs caf bug31546

Related:
- Standard_OVERRIDE is added in declarations of virtual methods in descendants of Storage_BaseDriver
- Methods operator << and operator >> are removed in descendants of Storage_BaseDriver (they repeat the same methods inherited from the base class)
- Typedef PCDM_BaseDriverPointer is marked as deprecated
- Unused class DDI_Ostream is removed
- Private field Standard_Transient::count is renamed to myRefCount_ to avoid compiler warnings if the same name is used within the scope of a descendant class
- Output of meaningful error messages is restored in DRAW commands fsdread and fsdwrite
2020-05-07 21:24:46 +03:00
ifv
dcc4e908c2 0030185: Unify same domain algorithm corrupts the initial shape
ShapeUpgrade_UnifySameDomain.cxx: checking of surface domains and projection to get pcurves are added
tests/bugs/heal/bug30185: test case added
2020-05-07 21:23:16 +03:00
kgv
b40cdc2b55 0029384: Visualization, TKOpenGl - basic integration with OpenVR
V3d_View::AutoZFit() is now called only before redraw
within methods V3d_View::Redraw() and V3d_View::Update().

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

Graphic3d_Camera now allows setting custom stereoscopic Projection matrices.

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

genproj.tcl has been extended to handle optional CSF_OpenVR dependency.
2020-05-06 20:45:53 +03:00
kgv
2615c2d705 0031548: Visualization, SelectBasics_PickResult - include surface normal into picking details
SelectMgr_SortCriterion::Normal, SelectBasics_PickResult::SurfaceNormal() - added new property.
SelectMgr_RectangularFrustum::Overlaps() for triangle sets new normal property.
gp_GTrsf::GetMat4() - added conversion into NCollection_Mat4 similar to gp_Trsf::GetMat4().
2020-05-06 19:09:53 +03:00
kgv
23fe70ec52 0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger()
Added short-cuts methods in Message_Messenger for sending message with specified gravity,
and stream buffer class for using stream-like interface for that.
Similar short-cuts to DefaultMessenger() are added in Message package.

ViewerTest has been updated to send messages to Message::DefaultMessenger()
instead of direct output to std::cout/std::cerr.

Off-topic: spelling error (duplicate "and") is corrected in two places

Added test bugs fclasses bug31189
2020-04-30 19:42:44 +03:00
ika
331bcfc0d0 0031517: Data Exchange - wrong result of ShapeTool::UpdateAssemblies()
Get rid of problem with updating of parents shared one assembly.
2020-04-29 20:45:52 +03:00
kgv
7ff18fb9cc 0031521: Samples - update MFC ImportExport sample to use AIS_ViewController
The following MFC samples have been updated to use AIS_ViewController:
Geometry, HLR, ImportExport, Modeling, OCAF, Triangulation, Viewer2D.
2020-04-29 20:44:15 +03:00
nds
ab9e277f15 0031193: Visualization - OpenGl_Flipping wrong text position if local transformation set
Before the patch, if the values of the isReversedX/Y/Z variables were set to false, then the WorldView matrix did not change and local transformation was not applied, which caused errors.
In order to correctly set the local transformation in case the text does not have its own attach point, the local transformation is set in OpenGl_Text, and the ModelWorld matrix is changed in OpenGl_Flipper, instead of the WorldView matrix. In this case, local transformation will always be applied.

bugs/vis/bug31193: test case added
2020-04-29 16:36:23 +03:00
kgv
0439d1cf44 0031518: Samples - update QtWidget samples to use AIS_ViewController
Qt samples IESample and Tutorial have been updated to use AIS_ViewController for view manipulations.
2020-04-26 11:33:26 +03:00
kgv
e1c9a10311 0031519: Visualization, AIS_ViewController - add AIS_MouseGesture_ZoomWindow gesture
AIS_ViewController now supports AIS_MouseGesture_ZoomWindow gesture,
which displays zooming window via Rubber-Band rectangle.
2020-04-24 20:03:50 +03:00
kgv
9ad4ff93a0 0031511: Point Cloud Rendering, Volume Rendering - reuse Graphic3d_CullingTool
Graphic3d_CullingTool::IsCulled() has been extended with theIsInside argument for full inclusion test.
Graphic3d_Layer::UpdateCulling() now avoids frustum culling tests for BVH children for parent nodes completely included into frustum.
Graphic3d_CullingTool::SetViewVolume() has been extended by optional model-world matrix.
2020-04-24 20:03:50 +03:00
kgv
89fcfe1551 0031512: Foundation Classes - drop unused class NCollection_Comparator 2020-04-23 10:45:50 +03:00
mzernova
a24a782174 0031440: Visualization - Impossible to make common behaviour for multi-selection in viewer
A special mode for the selecting by polygon is added to select only completely overlapping objects.

In order to track the sensitives that were included completely by defined polygon, the boundary points of the polygonal frustrum are stored in the variable myBoundaryPoints.

If an sensitive intersects with at least one of the frustrums from myFrustums, then checking whether this object intersects with borders using the isIntersectBoundary method; if not, then the sensitive were included completely by defined polygon.

Because the polygon can be concave, then to check the sensitive were included completely by defined polygon, it is not enough to check of all its points, it is necessary that the edges of the sensitive do not intersect polygonal frustrum. To do this, for polygonal selection, a call to the Overlaps method for a point was replaced by a call to a segment where necessary.

bugs/vis/bug31440: test case added
2020-04-23 10:44:30 +03:00
jgv
5a2f31c887 0031492: BRepBuilderAPI_MakeFace crashes on a wire
Method BRepClass_Intersector::LocalGeometry is modified: check whether is tangent defined and check of infinite curvature is added.
2020-04-20 20:36:27 +03:00
akaftasev
67a843c0d4 0031318: Documentation, TopoDS.hxx - typo in the reference manual
change "onject" to "object" in description of TopoDS class
2020-04-17 18:45:50 +03:00
kgv
b9f43ad13b 0031505: Point Cloud Rendering - fix on-screen statistics about number of visible points
OpenGl_Element now provide methods ::UpdateMemStats() and ::UpdateDrawStats()
for unified request of statistics used by OpenGl_FrameStats instead of direct handling of OpenGl_PrimitiveArray.
Graphic3d_FrameStatsCounter counters list has been extended by Graphic3d_FrameStatsCounter_NbLinesNotCulled.
2020-04-17 18:36:43 +03:00
kgv
b8a00b410a 0031502: Coding - New warnings after integration fix for 0031456
Deprecated AIS class aliases have been moved from PrsDim to AIS package.
2020-04-17 17:43:00 +03:00
dpasukhi
e00b8ed948 0031435: Data Exchange - Problem importing STEP files
- Fix recursion in EntityCluster's methods :
  -  Value
  -  SetValue
  -  Append
- Add destructor in the EntityCluster
- Add check null grade in the STEPCAFControl_GDTProperty::GetDimClassOfTolerance
2020-04-16 20:43:51 +03:00
emv
590b3f0416 0031499: Boolean Operations - Custom fuzzy value corrupts the result of CUT
IntPatch_ImpImpIntersection::CyCyNoGeometric - Use the provided 3D tolerance to compare the points.
2020-04-16 10:01:55 +03:00
emv
62fbfa9856 0031207: Regression in Boolean Operations: fuse gives wrong result
ForceInterfEE, ForceInterfEF - Use normalized vectors for angle computation. Increase the criteria angle.
2020-04-16 10:00:54 +03:00
ifv
1f9cb9f999 0031496: Modeling Algorithms - BRepAlgo::ConcatenateWireC0() crashes
BRepAlgo.cxx: fixing of wrong treatment of reversed edges
bug31496: test case added
2020-04-16 09:59:25 +03:00
jgv
13dd311c9b 0031470: Modeling Algorithms - Regression: BOP common produces empty result (box and holed sphere)
Approx_ComputeCLine.gxx : new class field is added to manage hang checking.
ProjLib/ProjLib_ComputeApprox.cxx : unset hang checking for analytical surfaces and curves
2020-04-16 09:58:15 +03:00
gka
1e1b83c07b 0031472: Exception raised during translation of the STEP entity Constructive Geometry Representation containing one representation
Modification number of the representation items are considered for STEP entity "Constructive Geometry Representation"
2020-04-10 17:43:52 +03:00
kgv
8f08e231fa 0031490: Foundation Classes, Poly_Connect - speed up temporary allocations
Poly_Connect::Load() now uses NCollection_IncAllocator instead of new/delete
for allocation temporary sequence elements.

StdPrs_ShadedShape, fillFaceBoundaries() now uses NCollection_IncAllocator for temporary points.
2020-04-10 17:41:40 +03:00
ifv
f0ada3e8d4 0031469: BRepFeat_MakePrism failed
BRepFeat_Form.cxx: methods IsDeleted, Modified, Generated are corrected
BRepTest_FeatureCommands.cxx: history treatment is added in methods DEFIN and PERF
bugs/modalg_7/bug31469: test case added
2020-04-10 17:41:39 +03:00
jgv
9171cefaad 0031464: BRepOffsetAPI_MakeFilling algorithm increases tolerances of vertices in input edges
Modify history in BRepFill_Filling: now vertices are also stored in the map.
2020-04-10 17:41:39 +03:00
kgv
247ecf1b16 0031483: Configuration - __asm keyword not supported on ARM within Windows target
_M_IX86 is now checked before using _asm fot TBB workaround.
2020-04-10 17:41:38 +03:00
emv
3f7e5e99d5 0031462: Modeling Algorithms - BOP result depends on the arguments order
Eliminate numerical instability by ensuring that the tolerance of intersection entities is slightly grater than the actual distance to the shapes creating the entity.
2020-04-01 20:44:23 +03:00
kgv
6d43db4f74 0031471: Confuguration, genproj - unable to build OCC Products
Restored parsing of src/VAS/Products.tcl.
2020-04-01 13:42:12 +03:00
emv
128654b60b 0031461: Mesh - Add possibility to force the meshing of the shape
BRepMesh: Add new mesh parameter *AllowQualityDecrease* which affects the criteria used for checking of the consistency of the existing mesh to new meshing parameters.
So if set to true it will force the meshing of the shape if current deflection strongly vary from the new one, no matter in which side.

BRepTools::Clean: Keep triangulation on non-geometric shapes (faces with no surface or edges with no curves).
2020-04-01 13:36:29 +03:00
osa
21095f2dc2 0031468: Visualization - add public interface to return embedding a single fallback font 2020-04-01 13:34:08 +03:00
kgv
420f5c8682 0031467: Foundation Classes, OSD_MemInfo - disable reading /proc/%d/status with Emscripten
OSD_MemInfo::Update() no more uses procfs with Emscripten.
OSD_MemInfo::MemVirtual counter is now set to WebAssembly module heap length.
2020-03-27 18:03:20 +03:00
kgv
85b147584e 0031465: Data Exchange, RWObj_Reader - skip duplicating smooth groups
RWObj_Reader::pushSmoothGroup() now ignores smooth groups statements pointing to the same group.
2020-03-27 18:01:01 +03:00
kgv
7f24b768c3 0031458: Visualization - refine classes across Prs3d and StdPrs packages
Prs3d::GetDeflection() has been moved to StdPrs_ToolTriangulatedShape::GetDeflection().
Prs3d_ShapeTool has been moved to StdPrs_ShapeTool.
Code collecting free edges on Poly_Triangulation
has been moved out from StdPrs_WFShape to Prs3d::AddFreeEdges().
StdPrs_BndBox has been moved to Prs3d_BndBox.
Geom_Transformation has been replaced by TopLoc_Datum3D within visualization classes.

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

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

Package Graphic3d has been moved from TKV3d to TKService.
2020-03-27 17:58:02 +03:00
kgv
787ff2408c 0031456: Visualization - move out Dimensions and Relations from package AIS to PrsDims
The following classes and their subclasses within AIS package
have been moved to new package PrsDim and renamed:
- AIS_Relation  -> PrsDim_Relation;
- AIS_Dimension -> PrsDim_Dimension,
2020-03-27 17:58:00 +03:00
mzernova
64943a5187 0031459: Visualization, AIS_TextLabel - add missing getters
Add getters for Text, FontName and FontAspect
Remove duplicate properties: Font and FontAspect
2020-03-26 19:59:16 +03:00
jgv
486ad71287 0031441: UnifySameDomain corrupts the shape
Local function TransformPCurves is modified to process correctly same-domain elementary surfaces with different local coordinate systems.
2020-03-26 19:57:52 +03:00
oan
c9125b6232 0031378: Modeling algorithms - brep incremental mesh is frozen during STEP file loading
Refactoring of BRepMesh_Delaun::isBoundToFrontier() to unwind the recursion loop.
2020-03-26 19:56:21 +03:00
ifv
87c7d55469 0031415: Modeling Algorithms - Solid classifier works incorrectly on a cylinder
BRepClass3d_SClassifier.cxx : revert integration for CR29712

Test case added
2020-03-26 19:54:58 +03:00
abv
14b741b0ef 0031454: Visualization - perceptually uniform color scale
Support of CIE Lab and Lch color spaces is introduced in Quantity_Color:
- Enumeration Quantity_TypeOfColor is extended by new values representing CIE Lab and Lch color spaces (with D65 2 deg illuminant).
- Conversion of RGB color to and from these color spaces is implemented in Quantity_Color class (within existing API).
- Color difference calculation using CIE Delta E 200 formula is implemented in method DeltaE2000().

New methods MakeUniformColors() and SetUniformColors() are added in class AIS_ColorScale, generating and setting color scale based on colors of the same lightness in CIE Lch color model.

DRAW commands vcolorconvert and vcolordiff are added to perform conversions and compute difference, respectively.
A new option -uniform is added in DRAW command vcolorscale, to set uniform color scale.

Added test grid v3d colors (color conversions and difference), test bugs vis bug31454 (uniform color scale)
2020-03-26 19:53:27 +03:00
gka
89180f9822 0029803: STEP Import: Units (inch) not applied to entity possessing GEOMETRIC_REPRESENTATION_CONTEXT
Translation of the entities AXIS2_PLACEMENT_3D including in the entity CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP was added.
Entity  AXIS2_PLACEMENT_3D is translated to the planar face with axis equal to AXIS2_PLACEMENT_3D.
New parameter "read.step.constructivegeom.relationship" is added to enable this translation (by default it is OFF).

Added test bugs step bug29803
2020-03-25 19:52:12 +03:00
ifv
517ba7aa70 0031460: Modeling Algorithms - Regression: Revolution not done.
BRepPrimAPI_MakeRevol.cxx: check of intersection of edge with rotation axis is improved.
Test case added
2020-03-24 19:57:37 +03:00
antonavt
68064d7bc3 0028880: Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter
- Added Right() method to BRepFeat_SplitShape;
- Added an option in command buc60854, which allows to select Left() or Right() method;
- Modified method BUC60854 in QABugs_14.cxx;
- Added new option to the help of command buc60854;
- Modified test case buc60854. Now its state is "OK";
- Added check Right() in buc60854 test case.
2020-03-24 19:55:05 +03:00
abv
62afcbbb4a 0031455: Modeling Algorithms - useless pointer casts in BRepAlgoAPI classes
Useless casts are removed.

Off-topic: corrected description of constructor of TCollection_HAsciiString class from TCollection_HExtendedString for the case when input string contains non-Ascii character.
2020-03-23 09:51:39 +03:00
gka
7ef1f9b7c1 0031301: Data Exchange - Export to STEP corrupts the shape
For small edges fully covered by tolerances of vertices BSpline periodic curves are converted to not periodic BSpline curves by cutting segment before writing.
In the class TopoDSToStep_MakeStepEdge permute of edge vertices for closed curves was added for the case when the range obtained from the vertex projection contradicts the edge range in order to avoid computation of the invalid edge range after reading.

Second test script for bug 0031301
2020-03-20 10:24:10 +03:00
kgv
877fd611ac 0031442: Samples - remove unsupported sample mfc/occtdemo 2020-03-20 10:22:25 +03:00
kgv
dc9f1dbf69 0031445: Advanced wrappers, C# wrapper - provide device info in About dialog of WPF sample
D3DHost_View::DiagnosticInformation() now appends D3D device information to the map.
2020-03-19 19:08:10 +03:00
ifv
895a80d38a 0031404: Modeling Algorithms - BOP Fuse produces a self-interfering or a good shape depending on the order of arguments
Approx_ComputeCLine.gxx : number of possible cuttings is increased

tests/bugs/modalg_7/bug31404 : test case added
2020-03-19 19:00:58 +03:00
gka
6a9f983a16 0030052: Data Exchange - STEP import missing surfaces
Changes made for #31233 are reverted.

Correction in the ShapeFix_ComposeShell:
 Modification of the method SplitByLine in order to find all points of the intersection for case when initial curve shifts in the positive or negative direction
 to avoid splitting edge when split point lies in the limits of the tolerance of the vertex.
 to correct shift of the pcurves for case when initial shift is more than 1 in the method ShapeFix_ComposeShell::SplitByLine

In the method ShapeFix_Face::FixMissingSeam added removing small edges having length less than working precision and removing wires having area less than working precision

Modified test cases; added test for related issue: bugs step bug31301
2020-03-18 20:03:05 +03:00
mgn
22fa1da36e 0031439: Visualization - Access to the active axis of AIS Manipulator
A new method that returns the active axis of the manipulator has been added.
2020-03-18 19:39:38 +03:00
Roman Lygin
fb99177766 0031430: Offset surfaces on C1 surfaces (with multiplicity equal to degree) may still throw exception
In constructor of Geom_RectangularTrimmedSurface, skip check if an offset surface has insufficient continuity. The reason is that this surface has already passed the check once created. So, here we must not apply more strict check than that first time.
2020-03-18 19:38:12 +03:00
kgv
67441d0ca3 0031424: Visualization - stop using Prs3d_Drawer::HLRAngle() parameter
Prs3d_Drawer, AIS_Shape, AIS_InteractiveContext - removed properties HLRDeviationCoefficient() and HLRAngle().
Prs3d_Drawer::HLRAngle() is kept as alias to Prs3d_Drawer::DeviationAngle() with deprecated flag.
Prs3d_Drawer::DeviationAngle() default value is changed from 12 to 20 degrees
to match Prs3d_Drawer::HLRAngle() which has been previously used in majority of cases.
Removed unused property HLRBRep_PolyAlgo::Angle().
2020-03-16 16:56:30 +03:00
kgv
b5163d2f8d 0031431: Visualization, PrsMgr_PresentableObject - simplify HLR computing interface
Multiple PrsMgr_PresentableObject::Compute() methods have been replaced by single one
PrsMgr_PresentableObject::computeHLR().
Dummy implementations of previously declared methods have been removed
from AIS classes not implementng HLR presentation.
Class Prs3d_Projector has been removed and Graphic3d_Camera is now passed directly,
so that redundant dependency from HLRAlgo_Projector in Prs3d interfaces has been eliminated.
StdPrs_HLRShape and StdPrs_HLRPolyShape now implement common interface StdPrs_HLRShapeI.
2020-03-16 16:56:28 +03:00
kgv
29263c947e 0031425: Visualization - free Edge has selection sensitivity inconsistent to presentation
BRepTools::Triangulation() has been extended with a new parameter for checking Poly_Polygon3D presense within free Edges.
StdPrs_WFShape::Add() now performs auto-triangulation in the same way as StdPrs_ShadedShape::Add().
StdSelect_BRepSelectionTool::GetEdgeSensitive() now creates Select3D_SensitiveSegment instead of Select3D_SensitiveCurve for tessellated segment.
Select3D_SensitiveSegment default sensitivity factor has been changed to 3 pixels to match Select3D_SensitiveCurve.

Test case bug23625_1, added workaround for out-of-range crash in HLRBRep_PolyAlgo on re-triangulated shape.
2020-03-12 19:29:23 +03:00
kgv
08669adf1b 0031419: Visualization, TKOpenGl - per-object Graphic3d_TOSM_FACET is ignored within obsolete FFP
OpenGl_ShaderManager::PushState() now sets GL_SHADE_MODEL within FFP.
OpenGl_Context::SetShadeModel(), added property holding cached GL_SHADE_MODEL state.
2020-03-11 18:37:12 +03:00
ifv
68ad329c9d 0031303: Different calculation of offset direction in Adaptor2d_OffsetCurve and Geom2d_OffsetCurve
Calculations in Adaptor2d_OffsetCurve are unified with similar calculations in Geom2d_OffsetCurve using   methods extracted from Geom2dEvaluator_OffsetCurve to Geom2dEvaluator.cxx

BRepFill_OffsetWire.cxx, Geom2dGcc_Circ2d2TanRadGeo.cxx, Geom2dGcc_Circ2dTanOnRadGeo.cxx, MAT2d_Circuit.cxx are modified to satisfy changing offset direction.
2020-03-11 16:37:50 +03:00
azv
d6e18114eb 0031407: [Regression to 7.3.0] Extrema does not process parallel circles correctly
Use correct ranges of circles when processing the concentric case. Repeat the range comparison 3 times shifting each time for a half-period to process the extrema between boundary points of arcs.
2020-03-06 16:05:19 +03:00
kgv
e5c11edd7b 0031405: Advanced wrappers, C# wrapper - dark colors in WPF sample
D3DHost_FrameBuffer::IsSRGBReady() - added new propery defining if
D3D application handles FBO as sRGB-ready texture or not.
2020-03-06 16:03:33 +03:00
ifv
fffc249f21 0027531: Modeling Algorithms - Make the algorithm Approx_SameParameter more clear and robust
Approx/Approx_SameParameter.cxx,hxx:
Class Approx_SameParameter refactoring. Logic is changed in many places to unify usage, simplify maintenance.
Method Curve2d() is changed to return Geom2d_Curve instead of Geom2d_BSplineCurve. Corresponding message is added to the upgrade guide.
.lxx file is merged into .hxx.
Tangent computation is extracted into special method.
Comparing number of sample points after CheckSameParameter(...) is added to define cases with projection fails.
Undesirable behavior when curves are not same parameterized is fixed.

Geom2dAdaptor/Geom2dAdaptor.cxx: treatment of offset curve is added

Adaptor3d/Adaptor3d_TopolTool.cxx: minor improvement of performance for BSpline surfaces with huge number of knots

Tests were modified according to new behavior of sameparameter algorithm
2020-03-06 15:54:46 +03:00
emv
739c7e5968 0030386: Modeling Algorithms - Unable to perform Cut operation
Get rid of requirement for the arguments of Boolean operations of type CUT and COMMON to be one-dimensional shape. For FUSE operation this requirement is kept.
2020-03-04 19:17:16 +03:00
ifv
f732ea1ab5 0031381: Foundation Classes -wrong evaluations for rational BSpline curves using Adaptor curves
BSplCLib_Cache.cxx - it is forbidden zeroing derivatives for rational splines when derivative order more than degree

bug31381 - test case added
2020-03-03 17:49:09 +03:00
vro
ae87bb87d0 0031400: Application Framework, TPrsStd_AISPresentation - Ocaf selection mechanism doesn't allow multiple selection
TPrsStd_AISPresentation::ActivateSelectionMode() uses Multiple enumeration for definition of the selection mode instead of GlobalOrLocal.
2020-02-28 21:02:40 +03:00
kgv
3d60d73f76 0031394: Visualization, TKOpenGl - define OpenGl_Element::EstimatedDataSize() interface
OpenGl_FrameStats::updateStructures() now relies on OpenGl_Element inteface
instead of handling OpenGl_PrimitiveArray specifically
for collecting Graphic3d_FrameStatsCounter_EstimatedBytesGeom counter.
OpenGl_PrimitiveArray and OpenGl_Text implement new interface.
2020-02-28 21:02:40 +03:00
nds
0950253ca6 0031366: Documentation - Doxygen warnings in Standard_Dump.hxx 2020-02-22 13:01:25 +03:00
nds
f6d8ca74d5 0030749: Inspectors - compilation under tcl scripts
- 'Search Qt4' is renamed into 'Search Qt'. Configuration uses Qt5 from now. For Qt4 use CMake configuration.
- 'Build Inspector' check box is added. It causes 'tools' toolkits compilation. Activates automatically 'Search Qt' control.
- Many Tcl procedures are extended with additional parameter to giving a directory of processed toolkits. The default directory is 'src', inspector directory is 'tools'. This way is similar Inspector compilation implemented in Cmake build procedure.
- Dependency libraries in DEBUG are stored in __TKDEP_DEBUG__. Qt requires it as names of debug and release libraries are different.
2020-02-20 18:33:01 +03:00
vro
00cdefc7a2 0030101: Application Framework - A mistake reading a RealArray attribute with too small value
A case of reading of a very small value was skipped, for example: 2.1219957909652723e-314.
Fixed in XmlMDataStd_RealArrayDriver.cxx and XmlMDataStd_RealListDriver.cxx

// A test file bug29452.xml is extended to check this skipped case.
2020-02-19 19:34:10 +03:00
kgv
d850414af1 0031315: Visualization - marker texture is lost after multi-textured object
OpenGl_Context::BindTextures() now iterates over pair of texture sets
considering inconsistent texture unit ranges.
2020-02-19 19:31:58 +03:00
kgv
b380b06c5d 0031206: Foundation Classes, Message_PrinterSystemLog - log messages to Browser console within Emscripten
Message_PrinterOStream::SetConsoleTextColor() skips color tags in case of Emscripten.
Message_PrinterSystemLog now implements log via emscripten_log().
2020-02-17 14:35:46 +03:00
kgv
c64efd9e30 0031375: Visualization, TKOpenGl - suppress warning on WebGL 1.0
Check for WebGL version in advance.
2020-02-17 14:35:44 +03:00
kgv
cd43c08f2b 0031372: Visualization, TKOpenGl - failed to create texture on OpenGL ES 2.0 due to unknown GL_TEXTURE_BASE_LEVEL
OpenGl_Sampler::applySamplerParams() has been corrected to check for OpenGL ES 3.0
when applying GL_TEXTURE_BASE_LEVEL/GL_TEXTURE_MAX_LEVEL parameters.
2020-02-16 15:05:41 +03:00
nds
28b13b31aa 0031014: Inspectors - variables for Qt in CMake
It restores path to Qt binaries in 3RDPARTY_DLL_DIRS for correct start TInspectorEXE under VStudio.
2020-02-13 20:48:05 +03:00
sshutina
10ac040338 0031336: Modeling data - extend BRepPrimAPI_MakeBox with planar shape creation
-Create a new package BRepPreviewAPI, inherited from BRepPrimAPI to create both, valid and degenerative shapes
-Create a new class BRepPreviewAPI_MakeBox for working with a box
    Preview can be vertex, edge, rectangle or box
-BRepPrim_GWedge: in the case of non-valid data, the exception does not happen in the constructor, but at the moment of access to the shape
-BRepPrimAPI_MakeBox: myWedge is now not private, but protected, because used in  BRepPreviewAPI_MakeBox which inherits from BRepPrimAPI_MakeBox
-Add tests for checking of a creation a preview in tests/geometry/preview (vertex, edge, rectangle, box)
-Update a command "box": add new parameters
2020-02-12 18:00:37 +03:00
nds
7e1c1e4869 0030268: Inspectors - improvements in VInspector plugin
- Convert package creation. It is used to prepare some auxiliary presentations/methods to prepare variables for inspector based on occt classes.
- ViewControl package improvement:
  Classes for property view, table, table model are implemented to visualize view of properties.
  This view is filled by selection in tree if the selected object has implemented DumpJson functionality.
- TreeModel package improvements:
  Method InitColumn is implemented in TreeModel_TreeModel to fill default columns in base model. The default columns are:
    Name, Visibility, Rows. Additional columns should be added in successors.
  Container of root items is moved into the base class
- View package imrovements:
  Store preferences: display mode, fit all checked state and type of external context
  View_DisplayPreview is added to process preview for selected in tree view objects
  hide actions Clear, Multi, Single by default (as selection in tree view or Visibility state of item define which presentations should be displayed or erased)
- ShapeView plugin improvements:
  Property View content based on DumpJson (columns in tree view for properties are removed),
  Properties for TopoDS_Shape are displayed
  Explode shape action in tree view to see content of shape by selected shape type. Type of displayed shapes is only preview, it is not used in export action.
  Export shape into BREP. The previous implementation about BREP files in some directory and default view is removed.
- VInspector plugin imrovements:
  Property View content based on DumpJson (columns in tree view for properties are removed),
  Properties for AIS_InteractiveContext and AIS_InteractiveObject are displayed
  obsolete classes to provide properties are removed.
- DFBrowser plugin improvements:
  Property View content based on DumpJson is not used yet. But there is the USE_DUMPJSON macro. It's switch off by default.
  If switch ON, it creates a Property View filled with DumpJson. It's a way of DFBrowser moving on this property view.
  Init uses static variable CDF_Session::CurrentSession()->CurrentApplication to fill plugin if application in plugin is not set but OCAF application exists

- OCC_VERSION_HEX variable used for previous OCCT versions support (before 6.9.0 or 7.2.0) is removed
2020-02-12 18:00:36 +03:00
kgv
a2803f37e7 0031341: Visualization - Graphic3d_Layer::UpdateCulling() ignores Presentation range
Graphic3d_Layer::UpdateCulling() now takes into account BVH_Tree::EndPrimitive().
'vstatprofiler structs' now properly prints number of structures in case of no culling.
2020-02-11 18:42:13 +03:00
abv
18348b382e 0031364: Foundation Classes - unused enumerations in GeomAbs package
Files GeomAbs_CurveForm.hxx, GeomAbs_SurfaceForm.hxx, GeomAbs_UVSense.hxx are removed
2020-02-11 18:42:12 +03:00
abv
64e68ea690 0031363: Documentation - broken Doxygen documentation of header files in Standard package
Documentation is corrected
2020-02-11 18:42:12 +03:00
anv
bee13ef1cf 0031360: Modeling Algorithms - Removing redundant class
math_GaussPoints was removed.
2020-02-07 18:23:45 +03:00
kgv
e73ef9d219 0031356: Visualization - out of range within StdPrs_WFShape::AddEdgesOnTriangulation()
Removed unused code causing the issue.
2020-02-07 14:22:01 +03:00
anv
8b3fbdef34 0031233: Reading SAT files produces invalid shapes
Added removal of overlapping "tails" while splitting wires with a seam edge in ShapeFix_ComposeShell::SplitWire.
2020-02-06 18:01:21 +03:00
kgv
e2550e48f1 0031333: Data Exchange - RWGltf_TriangulationReader::readBuffer() fails to read interleaved buffer at the end of file
Standard_ReadBuffer has been extended with a flag for reading an interleaved data.
RWGltf_TriangulationReader::readBuffer() uses new flag for reading vertex attributes.
2020-02-06 17:45:05 +03:00
oan
62beabff7c 0025551: BRepMesh can produce internal nodes outside the face interior based on distorted BSpline surface
updated test script to see the difference on current version of OCCT
2020-02-06 17:41:07 +03:00
oan
5e06dfcb32 0028247: Effect of minSize parameter of BRepMesh_IncrementalMesh seems to be too strong Updated description of MinSize parameter of IMeshTools_Parameters 2020-02-06 17:41:06 +03:00
oan
35befde2ad 0026382: BRepMesh produces internal nodes outside the face interior
updated test script: clean up shape before meshing to see the difference
2020-02-06 17:41:06 +03:00
nds
bc73b00672 0031313: Foundation Classes - Dump improvement for classes
- Provide DumpJson for geometrical, ocaf and visualization classes;
- Change depth parameter of DumpJson (constant is not obligate here)
- Introduce a new macro for transient objects to be called as the first row in DumpJson: OCCT_DUMP_TRANSIENT_CLASS_BEGIN. We need not put the class name in the macro, using get_type_name of Standard_Transient for it.
- change implementation of OCCT_DUMP_CLASS_BEGIN and OCCT_DUMP_TRANSIENT_CLASS_BEGIN. It is not an sentry more and it does not create a new hierarchy level. It appends a new row into the output stream: "className": <className>
- OCCT_DUMP_* does not require semicolon
- class header is included first in source files of TDataStd, TDocStd, TCAFDoc
2020-01-31 17:13:40 +03:00
kgv
00ea7f2676 0031321: C# wrapper - wrap AIS_ViewController
Added missing virtual destructor for AIS_ViewController.
2020-01-31 16:54:16 +03:00
nds
fe758dbe2c 0031322: Visualization, Select3D_SensitiveEntity - method NbSubElements() should be const
Set constant state for the method NbSubElement to be able to call it from other constant methods (e.g. DumpJson of Select3D_SensitiveEntity).
2020-01-30 18:58:32 +03:00
kgv
8811d6f2aa 0031332: Data Exchange - RWGltf_CafReader ignores bufferView.byteStride within glTF 2.0
RWGltf_GltfJsonParser::gltfParseBufferView() now reads byteStride parameter within bufferView.
2020-01-30 18:55:55 +03:00
nds
1939cfd9cb 0030904: Visualization - OSD_MemInfo provide Update with parameter of computation kind
Added method OSD_MemInfo::SetActive() for disabling specific counter.
2020-01-28 18:02:35 +03:00
iko
7860770232 0031275: Visualization, TKOpenGl - handle normal-map texture with Path-Tracing
Base normal map support has been implemented in path tracing (just geometry normal replacement).
Smooth normal adaptation has been implemeneted in order to avoid black areas artefacts during path tracing.
Tangent normal space calcuation has been moved to separate unified function.
Tangent space orthogonalization algorithm has been changed in order to handle all orientations and combinations of UV coordinates.
2020-01-24 16:35:41 +03:00
kgv
6216ed573e 0031312: Data Exchange - RWGltf_CafReader fails reading texture embedded into base64 bufferView
RWGltf_GltfJsonParser::gltfParseTexture() now handles images embedded into bufferView of non-glb file.
2020-01-23 18:13:19 +03:00
oan
973f7d55bd 0031258: Mesh - OCCT 7.4.0 VIS get wrong render data
Check intervals for infinite value causing exception in GeomLib::NormEstim
2020-01-22 10:16:28 +03:00
emv
0c74168c42 0031306: Modeling Algorithms - Incomplete result of Cut operation
The problem is fixed by #0029323. Integrating test case only.
2020-01-22 10:15:21 +03:00
kgv
3eba1c72ef 0031309: Data Exchange - RWObj_Reader fails to read mh03.obj with multi-line syntax
Standard_ReadLineBuffer::SetMultilineMode() now accepts a flag to put gap space while joining lines, enabled by default.
2020-01-21 13:04:46 +03:00
kgv
e83d440f92 0031304: Configuration - TKACIS building failure due to duplicated symbol GeomFillFusInt()
Added missing "static" to internal methods of GeomFill package.
2020-01-18 12:30:59 +03:00
iko
6558400123 0031302: Visualization, TKOpenGl - wrong tangent space calculation for normal maps
The normal after tangent space calculation has been reverted in order to be in right orientation.
The tangent space calculation has been modified in order to handle back faces with inverted normal.
2020-01-16 18:48:56 +03:00
ifv
389f5b59dd 0031260: Geom2dGcc_Circ2d2TanRad fails in this case (720)
Adaptor2d/Adaptor2d_OffsetCurve.cxx:
Function nbPoints(...) is modified

Test case added
2020-01-16 18:20:01 +03:00
ifv
08353e37cf 0031294: Modeling Algorithms - Regression relatively 7.3.0. Crash in method BRepPrimAPI_MakePrism::Generated(...)
BRepSweep_NumLinearRegularSweep.cxx: raising exeption is removed

Test case is added

QABugs_20.cxx - test command is added
2020-01-14 18:26:50 +03:00
iko
c8bead4752 0031293: Visualization, TKOpenGl - broken capping when PBR shading is ON
Division by 'w' component has been added in texture coordinates calculations in PBR functions.
2020-01-13 16:21:56 +03:00
osa
9df71488b3 0031295: Foundation Classes, BVH_Tools - incorrect detection of ray-box intersection 2020-01-13 16:18:55 +03:00
msv
ef59b5e064 0031292: Data Exchange - SIGSEGV on reading STEP file with references to invalid entities
Changes:

- in StepData_StepReaderData::ReadEntity, make sure that entity handle is not null before calling IsKind() of it.

- in StepData_StepReaderData::SetEntityNumbers, do not invert the sign of entity number of referenced parameter if the second pass is not required. Otherwise, the number -1 (obviously invalid) becomes 1 (invalid, but not obviously) without further correction of it.

- in StepData_UndefinedEntity::ReadRecord, consider the case when the entity number is positive but refers to non-existing entity. In this case literal value will be used instead of null entity for the problematic parameter.
2020-01-13 16:16:48 +03:00
oan
0c061f3d9d 0025287: BRepMesh_IncrementalMesh produces (way) out of tolerance mesh Added test case 2020-01-13 16:13:24 +03:00
iko
88b312d3a4 0031099: Visualization, TKOpenGl - support Point light source with artistic full cut-off distance
"Range" parameter of point light sources (positional and spot) concidering in PBR has been added.
Angular attenuation parameter of spot light in PBR has been reimplemented based on existing "concentration" parameter.
2020-01-13 16:07:19 +03:00
kgv
0858125fd4 0031284: Visualization - XCAFDoc_VisMaterialPBR lacks Index of Refraction
Added missing parameter.
2019-12-27 16:35:31 +03:00
mzernova
89d855ba58 0031225: Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing
Ray-Tracing now handles IBL and background cubemaps in similar way as PBR.
Ambient light source is handled by Ray-Tracing in similar way as PBR,
e.g. as coefficient for environment map (IBL) or as constant light source.

Test script generating PBR spheres has been moved to Samples
and now shared by PBR and Path-Tracing tests.
2019-12-27 16:26:48 +03:00
kgv
d415125a68 0031274: Data Exchange - RWObj_Reader ignores usemtl with empty name
Fixed out of range access within pushMaterial().
2019-12-26 17:19:31 +03:00
razmyslovich
0da2ecac41 0031251: Add a new meshing parameter to enforce face linear deflection
Parameter has been renamed to ForceFaceDeflection. Added test case.

New parameter -force_face_def has been added to incmesh command.
2019-12-25 15:25:43 +03:00
ifv
bdd09cfaf4 0031242: Scaling with different coefficients along axes produces invalid shape
GeomConvert_1.cxx:
Creation periodic BSpline surfaces from trimmed periodic surface if trim is boundaries of periodic domain is allowed

BRepTools_NurbsConvertModification.cxx:
Checking domain of 2dCurves if surfaces are periodic is added

Test case tests/bugs/mesh/bug30008_2 is modified according to current behavior

Test case tests/bugs/modalg_7/bug31242 is added
2019-12-23 11:49:04 +03:00
kgv
9504a30d15 0031253: Visualization, TKOpenGl - phong shading GLSL compilation fail on Adreno 308
Removed initialization of global Normal variable outside of main() block.
occLight_IsHeadlight() flag is now packed into occLight_Position().w
2019-12-19 16:55:21 +03:00
jgv
9a1701fbcb 0030597: Result of BRepOffsetAPI_MakePipeShell doesn't match the given profiles
Modify the local function EdgeToBSpline of BRepFill_NSections to build a BSpline curve of general type for each curve of profile.
2019-12-19 16:53:36 +03:00
mzernova
c68c346d2b 0030600: Visualization, TKOpenGl - include GLES3/gl3.h instead of GLES2/gl2.h
Changed GLES2/gl2.h to GLES3/gl3.h.

OpenGl_Window_1.mm has been updated, now it is trying to create kEAGLRenderingAPIOpenGLES3 before trying to create kEAGLRenderingAPIOpenGLES2.
2019-12-19 16:50:16 +03:00
ifv
e2447a80ea 0031203: Test harness command "bsection" on the planar faces return only one vertex instead edge representing intersection line
BRepClass/BRepClass_FaceExplorer.cxx:
Protection against intersection of test ray with almost parallel edges is added.

SWDRAW/SWDRAW_ShapeFix.cxx: add tolerance as parameter in command checkfclass2d

tests/bugs/modalg_7/bug31203:
test case is added
2019-12-19 16:45:54 +03:00
oan
936ce1f273 0031199: BRepMesh fails on thin faces
Use real tolerance of a face to define threshold for tolerance of discrete model instead of empirical values based on discrete model itself
2019-12-19 16:30:06 +03:00
jgv
6ef7a1f9e5 0031187: Modeling Algorithms - Regression relatively 7.3.0. Unify same domain algorithm produces invalid shape.
Modify the local function ReconstructMissedSeam to build new seam edges correctly.
2019-12-18 19:42:50 +03:00
msv
23c2ae55c7 0031120: Memory leak in BRepOffsetAPI_MakeOffset
Add destructor of MAT2d_Mat2d - full removal of edges and bisectors.
2019-12-17 15:51:06 +03:00
abk
8bfae263c1 0031168: JT Import - cannot see properties attached to objects
Draw command GetNDStrings was improved to sort the properties by the keys and
skip conversions of the strings to type TCollection_AsciiString.

Certain Draw commands were corrected to use the Draw interpreter instead of "std::cout".

A Tcl procedure was created to compare two multi-line strings.
2019-12-14 13:52:16 +03:00
ma haidong
1c2ddf5612 0031231: Samples - the command "donl" in ModelingDemo.tcl should be "donly"
Fixed misprint in Tcl sample script.
2019-12-14 13:51:03 +03:00
kgv
5a8d30b87b 0030945: JT Import, JtProperty_LateLoaded - expose type of Deferred object
RWMesh_NodeAttributes has been extended with NamedData property for passing Metadata.

RWMesh_CafReader::addShapeIntoDoc() has been corrected to avoid
adding calling XCAFDoc_ShapeTool::AddSubShape() for sub-shape labels.
Attributes for Products and Instances are now set independently to shape labels.
Sharing of Compounds (previously always duplicated) as sub-Components has been fixed.

TDataStd_NamedData has been extended with interface for deferred data loading.
Setters have been corrected to avoid duplicating lookups within map.
2019-12-06 19:38:01 +03:00
kgv
b7b22996bb 0031227: Tests - log number of compared images into report 2019-12-06 19:32:37 +03:00
anv
552a74d829 0030889: ACIS Import - Incorrect result reading SAT and SAB files
Adapting CR30932 fix for a GeomLib approximator.
2019-12-06 19:32:36 +03:00
mzernova
c37bd936c3 0031213: Coding Rules, RWStl_Reader - misnamed variable THE_BUFFER
Renamed THE_BUFFER variable.
2019-12-06 19:32:35 +03:00
anv
4e8c1d8666 0031202: Shape Healing - FixMissingSeam creates degenerated edge
Adding tolerance to prevent degenerated cuts in cases where all vertex tolerance is covered by distance of the edge curve from vertex point.
2019-12-06 19:32:34 +03:00
iko
72f6dc612c 0031096: Visualization, TKOpenGl - support metallic-roughness texture mapping
OpenGl_ShaderManager - metallic-roughness, emissive, occlusion
and normal texture maps are now supported by PBR.
Emissive, occlusion and normal texture maps are now supported by Phong shading model.
Path-Tracing now handles metallic-roughness and emissive texture maps.

Graphic3d_TextureUnit enumeration has been extended by
new values corresponding to supported texture maps.

OpenGl_TextureSet and OpenGl_ShaderProgram have been extended with
bitmask Graphic3d_TextureSetBits identifying texture slots read from GLSL Program
and slots defined within Texture Set to avoid undefined behavior by binding mock textures.

OpenGl_TextureSet now duplicates texture unit information to handle
textures shared across multiple slots (like Occlusion [R] + Metallic-Roughness [GB]).

OpenGl_Context::BindTextures() has been extended with active GLSL program paramter
to set mock textures to texture units used by program but undefined by texture set.
OpenGl_Workspace::ApplyAspects() has been extended with parameter to avoid bining texture set.
2019-11-29 20:36:23 +03:00
mzernova
f051908edc 0030982: Visualization, OpenGl_View::MinMaxValues() - do not add background quad into depth range
Deleted adding background quad into depth range. Background is drawn in 2D coordinates. Fixed problem with using gradient background in tiles.
2019-11-29 20:19:42 +03:00
emv
420b38fde9 0031148: Modeling Algorithms - Offset adjacent co-planar faces with different offset values
Extend the Offset operation (Join Type "Intersection", mode "Complete") to allow different offset values on adjacent co-planar faces.
The gap between adjacent faces is closed by creating artificial face perpendicular to the face.

Adding test cases.
2019-11-29 10:06:22 +03:00
emv
34e7ac6817 0031201: Modeling Algorithms - Result of a section operation is incomplete
Fixing misprint - use the boundaries of the cylinder for Plane/Cylinder intersection.
Test cases for the issue.
2019-11-29 09:59:01 +03:00
osa
2b5a58a33c 0031186: Foundation Classes - add additional useful methods to BVH_Box.
Add Transform() and Transformed() methods by Mat4 for BVH_Box (only for 3D dimension).
Add PointBoxProjection() method to project point to box and RayBoxIntersection() method to compute hit time of ray-box intersection to BVH_Tools.
Add BVH_Ray class to define ray object.
2019-11-26 18:36:55 +03:00
kgv
e513a6c538 0031188: Draw Harness - enable colorized messages output to console by default
Message_PrinterOStream now uses colorized output by default.
DRAWEXE has been corrected to disabled colorized output
when it is called with -f argument to avoid spoiling testgrid HTML logs.
2019-11-26 18:35:38 +03:00
kgv
8c2d331426 0031007: Coding - eliminate warnings issued while compiling with -pedantic flag
Removed duplicating semicolons ;;.
Removed redundant semicolon at namespace closure.
2019-11-26 18:29:13 +03:00
mzernova
caee80f39f 0030697: Draw Harness - Draw_Printer should not be set to Message::DefaultMessenger() by default
Fixed bugs that occurred when using the default std::cout from Message::DefaultMessenger() instead of Draw_Printer

A dedicated option was added to Draw_ProgressIndicator, for outputting data to the tcl when performing tests

Added -tclOutput parameter to XProgress command
2019-11-23 16:09:07 +03:00
kgv
01b2f506d6 0030953: Data Exchange - implement export of mesh data into glTF 2.0 format
Added new class RWGltf_CafWriter for exporting XCAF document into glTF file
as well as Draw Harness command WriteGltf.

Added auxiliary method OSD_Path::FileNameAndExtension() splitting file name into Name and Extension.
2019-11-23 16:03:19 +03:00
vsv
df8c7e3e18 0031153: Visualization - Non clear highlighting of selected trihedron elements
AIS_Trihedron - removed extra fields holding highlight styles; standard styles are now used instead;
fixed unexpected modification of global aspects;
fixed unhighligting of selected plane within Shaded trihedron.

AIS_InteractiveContext now sets highlight color to highlight aspects, not only base color to drawer itself.
2019-11-21 17:43:07 +03:00
kgv
3f1675c941 0031174: Visualization - support user-provided stipple line patterns 2019-11-21 17:40:58 +03:00
kgv
6a56fe9240 0031178: Configuration, genproj - fix searching for zlib on Linux platform
zlib library is called libz on Linux.
2019-11-21 17:24:12 +03:00
mzernova
51ee6a7dbb 0030964: Data Exchange - use Standard_ReadLineBuffer within OBJ reader
Standard_ReadLineBuffer now supports a processing of the special multi-line case with \ at the end of the line.

Standard_RedLineBuffer was used to load Stl files
2019-11-20 17:08:31 +03:00
kgv
14a356b178 0031015: Visualization, TKOpenGl - OpenGl_WorldViewState does not cache inverted matrix
Implementation has been fixed to proprely set myInverseNeedUpdate flag.
2019-11-19 18:58:54 +03:00
kgv
4eff0c0480 0031175: Visualization - support dumping RED channel as grayscale image
Graphic3d_BufferType has been extended by Graphic3d_BT_Red.
2019-11-19 10:37:54 +03:00
abv
8f00325d73 0031171: Draw - support Unicode input / output in console on Windows
System console is configured at DRAW start to use UTF-8 encoding, for cout and cin to deal correctly with Unicode symbols.
Use of std::wcout is avoided as it leads to corrupted output.

Command testgrid is improved to enforce UTF-8 encoding in child DRAW processes to preserve Unicode symbols in captured output.

Test bugs fclasses bug22125 is refactored:
- avoid dependency on external data file
- avoid producing snapshot
- check that Unicode name of the file created by OCCT procedure matches the name interpreted by Tcl functions
2019-11-17 17:52:38 +03:00
kgv
9a90a4524e 0031159: Visualization - Font_FontMgr skips sub-faces within .ttc font collections
Font_SystemFont now defines Face Id in addition to file path.
Font_FontMgr::CheckFont() has been extended to return the list of Faces from font collections.
2019-11-15 16:51:15 +03:00
abv
31a5a359bb 0031144: Shape Healing - ShapeAnalysis::OuterWire() infinite loop on solid obtained from IFC
Implementation of ShapeAnalysis::OuterWire() is revised to avoid infinite cycle if face contains internal vertex.
2019-11-15 16:37:25 +03:00
jgv
bf97419a18 0030958: BRepOffsetAPI_ThruSections operation raises an exception while building history
Correct methods Build and Generated:
use BRepTools_WireExplorer instead of TopExp_Explorer or TopoDS_Iterator, for compatibility with previous computations.
2019-11-14 22:40:01 +03:00
gka
4c26106f76 0031140: Draw command "cirtang" raises exception on the parallel curves
Exception in the algorithm Geom2dGcc_Circ2dTanOnRadGeo raised because the number of solutions exceeded the size of reserved array for solutions. A check has been added to forbid adding solutions outside of allocated place.

The similar protection has been done in other algorithms of this package.
2019-11-13 18:38:28 +03:00
kgv
15e4e6a23e 0031118: Visualization - Font_FontMgr skips fonts with unknown styles like Narrow or Black
Extended Style name is now appended to Family name for unique identification of the font.
vfont -find now accepts mask to search the font and returns family name.
2019-11-13 18:34:33 +03:00
kgv
6b467e52bb 0031137: Modeling Data, BinTools_ShapeSet - avoid allocation of temporary arrays
BinTools_ShapeSet now defines maps with proper types instead of Standard_Transient.
BinTools_ShapeSet now avoids allocation of temporary arrays while reading
triangulation and polygonal data.

Classes Poly_Triangle, Poly_PolygonOnTriangulation, Poly_Polygon3D and Poly_Polygon2D
have been cleared from .lxx files and extended by new methods for preallocating and filling array,
as alternative to passing arrays by copy.

wavefront command - export "f" instead of obsolete "fo" keys into file.
BinTools - added missing tools for reading/writing short reals.
2019-11-09 19:12:47 +03:00
kgv
08b438b076 0031138: Visualization - Image_AlienPixMap fails to load PNG image with palette
Added fallback code converting unsupported pixel format into RGB24 using FreeImage itself.
2019-11-07 20:19:38 +03:00
kgv
a14f2b4722 0031139: Data Exchange - fix misprint in RWObj_CafReader
RWObj_CafReader::BindNamedShape(), added missing bind to material map.
XCAFDoc_VisMaterial::ConvertToCommonMaterial()/::ConvertToPbrMaterial(), added copying of base color texture.
XCAFPrs_DocumentExplorer now properly fills XCAFDoc_VisMaterial property of XCAFPrs_Style.
2019-11-07 20:18:25 +03:00
kgv
a1a9b24952 0031135: Visualization, TKOpenGl - texture sRGB -> linear conversion is applied twice by Path Tracer
Removed from PathtraceBase.fs redundant gamma correction applied to texture.
2019-11-06 19:33:36 +03:00
abv
f979709590 0031038: Draw - adaptations for running tests with CLang address sanitizer
New optional environment variable CSF_CPULIMIT_FACTOR is introduced, allowing scaling the argument given to DRAW command cpulimit by specified factor.

Command testgrid is extended by two new options:
- -skipped: to re-run tests skipped in specified log
- -skip: to skip specified number of tests in the beginning of test sequence

Temporary Tcl scripts generated by test system are now removed from the test log directories immediately after the test execution, to save disk space.

Advises on use of CLang sanitizers are added in guide "Debugging hints and tips".
2019-11-06 19:22:33 +03:00
oan
e9d05765c2 0031131: [REGRESSION] Mesh - location of Wire affects Poly_Polygon3D
Use TopoDS_Edge without location in case of free edges to produce Poly_Polygon3D without offset.
2019-11-06 19:19:47 +03:00
oan
7756fc599d 0031125: BRepMesh_IncrementalMesh crash in constructor for empty compound shape
Added check for cases of empty shapes producing null models.
NoError status is returned as far as empty compounds are generally coorect shapes.
2019-11-06 19:17:24 +03:00
abv
b31fbc832d 0031124: Configuration - linker errors when building with CLang on Windows
Standard_EXPORT is added in declaration of virtual methods where it was missing, to allow creation of sub-classes in other DLLs.
In some classes in OpenGl package Standard_EXPORT is added for all methods to make these classes usable in other DLLs.
2019-11-04 14:08:18 +03:00
abv
1bd04b5a02 0031060: Configuration - Support building with CLang compiler under VS 2019
Build tools are updated to support building with Visual Studion 2019 toolset ClangCL (LLVM clang-cl):
- In CMake builds, use of unsupported option "-std=c++0x" is avoided
- Tool genconf recognizes availability of ClangCL toolset and proposes it in the list
- Tool genproj recognizes new compiler specification VCVER=vclang and generates VS 2019 projects for it

Note that vclang configuration puts binaries to folder "vc14" as it is compatible with vc14 CRT.

Code is updated to build with Clang for Windows without errors and warnings:
- In BVH classes, pure virtual destructors are replaced by empty ones, to avoid bogus compiler warning
- In .lex files, pragmas are added to disable warnings in parser code
- In OSD, signature of function _osd_wnt_set_error() is corrected to avoid warning on incorrect use of va_args (undefined behavior)
- In OSD_Host, OSD_Parallel_TBB, warnings on usage of deprecated function are disabled
- In Quantity_ColorRGBA and ViewerTest_CmdParser, incorrect use of predefined macro __FUNCTION__ assuming it was a string literal is avoided
- In Standard_Macro.hxx, code is reordered to handle Clang for Windows appropriately
- In AdvApp2Var_SysBase.hxx, inclusion of obsolete (MSVC-specific) header file is replaced by Standard_TypeDef.hxx
- In Standard_ErrorHandler.hxx, empty statements added to avoid warning on unused class fields
- In IVtkDraw and ViewerTest, interface is corrected to use actual type avoiding unnecessary type casts

Off-topic: corrections of some errors (uninitialized class fields) reported by VS Code Analysis in TKernel
2019-11-03 21:47:59 +03:00
vro
6466cc9eb1 0031117: Visualization, AIS_ViewCube - additional properties for visualization of trihedron of a View Cube
AIS_ViewCube has been extended by additional properties (previously hard-coded):
- radius of axes of the trihedron
- radius of cones of the axes of the trihedron
- radius of a sphere (central point) of the trihedron

ViewerTest command vviewcube has been extended to support new parameters:
-axesradius, -axesconeradius, -axessphereradius.
2019-11-01 18:29:12 +03:00
osa
f7fc0c03be 0029367: Visualization - simplify interface of V3d_View and V3d_Viewer
The interface of V3d_View and V3d_Viewer has been simplified.
For the fields myDefinedViews, myActiveViews, myDefinedLights, myActiveLights were added appropriate methods returning the internal raw data.
Make the next methods deprecated:
IfMoreLights(), InitActiveLights(), MoreActiveLights(), NextActiveLights(), ActiveLight() and
InitActiveViews(), MoreActiveViews(), NextActiveViews(), ActiveView(), InitDefinedViews(), MoreDefinedViews(), NextDefinedViews(), DefinedView(),
InitActiveLights(), MoreActiveLights(), NextActiveLights(), ActiveLight(), InitDefinedLights(), MoreDefinedLights(), NextDefinedLights(), DefinedLight().

Remove deprecated methods added in scope of tasks 0029290 and 0028987 (Target Version 7.3.0):
SelectMgr_SelectableObject: Init(), More(), Next(), CurrentSelection().
SelectMgr_Selection: Init(), More(), Next(), Sensitive().
V3d_AmbientLight: one constructor.
V3d_DirectionalLight: two constructors.
V3d_PositionalLight: one constructor.
V3d_SpotLight: two constructors.
2019-11-01 18:27:06 +03:00
iko
67312b7991 0030700: Visualization, TKOpenGl - support PBR Metallic-Roughness shading model
Metallic-Roughness shading model Graphic3d_TOSM_PBR has been implemented.
New materials descriptors Graphic3d_PBRMaterial have been added to Graphic3d_MaterialAspect.
PBR shading model requires OpenGL 3.0+ or OpenGL ES 3.0+ hardware.
Environment cubemap is expected to be provided for realistic look of metallic materials.

occLight_IsHeadlight() now returns bool instead of int.
Avoid using lowp for enumerations to workaround occLight_IsHeadlight()
ignorance on Adreno 308 caused by some GLSL optimizator bugs.

OpenGl_Texture::EstimatedDataSize() - fixed estimation for Cubemap textures.
OpenGl_Sampler::applySamplerParams() - fixed uninitialized GL_TEXTURE_WRAP_R in case of GL_TEXTURE_CUBE_MAP target.
2019-11-01 18:25:28 +03:00
tiv
f4a7308f61 0030609: Coding - eliminate warnings issued by gcc 8.1.0
Warnings issued by gcc 8.1.0 are eliminated.

New Standard_WarningDisableFunctionCast.hxx header file is introduced to disable GCC warning "-Wcast-function-type" in those files *.cxx where it is issued. This warning is issued when the conversion from the pointer to one function type to the pointer to another function type takes places, it was added in gcc 8.1.0.

The function MyVISEDG in SWDRAW_ShapeAnalysis.cxx is removed as it does not seem to do anything useful and relevant DRAW command K_VISEDG is never used in tests.
2019-10-30 23:26:08 +03:00
abv
53d770b3a2 0031092: Foundation Classes - incorrect last output value for Infinite progress indicator
DRAW implementation of progress indicator is corrected to print "finished" instead of 1e100 for the end of infinite range.
Added test bugs fclasses bug31092
2019-10-30 23:23:55 +03:00
abv
7ed6e985e2 0013175: XCAF document with one vertex is exported to an incorrect STEP file
Added non-regression test case
2019-10-30 23:23:54 +03:00
oan
da6b95a075 0031043: GCPnts_TangentialDeflection generates points which number is inconsistent with MinimumOfPoints Parameter
Updated crvtpoints command API to reproduce reported problem
Generate number of points according to the specified minimum value
2019-10-29 11:04:53 +03:00
kgv
565baee64b 0031070: Configuration - fix building issues when using Emscripten toolchain
Handled __EMSCRIPTEN__ macros to:
- Workaround atomics (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is undefined, but GCC atomics are provided).
- Suppress non-standard header <sys/signal.h> warning.
- Return OSD_LinuxREDHAT.
- Avoid inclusion of XLib headers.
- Skip fontconfig library.
- Enable EGL+GLES path (translated by Emscripten into WebGL).
- Skip eglCreatePbufferSurface() not implemented by Emscripten EGL.

Fixed Graphic3d_Vec4.hxx usage within Quantity_ColorRGBA.hxx.

OpenGl_ShaderManager::defaultGlslVersion() now prefers GLSL 300 es when WebGL 2.0 is available,
as there no any OpenGL ES greater than 3.0 emulation so far.

Shaders_Declarations.glsl - added workaround for GLSL compilation on WebGL 1.0
by defining Light properties accessors as macros instead of functions
('[]' : Index expression must be constant).

OpenGl_FrameBuffer::Init() - added workaround for initialization of GL_DEPTH24_STENCIL8
depth-stencil attachment on WebGL 1.0 + GL_WEBGL_depth_texture extension.

OpenGl_Context::Vec4FromQuantityColor() now considers myIsSRgbActive flag
to handle use case, when Immediate Layer is drawn directly into window buffer,
which is not sRGB-ready.

Added new sample - OCCT WebGL viewer.
2019-10-27 00:43:07 +03:00
kgv
36e28f96f6 0031079: Visualization - embed minimal fallback font
Font_FTFont::FindAndCreate() now loads embedded fallback font within Font_StrictLevel_Any level.
Font_FontMgr::FindFont() - fixed misprint in message, and customized message for range fallback error.
Font_FontMgr - added one more fallback Korean font for Linux.

vfont command has been extended with options to clear Font Manager content.
2019-10-27 00:43:06 +03:00
kgv
215dd33149 0031102: Visualization, AIS_ViewController - AIS_DragAction_Stop is never emitted on mouse unclick
AIS_ViewController::UpdateMousePosition() now sets myMouseStopDragOnUnclick flag
to emit AIS_DragAction_Stop on mouse unclick.
2019-10-27 00:43:05 +03:00
emv
5646c90e87 0030878: Modeling Algorithms - BRepLib_MakeFace produces face with abnormal surface
When collecting the points to build plane use the points on the curve instead of poles (in case of BSpline and Bezier curves).

Side effect changes:
Changes in Geom2dHatch_Elements are to increase the chance of correct 2d classification (by the means of Geom2dHatch_Classifier) by taking more than just one point on the edge to construct the classification ray and by checking if this ray is not tangent to the edge itself.
2019-10-24 17:47:28 +03:00
kgv
97e0059b05 0031088: Visualization - GL_INVALID_ENUM while dumping view within OpenGL 1.1
OpenGl_Sampler::resetGlobalTextureParams() - added missing version check before disabling GL_POINT_SPRITE.
2019-10-24 17:45:00 +03:00
kgv
8445efca81 0031082: Visualization - crash on display if there are no lights in the view
OpenGl_View - fixed uninitialized property myLights.
2019-10-24 17:43:38 +03:00
kgv
a6a66c3a21 0031037: Foundation Classes - add class Message_PrinterSystemLog for printing messages into system log
Added new class Message_PrinterSystemLog that can be used for logging messages into system log for debugging application in restricted environment.
2019-10-22 15:17:00 +03:00
kgv
cc99be369e 0025341: Visualization - disallow displaying object as part of connected one and as a free one at the same time
AIS_ConnectedInteractive::connect() now throws exception on connecting already displayed object.
AIS_TextLabel::AcceptDisplayMode() - added missing Display Mode filter.

Commands vconnect, vconnectto and vaddconnected have been corrected to
replace dispalyed AIS_Shape with AIS_ConnectedInteractive in context.
2019-10-22 15:15:56 +03:00
kgv
1a5007a920 0031067: Visualization - Aspect_Window::DoResize() should be a non-const method
Removed 'const' from Aspect_Window::DoResize() virtual method.
2019-10-22 15:15:55 +03:00
kgv
3818aacaa5 0031056: Samples - update glfw sample to use AIS_ViewController 2019-10-22 15:15:54 +03:00
kgv
e1d039d56d 0031036: Foundation Classes, Message_PrinterOStream - add option printing colored text into console
New property Message_PrinterOStream::ToColorize() can be set to colorize text output into console.
The new option is disabled by default.
2019-10-22 15:15:53 +03:00
kgv
a4815d5509 0029902: Data Exchange, XCAF - provide extended Material definition for visualization purposes
Introduced new attribute XCAFDoc_VisMaterial storing visualization material definition.

XCAFPrs_Style has been exteneded Material() property.
XCAFPrs_AISObject::DispatchStyles() maps new XCAFPrs_Style::Material() property onto graphics aspects.

RWGltf_GltfJsonParser and RWObj_CafReader now put Material definition into XCAF document instead of a color label.
RWGltf_MaterialMetallicRoughness - added missing properties AlphaMode, AlphaCutOff and IsDoubleSided;
fixed default values in constructor for Metallic and Roughness.

Added commands XGetAllVisMaterials, XGetVisMaterial, XAddVisMaterial,
XRemoveVisMaterial, XSetVisMaterial, XUnsetVisMaterial for working with
new visualization materials table in the document.
2019-10-22 15:15:53 +03:00
kgv
ba00aab7a0 0029528: Visualization, TKOpenGl - allow defining sRGB textures
OpenGL rendering is now done into sRGB framebuffer.
OpenGl_ShaderManager::prepareStdProgramFboBlit() has been extended
by programs resolving MSAA texture and applying gamma correction as fallbacks.

Quantity_Color definition has been modified to store RGB components
in linear color space within Quantity_TOC_RGB type.
Standard colors defined by Quantity_NameOfColor enumeration has been updated accordingly.
New Quantity_TOC_sRGB type has been introduced to handle RGB components in non-linear sRGB color space.

OpenGl_TextureFormat class definition has been moved to dedicated files.
New method OpenGl_TextureFormat::FindFormat() replaces OpenGl_Texture::GetDataFormat().
New method OpenGl_TextureFormat::FindSizedFormat() replaces OpenGl_FrameBuffer::getColorDataFormat()
and OpenGl_FrameBuffer::getDepthDataFormat().

Graphic3d_TextureRoot::IsColorMap() - introduced new property defining
if RGB(A)8 image formats should be loaded as sRGB(A) textures or as data RGB(A) textures.
OpenGl_Texture initialization methods have been extended with new theIsColorMap argument.

vreadpixel - added argument -sRGB printing color in sRGB color space.

Test cases have been updated to new sRGB rendered results.
2019-10-22 15:15:52 +03:00
kgv
aaf8d6a98d 0030969: Coding Rules - refactor Quantity_Color.cxx color table definition
The table of named colors has been compressed and moved out
from Quantity_Color.cxx into Quantity_ColorTable.pxx.

Quantity_NameOfColor - grayscale enumeration values have been re-ordered to fix discontinuity.
Duplicating colors has been merged within enumeration:
  CHARTREUSE=CHARTREUSE1, GOLD=GOLD1, GREEN=GREEN1, ORANGE=ORANGE1,
  ORANGERED=ORANGERED1, RED=RED1, TOMATO=TOMATO1, YELLOW=YELLOW1.
Added aliases to several other common colors:
  BLUE=BLUE1, CYAN=CYAN1, LIGHTCYAN=LIGHTCYAN1, MAGENTA=MAGENTA1.

Quantity_Color class definition has been cleaned to follow OCCT coding style.
Quantity_Color now stores NCollection_Vec3<float> as class field instead of separate components.
Removed unused class Quantity_ColorDefinitionError.

New methods Quantity_Color::Convert_LinearRGB_To_sRGB() and Quantity_Color::Convert_sRGB_To_LinearRGB()
converting RGB components from linear to non-linear sRGB colorspace and vice versa.
Image_PixMap::PixelColor() and Image_PixMap::SetPixelColor() methods have been extended
with an optional argument for performing linearization/delinearization of 8-bit sRGB pixel formats.

Draw Harness command AISColor has been corrected to take color name instead of enumeration index.
2019-10-22 15:15:51 +03:00
jgv
b008226203 0031023: Fillet regression in OCCT 7.4 from 7.3
Modify local static function ReorderFaces to be able to process multiple-faces-connecting vertices.
2019-10-22 15:15:50 +03:00
jgv
eff3eff916 0030940: BRepFilletAPI_MakeFillet algorithm fails on closed shell
1. Add check of configuration of corner in the end of spine.
2. Correct treatment of "smooth corners".
2019-10-22 15:15:49 +03:00
jgv
bf327822d6 0026071: BRepOffsetAPI_MakePipeShell produces rough result
1. Correct building history: the case of closed spine.
2. Rollback method GeomFill_CorrectedFrenet::InitInterval - correct processing singularities on spine.
3. Correct test cases.
2019-10-22 15:15:48 +03:00
jgv
63da0df9c2 0031066: Infinite loop in ShapeUpgrade_UnifySameDomain
Modification in local static method TransformPCurves - compute real U And V bounds of a face and use them in further computations.
2019-10-22 15:15:47 +03:00
skl
13a44c4b7f 0029068: Data Exchange - Invalid rotation of result shape after import attached STEP file
Changes for using Axis Placement(not used during creation of assembly) as transformation for root Shape Representation.
Test for bug 29068 and auxilary command are added.
2019-10-22 15:15:46 +03:00
aml
f04de1335c 0030932: Modeling Algorithms - Invalid result on 2d curve on surface approximation
New method generating 3D curve is added when 2D curve is linear isoline.
2019-10-22 15:15:46 +03:00
emv
c08fd12706 0029843: Modeling Algorithms - Boolean FUSE produces incorrect result
When splitting the shell/face with internal faces/edges use the 'internal' criteria of the face to choose the way to create loops.

Side effect changes:
- When performing Boolean operation - move the objects located far from Origin to the Origin to increase the accuracy of intersections.
2019-10-22 15:15:45 +03:00
ifv
d7992a77f6 0031029: BRepLib::SameParameter regression in OCCT 7.4 from OCCT 7.3
1. BRepLib.cxx: calculation of 2d tolerance is changed in method BRepLib::SameParameter(Edge..)
2. Geom2dConvert.cxx: incorrect comparing
"SquareDistance < tolerance"
is replaced by
"SquareDistance < tolerance*tolerance"
because tolerance is linear value.
2019-10-22 15:15:44 +03:00
kgv
8c787b5fa9 0031050: Data Exchange - XmlXCAF persistence stores triangulation-only Faces without any geometry
BRepTools_ShapeSet now ignores myWithTriangles flag in case if triangulation is the only geometry representation.
2019-10-22 15:15:43 +03:00
ifv
44fafc477f 0031031: Incorrect result is returned from BRepPrimAPI_MakePrism::Generated()
1. src\BRepSweep\BRepSweep_NumLinearRegularSweep.cxx

Fix bug by adding result in list of generated shapes, if initial shape is vertex, edge or face.

2. src\BRepLib\BRepLib.cxx

Add protection against treatment not geometric edge in BRepLib::UpdateInnerTolerances(...)

3. Add test case for bug and correct test for bug 30346 according to new behavior of algorithm
2019-10-22 15:15:43 +03:00
vro
780fbc2897 0031013: Application Framework - Storage status is wrong after a failure
CDF_StoreList.cxx::Store() was amended
2019-10-22 15:15:42 +03:00
apn
620a6baa59 0030456: Make OCCT_CHECK_AND_UNSET_GROUP more general
Modify OCCT_CHECK_AND_UNSET_GROUP function to allow unset any group of variables
2019-10-22 15:15:41 +03:00
kgv
89073268fd 0031021: Coding Rules - Deprecation warnings on OSX within Draw_Window_1.mm
Use new renamed enumeration values instead of deprecated ones.
2019-10-22 15:15:40 +03:00
abv
6ed44b1ca9 0031044: Coding - Standard_NODISCARD should be placed before Standard_EXPORT
Standard_NODISCARD is put before Standard_EXPORT in all places throughout OCCT code
2019-10-22 12:12:26 +03:00
msv
746cb7c328 0031020: Coding - invalid inline usage in BRepBlend_AppSurface
BRepBlend_AppSurface and some other classes have been corrected to avoid inlining member functions in .cxx code.
2019-10-22 12:12:25 +03:00
kgv
8ba3d978db 0031048: Visualization - runtime error reported by Clang undefined behavior sanitizer in Image_AlienPixMap::Save()
Image_PixMapData - use unsigned math (uintptr_t) instead of signed math with pointers for defining negative stride.
2019-10-19 22:59:21 +03:00
abv
c275673dbf 0030993: Modeling Algorithms - heap-use-after-free reported by Clang address sanitizer in BRepFeat_MakeRevolutionForm::Perform()
Use of reference to object removed from the list after that removal is avoided
2019-10-19 12:31:38 +03:00
abv
9e3045dae1 0030992: Foundation Classes - heap-buffer-overflow reported by Clang address sanitizer in BSplCLib::BuildKnots()
Inconsistent code for guessing bspline span index is removed in Geom_OsculatingSurface::BuildOsculatingSurface().
2019-10-19 12:31:38 +03:00
kgv
c2bcd98369 0031024: Coding - invalid left shift in BVH_RadixSorter::Perform() using -fsanitize=undefined
Standard_Integer has been replaced by unsigned int for bit operations.
2019-10-19 12:31:37 +03:00
abv
683b72c3c1 0031010: Foundation Classes - heap-buffer-overflow reported by Clang address sanitizer in OSD_Path::IsUncExtendedPath()
Use of memcmp is replaced by strncmp to avoid possible read access out of string buffer size
2019-10-19 12:31:36 +03:00
mpv
3358ed643b 0031008: Application Framework - memcpy-param-overlap reported by Clang address sanitizer in LDOM_XmlReader::ReadRecord()
Use memmove instead of memcpy because of copy of the possible overlapped source and destination parts of the buffer.
2019-10-19 12:31:35 +03:00
abv
2724a0b3cc 0031034: Visualization - stack-use-after-scope reported by Clang address sanitizer in AIS_FixRelation::Compute()
Methods of classes Geom_ElementarySurface, Geom_Conic, and Geom2d_Conic setting or returning values of fields are made inline and return const& to avoid copying
2019-10-19 12:31:35 +03:00
abv
0deeff45a0 Update version of OCCT up to 7.4.1 2019-10-19 12:31:33 +03:00
bugmaster
fd47711d68 Increment OCCT version up to 7.4.0 2019-09-29 12:12:58 +03:00
kgv
c61c864f73 0031006: Draw Harness - locate_data_file fails on path containing spaces 2019-09-29 12:12:58 +03:00
bugmaster
d9619512e1 Update of environment files 2019-09-29 12:12:57 +03:00
kgv
7863dabb54 0031002: Documentation - update Overview for 7.4.0
Updated OCC logo.
Replaced some external links to https.
Added references to VS2019 support.
Added glTF, OBJ, IFC, JT into listing within appropriate sections.
Replaced dead URLs.

Fixed misleading information.
2019-09-26 17:01:58 +03:00
apn
cf97685735 0031001: Documentation - modeling_algos.md can not be generated
'\n' was returned to @figure ALIAS because it doesn't cause the appearance of warnings during generation of PDF documentation
2019-09-25 21:04:20 +03:00
emv
92686513a2 0030994: Test cases of group sat/read_parallel_1/_2 are crashed with exception
Revert changes by #30518
2019-09-25 17:49:04 +03:00
drazmyslovich
8c186dad9b 0025044: BRepMesh tweaks - treatments for degenerated and tiny faces
BRepMesh_ModelHealer - recognize a small face with 1 wire and 2 small edges as a face for refinement.
BRepMesh_DefaultRangeSplinner - reduce tolerance on tiny faces to improve the meshing results.

Added new test cases: bugs mesh bug25044_*.
Existing test cases updated to reflect improvements.
2019-09-25 17:46:57 +03:00
nds
3de0f78449 0030997: Foundation Classes - name correction of dump macros 2019-09-25 17:35:15 +03:00
nds
8aafd5f9e3 0030886: Documentation - provide information about some changes in upgrade 7.4.0
Modifications added to upgrade guide:
- Font_FontAspect enum digits have different values (0030439),
- Graphic3d_PolygonOffset default value change (0030716),
- AddZLayer inserts layer before Graphic3d_ZLayerId_Top, the previous implementation inserted it above all layers(0030668).
2019-09-25 17:31:30 +03:00
oan
cc50812d6f 0025588: BRepMesh_ShapeTool::FindUV check for 2d points to be the same is inconsistent with ShapeAnalysis_Wire::CheckLacking 2019-09-25 16:23:11 +03:00
tiv
467e864adf 0030720: Coding - fix HashCode() function problems that are not resolved with 30550
Undefined behavior caused by left shift operations in TopLoc_Location::HashCode() function is fixed.
HashCode() function overload for Standard_Size type is made available only if Standard_Size and "unsigned int" are different types (it is usually true for 64-bit platforms). The overload for "unsigned int" is made simple non-templated function (so it behaves the same on 32-bit and 64-bit platforms).
HashCode() function overload for Standard_Utf32Char type is made available only if Standard_Utf32Char and "unsigned int" are different types (it is needed for some old compilers).
2019-09-25 15:58:08 +03:00
abv
0a5ec5f380 0030990: Foundation Classes - unexpected change in numerical results on bsplines after 0029769
Added DRAW command and test case for detection of inconsistent update of B-Spline surface cache
2019-09-24 14:15:18 +03:00
kgv
27bd52b540 0030966: Configuration, genproj.tcl - look for an optional libraries e57 and xerces
Added missing HAVE_RAPIDJSON to env.sh.

genconf.tcl has been extended with new option HAVE_E57
which enables looking for E57 and xerces libraries.
Added new libraries CSF_E57 and CSF_xerces to genproj.tcl.
2019-09-24 14:04:54 +03:00
kgv
9196ea9d5a 0030991: Draw Harness - ViewerTest::ParseColor() defines out-of-range alpha component
ViewerTest::ParseColor() - fixed alpha component defined as 255 for RGB-only input.
Quantity_Color::ColorToHex() now rounds-up float values to closest integer.
Quantity_ColorRGBA::ColorToHex() - added method formatting color into hex with alpha component consistent to Quantity_Color::ColorToHex() for RGB.

vdrawtext command now uses ViewerTest::ParseColor() for parsing color argument, so that it accepts hex.
vreadpixel command now has been extended with -hex argument for printing color in hex format.

Commands XSetColor, XGetColor, XGetShapeColor, XGetAllColors, XAddColor, XRemoveColor, XFindColor,
XUnsetColor, XGetInstanceColor, XSetInstanceColor have been corrected to properly report syntax input errors
and to accept color names and hex (by reusing ViewerTest::ParseColor()).
2019-09-24 13:52:45 +03:00
abv
d537c5e67d 0029705: Foundation Classes - ShapeAnalysis_FreeBounds intention documentation is misleading
Description of the purpose of the class is corrected (wording improved)
2019-09-24 13:45:19 +03:00
ifv
e774a5534c 0030907: Visualization Algorithms - failure on attempt to compute iso-lines for an offset face made by a face of linear extrusion
The visualization code drawing iso-lines has been protected against getting iso-lines of infinite offset surface. In such case the surface is trimmed by UV bounds of the face.
Test case added
2019-09-24 13:18:28 +03:00
gka
258a844b63 0029780: [REGRESSION] Shape Healing - Operator FixShape failed with exception
Method ShapeFix_Wire::FixNotchedEdges() is corrected to handle the case of closed notched edges: on such edges split parameter may fall to wrong end of the curve due to projection.
2019-09-20 19:40:47 +03:00
abv
cbaac5de6d 0030985: Modeling Algorithms - heap-use-after-free reported by Clang address sanitizer in TopOpeBRepTool_REGUW::InitBlock()
Code is corrected to avoid use of reference to a shape removed from the list after that removal
2019-09-20 19:39:33 +03:00
emv
1f99e08822 0022886: Bug in Boolean
Updating test case as the problem is not reproduced anymore.
2019-09-20 19:39:30 +03:00
abv
eb62cbc494 0030518: Foundation Classes - NCollection_IndexedDataMap array out of bounds
Implementation of NCollection_IndexedDataMap::Iterator is revised to avoid unintended access to the element out of array bounds
2019-09-20 19:39:30 +03:00
abv
1e0a1fc9cb 0030981: Foundation Classes - heap-buffer-overflow reported by Clang address sanitizer in TCollection_ExtendedString
Avoid using memcmp on null-terminated extended (16-bit) strings.
Plain zero is used instead of one-byte null char literal for 16-bit chars.
2019-09-20 19:39:29 +03:00
abv
25093c3f54 0030980: Data Exchange - global-buffer-overflow reported by Clang address sanitizer in iges_newchar()
Avoid unnecessary copying of characters with zero-length string literal as source
2019-09-20 19:39:28 +03:00
nds
0904aa6395 0030949: Foundation Classes - Dump improvement for OCCT classes
1. new file Standard_Dump to prepare and parse Dump in JSON format for OCCT objects
2. some presentations cover the proposed dump functionality.
3. 'bounding', 'vaspects' has '-dumpJson' field to see the DumpJson result
4. Bnd_Box constructor with min/max points is implemented to use Dump of this class in Dump BVH_Box
5. Limitation (some classes of Graphic3d, Prs3d has not full filling for DumpJson)
2019-09-20 19:39:28 +03:00
mzernova
c42ef16585 0030180: Data Exchange - VrmlAPI_Writer is expected to return export state
The VrmlAPI_Writer::WriteDoc() and VrmlAPI_Writer::Write() methods now return the export state.
2019-09-20 19:39:27 +03:00
abv
1f44d29a0f 0030978: Visualization - stack-use-after-scope reported by Clang address sanitizer in OpenGl_Text.cxx
Implementation of auxiliary class in OpenGl_Text.cxx is corrected to avoid storing reference to temporary object.

Off-topic: test parse rules are corrected to recognize situation when test is killed by elapsed time, and report it as such.
2019-09-20 19:39:27 +03:00
apn
05ed7ed8e0 0029308: Configuration, Inspectors - search of Qt in CMake scripts is separated from search of other 3rd-party libs
Qt for inspector and samples is searched together with all 3rd-party products
2019-09-18 19:20:10 +03:00
kgv
f4b0c77247 0030967: Configuration, genproj.tcl - generate OCCProducts solution for products
genproj procedure has been extended with new parameters -solution, set to OCCT by default.
Added missing HAVE_RAPIDJSON to env.sh.

Added implicit file path normalization for PRODUCTS_PATH variable,
to avoid genconf.tcl script malfunction on backslashed.
2019-09-16 19:41:13 +03:00
msv
487942b562 0030968: Update the upgrade guide regarding the issue 30778 2019-09-16 19:40:03 +03:00
mzernova
8b037fe4ea 0030866: Visualization - remove map of AIS_Manipulator from ViewerText
ViewerTest_MapOfAISManipulators and ViewerTest_AISManipulator have been removed from ViewerTest
2019-09-16 19:38:33 +03:00
abv
cd58de63de 0028144: Modeling Data, GeomAdaptor_Curve - regression in comparison of version OCCT654
Test case moved to grid modalg_7 and corrected to use BREP instead of STEP, and to use wireframe in 3D viewer
2019-09-16 09:47:26 +03:00
gka
5859be3886 0030302: XCAF - Typo in XCAFDoc_GeomTolerance
Typo in the XCAFDoc_GeomTolerance.cxx where Loc is used instead of aPnt was corrected.
2019-09-14 11:45:37 +03:00
gka
d45b7860a5 0030113: Data Exchange - STL file in text format with "Facet" keywords can't be imported
Case-sensitive method strncmp used in the REStl_Reader cosidered register of letter was replaced on the method _strnicmp for Windows and strncasecmp for Linux and MacOs
Test script for case 0030113
2019-09-14 11:45:36 +03:00
agv
0cdaa8a4a5 0030831: ShapeFix algorithm (creation of seam edge) takes too long time with thin faces
In class ShapeFix_ComposeShell the U- and V-closedness of input face is taken immediately avoiding the error when the face is small in any of these dimensions.
Test case for bug 0030831
2019-09-14 11:45:36 +03:00
abv
3b80dc166a 0030948: Configuration, CMake - problem building with CMake 3.15.2
Minor corrections in CMake procedures and include statements
2019-09-14 11:45:35 +03:00
mzernova
fdae2107d9 0030946: Visualization - Image_AlienPixMap ignores 1-bit pixelformat when using FreeImage
Convert 1-bit image to 8-bit one during its loading because only greyscale images are supported by visualization
2019-09-14 11:45:35 +03:00
kgv
44b80414d3 0030775: Foundation Classes - Preserve application-defined top-level exception filter
New overload for method OSD::SetSignal() is added accepting argument specifying how to set or unset handlers.
New enum OSD_SignalMode describes different modes of signal handlers setting used in extended version of OSD::SetSignal().
Method OSD::SignalMode() returns mode set by the last call to SetSignal().
Method OSD::IsFloatingSignalSet() is changed to return value based on actual floating point exception flags (rather than on variable set by previous call to SetSignal()).

Added new method OSD::SetThreadLocalSignal() intended to setup thread-specific handlers (e.g. _set_se_translator() on Windows) and FPE settings.
OSD_ThreadPool and Media_PlayerContext now use new method instead of OSD::SetSignal(), to avoid overriding global handlers.

dsetsignal syntax has been extended to support choice of signal handling mode.

DRAW command OCC30775 is added allowing to test signal handling in multithreaded process.
2019-09-14 11:45:34 +03:00
mzernova
b1492cb30f 0022777: Visualization - Unsafe way to get attribute values from MeshVS_Drawer
Set default values for local variables used for storing values that are obtained by MeshVS_Drawer::Get****() methods
2019-09-14 10:49:50 +03:00
iko
5c225e8e07 0030963: Visualization, TKOpenGl - texture unit error during FFP global texture's parameters processing
The texture units used in FFP texture functions are correct now.
2019-09-14 10:49:49 +03:00
oan
3068c3bb65 0030959: OSD_Parallel_TBB: number of execution threads is strictly limited by the root scope
Do not limit number of available threads by number of items processed within the root scope due to possibility of spawning of an additional threads within the subscopes.
2019-09-14 10:49:48 +03:00
tma
ac293bde7f 0030957: Data Exchange - Assembly item Id should not start with '/' symbol
Fix test case: added parsing of the output of the dump note command
2019-09-11 18:48:14 +03:00
jgv
a53d3975c9 0023380: BRepOffsetAPI_MakeFilling fails and leaves boundary faces with high tolerance
Avoid exception: use BRep_Builder for building wire instead of using BRepLib_MakeWire.
2019-09-09 19:27:59 +03:00
aml
94beb42a68 0029858: Modeling Data - Regression in GeomAPI_ExtremaCurveCurve
Fix Newton's minimum projection algorithm onto boundaries in case of conditional optimization.
Add possibility to detect several optimal points at initialization of the math_GlobOptMin.
2019-09-09 19:26:39 +03:00
bugmaster
5a7808160e Increment OCCT version up to 7.4.0beta 2019-09-06 19:24:56 +03:00
drazmyslovich
9063f1e089 0030870: Data Exchange - Add the support for empty draughting models and empty presentation layer assignments for step import
Protections to avoid exception in the methods  RWStepVisual_RWDraughtingModel::ReadStep and RWStepVisual_RWPresentationLayerAssignment::ReadStep for case when assigned items are absent were added
2019-09-06 19:24:56 +03:00
abv
fa68c1e116 0029979: Data Exchange - Crash by reading STEP file
Added work-around against specific problem of ORIENTED_EDGE referring to another ORIENTED_EDGE instead of EDGE_CURVE.
Added handling of edges with null EDGE_CURVE, to allow passing the translation further instead of exception.

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

Added test bugs step bug29979
2019-09-06 19:23:19 +03:00
emv
ba165db3d3 0030880: Modeling Algorithms - Bug in BRepExtrema_ExtCF
Use the BRepTopAdaptor_FClass2d instead of BRepClass_FaceClassifier in BRepExtrema_ExtCF for classification of the found intersection points.
2019-09-06 19:23:19 +03:00
vro
f2c862db07 0030704: Modeling Data, Bnd_OBB - Oriented bounding box gives a wrong result if a box is added to a void box
Added protection on a void box to methods Bnd_OBB::Add() to escape taking into account "heap trash" coordinates of a void box.
2019-09-06 19:23:18 +03:00
drazmyslovich
a90dd15e6b 0030876: Data Exchange - StepToTopoDS edge translation should be resistant to malformed parameter values
Corrected misprint in the method CheckPCurves of the class StepToTopoDS_TranslateEdgeLoop for case when higher bound of the range of pcurve on the edge greater then last parameter of the pcurve.
Added check on the not periodic flag for pcurve when range pcurve on the edge is adjusted to parameters pcurve.
2019-09-06 19:23:17 +03:00
gka
f9c58d7c4e 0029269: Improvement for thread safety of the STEP translator - cleanup
Removal of unused stuff and some protections implemented within #29269
2019-09-06 18:26:44 +03:00
msv
ce64c9ad5e 0030778: [Regression to 7.3.0] Extrema raises exception StdFail_InfiniteSolutions
The exception StdFail_InfiniteSolutions has been suppressed in all Points() methods.
2019-09-06 18:26:44 +03:00
ifv
dec7af167b 0030196: [REGRESSION] Modeling Algorithms - Crash in BRepBuilderAPI_GTransform
Test case is added
2019-09-06 18:26:43 +03:00
kgv
14c7f553a9 0030942: Draw Harness, ViewerTest - command vdefaults should abort script on unknown argument 2019-09-06 18:26:42 +03:00
aml
7a74087601 0027534: [Regression to 6.9.1]: Infinite loop in Curve on Surface projection algorithm
Add test case.
2019-09-06 18:26:42 +03:00
kgv
9eefb360a7 0030846: Foundation Classes - StorageInfo violates the C++ One Definition Rule
Local definitions have been put into anonymouse namespace within files
OSD_MAllocHook.cxx and NCollection_BaseAllocator.cxx.
2019-09-06 18:26:41 +03:00
drazmyslovich
3f50e94e33 0029717: Shape Healing - ShapeFix_Face::FixSmallAreaWire delivers a face with wrong-oriented wires + 1 small crash-fix
- Fix FixSmallAreaWire for the reversed faces.

- Add nullptr check for FixOrient...

- Test bugs heal bug25923 is corrected to avoid relying on wrong orientation of face after fixing small wire
2019-09-06 18:26:41 +03:00
kgv
bbd8ce1008 0030721: Visualization - Arrows in dimensions are drawn behind some other lines after applying 30716
AIS_Dimension::DrawArrow() now disables polygon offsets for drawing 2D arrow,
so that it is expected to be drawn at the same depth as dimension line.
2019-09-05 18:01:39 +03:00
abv
30870f51f4 Test for 0023979: Performance problem of STEP export for large files 2019-09-04 18:34:07 +03:00
nds
741c4f3ecc 0030728: Visualization - using one implementation of highlight/unhighlight in context 2019-09-04 18:05:55 +03:00
kgv
611684187d 0029516: Visualization - eliminate redundant property Graphic3d_MaterialAspect::ReflectionMode()
Decomposition of Ambient, Diffuse, Specular and Emissive properties has been eliminated within *Graphic3d_MaterialAspect* definition,
so that following methods of *Graphic3d_MaterialAspect* class have been removed:
SetReflectionMode(), SetReflectionModeOn(), Ambient(), Diffuse(), Emissive(), Specular(), SetAmbient(), SetDiffuse(), SetSpecular(), SetEmissive().

Graphic3d_NOM_NEON_GNC non-physical material definition has been corrected
and define WHITE emission color coefficient instead of YELLOW.

Added method Graphic3d_ClipPlane::SetCappingColor() for more straight-forward modification of Capping color in case of non-physical material.
Prs3d_ShadingAspect::Color() has been fixed to return InteriorColor instead of material color coefficient in case of non-physical material.
2019-09-04 15:13:18 +03:00
abv
c8428cb3e4 0030938: Configuration, genproj - Support building with VS 2019
Commands genproj and genconf are updated to support generation of projects for VS 2019, toolset v142
2019-09-04 15:08:14 +03:00
kgv
1202160b57 0030931: Visualization, TKOpenGl - do not render into GL_FRONT within "GDI Generic" renderer
OpenGl_Workspace now disables at initialization time
OpenGl_View::SetImmediateModeDrawToFront() property in case of "GDI Generic" OpenGL implementation.

OpenGl_View::redrawImmediate() - fixed no buffer swap in case of
myTransientDrawToFront without offscreen FBO.
2019-09-02 19:18:36 +03:00
kgv
59ee34efc0 0030930: Draw Harness, ViewerTest - add commands vlistcolors and vlistmaterials listing standard Colors and Materials
Introduced two new commands vlistcolors listing named colors and vlistmaterials listing standard materials.
These commands also can generate HTML table listing colors/materials with their properties.
vlistmaterials can generate OBJ model for comparing OCCT materials in different viewers.
New test cases use these commands for generating HTML tables.

Graphic3d_MaterialAspect::MaterialType() - added missing getter.
Corrected name of unlit shading model within vaspects and vrenderparams commands.
2019-09-02 19:17:23 +03:00
abv
7185019ae6 0028242: [Regression] HLR Poly Algo has broken edges
Added test hlr poly_hlr bug28242
2019-09-02 19:16:38 +03:00
abv
090ef04012 0029334: Simple offsets complicate geometry
Method BRepOffset::Surface() is used in simple offset algorithm to create offset surface, instead of direct and unconditional construction of new Geom_OffsetSurface instance.

Added test bugs modalg_7 bug29334
2019-09-02 08:08:37 +03:00
jgv
a22151d83c 0030927: Modeling Algorithms - UnifySameDom looses the Closed flag for wires
Add setting the Closed flag for a new wire
2019-08-30 18:07:53 +03:00
vro
990d032c90 0030926: Data Exchange - Change of the number of GDT points of a View may lead to a crash 2019-08-29 19:09:49 +03:00
kgv
b383a61fbd 0030923: Visualization, AIS_ViewCube - avoid mixing non-zoomable text and trihedron-persistence
Box sides labels are now drawn with zoomable flag.
2019-08-29 19:08:55 +03:00
anv
07f2064617 0030919: ACIS Import - Improving translation of string attributes into XDE
- Added possibility to get (or create if absent) a properties attribute via ShapeTool;
- Added Draw command to print properties attached to a Label.
2019-08-29 19:07:12 +03:00
emv
fb64d0f4a2 0030914: Modeling Algorithms - Improve performance of UnifySameDom algorithm for specific case with many edges
Use cached containers to find the necessary shapes.
2019-08-29 19:06:12 +03:00
emv
115d350e09 0030913: Invalid result of Fusing slices
Refactoring of the Line-Line intersection method strengthening the parallel and coincidence criteria to allow almost parallel lines have an intersection point.
2019-08-29 19:04:39 +03:00
emv
3dd193aa6d 0030903: Bug in IntCurvesFace_ShapeIntersector
When classifying the intersection point check the ON status in 3D - compare the 3D distances with 3D tolerance.
2019-08-29 19:03:48 +03:00
kgv
87018b452a 0030924: Coding - incorrect header in file OSD_ThreadPool.hxx
Fixed license statements within files BRepGProp_MeshProps.cxx, BRepGProp_MeshProps.hxx,
OSD_ThreadPool.cxx and OSD_ThreadPool.hxx.

Removed non-ASCII char from BRepMesh_ModelHealer.hxx.
2019-08-29 19:02:45 +03:00
kgv
61f73653ba 0030915: Visualization - AIS_ColorScale::FindColor() returns Wrong color for maximal value
Map the very upper value (theValue==theMax) to the largest color interval.
2019-08-26 15:16:14 +03:00
nds
8ed0708507 0030857: Visualization - using one implementation of Text in graphic group
Graphic3d_Group::Text(...) are obsolete, AddText() should be used instead of these methods.
Graphic3d_Text is a new class for parameters necessary to fill OpenGl_Text. All parameters of Graphic3d_Group::Text() are moved into this class.

OpenGl_TextParam is removed, these fields were moved into Graphic3d_Text.
OpenGl_Text constructors/Init with OpenGl_TextParam parameter were removed. Constructor with Graphic3d_Text should be used instead of it.
Using OpenGl_Text Init() with OpenGl_TextParam should be now replaced on two cases. The first case is setting values into Graphic3d_Text and the second case is calling Reset() after. As example, look at modification in OpenGl_FrameStatsPrs.
2019-08-23 16:58:25 +03:00
iko
077a220c51 0030807: Visualization, TKOpenGl - supporting cubemaps
A cubemap texture initialization has been implemented.
Setting environment cubemap as interactive background is posssible now.
2019-08-23 16:56:40 +03:00
emv
c5cee3222f 0030905: Modeling Algorithms - Faulty shapes in UnifySameDomain
Make face FORWARD before adding wire in it.
2019-08-23 16:56:39 +03:00
anv
e837b3a26c 0029662: Modeling Data - Allow replacement of Compounds via BRepTools_ReShape
- Fixed condition to allow proceeding of nested compounds;
- Added new key to "reshape" draw command to state a level of type until which requests are taken into account;
- Test case added.
2019-08-23 16:56:39 +03:00
drazmyslovich
846245d4b2 0030874: Modeling Algorithms - GCPnts_TangentialDeflection inserts the points between nearby points
Check the points distance before inserting a new point in between.
2019-08-23 16:56:38 +03:00
kgv
d7fa57a7a3 0030906: Visualization, SelectMgr_ViewerSelector - Object clipping planes overrides View clipping plane for next objects
Clipping range has been moved from SelectMgr_RectangularFrustum to SelectMgr_SelectingVolumeManager
and passed to frustum as an argument to Overlap() methods.
This fixes an issue when Clipping is customized per-object within SelectMgr_ViewerSelector::traverseObject()
in case when shallow copy of SelectMgr_SelectingVolumeManager is created
(frustums are copied from global frustum manager by Handle).
2019-08-23 16:56:37 +03:00
nds
0be11733a7 0030901: Visualization - OSD_MemInfo moving memory computation out of the constructor 2019-08-16 17:34:37 +03:00
kgv
c64135f723 0030900: Configuration - fix compilation using macOS SDK before 10.12
ViewerTest - added compatibility defines.
2019-08-16 12:16:47 +03:00
kgv
5e2477a7bd 0030899: Data Exchange, RWObj_Reader - reading multiline file with more than one line separator leads to memory corruption
Fix misprint in condition.
2019-08-16 12:16:43 +03:00
msv
8e7dc6f465 0030897: Modeling Algorithms - Crash in UnifySameDomain [Regression]
The regression caused by the patch for 0030534 has been eliminated. For that the method InsertWiresIntoFaces() has been corrected: the face to which a wire is added is first oriented as forward.
2019-08-16 12:16:40 +03:00
kgv
2546fd477f 0026978: VIS - Interactive selection is insensitive to swept shell
IVtkOCC_SelectableObject::BoundingBox(), AIS_Shape::BoundingBox() now don't use
BRepBndLib::AddClose() on arbitrary shapes.
2019-08-16 12:16:40 +03:00
kgv
7fab82af5f 0008239: Foundation Classes - directive "using namespace std" doesn't allow to build application with OCC and other 3rd party libraries
Standard_Stream.hxx no more adds "using std::" entities.
2019-08-16 12:16:39 +03:00
tiv
0423218095 0030895: Coding Rules - specify std namespace explicitly for std::cout and streams
"endl" manipulator for Message_Messenger is renamed to "Message_EndLine".

The following entities from std namespace are now used
with std:: explicitly specified (from Standard_Stream.hxx):
std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream,
std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr,
std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision,
std::hex,std::dec.
2019-08-16 12:16:38 +03:00
jgv
3977d18aca 0030286: Cover polygonal HLR algorithm by regression tests
New folder "hlr" with subfolders "exact_hlr" and "poly_hlr" has been created.
Draw command "vcomputehlr" has been corrected.
QA command "OCC27341" has been deleted as "vcomputehlr" does its job.
2019-08-16 12:16:36 +03:00
kgv
9975d32acf 0030888: Data Exchange, RWGltf_CafReader - fix misprint in condition while iterating binary glTF 2.0 chunks 2019-08-13 17:36:58 +03:00
drazmyslovich
a6b55fba08 0030872: In case of failure, retry to acquire the driver for the format 2019-08-09 17:37:29 +03:00
kgv
208dc370ac 0030863: Visualization, SelectMgr_ViewerSelector - disabling of View clipping planes is ignored for transformed objects
SelectMgr_ViewerSelector::computeFrustum() - fixed lost clipping planes when creating a new frustum.
2019-08-09 17:36:47 +03:00
kgv
caa309aaf4 0030854: Visualization, AIS_ViewCube - pack triangulations into common array(s)
Presentation computation has been modified to merge triangulations per box part type.
Prs3d_Drawer::FaceBoundaryDraw() flag is now handled for drawing box sides edges.

Graphic3d_ArrayOfPrimitives has been extended by auxiliary methods:
- ::AddSegmentEdges(), ::AddTriangleEdges(), ::AddQuadEdges() raising exception on wrong primitive type.
- ::AddQuadTriangleEdges() splitting quad into indexed triangulation;
- ::AddTriangleStripEdges() splitting triangle strip into indexed triangulation;
- ::AddTriangleFanEdges() splitting triangle fan into indexed triangulation;
- ::AddPolylineEdges() splitting polyline into indexed segments.
2019-08-09 17:36:47 +03:00
emv
6f5db50804 0030869: Modeling Data - BRepAdaptor_CompCurve incorrectly evaluates the boundary points
Problem is solved by #0029430. Integrating test case only.
2019-08-09 17:36:46 +03:00
nds
8996b4490a 0030695: Visualization - selection by box should use clipping planes set for viewer - moving check on touching the clipping plane in selection only. 2019-08-07 19:54:06 +03:00
nds
87bda9d805 0030425: Visualization - possibility to redefine AIS_Selection 2019-08-06 17:27:37 +03:00
abv
ba83248011 0030865: Samples - sample for 3D version of new OCC logo
Added new Tcl sample "logo2019.tcl" and relevant test demo/samples/logo2019
2019-08-06 17:23:55 +03:00
msv
b1bb21e714 0030864: Global variable Version defined in TopTools_ShapeSet.cxx is superseded by same name variable from executable
The variable Version defined in TopTools_ShapeSet.cxx has been declared as static to limit its scope.
2019-08-06 17:19:43 +03:00
ika
da7e894868 0030856: Data Exchange - Wrong colors after STEP file import
Fix processing of colors, attached to assemblies in STEP file.
2019-08-06 17:14:42 +03:00
jgv
389b9d5ca3 0030534: Regression in the tool UnifySameDomain - the shape looses faces
1. Add method TransformPCurves to ShapeUpgrade_UnifySameDomain - to rotate and translate existing pcurves instead of projecting.
2. Modify method ShapeUpgrade_UnifySameDomain::IntUnifyFaces - now it does not apply ShapeFix to new wires and new faces.
3. In the method UnifyEdges: add merging degenerated edges.
2019-08-02 15:48:00 +03:00
mpv
c2100640f6 0030835: Possible performance improvements in methods TDF_Label::FindAttribute
Make attribute iterator work with pointers to attributes, so, creation of handle on each iteration is avoided.
2019-08-02 15:42:54 +03:00
kgv
607e5e62e7 0029837: Visualization, Graphic3d_Camera - Fit All operation works incorrectly on flat object
Graphic3d_Camera has been revised to store camera Direction from Eye explicitly
and Distance to Center instead of auxiliary Center point.

This allows setting camera Distance to 0 (for flat objects) without side effects
like broken FitAll, wobbling on rotating.
2019-07-30 19:34:49 +03:00
kgv
e36ee9677a 0026154: Visualization - v3d viewer grid disappears due to automatic z-fit
V3d_RectangularGrid, V3d_CircularGrid, fixed initialization of presentation bounding box (lost Z offset).
2019-07-30 19:33:20 +03:00
kgv
f6b4e578cd 0030855: Coding - New warnings within Standard_ReadLineBuffer after integration fix for 0030830
Added missing cast.
2019-07-28 12:24:53 +03:00
kgv
59515ca600 0030744: Visualization, TKOpenGl - stipple line does not work on OpenGL ES 2.0
OpenGl_ShaderManager now provides fallback stipple lines GLSL code for obsolete OpenGL ES 2.0 devices.
OpenGl_Caps has been extended by flags disallowing OpenGL extensions usage
and restricting upper OpenGL version to be used by OCCT for testing purposes.
2019-07-27 12:05:35 +03:00
osa
fa1710b567 0030830: Point Cloud Rendering - use temporary buffer to read lines from .pts and .ptx files
Add Standard_ReadLineBuffer - auxiliary tool for buffered reading of lines from input stream.
2019-07-27 12:04:26 +03:00
kgv
9460f8c0b9 0030853: Visualization, AIS_ViewController - fix 1 pixel Y shift while zooming
Fixed error in math converting Y-down mouse coordinates into Y-up within AIS_ViewController::handleZoom().
Added flags ToStickToRayOnZoom()/ToStickToRayOnRotation() enabled by default,
which will project picked point onto ray at mouse cursor to preserve focus on zoom out.
2019-07-27 12:04:25 +03:00
kgv
a3a3ff3d33 0030850: Visualization, OpenGl_Text - text within trihedron persistence jitters when camera is far from origin
OpenGl_Text now discards (redundant) translation part from camera orientation matrix.
Text anchor point alignment to integer coordinates is now not performed for 3D-oriented text.
2019-07-19 12:23:02 +03:00
aba
2108d9a25b 0028954: Visualization - implement interactive object for camera manipulations
Added new class AIS_ViewCube implementing interactive cube
displaying orientation of the main axes of the model space in the viewer.
Each side, edge, or corner of the cube corresponds to particular orientation of the camera,
and the class provides methods to move the camera to corresponding position (with animation if needed).

AIS_InteractiveContext::LastActiveView(), added new property returning the last View processed by MoveTo() event.
AIS_InteractiveContext::BoundingBoxOfSelection(), added method returning bounding box of selected objects.
SelectMgr_EntityOwner::HandleMouseClick(), added new callback for handling
mouse clicks by owner itself without automatic highlighting and clearing previous selection.
Called by AIS_InteractiveContext::Select() method.

AIS_ViewController::ViewAnimation() has been extened with camera animation propery,
which can be bound to AIS_ViewCube for smooth embedding into event loop.

Prs3d_ToolDisk has been extended with parameters specifying angle range.
Graphic3d_MaterialAspect now initializes all coefficients to 1.0
when Graphic3d_NOM_UserDefined is passed to class constructor.
AIS_AnimationCamera::update() now sets the end camera position if animation duration is 0.
Prs3d_DatumAspect, added missing setters.

New command vviewcube has been added.
2019-07-19 12:23:01 +03:00
msv
e8dec5e171 0030790: [REGRESSION] Modeling Algorithms - Crash when loading specific step file
The problem occurred when the algorithm IntCurvesFace_Intersector was called for a face occupying zero extension along V direction. This is obviously a bad face, but we need to have the algorithm not crashing the application. So, the algorithm has been protected against such input data. At attempt to make calculations it establishes NotDone status.

Bad test case tests/de/step_3/D9 has been updated.
False memory leak detection has been suppressed in tests/bugs/fclasses/bug7287_2.
2019-07-19 12:23:00 +03:00
mzernova
0dab581700 0030799: Draw Harness, ViewerTest - setup uniforms via vshader command
vshaderprog command now supports setup custom uniforms
2019-07-19 12:23:00 +03:00
kgv
1c728f2d6d 0030668: Visualization - revise adding ZLayer API
V3d_Viewer::AddZLayer() has been replaced by
V3d_Viewer::InsertLayerBefore() and V3d_Viewer::InsertLayerAfter() methods
allowing to specify Layer settings and index of existing layer to insert new one before/after.
The behavior of V3d_Viewer::AddZLayer() has been adjusted to append
new Layer before Graphic3d_ZLayerId_Top
(between Graphic3d_ZLayerId_Default and Graphic3d_ZLayerId_Top).

Graphic3d_Layer now provides LayerId() property.
Graphic3d_ZLayerSettings has been extended with IsRaytracable() property;
Ray-Tracing now processes multiple layers instead of Graphic3d_ZLayerId_Default.

Moved some methods from OpenGl_View to the base class Graphic3d_CView.
2019-07-19 10:23:22 +03:00
ika
6b9b7e3c92 0030630: Visualization - wrong visualization of shape with mirrored transformation
Solids with mirror location are displayed, according to their normals.

vaspects -setBackFaceColor, added command to set backface color.
2019-07-18 11:09:08 +03:00
msv
7c08e3ac6e 0030829: BRepExtrema_ShapeProximity crashes with shape from STL/WRL
The fix makes algorithm independent on geometrical data. Only triangulation is needed for its work.
2019-07-18 11:09:08 +03:00
Benjamin Bihler
718d07fe5e 0030403: Application Framework - Overwriting Big BinOcaf Files Does Not Reduce Their Size
OSD_OpenFileDescriptor(), added truncating flag to fopen() flags for std::ios_base::out,
since truncating is implied by C++ output flag.
This fixes misbehavior of OSD_OpenStream() on MinGW-w64 platform.
2019-07-17 15:46:39 +03:00
abv
bc28da5c3a 0029736: Some Warnings During Compound Transfer to IGES Look Dubious
Incorrect (legacy) warnings during IGES export are removed
2019-07-15 15:56:03 +03:00
kgv
2fb08f0132 0030628: [REGRESSION] Data Exchange - Crash on importing STEP file
RWHeaderSection_RWFileDescription::ReadStep(), added check for an empty list.
2019-07-15 15:48:00 +03:00
ysn
b8d92a7f8f 0029987: Request for translation of French comments in the code
French comments in two files have been translated in English.
2019-07-11 13:36:28 +03:00
kgv
f6abd02cdc 0030837: Data Exchange, XCAFPrs_DocumentExplorer - fix misprint in XCAFPrs_DocumentExplorerFlags_NoStyle check 2019-07-11 11:08:15 +03:00
apn
943b4e5b95 0027710: Make Data-exchange test cases more machine independent
Added description of de test grid in user guide.
2019-07-11 11:04:19 +03:00
iko
c55c8fe929 0030833: Visualization - Graphic3d_Camera constructor's exceptions
Field's initialization part has been added to Graphic3d_Camera constructor receiving Handle(Graphic3d_Camera).
2019-07-10 10:41:26 +03:00
oan
4c04741d4c 0030827: Add common functionality allowing to switch triangulation algorithm in runtime
New classes BRepMesh_ConstrainedBaseMeshAlgo, BRepMesh_CustomBaseMeshAlgo and BRepMesh_CustomDelaunayBaseMeshAlgo are added.
These classes allow to add any custom triangulation algorithm to BRepMesh and perform post-processing and optimization of base mesh generated by those algorithms.
BRepMesh_Delaun: added possibility to process constraints when base mesh is generated by different algorithm.
BRepMesh_DelaunayNodeInsertionMeshAlgo: added PreProcessSurfaceNodes flag controlling addition of surface nodes (either before creation of base mesh or after) to gain maximum performance from triangulation algorithms.

Minor changes:
Use simple algorithm for cylinders when internal vertices mode is switched off to speed up computations.
BRepMesh_IncrementalMesh: added Perform method allowing to execute algorithm using manually created Context.
2019-07-08 15:40:36 +03:00
asl
0d56f7433b 0030824: Visualization, PrsMgr_PresentableObject - A new flag to disable automatic selection of children
A new flag myToPropagateVisualState is introduced for PrsMgr_PresentableObject: by default it is true, it means that the visual state (display/erase/color) should be propagated to all children. If false, the visual state is not propagated.
The flag can be set via the method ToPropagateVisualState() or via Draw command: "vparent <parent> -ignoreVisu"
2019-07-04 19:36:30 +03:00
tiv
acc6542a1b 0030820: Draw Harness, ViewerTest - vsetcolor has no effect on objects created by vsegment and vtriangle
MyPArrayObject class (an interactive object representing some array of primitives) is improved: a possibility of color changing is added to it.
2019-07-04 19:34:27 +03:00
kgv
803bdcdf2b 0030821: Data Exchange, RWGltf_CafReader - fallback to Mesh name in case of Node name is empty
Added option to use Mesh name as fallback, enabled by default.
2019-07-01 13:31:58 +03:00
emv
b6c113d0eb 0030817: Modeling Algorithms - BRepOffsetAPI_MakePipeShell produces invalid result
BRepFill_TrimShellCorner::CheckAndOrientEdges() - When orienting next edge in a sequence take into account the Orientation of the previous edge.
Test cases for the issue.
2019-06-27 16:07:14 +03:00
kgv
82c59511b4 0030811: Data Exchange, RWGltf_CafReader - fix inaccessibility of properties
Added missing Standard_EXPORT and getters.
Fixed metadata loss.
2019-06-26 18:49:23 +03:00
kgv
d9dd07545d 0030810: Data Exchange, RWObj_CafReader - fix material assignment
RWObj_MtlReader fixed incorrect folder iteration within findRelativePath().
Fixed discarding texture-only material.
RWObj_TriangulationReader::addMesh() - fixed usage of wrong material for flushing previous group.
2019-06-26 18:48:16 +03:00
emv
88c3accd1a 0030787: BRepOffsetAPI_MakePipeShell: hangs on the attached model
Protect IntTools_EdgeEdge::FindSolutions method from cases where splitting edge on parts does not give bounding box decreasing.
Use at least Epsilon from edges parameters as a step in BRepLib::FindValidRange.
Test case for the issue.
2019-06-25 19:47:09 +03:00
oan
3c1b70842d 0030780: [Regression to 7.3.0] BRepMesh fails triangulating one face of the shape
Added new parameter KeepSmallEdges to IMeshTools_Parameters allowing to compute min size for each edge locally, depending on the length of particular edge.
Parameter -smalledges now available for incmesh command.
2019-06-25 19:46:09 +03:00
kgv
62810a3c51 0030809: Data Exchange - fix misprint in RWMesh_CafReader::generateNames() 2019-06-25 19:45:05 +03:00
aba
bbf3fcdecd 0030806: Visualization - AIS Manipulator highlighting is not affected by the view affinity
- AIS_Manipalator object view affinity is now applied to presentation for highlighting.
2019-06-25 19:44:07 +03:00
kgv
e05d8d90c0 0030805: Visualization, StdSelect_BRepSelectionTool - empty sensitivity from polygon-only Edge
StdSelect_BRepSelectionTool::GetEdgeSensitive() now takes polygon points before creating curve Adaptor.
2019-06-25 19:42:49 +03:00
kgv
841aa8c47b 0030804: Foundation Classes - Poly_Connect crashes due to out-of-range array modification
Fixed initialization of edges array based on the wrong statement.
2019-06-25 19:41:23 +03:00
kgv
95bde2af7f 0030802: Draw Harness - add scrollbars to DFBrowse 2019-06-25 19:38:47 +03:00
msv
64a4475285 0029679: Draw Harness - Command 2dapprox works wrong when giving points in command line
Correct the behavior of the command 2dapprox for the case of points input in the command line.
Restore the work of the command 2dinterpole (implemented in the same method as 2dapprox).
Add test cases.
Correct generation of snapshots for the tests lowalgos/2dinter/*.
2019-06-24 19:22:47 +03:00
kgv
0c33a0bf4d 0030748: Visualization - Marker displayed in immediate layer ruins QT Quick view controls
OpenGl_Workspace::ResetAppliedAspect() now resets active texture unit to GL_TEXTURE0.
2019-06-22 19:50:10 +03:00
kgv
4151c94d20 0029296: Data Exchange - implement import of mesh data from files in OBJ format
RWObj_Reader and RWObj_CafReader - added new classes reading triangulation from OBJ file.
2019-06-21 18:19:09 +03:00
kgv
0a419c51ed 0030691: Data Exchange - implement import of mesh data from files in glTF format
Added RWGltf_CafReader class implementing glTF reader.
Added readgltf Draw Harness command for reading glTF files.
2019-06-21 18:19:08 +03:00
oan
eec6e810f1 0027685: Visualization of a shape imported from IGES hangs
Adding test case
2019-06-20 15:20:52 +03:00
emv
c2a25d522b 0030785: Mesh - protect BRepMesh_IncrementalMesh::Perform from raising exception
IMeshTools_ModelAlgo and IMeshTools_ModelBuilder have been changed to provide exception protected interfaces for performing the operations.
Protect single Edge/Face discretization methods from raising exceptions to skip broken Edges/Faces and allow mesh construction on the whole model.
2019-06-20 15:20:51 +03:00
kgv
fe525c6f7c 0030777: Visualization - Incorrect selection/highlighting of clipped objects
SelectMgr_ViewerSelector::traverseObject() now handles Object clipping planes in the same way as View clipping planes.
2019-06-20 15:20:51 +03:00
ika
3b739e69c9 0030789: Data Exchange - Some names are lost during STEP import
Add importing name from PRODUCT_DEFINITION_WITH_ASSOCIATED_DOCUMENTS STEP entity.
Update test cases with files contained this entity.
2019-06-20 15:20:50 +03:00
kgv
c9983ee863 0030706: Visualization - fetch font folder list from fontconfig library on Linux
vfont command now prints fonts in alphabetical order.
2019-06-20 15:20:49 +03:00
kgv
912761ea17 0030782: Visualization, Font_FTFont - use predefined fallback fonts for extended Unicode subsets
Font_FTFont now uses fallback fonts for characters from unsupported Unicode subsets,
managed by Font_FTFont::ToUseUnicodeSubsetFallback()
and Font_FontMgr::ToUseUnicodeSubsetFallback() option, enabled by default.
The fallback list includes common font families for Chinese, Korean and Japanese languages.

Font_FTFont::RenderGlyph() now supports FT_PIXEL_MODE_MONO input format used by some CJK fonts.
OpenGl_Font::createTexture() now limits single texture size to circa 4096 glyphs.

test/testgrid now expects test scripts being in UTF-8 encoding in sync with "DRAWEXE -f script.tcl".

AIS::InitFaceLength() - fixed usage of uninitialized result.
2019-06-19 19:42:24 +03:00
emv
1bb67d3844 0030595: Oriented Bounding Box seems not optimal for some shapes
Add possibility of construction of the Optimal Oriented Bounding Box from set of points (the case of shape with triangulation).

The interface of the BRepBndLib::AddOBB method is not changed, but the option <theIsOptimal> now controls also the construction of the OBB from Set of points.
The slightly modified DiTo algorithm will be used, checking all possible axes created by the extreme points.
The performance of the construction of the Optimal OBB is lower but the quality is usually much higher (can't be worse by definition).

Test cases for the issue.
2019-06-17 09:26:54 +03:00
kgv
6b41f0f335 0030754: Coding - the array of weights should begin with Lower, not the constant value 1 within Geom_BSplineCurve.cxx 2019-06-14 18:58:49 +03:00
ika
d6b200e03a 0030779: Data Exchange - Problems with located subshapes in expand compounds
Protect Expand compounds against problems with located subshapes.
Add method XCAFDoc_ShapeTool::AddSubShape() with Boolean output parameter.
Speed up XCAFDoc_ShapeTool::Expand().
Speed up XCAFDoc_ShapeTool::FindSubShape().
2019-06-14 12:27:34 +03:00
mpv
7f662bf4ef 0030761: Application Framework - HOMEDRIVE and TEMP are undefined on UWP
Avoid CDF_Stroe to find default folder since there is no case where this folder does not reset to exact value given by the user.
Also, remove the exception raising for the case this method is called from outside.
2019-06-13 20:18:28 +03:00
nds
13c556d9de 0030725: Visualization - remove Display calling from SetSelected methods of context
AIS_InteractiveContext::Load/ClearGlobal is modified for correct processing SetSelected for child objects.
As Display/Erase of object with children displays/erases these children, then the children status inside context should also be updated.
2019-06-13 18:56:56 +03:00
kgv
49582f9dbf 0030507: Visualization - introduce AIS_ViewController
ViewerTest_EventManager now inherits AIS_ViewController.
Platform-dependent user input handling within ViewerTest has been revised
to process events in common way through AIS_ViewController.
The mouse navigation has been changed, so that left mouse clicked
without modifers now rotates View.
The rubber-band selection can be activated via Alt+LeftMouseButton.
Selection is now done on mouse unclick and keyboard short-cuts take effect on unclick.

Aspect_Window::SetTitle() - added new method configuring Window title.
Introduced new types Aspect_Touch, Aspect_VKey, Aspect_ScrollDelta
for processing window events in platform-independent way.
2019-06-13 18:50:12 +03:00
szy
61aef3ce05 0030772: Data Exchange - Invalid person's name constructed by STEPConstruct_AP203Context class.
// fixed remarks.
2019-06-10 12:59:39 +03:00
age
d31fb73a09 0030765: Visualization - Incorrect intersection with Select3D_SensitiveBox when clipping is turned on
SelectMgr_RectangularFrustum::Overlaps method for computing intersection of box with frustum was reworked. Now the nearest non-clipped point is calculated.
2019-06-07 15:02:39 +03:00
nds
8d2c79f4e3 0030726: Visualization - change Selected state of owner in AIS_Selection
AIS_InteractiveContext::IsHilighted() behavior has been changed.
It should use the same logic for owner processing like when it is highlighted. IsSelected of owner is used for selection state, not highlight.

 Without this correction, object is never shown as selected by click (Select(bool)):
 if (!HighlightStyle (theOwner, aCustomStyle) ||
    (!aCustomStyle.IsNull() && aCustomStyle != anObjSelStyle))

 IsSelected is already true, so the highlight style is equal to selection style, nothing to do.
2019-06-07 15:02:39 +03:00
kgv
fc552d842e 0030692: Data Exchange - introduce base framework RWMesh for importing mesh data formats into XDE document
RWMesh_CafReader - added new interface class for common workflow for reading mesh data files into XDE document.

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

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

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

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

Eliminated gcc 4.4 compilation errors within Standard_OutOfRange_Raise_if,Standard_RangeError_Raise_if.
2019-06-07 15:02:38 +03:00
apn
5771d380b1 0030715: Configuration, CMake - error build with QTANGLE
SEARCH_TEMPLATES was modified to find EGL and GLES2 libraries in different folders (angle-gles, egl-gles, egl, angle, etc).
Find 3rdparty products procedure allows to define 3RDPARTY_LIBRARY_DIR or 3RDPARTY_DLL_DIR manually to find necessary libraries and dlls.
2019-06-05 13:35:24 +03:00
emv
78005ffefe 0030760: Modeling Algorithms - Intersection fails in Occt 7.3.0
Use FORWARD orientation of edges and face when attaching pcurve from one edge to another.
Test case for the issue.
2019-06-05 13:35:24 +03:00
emv
9324aa2d0d 0030656: Modeling Algorithms - Change Boolean Operations algorithm to use BVH tree instead of UBTree
Switching the Boolean Operations algorithm to use the BVH tree instead of UB tree as selection of the elements from BVH tree is usually faster.
2019-06-04 17:36:43 +03:00
abv
0616aa9ecf 0030764: Coding - warnings in Image_AlienPixMap.cxx when built with MSVC10
Disable warnings when including system headers (conflict between VS 2010 and Windows SDK definitions).
2019-06-04 17:31:13 +03:00
kgv
0ae9ac2179 0030729: Visualization - TKOpenGl reports OpenGL 4.5 loading functions error on Intel drivers
Make reported error more verbose.
2019-06-03 10:44:07 +03:00
kgv
b30b2c1381 0028668: Point Cloud Rendering - standard selection API returns invalid values
Added an argument to OpenGl_GraphicDriver::GetSharedContext() for returning only currently bound OpenGL context.
SelectMgr_SelectingVolumeManager::GetMousePosition() - added getter returning mouse coordinates.
2019-05-31 19:47:03 +03:00
kgv
edc4ba21c4 0030756: Visualization, TKOpenGl - capping plane does not work for ZLayer with non-zero origin
OpenGl_CappingPlaneResource::updateTransform() now takes into account ZLayer origin.

Fixed VT_ProcessKeyPress() passing arbitrary input to Draw::Atoi() leading
to messages in console like "unclosed braces".
2019-05-30 18:42:32 +03:00
kgv
9aceb23df6 0030745: Visualization, TKOpenGl - fix initialization of GLES3 context
OpenGl_GraphicDriver::InitContext() now tries to initialize GLES3 context
(EGL_CONTEXT_CLIENT_VERSION) and then fallback to GLES2.
2019-05-30 18:31:33 +03:00
iko
8e6ce38cf4 0030698: Volume Rendering - Early clipping of volume object's bounding box
Flag to control check of bounding box clipping before drawing has been added.
2019-05-30 18:17:06 +03:00
emv
7c1a821000 0030655: Modeling Data - Provide interfaces for selection of the elements from BVH tree
Provide the easy to use interfaces for selection of the elements from BVH tree.
The selection rules should be implemented in the selector class derived from *BVH_Traverse* or in *BVH_PairTraverse* in Reject/Accept methods.

The *BVH_Traverse* is used for selection of the elements from the tree.
The *BVH_PairTraverse* is used for selection of the pairs of elements from two BVH trees.

Auxiliary changes:
- Two methods BVH_Box::IsOut(OtherBox) and BVH_Box::IsOut(Point) have been added;
- Added methods for conversion of Bnd boxes to BVH boxes

Added new class *BVH_Tools* containing useful static methods operating on BVH points and boxes.

The classes BRepExtrema_OverlapTool and BVH_DistanceField have been rebased to use the new traverse methods.
2019-05-28 19:02:22 +03:00
Benjamin Bihler
1b827f0484 0030731: Modeling Data - B-Spline should have explicit data check error messages
Error messages have been added in throw statements.
2019-05-27 12:21:45 +03:00
kgv
e3249d8e5a 0030694: Data Exchange - support non-standard GB2312-encoded STEP files
STEPCAFControl_Reader::SourceCodePage() - added property defining text encoding
for converting names within STEPCAFControl_Reader::ReadNames() method.
Added associated "read.stepcaf.codepage" parameter,
which default value is Resource_UTF8, preserving current behavior.

Resource_FormatType enumeration has been extended by UTF8 and SystemLocale values.
Resource_Unicode - added conversion methods taking Resource_FormatType as argument.

GetName command has been corrected to NOT replace non-Latin symbols.
2019-05-24 16:59:16 +03:00
kgv
48ba181118 0030702: Configuration, CMake - error for iOS build due to searching macos frameworks
Look for UIKit+OpenGLES on iOS instead of AppKit+OpenGL.
2019-05-24 16:47:06 +03:00
kgv
f6973d9054 0030738: Data Exchange - XCAFDoc_ShapeTool::updateComponent() is too long
Cache subshapes list into map instead of re-iterating it multiple times within the loop.
Avoid iteration at all if modified state has been already detected.

XCAFDoc now returns GUIDs by const reference instead of a copy.
2019-05-24 16:44:30 +03:00
jgv
9369e98a62 0030590: Wrong result of Boolean Cut algorithm
Modification in static method BoundedArc of IntStart_SearchOnBoundaries:
    add exact intersection of canonical curve-surface (when Func is IntPatch_ArcFunction).
2019-05-24 12:11:52 +03:00
ika
7783ba1120 0030727: Data Exchange - Problems in Shape Tool
Add protection from return of not top-level shape by FindShape method.
Add protection against located roots into FindMainShape method.
Add new Draw command for FindMainShape.
Add flag findInstance to Draw command FindShape
2019-05-24 10:33:24 +03:00
emv
47cd8af2d2 0030670: Modeling Algorithms - Performance improvement of Boolean Operations algorithm
The following improvements have been made in Boolean operations algorithm:
1. Added possibility to update FaceInfo structure for many faces at once which helps to avoid nested loops.
2. Improve Point-Face classification procedure by caching the FaceExplorer for a face.
2019-05-24 10:33:23 +03:00
kgv
a4d594cbda 0030440: Visualization - Graphic3d_Camera::Frustum() returns wrong planes in portrait mode
Graphic3d_Camera::Frustum() now handles window Aspect Ratio < 1.0.
2019-05-23 15:46:47 +03:00
kgv
0ef04197f7 0030687: Visualization - remove redundant interfaces SelectBasics_EntityOwner and SelectBasics_SensitiveEntity
SelectBasics_EntityOwner has been merged into SelectMgr_EntityOwner.
Unused property SelectMgr_EntityOwner::ResetLocation() has been removed.
SelectBasics package has been moved from TKService to TKV3d.

SelectBasics_SensitiveEntity has been merged into Select3D_SensitiveEntity.
2019-05-21 19:42:15 +03:00
tiv
547fcc76b2 0030718: Mesh - broken triangulation within 32-bit builds
The problem caused by the changing of HashCode() method of TColStd_PackedMapOfInteger::TColStd_intMapNode class done as a part of 30550 changes is solved.
2019-05-21 19:15:26 +03:00
kgv
98eb4489d7 0030680: VIS - IVtkOCC_ShapeMesher displays Isoline wrong
IVtkOCC_ShapeMesher now calls StdPrs_Isolines tool instead of code copy-paste.
2019-05-21 18:58:14 +03:00
kgv
a9080ef924 0030717: Visualization, AIS_InteractiveContext::Erase() - selection presentation in a mode other than the default after hiding an object
AIS_InteractiveContext::EraseGlobal() now erases all object owners
(in the same way as AIS_InteractiveContext::ClearGlobal()).

Removed redundant fields AIS_InteractiveContext::myLastinMain and myWasLastMain.
2019-05-21 18:53:46 +03:00
mnv
8cf3bf84ce 0030713: Visualization, TKOpenGl - stipple line artifacts on Intel UHD Graphics 630
Added workaround for dashed line presentation on Intel UHD Graphics 630.
2019-05-20 11:19:41 +03:00
tiv
8fd45ae74f 0030716: Visualization - Set polygon offset units property to 1.0
The default value of the Units property of the Graphic3d_PolygonOffset class is changed to 1.0f (instead of 0.0f used previously).
2019-05-20 11:05:30 +03:00
msv
4811214cc0 0030679: Attached model hangs most of OCCT common functionality
Evaluator of offset surface has been protected against evaluation at infinite parameters. Now it throws exception when evaluating such data.

The methods IsUClosed and IsVClosed of the class ShapeAnalysis_Surface have been corrected to avoid evaluation of the surface at infinite parameters (fighting with regressions "parasolid doc_3 E3" and "parasolid doc_2 A3" in products).
2019-05-16 19:46:25 +03:00
asl
52c38ce17d 0030561: Visualization, PrsMgr_PresentableObject - Keep the current transformation for child in AddChild()
New methods AddChildWithCurrentTransformation(), RemoveChildWithRestoreTransformation() are implemented to keep the current global transformation of the object (child).
In DRAW a new command vchild is provided for testing low-level connections between presentations.
2019-05-16 19:34:17 +03:00
msv
b271edb092 0030712: Application Framework - Protect binary TriangulationDriver against empty triangulation in the file
The matter is that when the binary OCAF file contained a triangulation with 0 nodes and 0 triangles the method Paste would cause construction error of Poly_Triangulation.
This patch protects this method against exception.
2019-05-15 20:11:51 +03:00
emv
cca36b6b21 0030708: Modeling Data - Exception is raised while initializing TopoDS_Iterator with null shape
Added protection from null shapes to TopoDS_Iterator::Initialize method.
2019-05-15 20:05:31 +03:00
kgv
853af31fb1 0030705: Visualization, TKOpenGl - stipple line GLSL error on using OpenGL 2.1 + GL_EXT_gpu_shader4 extension on macOS
Fix compatibility with pure GL_EXT_gpu_shader4 specs by defining "uint" as "unsigned int".
2019-05-14 18:26:17 +03:00
kgv
ab1f458034 0030690: Draw Harness - provide XDisplay command for displaying XDE document
XDisplay - added new command displaying XDE document in ViewerTest map of object:
> XDisplay Doc [label1 [label2 [...]]] [-explore {on|off}] [-docPrefix {on|off}] [-names {on|off}]
>              [-noupdate] [-dispMode Mode] [-highMode Mode]

vstate - added NULL checks.
vdisplay now prints error on attempt to specify unsupported display mode.
verase, vremove now raise Tcl exception on attempt to hide non-existing object.
verase, vremove, vdir now accept name masks like "verase b*".
vremove and vdir output is now consistent to verase command (space-separated list of removed objects).
2019-05-14 18:24:09 +03:00
kgv
49dfdb7a97 0030516: Visualization - Pointer to an OpenGl_Structure is deleted and accessed later after PrsMgr_Presentation::Highlight()
Do not set IsForHighlight flag for already displayed presentation.
2019-05-14 18:21:17 +03:00
kgv
43070f2fd8 0030696: Draw Harness, testgrid - specify encoding in HTML header 2019-05-07 14:28:58 +03:00
kgv
77bc2ad1e0 0030683: Coding Rules - eliminate CLang compiler warnings -Wreturn-std-move
Added generalized move constructor and assignment operator to initialize TopoDS_Shape by object of this or derived type.
Added move constructor and assignment operator for TopLoc_SListOfItemLocation.
Macro OCCT_NO_RVALUE_REFERENCE is used in Standard_Handle.hxx instead of direct check of compiler version.
2019-05-07 14:22:52 +03:00
nbv
858435884d 0029523: Problem with BRepOffsetAPI_MakeEvolved
The capabilities of the class BRepOffsetAPI_MakeEvolved have been extended with involving alternate algorithm of resolving the loops in the piped shape. The new option theIsVolume is added for that in the constructor.

New class BRepFill_AdvancedEvolved has been created in order to provide new OCCT-algorithm combining BRepFill_PipeShell and BOPAlgo_MakerVolume.

A change in BOPAlgo_PaveFiller.cxx has been made in order to solve a specific problem of Boolean operation.

The interface of DRAW-command "evolved" has been updated to add the new option. DRAW-command "evolvedsolid" has been deleted. Now it is replaced with DRAW-command "evolved" with the option "-solid".

Testgrid "evolved" has been created.
2019-05-07 14:20:58 +03:00
kgv
1ac1059961 0030684: Coding Rules - eliminate GCC compiler warnings -Wformat-overflow and -Wcatch-value 2019-05-06 15:57:57 +03:00
kgv
b44bf0f8fe 0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation-persistent objects
SelectMgr_ViewerSelector::updatePoint3d() - added missing Abs() for computed tolerance
and added check to not attempt transforming undefined 3D point.
2019-05-06 15:57:57 +03:00
ifv
6f2411378b 0030433: Checkshape: bad solid, created by revolution, is reported as valid.
BRepPrimAPI_MakeRevol.cxx, hxx
Insert checking of self-intersecting of generated surfaces in MakeRevol

BRepTest_SweepCommands.cxx
Adjusting command revol to current behavior of MakeRevol algorithm.
2019-05-06 15:57:56 +03:00
kgv
7dd7c146e8 0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presentation
Removed redundant proxy class Prs3d_Presentation - Graphic3d_Structure now should be used directly.
Removed auxiliary class PrsMgr_ModedPresentation holding Structure and Display Mode index (field has been moved to Structure itself),
so that PrsMgr_Presentations (AIS_InteractiveObject::Presentations()) now holds Structures directly.
PrsMgr_Prs proxy class has been removed, and PrsMgr_Presentation now inherits Graphic3d_Structure.

Graphic3d_Structure, maps declarations have been corrected to use class instead of void*, which allowed to avoid redundant casts.
Several methods have been also modified to avoid creating Handle from this pointer.
AIS package headers have been cleaned up from forward declaration of Prs3d_Presentation class.

Fixed dereference of destroyed presentations within connected and HLR computed objects:
- AIS_InteractiveContext::Disconnect() now erases connected presentation.
- Graphic3d_CView::Clear() now removes destructed structures from Computed list.

- fix inaccessibility of PrsMgr_Presentation methods
2019-05-06 15:57:56 +03:00
kgv
faa0a91133 0030682: Configuration, qmake - all warnings are suppressed on macOS target
Fixed inconsistency of compiler flags with genproj.
warn_on+QMAKE_CXXFLAGS_WARN_ON is now used instead of warn_off+QMAKE_CXXFLAGS.
Added No_Exception to DEFINES.
2019-04-30 14:26:52 +03:00
kgv
42451ec057 0030681: Configuration - suppress OpenGL deprecation warning on macOS 10.14
Define GL_SILENCE_DEPRECATION to suppress warnings.
2019-04-30 14:26:51 +03:00
kgv
66278500db 0030672: Visualization - AIS_InteractiveContext::SetLocation() sets invalid selection BVH flag to removed object
SelectMgr_SelectionManager::Remove() now deactivates selection before removal.
2019-04-26 16:59:35 +03:00
kgv
245cbf9441 0030669: Visualization - AIS_Manipulator ignores parent transformation
AIS_Manipulator::Transform() now considers object parent transformation.

Added new command vchild for easier testing of low-level connections between presentations.
2019-04-25 16:41:17 +03:00
kgv
2b88626548 0030674: Visualization, AIS_InteractiveObject - fix accessibility of several properties
AIS_InteractiveObject/SelectMgr_SelectableObject/PrsMgr_PresentableObject
- added missing getters;
- removed redundant private sections;
- improved documentation;
- AIS_InteractiveObject::Compute() marked as pure interface;
- methods within this hierarchy have been moved to the base class, when reasonable.

Removed redundant typedefs to pointers (PrsMgr_PresentationPointer, PrsMgr_PresentableObjectPointer).
2019-04-25 16:41:16 +03:00
kgv
2506cf29b3 0030652: Configuration, genproj - reuse PRODUCTS_PATH within generated custom.bat
genconfdeps.tcl now puts %PRODUCTS_PATH%/$PRODUCTS_PATH into generated custom.bat/custom.sh scripts.
Added missing CSF_winmm definition to OccToolkit.pri
2019-04-25 16:35:55 +03:00
azv
6fd9bdf2cc 0030645: Modeling Algorithms - B-spline segmentation produces wrong parametrization
Method Segment() of B-spline curve and surface has been extended by parameter theTolerance (theUTolerance and theVTolerance for surface), which defines the proximity between knots of a NURBS and boundaries of cutting segment. The default value of the tolerance is Precision::PConfusion().
Test cases have been added to check segmenting of B-spline surface and curves both 2D and 3D.
2019-04-23 18:17:47 +03:00
ifv
d1775ee992 0030621: Implementation of building U-periodical surfaces.
draw_test_harness.md - description of new options in Draw commands

AppDef_BSplineCompute.hxx, BRepApprox_TheComputeLineOfApprox.hxx, GeomInt_TheComputeLineOfWLApprox.hxx, Approx_BSplComputeLine.gxx - implementation of method SetPeriodic(...) and implementation periodic boundary conditions for multiline in order to get periodic multicurve.

GeomAPI_PointsToBSplineSurface.hxx, GeomAPI_PointsToBSplineSurface.cxx - adding new parameter for methods Init(...) and Interpolate(...), implementation of building periodic tangents for first and last AppDef_MultiPointConstraint of multiline for U direction of surface.

GeometryTest_APICommands.cxx - implementation of new functionality in Draw command surfapp and surfint

GeomFill_NSections.cxx
Fixing problem with bugs modalg_3 bug606_2
2019-04-23 18:12:16 +03:00
tiv
293211aee0 0030592: Draw Harness, ViewerTest - provide vbackground command unifying vsetbg, vsetbgmode, vsetgradientbg, vsetgrbgmode, vsetcolorbg
A new command vbackground is created. Old background commands are made aliases for the newly created command (including vsetdefaultbg).
Tests are modified using newly added command vbackground.
2019-04-22 19:31:24 +03:00
vro
1bbd7c793c 0030663: Visualization - synthesize italic style for a font having no italic style
Font_FTFont now defines shear transformation to synthesize italic style for fonts having no such style.
Font_FontMgr::FindFont() and command "vfont -find" have been extended with -strict option
to check whether the given font is actually registered or not.
Font_FTFont::Init() - added constructor from memory buffer.
Second Font_FTFont::Init() override has been renamed to Font_FTFont::FindAndInit()
to avoid ambiguity between two similar methods taking full font path and font name as string.
2019-04-22 19:28:11 +03:00
ifv
ba7f665dce 0030435: Improving performance of Approx_ComputeCLine
1. Approx_ComputeCLine.gxx, Approx_FitAndDivide.hxx, Approx_FitAndDivide2d.hxx, BRepFill_ComputeCLine.hxx
It is base modification, which allows improve performance of approximation with help of Approx_ComputeCLine. The main idea of improvement is using degree selection by inverse order - from maxdegree to mindegree. If tolerance for maxdegree is not reached, there is no sense to make approximation for current number of knots with lower degree, it is necessary to cut parametric interval.

2. ProjLib_ComputeApprox, ProjLib_ComputeApproxOnPolarSurface, ProjLib_ComputeApproxOnPolarSurface, ProjLib_ProjectOnPlane
It is additional modification of methods using Approx_ComputeCLine.
Mainly, modifications concern to more optimal choosing parameters for approximation algorithm.

3. BRepCheck_Face
Small improvement of method Intersect(...), which intersects two wires on face.

4. BRepTopAdaptor_FClass2d
Impovement of treatment infinitely narrow faces.

5. ChFi3d/ChFi3d_Builder_6.cxx
Small improvement, which forbids extension of singular boundary of surface.
It was TODO problem in tests/bugs/modalg_7/bug27711_3

6. IntTools_EdgeEdge.cxx
Improvement of performance for cases of searching common parts between line  and analytical curve

7. GeomliteTest_CurveCommands.cxx
Adding Draw command fitcurve. This command is analog of approxcurve, but uses Approx_FitAndDivide algorithm.
Mainly to have direct draw command for testing Approx_ComputeCLine.

8. Extrema_ExtElC.cxx

Treatment of case "infinite solutions" for extrema line-ellipse

9. Modification of some tests according to new behavior of algorithm.

10. tests/perf/moddata/bug30435
Test for new improved algorithm.

11. Implementation QAcommand OCC30435 in QABugs_20.cxx used in test bug30435
2019-04-22 14:03:45 +03:00
kgv
130bc3c097 0030657: Visualization - misprint in Graphic3d_ZLayerSettings::SetOrigin()
Add missing initialization of Geom_Transformation object.
2019-04-19 14:36:23 +03:00
kgv
1ec17fb48a 0030644: Coding - inline trivial methods of V3d_View class 2019-04-18 18:23:54 +03:00
tiv
2b2be3fb82 0030550: Coding - Integer overflow in Standard_CString HashCodes
0030551: Foundation Classes - Integer overflow in NCollection_CellFilter HashCode

Signed integers are not used in hash code functions now to prevent undefined behavior on left shift operations with signed integers.
A possibility of negative values of hash codes is eliminated.
INT_MAX → IntegerLast() in hash code functions.
All found hash code functions behaves uniformly now: they return a value in the range [1, theUpperBound]. Relevant comments are added to such functions.
2019-04-16 20:38:23 +03:00
ifv
833034f301 0030647: Geom2dGcc_Circ2d2TanRad not giving all the solutions
Method for calculation of correct number of sampling points is added for
Adaptor2d_OffsetCurve.
Now number of sampling points correspond with similar method for
Geom2dAdaptor_Curve for curve type GeomAbs_OffsetCurve
Test case added
2019-04-16 14:07:45 +03:00
tiv
f9b30c0db3 0030623: Draw Harness - support hex color codes within ViewerTest::ParseColor()
ViewerTest::ParseColor() function is improved to be able to parse the following set of input arguments:
  - "Red Green Blue [Alpha]", where Red, Green, Blue, Alpha must be integers within the range [0, 255] or reals within the range [0.0, 1.0]. Note that "0 0 1" triple is parsed as "0.0 0.0 1.0" and will be interpreted as a blue color.
  - "ColorName [Alpha]", where ColorName is one of WHITE, BLACK, RED, GREEN, BLUE, etc. (look at Quantity_NameOfColor enumeration for all possible variants). Alpha may be integer or real, as described at the previous list item.
  - #HHH, [#]HHH[H], [#]HHHHHH[HH], where H is a hexadecimal digit (0 .. 9, a .. f, or A .. F). There are a short hexadecimal RGB, RGBA formats, and a usual RGB[A], respectively.
2019-04-12 18:48:18 +03:00
jgv
a5278fc126 0030597: BRepOffsetAPI_MakePipeShell raises Standard_RangeError
Constructor of GeomFill_SectionPlacement has been corrected: add correction of boundaries of curve to avoid mistake of LocateU in the case when the curve is BSpline.
2019-04-12 11:34:54 +03:00
kgv
74413ca7d3 0030643: Visualization, Ray-Tracing - shader compilation errors are not properly logged
OpenGl_View::initShader() now uses OpenGl_ShaderObject::LoadAndCompile().
2019-04-10 15:33:55 +03:00
kgv
98e6c6d17b 0030612: Visualization - provide texture map with video as image source
Introduced package Media wrapping FFmpeg structures.
Media_PlayerContext class manages video decoding into Media_IFrameQueue interface.
Graphic3d_MediaTextureSet implements Media_IFrameQueue interface and can be used as texture source.
AIS_MediaPlayer implements simple AIS object displaying video.
2019-04-09 14:18:35 +03:00
kgv
9491df8c1b 0030638: Visualization, TKOpenGl - load OpenGL 4.5 functions within OpenGl_Context 2019-04-09 14:17:47 +03:00
kgv
d325cb7f57 0030635: Visualization - move OpenGl_Layer to Graphic3d_Layer
Renamed classes (moved from TKOpenGl to TKV3d):
- OpenGl_Layer -> Graphic3d_Layer;
- OpenGl_BVHClipPrimitiveSet -> Graphic3d_BvhCStructureSet;
- OpenGl_BVHClipPrimitiveTrsfPersSet -> Graphic3d_BvhCStructureSetTrsfPers;
- OpenGl_BVHTreeSelector -> Graphic3d_CullingTool.

Method OpenGl_Layer::Render() has been moved to OpenGl_LayerList::renderLayer().

Standard Z-layers list definition has been moved
from OpenGl_GraphicDriver to base class Graphic3d_GraphicDriver.
2019-04-09 14:16:33 +03:00
kgv
24ee60ffd7 0030636: Configuration, qmake - unable to build using VS2017 2019-04-09 12:33:43 +03:00
emv
cea8d5c1ab 0030629: Modeling Algorithms - Invalid result of fuse operation
Plane/Torus intersection: take into account the Plane-Torus distance sign to compute the correct location of the section curve.

Test case for the issue.
2019-04-08 16:03:41 +03:00
kgv
fc867b96a5 0030618: Modeling Algorithms, BOPTools_Parallel - avoid using map for thread-local contexts without TBB
OSD_Parallel::ToUseOcctThreads() - new flag allowing to use OCCT threads implementation even when compiled with TBB (for testing).
Added new command dparallel for managing default Thread Pool.
OSD_Parallel::For() now avoid creation of universal iterator in simplest case.

BOPTools_Parallel - eliminated redundant typedefs/explicit instantiations of templates.
Added functor using array of per-thread context instead of a map.
2019-04-08 15:59:23 +03:00
kgv
aafe169f89 0030339: Configuration - add project files for qmake
Added adm/qmake/Occt.pro for building OCCT using Qt Creator.
genproj/genconf scripts have been extended with an option defining project format.

Draw_Appli now tries resolving CASROOT/DRAWDEFAULT/CSF_OCCTResourcePath/CSF_OCCTSamplesPath
locations within usual OCCT development/installation environment.
Added missing TKShHealing dependency to TKDraw/DRAWEXE (inherited from TKMesh).
OSD_Process::ExecutableFolder() - added method returning executable folder.
2019-04-07 13:21:59 +03:00
iko
84b904bc36 0030626: Visualization - manipulator crashes when is attached with scaling mode disabled
AIS_Manipulator crashes on SetPart method when 2 inputs (AIS_ManipulatorMode, Standard_Boolean) has been fixed up.
Test case for this bug has been added.
2019-04-03 19:05:38 +03:00
gka
33defc7121 0030616: Crash on reading STEP file
Added protections to avoid exceptions for null objects.
For reading entity StepShape_ToleranceValue was added reading lower and upper bounds represented by entities "StepRepr_ReprItemAndMeasureWithUnit" or "StepRepr_MeasureRepresentationItem"
2019-04-02 21:24:57 +03:00
kgv
2a0522b1c6 0030622: Visualization, TKOpenGl - Path Tracing fails on macOS
Fixed usage of non-existing function texture2D().
2019-04-01 18:31:16 +03:00
kgv
8693dfd0e8 0030619: Draw Harness, ViewerTest - add continuous rendering option to vrepaint command
Aspect_Window::InvalidateContent() - added new virtual method for invalidating window content using platform-specific API.

TKDraw, tkLoop() on Window platform has been changed so that to prevent
continuous input window events blocking terminal input
(e.g. in case if processing events is not fast enough or
if another continuously sends new events).

TKViewerTest, on X11 platform has been fixed a message processing
so that to avoid messages being not processed.
Added aggregation of Exposer and ConfigureNotify events.
Fixed aggregation MotionNotify events.
2019-04-01 18:29:16 +03:00
kgv
a738b534ca 0030611: Coding Rules - eliminate GCC compiler warnings -Wcatch-value
Add missing const& to catch statements.
2019-03-31 23:39:50 +03:00
kgv
f996b507d8 0030579: Draw Harness, Draw_Interpretor - catch exceptions other than Standard_Failure 2019-03-25 18:24:18 +03:00
kgv
d9166000fe 0030574: Configuration, genproj - CSF_DEFINES is not reset at the beginning of env.bat
env.bat now resets %CSF_DEFINES% variable to empty state
and append optional %CSF_DEFINES_EXTRA% external value.
2019-03-25 18:20:51 +03:00
kgv
3697d4fa2f 0030556: Coding - IGESData_GlobalSection missing member initialization in default constructor
IGESData_GlobalSection now initializes class fields.
2019-03-25 18:19:12 +03:00
iko
4bcd07385e 0030505: Volume Rendering - Deferred lighting
Missing getter for OpenGl_Texture::mySizedFormat has been added.
2019-03-25 18:16:41 +03:00
emv
d84b49c743 0030522: Modeling Algorithms - BRepBuilderAPI_MakeWire produces different wires depending on the order of parameters
The following improvements have been implemented in BRepLib_MakeWire class to make it more reliable:
1. Quit adding edges of a wire into result if the current edges have not been added. Return NotDone status.
2. Allow merging not only bounding vertices (connected to only one edge) but also the middle ones, so the multi-connected vertices may appear in the result.

Test case for the issue.
2019-03-22 17:21:01 +03:00
kgv
aff73fd598 0030582: Coding - avoid defining references to properties of NULL objects
Approx_SweepApproximation::Perform() now creates empty arrays.
GeomAdaptor_SurfaceOfRevolution::UTrim() - fixed No_Exception misuse.
StdPrs_ShadedShape - fixed defining an invalid reference to Poly_Triangulation::UVNodes().

BSplCLib::MovePoint() and BSplCLib::MovePointAndTangent() now take optional
weights parameter as pointer consistent to other methods like BSplCLib::BuildEval().
2019-03-22 17:21:01 +03:00
ifv
afb3647b34 0030489: Modeling Algorithms - BRepBuilderAPI_GTransform hangs
Approx_ComputeCLine.gxx - criterium to stop interval cutting is increased.
ProjLib_ProjectedCurve.cxx - fix regression for bugs modalg_5 bug25886
Other tests are modified according to current state of algorithm
2019-03-22 17:21:00 +03:00
kgv
2328cae25d 0030593: Modeling Algorithms - ShapeUpgrade_ShapeDivide::Perform() throws Standard_NoMoreObject
Added missing TopExp_Explorer::More() checks to ShapeUpgrade_ShapeDivide::Perform() and BRepCheck_Analyzer::Perform().
2019-03-21 13:16:11 +03:00
kgv
85831628d6 0027316: Draw Harness - access violation on passing non-existing shape to XAddShape
Add NULL check to XAddShape command.
Removed broken test case bugs/step/bug27316.
2019-03-21 13:15:15 +03:00
kgv
667b5eb81b 0030583: Draw Harness - ignore cpulimit when Debugger is attached on Windows platform
cpulimit now omits ExitProcess() when IsDebuggerPresent() returns TRUE.
2019-03-20 19:00:48 +03:00
kgv
de07af824b 0030594: Data Exchange - access violation within IGESGeom_BSplineCurve constructor
Added NULL check.
2019-03-20 18:11:41 +03:00
kgv
cb6cad7df1 0023838: Modeling Data - Standard_OutOfRange in Geom_OffsetSurface::LocalDN (called by BRepFill_PipeShell)
Fixed incorrect array allocation within GeomEvaluator_OffsetSurface::CalculateDN()
and protection against assigning out-of-range values in case of non-square
number of U and V derivatives on surface.
2019-03-20 11:25:06 +03:00
kgv
ad67e36766 0030588: Coding - avoid calling operator->() on NULL Handle
Use .get() method instead of operator->() where result can be NULL.
STEPCAFControl_Reader::ReadLayers(), XCAFDoc_ColorTool,
XCAFDoc_LayerTool::SetVisibility() - fixed static functions syntax.
2019-03-20 11:23:45 +03:00
kgv
18434846a3 0030558: Coding - replace math_SingleTab with NCollection_LocalArray
math_Vector::Multiplied() - fixed modification of original array.

math_SVD::Solve(), math_SVD::PseudoInverse(), GeomFill_LocationGuide::InitX() - removed incorrect constness.

math_Vector, math_IntegerVector - math_SingleTab has been replaced by NCollection_LocalArray+NCollection_Array1.
Added accessors returning const value.
2019-03-20 11:23:08 +03:00
vro
43c8661e5e 0030536: Foundation Classes - TCollection_ExtendedString::StartsWith() and EndsWith() have a mistake
Draw-commands StartsWith and EndsWith are renamed to QAStartsWith and QAEndsWith.
The test script bug30536 was corrected.
2019-03-18 19:46:00 +03:00
abv
404504b234 0030544: Data Exchange - IGES import fails on specific file
Method IGESToBRep_BRepEntity::TransferEdge() is fixed to record result even if it is wire rather than edge.
This allows translation of EdgeLoop entities referring to CompositeCurve items in EdgeList entities.
Curves that fail to translate are recorded in result as Null shapes (rather than skipping them) to keep indexation of curves in EdgeList valid for remaining ones.

Method IGESToBRep_BRepEntity::TransferLoop() is improved to skip failed edges thus avoiding exception and allowing translation to complete for transferable entities.

Warning messages are corrected to be more meaningful.
Added test bugs iges bug30544
2019-03-18 19:45:07 +03:00
kgv
d65f9183fd 0030569: Foundation Classes - NCollection_Shared lacks inclusion of NCollection_DefineAlloc.hxx
Add missing includes.
2019-03-18 19:43:55 +03:00
kgv
6b121e2b48 0030584: Modeling Algorithms, BRepFill_OffsetWire - access violation on Face having no boundaries
Added missing NULL and empty result checks.
Updated test cases using offset_wire_092.brep shape containing all Edges
with TopAbs_INTERNAL orientation (hense no boundary to make offset).
2019-03-18 19:42:47 +03:00
kgv
437ef7713e 0030581: Modeling Data - Standard_OutOfRange within Geom_BSplineSurface::LocateV()
Geom2d_BSplineCurve::LocateU(),Geom_BSplineCurve::LocateU, Law_BSpline::LocateU()
Geom_BSplineSurface::LocateU() and Geom_BSplineSurface::LocateV()
have been corrected with missing range checks.
BSplCLib::Hunt() documentation has been corrected to reflect its actual implementation.
2019-03-18 19:41:40 +03:00
kgv
737e9a8da4 0030571: Visualization, TKOpenGl - mapped texture is ignored while drawing points
OpenGl_AspectsTextureSet now appends Sprite texture to the end of texture set.
OpenGl_Context::init() - fixed usage of GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS on too old GL context.

Default sampler names occSampler0, occActiveSampler and occSamplerBaseColor
are now excluded from header with common declarations for build-in GLSL programs.

OpenGl_ShaderObject::LoadAndCompile() and OpenGl_ShaderProgram::Link()
now includes program Id within error log.

OpenGl_ShaderManager now supports mapping texture onto point primitive within built-in programs
(texture transformation is ignored).
2019-03-16 16:48:21 +03:00
oan
ad4b04291f 0030511: Mesh - too long meshing of assembly containing single solid (shared)
Added test case.
2019-03-16 16:46:53 +03:00
oan
e9fb0cba58 0030573: OSD_Parallel_TBB: limit number of execution threads using settings of OSD_ThreadPool::DefaultPool()
Add tbb::task_scheduler_init to OSD_Parallel::forEach().
2019-03-16 16:46:53 +03:00
kgv
f2b42160f4 0030575: Tests - v3d/materials unstable image screenshots of alpha-blending on GeForce with MSAA
testdiff now looks for "IMAGE_COLOR_TOLERANCE: Tol" statements in log
to execute diffimage with -toleranceOfColor Tol parameter.

Image difference is first performed with 0 tolerance and then optionally with non-zero tolerance,
so that the log always includes information that some images are different,
but with two different messages:
- "IMAGE differs" for images failed comparison;
- "IMAGE is similar" for images passed comparison only with non-zero tolerance.

v3d/materials - disabled MSAA and removed duplicate.
demo/samples/materials - compare screenshots with 0.8% color tolerance (2/255).
2019-03-16 16:46:52 +03:00
kgv
6072d5975a 0030580: Configuration, CMake - introduce BUILD_RELEASE_DISABLE_EXCEPTIONS option managing No_Exception macros 2019-03-16 16:46:51 +03:00
jgv
85c103d277 0030560: Modeling Algorithms - Improvement of the method BRepTools::DetectClosedness
1. Rewrite the method BRepTools::DetectClosedness.
2. Correct the method BRepOffset_Tool::EnLargeFace to process properly non-periodic but closed faces.
2019-03-16 16:46:50 +03:00
kgv
31fe1f8ec4 0030570: Visualization, TKOpenGl - OpenGl_AspectFace ignores texture revision on recompute
Added revision check to one more branch within OpenGl_AspectsTextureSet::build().
2019-03-15 19:11:45 +03:00
kgv
5716d13b43 0030564: Coding - math_Gauss uninitialized 'Singular' member variable
Removed unused class field Singular.
2019-03-13 16:39:43 +03:00
kgv
a7fd4b1bb0 0030562: Coding - TopOpeBRepBuild_Builder use of null pointer
TopOpeBRepBuild_Builder::Clear() - added NULL check.
2019-03-13 16:39:41 +03:00
mnv
226fce20f0 0030124: Visualization, AIS_InteractiveObject - clean up confusing Presentation invalidation logic
Removed excess mechanism for invalidating presentations AIS_InteractiveObject::myRecomputeEveryPrs.
PrsMgr_PresentableObject::Update() has been deprecated and replaced by PrsMgr_PresentableObject::UpdatePresentations()
recomputing only explicitly invalidated presentations.
2019-03-13 16:39:40 +03:00
kgv
ac8f17746b 0030554: Coding - ChFiDS_CommonPoint uninitialized member traarc
Added missing initialization to ChFiDS_CommonPoint constructor.
2019-03-13 11:00:23 +03:00
kgv
a98b97f5da 0030553: Coding - TopOpeBRepDS_Surface missing default initalizations
All class fields are now initialized within every TopOpeBRepDS_Surface constructor.
2019-03-13 11:00:22 +03:00
kgv
c3c2b331cd 0030545: Documentation - methods marked with Standard_DEPRECATED has ill-formed Doxygen output
Doxygen option PREDEFINED has been extended by Standard_DEPRECATED declaration.
2019-03-13 11:00:22 +03:00
kgv
af2fa459f1 0030547: Foundation Classes - NCollection_DoubleMap lacks Seek() method
Added Seek1() and Seek2() methods to NCollection_DoubleMap class.
2019-03-13 11:00:21 +03:00
oan
060fc60338 0030149: BRepMesh_Delaun: free triangle is left in the mesh after cleanup of auxiliary items
Remove free triangles connected to triangles over nodes of super triangle.
Modification of improved test case.
2019-03-07 18:11:43 +03:00
kgv
bf5f0ca20a 0029570: Visualization, Graphic3d_Aspect - merge Graphic3d_Group aspects
Graphic3d_AspectFillArea3d, Graphic3d_AspectLine3d, Graphic3d_AspectMarker3d
and Graphic3d_AspectText3d have been merged into new class Graphic3d_Aspects.
The old classes are preserved as dummy sub-classes of Graphic3d_Aspects
preserving different per-aspect defaults.

Methods IsGroupPrimitivesAspectSet(), GroupPrimitivesAspect(), FillAreaAspect(),
LineAspect() and MarkerAspect() have been removed from Graphic3d_Group.
Instead, a new method Graphic3d_Group::ReplaceAspects() has been introduced
for replacing existing group aspects.

AIS_Shape now uses new method AIS_InteractiveObject::replaceAspects()
for updating computed groups with new aspects without presentation recomputation
in places where SynchronizeAspects() is not applicable.

OpenGl_AspectFace, OpenGl_AspectLine, OpenGl_AspectMarker
and OpenGl_AspectText have been merged into new class OpenGl_Aspects.

ViewerTest::parseColor() - fix uninitialized alpha component.
Graphic3d_AspectText3d/Prs3d_TextAspect - removed unused properties Space, ExpansionFactor, Angle.
Remove getters Values() deprecated since OCCT 7.1.0.
2019-03-07 18:08:36 +03:00
emv
e08a9b0302 0030470: Modeling Algorithms - Invalid result of offset operation in mode "Complete" with join type "Intersection"
The fix is intended to obtain the correct result of offset operation in which the result contained only the small inverse part of the shape, which clearly should not have been included in the result at all.

The fix adds treatment of the inverted edges while removing the inside faces (collapsed ones) - RemoveInsideFaces method:
- Removing the invalid hanging blocks containing the inverted edges.
- Considering the face containing the inverted edges as the invalid one.

Test cases for the issue.
2019-03-07 18:07:29 +03:00
Benjamin Bihler
55c8f0f7a4 0030523: Visualization - Highlighting does not work anymore
Added hints about ZLayer consideration and changing highlight colors to documentation
of AIS_InteractiveContext::SetHighlightStyle() method.

AIS_InteractiveContext::MoveTo() now checks if highlighting style does not use immediate layer
and performs full Redraw() instead of RedrawImmediate().

Improved parsing of ZLayer names within vdisplay, vzlayer and vselprops commands.
vreadpixel now reports syntax errors on wrong input.
2019-03-07 18:06:49 +03:00
vro
799318357c 0030535: Draw Harness - add size argument to vgrid command
vgrid command has been revised and extended with new argument -size.
2019-03-07 18:06:48 +03:00
anv
f522ce50b2 0030532: Visualization - Manipulator for dragging within a plane
Added dragging sectors to Manipulator presentation.
Test added.
2019-03-07 18:06:47 +03:00
emv
5d0038626b 0030490: Modeling Algorithms - Incomplete result of Cut operation
The problem is fixed by the fix for the issue #0027448, thus integrating the test case only.
2019-03-06 20:20:10 +03:00
kgv
88b12b7c05 0030182: Visualization, Image_AlienPixMap - support reading encoded image from memory buffer
Added two new Image_AlienPixMap::Load() methods, taking std::istream
and memory buffer (pointer, length) arguments.
This allows reading image from application memory or from file with non-zero offset.

Added Image_AlienPixMap::IsTopDownDefault() static property allowing to query rows order used by linked image library,
so that application might generate UV texture coordinates accordingly.

Added missing Release() to IWICImagingFactory instance.
2019-03-03 20:59:18 +03:00
ika
7b93ae3c5e 0030533: Data Exchange - Crash during STEP import.
Add Null checks to avoid crash during reading faces without bounds.
2019-03-03 20:58:37 +03:00
asl
6ef0d6f156 0024437: Visualization - silhouette edges based on OpenGL
Added new flag Graphic3d_AspectFillArea3d::ToDrawSilhouette() activating silhouette (outline) rendering.

The new feature can simulate fake HLR look-n-feel,
when combined with Aspect_IS_HIDDENLINE interior style (filling object with background color),
face boundary edges (with most continuity flag set to c2 or lower).

Silhouette GLSL program is very simple - it displaces model alongside vertex normal,
so that it is applicable only to smooth surfaces and closed volumes,
and produces visual artifacts at sharp corners, especially when face boundary is disabled.

OpenGl_SetOfShaderPrograms has been modified so that to reduce
dimensions of the grid of static size based on amount of program combinations.

OpenGl_PrimitiveArray no more allocates VBO resources if primitive array
is marked to be not drawn via interior style / line type / marker type.
2019-02-28 20:25:51 +03:00
nds
967d2f4f30 0030497: [REGRESSION] Mesh - wrong Poly_Polygon3D within local selection of located shape
The previous code has a condition to avoid processing the same faces if the face has a location.
The similar condition should be applied during the edges processing.
If not doing this, in the previous implementation, IMeshData_Edge instances are created for all edges(even located), but edges of faces located are not filled with curves.
As a result we had wrong local selection of edges.

Limit addition of edges to data model by ones with unique TShape and location using edges map already available in BRepMesh_ShapeVisitor.
2019-02-28 20:24:43 +03:00
pdn
4ec8ee66a0 0030356: Data Exchange - IGES model after importing into document has location issues 2019-02-28 20:23:35 +03:00
asl
0493ffd083 0029787: Visualization - Avoid in presentation edges of certain continuity class
A new flag Prs3d_Drawer::FaceBoundaryUpperContinuity() has been introduced
handled by StdPrs_ShadedShape::FillFaceBoundaries() method to exclude edges
of higher continuity class (e.g. to skip seam edges).

Draw Harness command vshowfaceboundary has been replaced by vaspects:
> vaspects -setFaceBoundaryDraw 1 -setFaceBoundaryColor RED -setFaceBoundaryType DASH.
2019-02-28 20:20:45 +03:00
Benjamin Bihler
0be7dbe183 0030448: Coding - add typo detection to derivation creation methods using Standard_NODISCARD attribute
Added macro Standard_NODISCARD equivalent to C++17 attribute [[nodiscard]] for compilers that support this.
Using Standard_NODISCARD macro for methods that create new object in gp, math, Geom, Bnd packages.
Marked equivalent operators with Standard_NODISCARD, if they are defined close to relevant methods.

Corrected code where warnings on unused result of calls to methods creating new objects are generated.
In most cases it looks like spelling errors (e.g. Normalised() instead of Normalise())
2019-02-27 19:59:07 +03:00
kgv
1c8fc6bee2 0030493: Draw, ViewerTest - minor improvement of vdisplay command
vdisplay no longer opens BREP file in case if Draw variable is not found.

Draw::Get() unused Complain argument has been removed from method definition.
Added Draw::GetExisting() and DBRep::GetExisting() commands never performing picking.
2019-02-27 19:55:32 +03:00
asl
d95f5ce102 0029810: Visualization - Tool for debugging shaders
A new tool for debugging shaders has been introduced.
The new method OpenGl_ShaderProgram::UpdateDebugDump() allows dynamically
dumping/restoring certain shader program (vertex and fragment shaders) to/from external file.

The file name is generated from the program's name with suffix ".vs" or ".fs" for shader type.
The environment variable CSF_ShadersDirectoryDump specifies the folder for dumps.

If the file does not exist (first frame), then it is automatically saved.
When the file date/time is changed in comparison with recent cached date,
then the file will be automatically loaded from external file,
thus this file can be modified in any editor.

OpenGl_ShaderManager now generates a human-readable resource ids for standard GLSL programs.

Draw Harness command vshader has been extended with arguments -list,-dump and -reload
for debugging shaders within OpenGl_Context.
2019-02-27 19:54:26 +03:00
kgv
1e756cb979 0030520: VIS - IVtkTools_ShapePicker::GetPickPosition() returns incorrect point
vmoveto and ivtkmoveto commands now print topmost picked 3D point.
2019-02-27 19:51:02 +03:00
abv
3bb61eb0fe 0029996: Porting to VC 2017: memory leak reported in visualisation
Tests for memory leaks on display / erase cycles are performed with VBO disabled to avoid false memory leaks reported on NVidia graphics
2019-02-26 15:23:18 +03:00
mnv
2a33274558 0029076: Visualization - implement element shrinking Shader
Aspect_IS_HOLLOW now an alias to Aspect_IS_EMPTY and Aspect_IS_HIDDENLINE does not implicitly enables mesh edges,
so that Graphic3d_AspectFillArea3d::SetDrawEdges() should be set independently.

OpenGl_ShaderManager now provides built-in GLSL programs for drawing mesh edges
in single pass (and on OpenGL ES which does not provide glPolygonMode()).

Graphic3d_RenderingParams::ToEnableAlphaToCoverage is now enabled by default
and properly handled at TKOpenGl level - enables coverage for Graphic3d_AlphaMode_Mask primitives.

OpenGl_PrimitiveArray now uses GLSL programs instead of glPolygonMode() by default,
which can be managed by OpenGl_Caps::usePolygonMode flag (desktop OpenGL only).
glPolygonMode() is also used as fallback regardless OpenGl_Caps::usePolygonMode flag
when GLSL programs are not supported (Geometry Shaders are required)
or stipple line style is required (not implemented within Face GLSL).

vaspects command has been extended by -setInterior -setDrawEdges -setEdgeColor -setEdgeType -setEdgeWidth
arguments replacing vsetinteriorstyle/vsetedgetype/vunsetedgetype commands.
vaspects now accepts arguments without "set" prefix.
ViewerTest::ParseColor() now parses RGBA color.

Redundant command BUC60738 has been removed.
AIS_ColorScale - fixed usage of uninitialized FillArea aspects.
2019-02-22 16:23:35 +03:00
jfa
4efe27fc4e 0030510: Application Framework - add missing NULL check within TDataStd_RealArray::ChangeArray() 2019-02-21 18:47:04 +03:00
kgv
ea298f59e4 0030384: Visualization - Won't display line with dot and dash style on Android
Fix misprint leading to double semicolon in GLSL code.
2019-02-21 18:44:37 +03:00
apn
78d5ea7a71 0030498: Warnings of building documentation
Fix warning 'Reached end of file while still insided a (nested) comment in Markdown' for old versions of doxygen
2019-02-18 14:59:32 +03:00
kgv
e084dbbc20 0030476: Visualization, Path Tracing - Adaptive Screen Sampling leads to unstable results
OpenGl_View::runPathtrace() has been extended with alternative multi-pass
Adaptive Screen Sampling mode, not relying on atomic floating point operations.
Although atomic operations on floats allows single-pass rendering,
such operations leads to instability in case of different calculation order.
Atomic float operations are also currently supported only by single GPU vendor.

Fixed GLSL compilation on Intel drivers (follow ARB_shader_image_load_store
specs rather than EXT_shader_image_load_store).

Graphic3d_RenderingParams::AdaptiveScreenSamplingAtomic option has been added
to activate 1-pass Adaptive Screen Sampling mode when supported by hardware.

vfps command has been extended with -duration argument allowing to limit command execution time.
vactivate command has been extended with -noUpdate argument.
2019-02-15 17:16:12 +03:00
kgv
66d1cdc65d 0030483: Visualization, Path Tracing - make Tile Size configurable
OpenGl_TileSampler has been refactored to better describe its logic:
- Offset image now defines tile index instead of offset to tile origin.
- Added 2D array defining the number of times to sample tile for straight-forward debugging.

Graphic3d_RenderingParams has been extended with property
RayTracingTileSize for testing various tile configurations.
Default behavior is the following:
- Target number of tiles (e.g. upper limit per frame): 256
- Tile size: 32x32.

OpenGl_View::runPathtrace() has been split into two methods per rendering stage.
OpenGl_Texture::Init() now returns FALSE immediately on 0 input dimensions.

Added Image_PixMapTypedData template class allowing to work with image data of known pixel format.
2019-02-15 17:14:19 +03:00
kgv
e607bd3e6b 0028488: VIS - fix compilation with VTK 8.2
Occurrences of removed method vtkDataArray::InsertNextTupleValue() have been replaced by InsertNextTypedTuple().
Fixed misprint in vtkTypeMacro usage for class IVtkTools_ShapeObject.
Patch #0030452 (SelectMgr_ViewerSelector::Deactivate() raises exception when called twice) has been propagated to IVtkOCC_ViewerSelector.
2019-02-15 15:52:14 +03:00
kgv
1ccc1371b9 0030486: Visualization - Rubber-band selection does not work with disabled overlap detection
SelectMgr_RectangularFrustum::Overlaps() now treats degenerated polygon as point instead of returning FALSE.
2019-02-13 17:07:17 +03:00
kgv
5ac0f98974 0030477: Visualization - crash in AIS_Manipulator::ObjectTransformation after using V3d_View::SetProj(V3d_Zpos) 2019-02-13 17:06:30 +03:00
kgv
2bda8346dc 0030488: Visualization, Ray Tracing - empty error message on GLSL program compilation
OpenGl_ShaderObject::LoadAndCompile() - added method combining Load() and Compile() with optional error logging.
OpenGl_ShaderProgram::Link() now logs failures by default.
2019-02-13 17:03:47 +03:00
kgv
92435cd0ff 0030478: Foundation Classes, NCollection_Array2 - provide Resize/Move methods consistent to NCollection_Array1 2019-02-12 18:54:34 +03:00
kgv
597fde688e 0030494: Coding Rules - eliminate declaration of OpenGl_Workspace::IsCullingEnabled() 2019-02-12 18:46:37 +03:00
abv
458ff6a680 0030129: With newest doxygen 1.8.14 generation of overview gives warnings
Doxygen configuration scripts are corrected to avoid '\n' symbols in the end of the @figure alias that caused multiple warning messages.
Other Doxygen warnings in Markdown files are eliminated.
In CMake builds the format of Doxygen warnings is set to use the style recognized by Visual Studio when compiler is MSVC.
2019-02-12 18:45:40 +03:00
nds
a7ced2a456 0030480: Visualization - Clear of Select3D_SensitiveGroup does not update internal container 2019-02-07 11:04:59 +03:00
bugmaster
ab9f6cabdc 0028936: Draw freezes while making a 3d representation
Adding testing case
2019-02-06 16:18:00 +03:00
kgv
95c882e9d4 0030329: Move BRepMesh_IncAllocator to NCollection package
NCollection_IncAllocator has been extended with optional mutex allocation (disabled by default).
2019-02-04 17:48:14 +03:00
kgv
976627e601 0030474: Visualization - fallback font is ignored for missing font alias within Font_FontMgr::FindFont() 2019-02-04 16:39:53 +03:00
kgv
d918208af6 0030469: Visualization - Draw crashes when 3D view is minimized
OpenGl_View::Redraw() - avoid rendering into window of zero size (leading to FPE and other issues).
2019-02-04 16:26:23 +03:00
kgv
98ae54f728 0030366: Coding Rules - GeometryTest_API2dCommands.cxx seems to be excess 2019-02-04 15:06:57 +03:00
kgv
c1197a1575 0030464: Visualization - unable to set sub-shape transparency using vaspects command
Added AIS_ColoredShape::SetCustomTransparency() for simple way for assigning sub-shape transparency.
2019-02-01 13:26:24 +03:00
kgv
82d23ad590 0030452: Visualization - SelectMgr_ViewerSelector::Deactivate() raises exception when called twice
Removed unused SelectMgr_SOS_Sleeping enumeration value.
SelectMgr_ViewerSelector::Deactivate() now checks activation status before updating tolerance map.
2019-01-31 20:53:34 +03:00
kgv
c29c0ad0a2 0030450: Visualization - AIS_InteractiveContext::MoveTo() never uses V3d_View::ImmediateRedraw()
AIS_InteractiveContext::MoveTo() now calls V3d_View::ImmediateRedraw() when applicable.
AIS_Trihedron::HilightOwnerWithColor() - added missing ZLayer setup.
2019-01-31 16:01:59 +03:00
gka
cf152970e2 0030405: Presentations of PMI are incorrectly scaled after change of units
Corrected search of the entity StepShape_ShapeDimensionRepresentation defining used units in the method readConnectionPoints
2019-01-24 14:24:40 +03:00
vro
a0d0f96afe 0030451: Selection mode of TPrsStd_AISPresentation attribute is restricted to one value
Two classes TDataXtd_Presentation and TPrsStd_AISPresentation were improved so that they accept a list of selection modes.
A new non-regression test is added: caf presentation N1
2019-01-23 15:33:06 +03:00
mahaidong
9c0787df75 0030429: Samples - add simple glfw 3D Viewer sample
Aspect_DisplayConnection now provides constructor wrapping existing X Display connection.
2019-01-22 15:58:32 +03:00
kgv
5b377041e3 0030439: Visualization - extend fonts search within Font_FontMgr::FindFont() on Linux
Font_FontMgr has been redesigned to:
- Store fonts in a map instead a list.
- Allow mapping multiple fonts to a single alias.
- Log informative message about usage of non-requested font (fallback).
- Register all font files within standard folders on Linux when "fonts.dir" is not found.
- Prefer specific alias ("serif") as default fallback font instead of arbitrary one in a system.

A couple of obsolete and broken font aliases have been removed;
instead, new aliases of fonts popular on Linux platform have been added.

Font_NameOfFont.hxx has been extended with more neutral aliases
"monospace", "serif", "sans-serif", "cjk" and "korean".

Font_FontAspect enumeration values have been renamed Font_FA_ -> Font_FontAspect_
with old values preserved as alias.

Font_SystemFont has been extended with a list of paths to Font_FontAspect styles,
so that entire Font Family is now defined within a single Font_SystemFont instance.
Non-resizable fonts are now ignored by Font Manager.
2019-01-21 16:15:33 +03:00
kgv
169c944c4b 0029670: Draw Harness - vtrihedron xaxis zaxis is wrong
Fixed gp_Ax2 initialization by two vectors.
Fixed -labels arguments number check.
2019-01-15 15:04:41 +03:00
osa
79b544e652 0030437: Visualization, TKV3d - add Draw command to print rendering statistics
Add new command "vstatprofiler" to manage rendering parameters and print them.
If there are some input parameters - print corresponding statistic counters values,
else - print all performance counters set previously.
2019-01-11 18:57:53 +03:00
osa
0e3025bc14 0030434: Visualization, TKV3d - add "NoUpdate" state of frustum culling optimization
Frustum culling is now managed by Graphic3d_RenderingParams::FrustumCullingState flag
and can be switched into Graphic3d_RenderingParams::FrustumCulling_NoUpdate state
useful for debugging the algorithm.

Draw Harness command vrustumculling has been replaced by vrenderparams -frustumCulling.
2019-01-11 18:57:52 +03:00
osa
30a1b24e19 0030412: Visualization, TKV3d - add presentation of camera frustum
1) Added method Graphic3d_Camera::FrustumPoints() returning corner points of camera frustum.
2) Refactored methods OpenGl_BVHTreeSelector::isFullOut(...) and OpenGl_BVHTreeSelector::CacheClipPtsProjections()
3) Changed computation algorithm of frustum planes (build them by corner points)
4) Added interactive object AIS_CameraFrustum to draw camera frustum.
5) Extended Draw command "vcamera" with option displaying camera frustum.
2019-01-11 18:57:52 +03:00
nds
25333d45ea 0030349: Coding - add usage of Standard_EXPORT for some not inline methods in Select3D 2019-01-11 18:57:51 +03:00
abv
8de8dacd02 0030430: Draw - command testgrid in parallel mode hangs if DRAW is launched without GUI
Ensure that initialization of Tcl interpretor is performed in the same thread where commands are evaluated.

Added test demo draw bug30430
2019-01-10 16:35:02 +03:00
abv
9b4243f9bf 0030377: DRAW, Windows - command executed via option -c fails on puts
When DRAW on Windows is launched with option -c, the command is now properly transferred to Tcl thread (separate thread that runs Tcl interpretor on Windows except when DRAW is run in batch mode) for execution, instead of being evaluated in the main thread.

Execution of DRAW in batch mode (option -b) is fixed by enabling proper initialization of the Tcl interpretor and replacement of backslashes in path to startup script by straight slashes on Windows in that mode.

Declaration of global variables used for communication of console command between threads is moved to Draw_Window.hxx to ensure consistency.
Function wscpy_s is used instead of memcpy to avoid possible buffer overrun.
2019-01-10 16:35:02 +03:00
kgv
0939d4cf1f 0030428: Modeling Algorithms - BRepBndLib::AddOBB() throws exception on empty Compound
Added missing Bnd_Box::IsVoid() check.
2019-01-10 16:12:13 +03:00
kgv
a345becea2 0030424: C# wrapper - implement IEnumerable interface by NCollection classes
TopExp_Explorer::Value() - added Current() alias for providing interface consistent to other OCCT Iterators.
2018-12-31 12:30:00 +03:00
ifv
80eeb3cef1 0030346: Modeling Algorithms - BRepPrimAPI_MakeRevol throws "BRepSweep_Translation::MakeEmptyVertex"
Implementation of method "IsDeleted(...)" for MakeRevol and MakePrism algorithms.

Problem (exception) occurs during history building and was caused by an attempt to obtain generated shape for subshape, which was really "deleted" by algorithm - this input subshape and its possible generated shape was not used in result.
2018-12-28 15:54:30 +03:00
kgv
39235bedc6 0030364: Visualization, TKOpenGl - allow initializing a Surface-less EGL context
OpenGl_Context::MakeCurrent()/OpenGl_Context::IsCurrent() have been modified to NOT fail
in case if myWindow is EGL_NO_SURFACE (valid off-screen rendering case within EGL).
OpenGl_GraphicDriver::InitEglContext() now finds EGL surface config in case if it has not been passed by argument.

OpenGl_Window constructor now allows wrapping an off-screen rendering surface EGL_NO_SURFACE.
However, it still creates a dummy surface eglCreatePbufferSurface() to workaround bugs in some GLES drivers (Vivante GC2000).

V3d_View::SetWindow()/V3d_View::MustBeResized()/V3d_Viewer::SetViewOn() have been modified
to avoid implicit View redraw (leading to undefined behavior/crashes in case if rendering
should be done into default FBO defined right after V3d_View initialization).
2018-12-23 20:25:14 +03:00
msv
4473e33655 0030396: Infinite recursion during ShapeFix after BRepAlgoAPI_Cut
Two test cases are added. One for Boolean operation (it is good, because BO has been fixed already), and another for fixshape operation (it causes Draw crash).
2018-12-21 19:45:20 +03:00
oan
6c27a5d993 0029964: Bad arc discretization
Added test cases.
2018-12-21 15:39:24 +03:00
nbv
4fe725a46a 0027976: Unstable work of 2d intersection algorithm for two lines
1. Test case for the issue has been created.
The problem is still reproduced on MASTER.

2. Some test cases have been moved to lowalgos/2dinter grid.
2018-12-21 15:38:03 +03:00
msv
4b97f9b15b 0030416: Incorrect implementation of the method Bnd_OBB::SquareExtent
The method Bnd_OBB::SquareExtent has been corrected.
2018-12-17 15:16:55 +03:00
kgv
3d999c6090 0030411: Data Exchange - attached model is exported as empty JT and VRML file
VrmlData_ShapeConvert::ConvertDocument() now handles reference labels within free shapes in the document.
2018-12-14 12:08:42 +03:00
kgv
7803c28d96 0030409: Data Exchange - exception during VRML file export
VrmlData_ShapeConvert::addShape() - handle case when parent node is NULL.
2018-12-14 12:07:56 +03:00
kgv
eeabb8f86a 0030413: Tests - increase counters within perf/ncollection/A1 2018-12-14 12:06:01 +03:00
skl
1d441d1ac7 0030402: Data Exchange - exported VRML file has broken location information 2018-12-13 13:34:41 +03:00
osa
2719e4f828 0030223: Visualization, TKOpenGl - frustum culling does not clip objects within perspective camera.
Fixed multiplication order of Projection and WorldView matrices
2018-12-13 13:33:42 +03:00
emv
d4db985b5e 0030395: DRAW bop: Some sub-shapes of some of the argument become connected through other shapes and the argument became self-interfered.
Integrating only test case for the issue as it is not reproduced any more.
2018-12-13 13:32:53 +03:00
kgv
f4d20b0086 0030400: Configuration - specify external dependencies user32 and shell32 explicitly 2018-12-11 19:16:42 +03:00
jgv
405b6fc5f9 0030391: Improvement of the method BRepOffset_Tool::EnLargeFace
Add options to set the length of enlargement for each of 4 directions.
Add restriction of enlargement in the case of singularity on the surface.
2018-12-11 19:15:54 +03:00
oan
3c7a61eae2 0029702: Foundation Classes - Introduce possibility to control parallel execution of BVH tools
Methods IsParallel() and SetParallel() have been added to BVH_Sorter, BVH_DistanceField and BVH_BuilderTransient to control parallel execution on low-level.
Fix compilation errors for old compilers without support of c++11 (std::begin, std::end)
2018-12-11 19:14:42 +03:00
oan
da555fc2ab 0029177: Foundation Classes - Adapt BVH package for use of OSD_Parallel
Explicit calls to TBB in BVH_DistanceField, BVH_LinearBuilder and BVH_RadixSorter have been replaced.
Task functors have been separated on execution and state parts for the sake of usage by OSD_Parallel.
2018-12-11 19:14:27 +03:00
emv
2ebb10988d 0030394: Modeling Algorithms - Empty result of offset operation (mode "Complete", join type - "Intersection")
The following changes have been made for improving the offset algorithm:
1. Multi-connexity support - intersection of the faces connected to the edge belonging to more than two faces is now performed.
2. Avoid intersection of the faces connected through internal edge.
3. Filling gaps (holes) in the splits of the created offset faces to increase possibility of creation of the closed volume from these splits.

Test cases for the issue.
2018-12-07 18:52:29 +03:00
emv
0c09fd3c6f 0029692: Add functionality to make the group of touching same-dimensional shapes connected
Implementation of the new class *BOPAlgo_MakeConnected* for making the group of touching same-dimensional shapes connected.
Provide the material association for the first sub-elements of the input shapes.
Provide possibility to make the connected shape periodic.

Draw commands for new algorithm:
* makeconnected - make the input shapes connected or glued, performs material associations;
* cmaterialson - returns the materials located on the requested side of a shape;
* cmakeperiodic - makes the connected shape periodic in requested directions;
* crepeatshape - repeats the periodic connected shape in requested directions requested number of times;
* cperiodictwins - returns all periodic twins for the shape;
* cclearrepetitions - clears all previous repetitions of the periodic shape, keeping the shape periodic.

Documentation & test cases for the new algorithm.
2018-12-07 18:49:58 +03:00
emv
53a73fc1d1 0029683: Add functionality to make the TopoDS_Shape periodic in 3D space
Implementation of the new class *BOPAlgo_MakePeriodic* for making the shape periodic in 3D space.
Periodicity of the shape means that the shape can be repeated in any periodic direction any number of times without creation of the new geometry or splits.
The idea of this algorithm is to make the shape look similarly on the opposite sides or on the period bounds of periodic directions.
It does not mean that the opposite sides of the shape will be mirrored. It just means the the opposite sides of the shape should be split by each other and obtain the same geometry on opposite sides.
Such approach will allow repeating the shape, i.e. translating the copy of a shape on the period, without creation of new geometry because there will be no coinciding parts of different dimension.

Draw commands for the new algorithm:
* makeperiodic - makes the shape periodic in required directions;
* repeatshape - repeats the periodic shape in requested periodic direction;
* periodictwins - returns the periodic twins for the shape;
* clearrepetitions - clears all previous repetitions of the periodic shape.

Documentation & test cases for the algorithm.
2018-12-07 18:49:44 +03:00
jgv
e9c073b866 0030363: BRepLib::SameParameter with option "forced" corrupts valid shape
Method BRepLib::SameParameter has been corrected to synchronize check of resulting tolerance with BRepCheck.
2018-12-03 15:57:36 +03:00
nbv
061cd2d841 0029149: BRepMesh produces invalid mesh on the bound of adjacent faces
1. Test case for the issue has been created. The issue is fixed by the patch #26106.

2. Since now, "tricheck" command uses edge tolerance instead of edge deflection to check cross-face-errors (set of nodes of the edge on 1st face must be equal to set of nodes of the same edge on 2nd face).
2018-11-30 18:49:27 +03:00
oan
e2fc86bbd9 0025594: Valid shape is not visualize in shading mode.
Added test case.
2018-11-30 17:28:13 +03:00
oan
1bb8ce7b7d 0025628: BRepMesh fails to mesh face with open wire, considered as correct by checkshape
Do not check status for "UnorientedWire", but check number of triangles instead.
2018-11-30 15:33:19 +03:00
oan
87036bbb70 0028719: Mesh - Display issue for special model
Clean existing triangulation before meshing.
2018-11-30 14:16:46 +03:00
ika
99524c4d24 0030273: Modeling Algorithms - Crash in postprocessing of imported shape.
Now end points of intervals calculated in GeomAdapter_Curve are not replaced by GeomAdapter_Surface.
Left bound of periodic curve less than UMin is not corrupted by LocateParameter during intervals calculating.
2018-11-30 13:39:16 +03:00
emv
44d5a096a3 0030389: Data Exchange - StlAPI_Writer does not check if the face has triangulation
When merging triangulation of the faces skip those having no triangulation.
Test case for the issue.
2018-11-30 13:38:25 +03:00
apn
7e19e96ae9 0030385: Samples - Warnings during generation of projects from .pro files
Define variables ARCH and VCVER in .pro files in qt samples.
2018-11-27 15:13:47 +03:00
abv
e05c25c123 0027620: Test perf bop boxholes crashes DRAW
Implementation of capturing of output to standard streams in DRAW (see command dlog) is revised to avoid problems with command "test" executing long test scripts:

1. Method OSD_File::Capture() is removed: on Windows it was allocating a C file descriptor for a file opened using WinAPI, and never released that descriptor (once allocated, it cannot be released separately from WinAPI file handle). Direct calls to dup/dup2 are used instead.

2. In Draw_Window.cxx the standard Tcl channels are initialized manually using corrected version of Tcl internal function. This works around a problem with Tcl channels on Windows being bound to OS device handle owned by the system which can get invalidated as result of calls to dup2() (used to capture output to standard streams).

3. Temporary file for capturing is opened once and used to store whole log, thus the need to collect log in the string stream in memory is avoided

4. Possible errors of dup() and dup2() are checked and reported

Test demo draw dlog is added

Off-topic changes:

- Test demo draw getsource is corrected for VS2017 which generates file name in lowercase
- Field myFaceBounds is initialized in constructor of the class BRepAlgo_NormalProjection to avoid undefined behavior
- Test bugs modalg_5 bug24012 is corrected to use command nproject instead of custom one, and to check propertes of the resulting shape
2018-11-23 12:18:42 +03:00
nbv
0df4bbd689 0030380: Exception while reading Step-file
Incorrect initialization of array (when upper bound is less than lower bound) has been avoided in some places.
2018-11-23 12:17:38 +03:00
kgv
a2fb712bea 0030382: Draw Harness, ViewerTest - command vdir doesn't work anymore 2018-11-22 23:14:52 +03:00
jgv
1d54b80764 0028828: Modeling Algorithms - New functionalities of BRepFilletAPI_MakeChamfer algorithm
Two new functionalities have been added in BRepFilletAPI_MakeChamfer:
- constant throat (the section of chamfer is isosceles triangle, its height is constant in all sections - this is the "throat" of the weld);
- constant throat with penetration(the section of chamfer is right-angled triangle, the first of two surfaces (where is the top of the chamfer) is virtually moved inside the solid by offset operation, the apex of the section is on the intersection curve between moved surface and second surface, right angle is at the top of the chamfer, the length of the leg from apex to top is constant - this is the "throat" of the weld).

- New abstract classes BlendFunc_GenChamfer and BlendFunc_GenChamfInv have been added;
- Class BlendFunc_Chamfer is now descended from BlendFunc_GenChamfer, class BlendFunc_ChamfInv is now descended from BlendFunc_GenChamfInv.
- New class BlendFunc_ConstThroat is descended from BlendFunc_GenChamfer, new class BlendFund_ConstThroatInv is descended from BlendFunc_GenChamfInv.
- New class BlendFunc_ConstThroatWithPenetration is descended from BlendFunc_GenChamfer, new class BlendFund_ConstThroatWithPenetrationInv is descended from BlendFunc_GenChamfInv.
- Class ChFi3d_ChBuilder has now mode of chamfer that can be ClassicChamfer, ConstThroatChamfer and ConstThroatWithPenetrationChamfer.
- Two new DRAW Test Harness commands "chamf_throat" ant "chamf_throat_with_penetration" have been added for the second mode of ChBuilder.
- The interface of DRAW Test Harness command "chamf" changed for symmetric case.
2018-11-16 19:16:05 +03:00
nbv
364c88864b 0025950: Bad performance of intersection algorithm.
1. Test case has been created.

2. Minor correction in DrawTrSurf.cxx file.
2018-11-15 17:34:44 +03:00
kgv
ce1c28b8b4 0030374: Visualization, TKOpenGl - activate texture unit Graphic3d_TextureUnit_1 after OpenGl_LayerList::renderTransparent() 2018-11-15 17:34:44 +03:00
ika
5290fb106f 0030362: Data Exchange - Writing dimensions with inches produced invalid file.
Writing dimensions into STEP files in inches not produce invalid references between STEP entities.
2018-11-15 17:34:43 +03:00
nbv
5fe14d0fac 0030354: BOP Cut doesn't modify the attached face
The reason of this problem is in wrong work of classifier algorithm (see the message ~0080992 to the issue #30354). Therefore, the algorithm of IntTools_FClass2d class has been improved. Namely, now orientation of the polygon is computed from area-criterion instead of angle. As result, some simplification of the method IntTools_FClass2d::Init(...) has been made.

<!break>

1. New constructor has been added to the class CSLib_Class2d. It allows applying TColgp_SequenceOfPnt2d.

2. DRAW-commands "addpolygonnode" and "polygonprops" have been created. They are covered by the test case "tests/geometry/2dpolygon/A1".

3. New method Poly::PolygonProperties(...) has been created. See help for detailed information.

4. New testgrid "lowalgos classifier" has been created.
2018-11-15 17:34:42 +03:00
oan
dc57476a0e 0028379: BRepMesh produces mangled mesh for a cone
Split seam edge of a cone according to the specified parameters.
Seam edge functor is called before check of triangulation consistency in order to keep face status consistent.
The cause is that split seam edge can set Outdated flag when Reused is set by another functor without reset which can lead to refusement of such face by triangulation procedure.
Fix compilation error on VS2008
2018-11-13 15:45:19 +03:00
nbv
9d083161b6 0025952: Wrong intersection curve
Test cases for the issue have been created.
2018-11-13 15:45:18 +03:00
nbv
1f17d5fbf7 0030234: BRepMesh_IncrementalMesh fail to discretize some zero-length free edges
Test case for the issue has been created.
This problem is fixed by the patch #30345.
2018-11-11 11:34:31 +03:00
nbv
0f16fd3cec 0029962: Master version of BRepMesh does not respect obvious details despite of specified deflection
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-11 11:34:30 +03:00
nbv
ac2ee719c0 0029685: Meshing - BRepMesh does not respect requested deflection
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-11 11:34:29 +03:00
nbv
9d09a1263e 0029751: Incremental mesh produces different meshes for windows and linux (debian 8)
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-11 11:34:27 +03:00
nbv
57d0f56b58 0027158: BRepMesh manage vertex tolerance in parametric space in improper way
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-11 11:34:26 +03:00
nbv
a385e6d1cd 0026889: Very poor mesh result from shape
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-11 11:34:25 +03:00
nbv
70bc8e4a71 0023795: Performance regression of meshing
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-11 11:34:24 +03:00
nbv
080fcebfca 0026928: Edges are meshed too coarsly
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-11 11:34:22 +03:00
nbv
51cf5bb604 0030345: Mesh, BRepMesh_CurveTessellator - GCPnts_TangentialDeflection throws Standard_ConstructionError
Now the algorithm GCPnts_TangentialDeflection is initialized by appropriate parameters.
2018-11-11 11:34:21 +03:00
nbv
e2f8fe449c 0025042: Cone Meshing: Missing two connecting edges.
Adding test case for the issue.
The problem has been fixed after the patch #28379.
2018-11-11 11:34:20 +03:00
nbv
42a213c67f 0023513: BRepMesh doesn't stop until out-of-memory
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-09 17:32:42 +03:00
kgv
22887d12c4 0030348: Shape Healing - ShapeFix_Wire::FixEdgeCurves() throws Standard_OutOfRange exception
Call FixClosed() instead of out-of-range FixConnected() at the last edge.
2018-11-09 17:32:41 +03:00
nbv
fb99e177e1 0027693: BRepMesh: fine edge tessellation leads to excess number of triangles along the whole U or V stripes
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-09 17:32:41 +03:00
nbv
24f355f097 0027845: BRepMesh produces invalid result on spline cavity
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-09 17:32:40 +03:00
nbv
1741292616 0026965: BRepMesh_IncrementalMesh hangs, and consumes infinite memory
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-09 17:32:40 +03:00
nbv
3f9b6e9ea4 0029205: BRepMesh skips some edges and generates invalid triangulation for the face
Adding test case for the problem.
The issue has been fixed by a patch for #26106.
2018-11-09 17:32:39 +03:00
jgv
cab49d68fc 0030186: BRepOffsetAPI_MakePipe Generated() method produces no results for the spine edges
Add method BuildHistory providing history for sub-shapes of profile and spine to BRepFill_Pipe.
2018-11-09 17:32:39 +03:00
nbv
c3ca03eb17 0030347: Mesh, BRepMesh_ModelPostProcessor - NCollection_Array1 throws Standard_RangeError
Obtaining of 3D-polygon is forbidden for not discretized edge.
2018-11-09 17:32:38 +03:00
kgv
8946be3422 0030344: Coding Rules - suppress GCC compiler warnings -Wstrict-overflow on Standard_OutOfRange_Raise_if and Standard_RangeError_Raise_if 2018-11-07 18:19:45 +03:00
abk
23babb36ec 0030243: Regression in HLR PolyAlgo in OCCT 7.1.0
The misprint leading to the problems was fixed.

"Draw" tests were created to check the fix.

"Draw" test bugs/modalg_7/bug28784 was corrected
for right changes of the results.
2018-11-07 18:17:59 +03:00
drazmyslovich
6e7791948b 0029716: Some TDF and XCAFDoc labels-related issues
1. "Descendants" closure mode is not taken into account by TDF closure tool
2. CopyTool always creates a new label at the target ignoring the relocation table
3. XCAFDoc_GraphNode throws an exception if Child of Father is not found during the unsetting
2018-11-07 18:16:51 +03:00
kgv
cf4bee7c0c 0027115: Configuration, genproj - add headers to generated MS VS projects
Header files and non-compilable source files are now included within generated VS projects.
genproj now generates DRAWEXE.rc.
2018-11-07 18:13:09 +03:00
nbv
6ff61620a3 0029329: Low performance of the General Fuse algorithm
Creation of test case.
2018-11-07 18:11:57 +03:00
kgv
c84c2ef70c 0030337: Draw Harness, ViewerTest - do not restrict vtexture to AIS_Shape 2018-11-07 18:11:56 +03:00
nbv
3c8287eb0a 0026820: bsection returns single vertex instead of curve
Test case has been created only because the problem is not reproduced on current MASTER.
2018-11-07 18:11:55 +03:00
nbv
9bc5f5850a 0021494: Intersection between cone and sphere fails
The condition (workaround), which forbid to return the intersection curve, has been removed.
2018-11-02 17:06:43 +03:00
nbv
32c408d76a 0025082: bopcommon returns different result on Windows and Linux system
Test cases have been created because the problem is not reproduced on current MASTER
2018-11-02 17:06:43 +03:00
nbv
4006ca98a2 0030322: Remove DRAW-command "mesh" as useless
In fact, the DRAW-command "mesh" is duplicate of "incmesh".

The difference is that the "mesh" creates DRAW-object MeshTest_DrawableMesh. However, this object is currently not applicable (e.g. we cannot display it).

DRAW-commands "mesh", "addshape", "smooth", "edges", "vertices", "medge", "mvertex", "triangle", "dumpvertex", "dumpedge", "dumptriangle" and "onetriangulation" have been removed.

The class MeshTest_DrawableMesh has been removed as useless.

Testgrids "mesh standard_mesh" and "mesh advanced_mesh" have been removed.
2018-11-02 17:06:42 +03:00
nbv
6933df8fe0 0030305: Strange logic in BRepMesh_Deflection::ComputeDeflection(...) method
Before the fix, angular deflection was scaled to some coefficient in the method BRepMesh_Deflection::ComputeDeflection(...). Now, angular deflection is constant.
2018-11-02 17:06:41 +03:00
nbv
46478ffe32 0030008: BRepMesh does not respect angular deflection in internal area of bspline surface
1. Check whether the mesh satisfies the required angular deflection has been amended. Namely normals (to the surface) in the ends of any not "frontier" link are made collinear (with the given angular tolerance).

2. New parameters AngleInterior and DeflectionInterior have been added in IMeshTools_Parameters structure.

3. In case of thin long faces with internal edges, add points of internal edges to control parameters using grabParamsOfInternalEdges() in order to avoid aberrations on its ends. Disable addition of parameters from boundary edges in case of BSpline surface. Deviation can be controlled through the deflection parameter.

4. Grab parameters from edges in case if there is just a single interval on BSpline surface along U and V direction.
2018-11-02 17:06:41 +03:00
oan
7bd071edb1 0026106: BRepMesh - revision of data model
Removed tight connections between data structures, auxiliary tools and algorithms in order to create extensible solution, easy for maintenance and improvements;
Code is separated on several functional units responsible for specific operation for the sake of simplification of debugging and readability;
Introduced new data structures enabling possibility to manipulate discrete model of particular entity (edge, wire, face) in order to perform computations locally instead of processing an entire model.

The workflow of updated component can be divided on six parts:
* Creation of model data structure: source TopoDS_Shape passed to algorithm is analyzed and exploded on faces and edges. For each topological entity corresponding reflection is created in data model. Note that underlying algorithms use data model as input and access it via common interface which allows user to create custom data model with necessary dependencies between particular entities;
* Discretize edges 3D & 2D curves: 3D curve as well as associated set of 2D curves of each model edge is discretized in order to create coherent skeleton used as a base in faces meshing process. In case if some edge of source shape already contains polygonal data which suites specified parameters, it is extracted from shape and stored to the model as is. Each edge is processed separately, adjacency is not taken into account;
* Heal discrete model: source TopoDS_Shape can contain problems, such as open-wire or self-intersections, introduced during design, exchange or modification of model. In addition, some problems like self-intersections can be introduced by roughly discretized edges. This stage is responsible for analysis of discrete model in order to detect and repair faced problems or refuse model’s part for further processing in case if problem cannot be solved;
* Preprocess discrete model: defines actions specific for implemented approach to be performed before meshing of faces. By default, iterates over model faces and checks consistency of existing triangulations. Cleans topological faces and its adjacent edges from polygonal data in case of inconsistency or marks face of discrete model as not required for computation;
* Discretize faces: represents core part performing mesh generation for particular face based on 2D discrete data related to processing face. Caches polygonal data associated with face’s edges in data model for further processing and stores generated mesh to TopoDS_Face;
* Postprocess discrete model: defines actions specific for implemented approach to be performed after meshing of faces. By default, stores polygonal data obtained on previous stage to TopoDS_Edge objects of source model.

Component is now spread over IMeshData, IMeshTools, BRepMeshData and BRepMesh units.

<!break>

1. Extend "tricheck" DRAW-command in order to find degenerated triangles.

2. Class BRepMesh_FastDiscret::Parameters has been declared as deprecated.

3. NURBS range splitter: do not split intervals without necessity. Intervals are split only in case if it is impossible to compute normals directly on intervals.

4. Default value of IMeshTools_Parameters::MinSize has been changed. New value is equal to 0.1*Deflection.

5. Correction of test scripts:

1) perf mesh bug27119: requested deflection is increased from 1e-6 to 1e-5 to keep reasonable performance (but still reproducing original issue)
2) bugs mesh bug26692_1, 2: make snapshot of triangulation instead of wireframe (irrelevant)

Correction in upgrade guide.
2018-11-02 17:06:40 +03:00
emv
80da8585f4 0030281: Regression to 7.2.0: Modeling Algorithms - Wrong result of CUT operation
Boolean Operations - Force the face with internal edges to be treated by the BuilderFace algorithm. It is needed for the cases when internal edges of the face go from side to side and should really split the face.
Test case for the issue.
2018-10-31 17:46:21 +03:00
jgv
9619ef4c94 0030174: ShapeUpgrade_UnifySameDomain does not unify cylindrical faces
Hotfix for issue 27271 (avoiding potential seam edges) is deleted.

Correction of test case
2018-10-30 16:06:32 +03:00
nbv
e28b8c6218 0029673: Exception while Face-Face intersection
If 2D-curves are requested in intersection result but they cannot be created (by some reason) then the full set of curves (3D and two 2D) is rejected from the intersection result.
2018-10-30 16:04:25 +03:00
nbv
a6ebe9fc7c 0028493: [Regression vs 7.0.0] Intersection algorithm produces curve with loop
1. New testgrid "lowalgos/intss" has been created. It will contain all test cases on geometrical intersection of two surfaces ("intersect" DRAW-command) and two faces ("bopcurves" DRAW-command).

2. New test case for the issue #28493 has been created because the problem is not reproduced on MASTER.

3. Test case (lowalgos/intss/bug24472) for the issue #29501 has been modified in order to check loops of the resulting intersection curves.
2018-10-30 16:04:24 +03:00
ika
100be67aa4 0030315: Data Exchange - Crash reading views during STEP import.
Add NULL check to protect against crash.
2018-10-29 11:21:20 +03:00
nbv
df1d6870c0 0024676: Wrong result done by intersection algorithm
Only test case has been created because the problem is not reproduced on the current MASTER
2018-10-26 15:48:08 +03:00
aba
f15c5f90c3 0030291: Visualization - manipulator crashes when is attached with scaling mode disabled
- in ComputeSelection() method checks are added to avoid taking triangulation of manipulator parts that are not computed
2018-10-25 19:22:15 +03:00
nbv
cdcf6fc27a 0026509: Intersection algorithm produces set of curves providing closed contour in 3D-space and not closed contour in 2D-space
Test cases have been created. No fix is needed because the described problem has not to be cause of failing of high-level OCCT-algorithms.
See the message ~80300 (issue #26509) for detail information.
2018-10-25 19:21:16 +03:00
kgv
04f0f1b046 0030270: Modeling Algorithms - BRepBndLib should provide an option for skipping infinite entities
Bnd_Box now keeps calculating of finite part of bounding box after specifying it to be Open in some direction.
The finite part can be retrieved using new method Bnd_Box::FinitePart().

Prs3d::GetDeflection() now uses Bnd_Box::FinitePart() when applying relative deflection.

Draw Harness command bounding has been extended with option -finite returing a finite part of AABB.
2018-10-24 22:53:26 +03:00
vro
253cfde728 0030214: Application Framework, TPrsStd_AISPresentation - Hidden Presentations Cannot Be Removed 2018-10-24 18:56:11 +03:00
nbv
a8b8f90dd3 0024905: Boolean cut produced invalid result
The method BOPAlgo_PaveFiller::PutClosingPaveOnCurve(...) has been improved in order to take into account extended vertex tolerance.
2018-10-24 18:55:07 +03:00
skl
5ada54fb79 0030280: Data Exchange - broken VRML output due to unescaped symbols starting comment block 2018-10-23 20:10:58 +03:00
ifv
e5826d916c 0030203: ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve2d array out of bound
Bug fixing: avoiding calculation if tPp == NbOfPnts
2018-10-23 20:09:55 +03:00
ifv
d8406b2f3a 0030199: Extrema Point<->Curve gives inaccurate result
Special treatment of bspline curve of first degree is implemented in Extrema_GExtPC.gxx
Test case is added
Some test cases are modified according to actual state of algorithm
2018-10-23 20:08:38 +03:00
mnv
3b4c69452b 0030119: Visualization, OpenGl_ShaderManager - implement mechanism generating in/out section of shader programs
Added functionality which generate in/out part of shaders source code from prepared list of variables.
2018-10-23 20:07:29 +03:00
kgv
87a64d53ab 0030269: Modeling Algorithms - unhandled Standard_NullObject within BRepBndLib::Add()
Added BRep_Tool::IsGeometric() check before every BRepAdaptor_Curve::Initialize().
2018-10-22 18:29:28 +03:00
osa
b49b181901 0030278: Foundation Classes - make IndexedMapNode as protected inside of NCollection_IndexedMap 2018-10-22 11:32:46 +03:00
jgv
cb6a45e318 0030204: BRepOffsetAPI_MakePipeShell crash
Add protection from type mismatch while ensuring Same Parameter on U-edges
2018-10-18 19:10:55 +03:00
szy
b34d86cb28 0030169: Application Framework - Document format version management improvement 2018-10-18 19:09:21 +03:00
kgv
90fd614536 0030248: Volume Rendering - importing volume with default parameters leads to crashes within OpenGl_Texture::Init3D() 2018-10-18 19:07:24 +03:00
ifv
5f41ce6626 0030230: An optimal bounding box of a face is too large
Bug fixing
Test case added
2018-10-18 19:06:09 +03:00
apn
20f720f11b 0030241: Test system - create option to exclude test groups from testgrid command
Add option "-exclude" to testgrid command.
It's possible to exclude groups, grids and test cases from test execution.
Add possibility to exclude subgroups from executed groups and test cases from executed subgroups\groups.
2018-10-18 12:22:29 +03:00
vro
78a8dfb9f8 0030215: Application Framework, TPrsStd_AISPresentation - Enable Lazy Presentation Updates 2018-10-17 16:35:32 +03:00
asl
da87ddc3eb 0030076: Visualization, TKV3d - API to update certain vertex attribute(s) without recomputing a presentation
Graphic3d_Buffer can be now optionally initialized as non-interleaved array of vertex attributes
and provides an interface to invalidate buffer sub-range tracked by OpenGl_PrimitiveArray.
2018-10-17 16:35:31 +03:00
kgv
34253146da 0030239: Visualization, Graphic3d_ArrayOfPrimitives - pass Graphic3d_ArrayFlags bitmask instead of dedicated Boolean flags to constructor 2018-10-17 16:35:30 +03:00
ifv
751d055356 0030194: Modeling Algorithms - Intersection points between line and torus are not found
Calling numerical solution is implemented if analytical algorithm fails
2018-10-16 10:42:37 +03:00
emv
0fdcb9c998 0030150: Modeling Algorithms - Removal of BRepAlgo_BooleanOperations and BRepAlgo_DSAccess classes
Replacing usage of BRepAlgo_DSAccess with usage of modern Boolean operations algorithms in BRepFill_Draft.
Removing BRepAlgo_BooleanOperations and BRepAlgo_DSAccess classes.

The following classes have been removed as unused:
* BRepAlgo_DataMapOfShapeBoolean
* BRepAlgo_DataMapOfShapeInterference
* BRepAlgo_EdgeConnector
* BRepAlgo_SequenceOfSequenceOfInteger
2018-10-15 20:26:25 +03:00
kgv
dc2749cfbd 0030240: Visualization, OpenGl_FrameStatsPrs - chart cannot be erased 2018-10-15 14:19:01 +03:00
kgv
c3749171b7 0030232: Visualization, StdPrs_BndBox - support Bnd_OBB in addition to Bnd_Box 2018-10-12 17:22:45 +03:00
kgv
5e30547b63 0030144: Visualization, TKOpenGl - extend OpenGl_FrameStats with frame timers 2018-10-11 19:13:23 +03:00
skl
9b9f2fe972 0030221: Data Exchange - VRML is exported with inversed normals
Added test case bugs/xde/bug30221
2018-10-11 19:12:12 +03:00
kgv
1b63268eb2 0030218: Visualization - custom selection presentation is not updated within SelectMgr_SelectableObject::UpdateTransformation()
SelectMgr_SelectableObject now assigns transformation to mySelectionPrs and myHilightPrs presentations.
Removed confusing method PrsMgr_PresentableObject::UpdateTransformation() with presentation as argument.
2018-10-10 18:50:00 +03:00
mnv
84e847557a 0030166: Visualization, TKOpenGl - add option OpenGl_Caps::glslDumpLevel dumping the source code of the shader program
Added new option -glslcode for vgldebug command with the following values:
- off   disables glsl source code dump;
- short to dump glsl source code in short format (except common declarations);
- full  to dump glsl source code in full format.
2018-10-10 18:48:37 +03:00
emv
dce5b3eb0c 0030198: Regression to 7.1.0: BRepAlgoAPI_Fuse unlimited memory usage
When refining the mesh to achieve required deflection (IntPolyh_Triangle::MultipleMiddleRefinement) limit the number of new triangles to avoid infinite loop.
Test case for the issue.
2018-10-10 18:47:18 +03:00
nbv
f67d7efd4e 0030207: ChFi3d_KParticular stack-use-after-scope
References to temporary objects have been eliminated.
2018-10-10 18:47:17 +03:00
nbv
dcd768a49a 0030202: IntPatch_WLineTool::JoinWLines array out of bounds
The main idea of the fix is that the creation of WLine with one point is forbidden.
2018-10-10 18:47:17 +03:00
ifv
dcf0889fc2 0030133: Modeling Data - Crash during visualization of invalid part
Control of number of recursive calls is implemented to avoid stack overflow.
2018-10-10 18:47:16 +03:00
mnv
6997ff1c88 0029020: Visualization, V3d_View - workaround image dump issue on Intel OpenGL driver
Implemented workaround for dump images with width >= 5462 pix on Intel OpenGl driver.
Changes according to OpenGl_Context::myVendor field in lowercase.
2018-10-05 15:31:38 +03:00
nbv
521648ce02 0030176: Modeling Algorithms - Infinite loop in IntWalk_PWalking::Perform()
Currently resetting of counter LevelOfIterWithoutAppend is enabled only if additional iterations have taken some positive effect.
2018-10-04 18:09:44 +03:00
ika
87efa821fa 0030189: Data Exchange - Wrong export to STEP of located root.
Now roots-references in XCAF Document can be exported to STEP without losing structure of assembly/sharing/metadata of this root. New auxiliary root assembly with each root-reference is created to save all necessary data.
2018-10-04 17:57:13 +03:00
emv
13c0e40223 0030145: Modeling Algorithms - Boolean Operations on open solids
Provide possibility to perform Boolean operations on open solids.

Implementation of the new method *BOPAlgo_Builder::BuildBOP* performing the construction of the result shape for the given type of Boolean operation.
This approach does not rely on the splits of solid to be correct and looks for the faces with necessary state relatively opposite solids to build the result solid.
The call to this method is performed from BOP algorithm in case there were open solids in the arguments.

Implementation of the draw command *buildbop* performing a call to the method above.
2018-10-03 19:21:14 +03:00
emv
60b1a085c7 0030154: [REGRESSION] Modeling Algorithms - Boolean Operation on planar geometry hangs inside BRepLib::FindValidRange()
Do not allow the precision with which the valid range is found to be less than the epsilon of the max parameter of the edge's range.
Test cases for the issue.
2018-09-28 11:07:35 +03:00
skl
a3506de770 0030115: Implementation of import from XCAF to VRML. 2018-09-27 19:28:32 +03:00
mnv
eaac086605 0030153: Visualization, TKOpenGl - AIS_ColoredShape::SynchronizeAspects() doesn't update all aspects
AIS_InteractiveObject::SynchronizeAspects() now propagates event
to OpenGl_Group::SynchronizeAspects() which properly handles
all aspects defined within the group.
2018-09-26 12:19:07 +03:00
asl
f2eaecb217 0030156: Visualization, TKV3d - Triangles outside of selection volume are selected
The addition of elements to map is put under correct condition that element overlaps with selection volume
2018-09-26 12:09:52 +03:00
kgv
72a2da560f 0030157: Draw Harness - xwd image dump should not be limited by desktop size within batch testing
DrawWindow now uses SWP_NOSENDCHANGING flag within batch mode to ensure
that created window is not clipped in size by desktop dimensions.
2018-09-24 17:57:45 +03:00
jgv
a922aab52c 0028949: BRepOffsetAPI_MakePipe Generated() method produces no result for spine edges
Add history for subshapes of spine: edges and vertices. Each edge of spine generates a shell. Each vertex of spine generates a set of edges and, possibly, faces (in the case of Round Corner).
2018-09-24 17:54:57 +03:00
kgv
4ba5491a50 0030146: Visualization - exception during attempt to display Edge without geometry
StdPrs_ToolRFace no skips curves with NULL curves.
Code has been cleaned up from duplicated checks, redundant casts
and dummy Adaptor2d_Curve2dPtr typedef.

StdSelect_BRepSelectionTool::GetSensitiveForFace() now catches
Standard_NullObject exception to skip invalid Edges.
2018-09-22 17:48:53 +03:00
mnv
c39bb31bac 0030136: Visualization, TKOpenGl - Graphic3d_TOSM_FACET does not work on mobile devices
Added new type of graphic3d limit Graphic3d_TypeOfLimit_HasFlatShading.
Added workaround for unexpected behaviour of mobile devices with Adreno GPU.
Added new complex flag hasFlatShading to OpenGl_Context for indicating support of flat shading.
2018-09-20 17:08:47 +03:00
vro
39effd08e5 0030142: Application Framework, TPrsStd_AISPresentation - Hidden Presentations Are Computed During Document Retrieval 2018-09-19 11:58:33 +03:00
nbv
7e425ba7b0 0030140: Modeling Algorithms - Access Null Pointer
The array TabP has been allocated correctly.
2018-09-19 11:58:32 +03:00
kgv
b8f7f6081f 0030143: Foundation Classes - provide operator[] alias for NCollection_Array1, NCollection_Vector 2018-09-17 13:16:42 +03:00
kgv
0de16e296a 0030135: Visualization, TKOpenGl - frame statistics do not include information about instanced structures
OpenGl_FrameStats now takes into account OpenGl_Structure::InstancedStructure().
OpenGl_View::renderStructs() - fixed resetting non-culled structure counters.
2018-09-14 15:51:52 +03:00
abv
6b1800cb76 0030130: Coding Rules - MSVC 2017 gives warnings about using of std::fpos::seekpos() within RWStl
Use of deprecated method std::fpos::seekpos() is avoided with MSVC 11 (Visual Studio 2012) and above.
2018-09-13 20:45:08 +03:00
osa
d0bcf7aa9b 0030131: Foundation Classes - support of Linear builder for 2D BVH trees
BVH_LinearBuilder and BVH_RadixSorter now accept N==2.
NCollection_Vec2/3/4 - added missing division by vec operators.
2018-09-13 20:42:21 +03:00
kgv
7604a15365 0029988: AIS_Shape - SetWidth() and SetColor() has no effect for FaceBoundary
AIS_Shape SetWidth and SetColor methods now propagate modifications to FaceBoundary aspect.
2018-09-11 20:39:21 +03:00
kgv
c60ec7f521 0030118: Draw Harness - extend vcomputehlr command with HLR algo type
vcomputehlr has been extended with -algoType argument
and sets result as DBRep shape in addition to displaying AIS_Shape.
2018-09-11 20:30:48 +03:00
emv
241a61330a 0030092: Modeling Algorithms - Invalid result of Section operation
The following improvements have been made in Boolean operations algorithm in order to fix the problem:
1. Initialization of the pave blocks which vertices have acquired the SD ones.
2. Removing from Data Structure the small edges having the same vertices on both ends (either initially or acquired).
3. Avoid adding empty SD connections when one vertex points to itself.

Test case for the issue.
2018-09-11 20:24:47 +03:00
apn
798a95ed9b 0029986: Configuration - environment scripts generated by CMake on Linux do not allow starting DRAW from build folder
Correct launching custom.sh in env.sh.in.
Correct definition of FFMPEG_DIR in custom.build.bat/sh.in and generation of custom_*.sh (variables CSF_OCCTBinPath and CSF_OCCTLibPath are not empty on the first run)
2018-09-11 20:08:12 +03:00
abv
5fecc4953b 0030091: Configuration - allow cross-compilation from Linux (case sensitive filesystem) to x86_64-w64-mingw32
Names of Windows header files are corrected to be lower case to match their actual names on Windows (except Windows.h) and MinGW.
Files COMMANDWINDOW.h and MAINWINDOW.h in Draw package are renamed to CamelCase according to names of corresponding CXX files.
2018-09-07 13:11:33 +03:00
mnv
112139f00a 0030026: Configuration, CMake - not clear description of some fields
Updated description for 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 and 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build fields.
2018-09-05 18:54:48 +03:00
emv
82d3cd0b0a 0030094: Modeling Algorithms - Defeaturing does not work on the attached shape due to incorrect extension of the torus
BRepLib::ExtendFace method when working with analytical and periodic faces now takes into account the possible closeness of the result face.
Test cases for the issue.
2018-09-04 19:24:43 +03:00
emv
83f7dbeb62 0030100: Modeling Algorithms - ShapeUpgrade_UnifySameDomain is unable to unify faces based on the same toroidal surface
When performing intersection of toroidal faces check first if they are based on the same surface.
Test cases for the issue.
2018-09-04 19:24:42 +03:00
nbv
98974dccef 0029972: Intersection curve has a weird gap in the middle of it
1. The condition of WLine breaking (in IntWalk_IWalking algorithm) has become more independent of the input tolerance.

2. Currently the algorithm of IntPatch_Points of WLine processing depends on the algorithm of obtaining the WLine.

3. The methods IntSurf_LineOn2S::Add(...) and IntSurf_LineOn2S::SetUV(...) have become not inline (see the message ~0077431 in the issue #29866).
2018-09-03 17:05:14 +03:00
gka
06a505ba53 0030087: Invalid result of the translation of the assembly when relating and related products are mixed in the SRR entity
Detection of specific case of error in the definition of transformation matrix describing position of the component within assembly, when it has Axis Placements swapped, is corrected to handle the case when one of these Axis Placements is contained in both Shape Representations (of the assembly and its component).
This allows the problematic STEP file to be translated correctly.

Added test bugs step bug30087
2018-09-03 15:48:41 +03:00
mnv
1ad3bc4c00 0030102: Visualization, TKOpenGl - Graphic3d_TOSM_FACET shading is incorrect in some casesn
gl_FrontFacing is now considered within Normal computation.
2018-09-03 15:46:20 +03:00
apn
93808a4a9c 0030093: Test system - Incorrect parsing of the regular expression
Add "\-" to regular expression (which contained only literal, numeric and underscore character).
2018-09-03 15:44:41 +03:00
emv
0e48692e82 0030090: Modeling Algorithms - BRepLib::FindValidRange does not find valid range for the edge
BRepLib::FindValidRange - check each sampling point to be out of tolerance sphere of the vertex.
Test case for the issue.
2018-09-01 11:10:22 +03:00
emv
56062e13f2 0027928: BOP common produces empty compound
BOPTools_AlgoTools::ComputeState - increase the chance of correct classification of the face relatively solid by classifying the point located inside that face instead of the point taken near the edge of that face.
Test case for the issue.
2018-09-01 11:07:05 +03:00
nbv
7eb3580b79 0030082: Intersection algorithm returns curve with big tolerance value
The fix inserts new points at the end of the WLine in case when the direction of the intersection curve is significantly changed.
2018-09-01 11:06:55 +03:00
kgv
4a056d205b 0030058: Visualization, Select3D_SensitivePrimitiveArray - the selection is not fast enough
Select3D_SensitiveSet::Matches() has been improved to check if BVH node is fully included by selection volume
and pass this information to overlapsElement()/elementIsInside() interfaces
to avoid expensive partial overlapping checks for individual elements.
Select3D_SensitivePrimitiveArray implements this new interface to improve partial overlapping performance.
Select3D_SensitivePrimitiveArray::Matches() now handles rectangle selection for sub-elements when Elements map is defined.
Added missing const to SelectMgr_BaseFrustum::Overlaps() methods.

AIS_PointCloud has been extended with new selection mode for collecting selected nodes

Draw Harness command vdrawparray has been extended with an option -shape
allowing to create a triangulation from tessellated shape.
2018-08-24 18:03:33 +03:00
skl
477000eb31 0029881: Data Exchange - PMI entities ignore length Units 2018-08-24 18:01:51 +03:00
kgv
e2a47b0cd2 0030081: Visualization - selection does not work when two clipping planes cut object from opposite sides
Fixed combining independent clipping planes into single range within SelectMgr_RectangularFrustum::computeClippingRange().
2018-08-24 13:08:31 +03:00
skl
65bb82f241 0028694: IGES reader produces too small edge covered by its vertices
Methods IsUClosed() and IsVClosed() are changed (check distance to middle point is added).
2018-08-24 13:08:30 +03:00
kgv
2382618330 0030068: Documentation - V3d_View::ToPixMap() description should clarify that method will redraw the View content before dump 2018-08-19 11:10:00 +03:00
kgv
343f7e4d34 0030071: Tests - locate_data_file does not skip .git folders
Regexp is now applied to subfolder name to filter folders starting with dot.
2018-08-16 17:33:39 +03:00
skl
cdcb6655e7 0029782: Shape Healing - Reading of invalid shape 2018-08-13 16:34:26 +03:00
bugmaster
47ba172e98 Adjusting testing cases for VC 2017 2018-08-08 18:33:16 +03:00
nbv
e121dd4d58 0029910: Porting to Debian80-64 : Regressions in Modeling Algorithms
Adjusting test cases.
Creation of new test cases.
2018-08-07 17:49:52 +03:00
apn
7c5f7e3e04 0030015: Documentation - Correct warnings in OCCT and PRODUCTS documentation
Fix warning multiple use of section label 'upgrade_740_extremaalgo' in the file upgrade.md
2018-08-06 16:58:02 +03:00
abv
c16c60a402 0029978: Data Exchange, macOS - the result of reading some entity from STEP looks odd
On Apple with XCode 9.4.1 and onwards, the compiler optimization is disabled for method gp_Mat::Transpose() as optimizer generates invalid code when that method is used.
Some refactoring of the code affected by this bug.
2018-08-02 18:51:18 +03:00
mnv
170175554f 0029938: Visualization - SelectMgr_ViewerSelector::PickedPoint() should return point lying on an object
Extended SelectBasics_PickResult structure by myObjPickedPnt field, which contained the value of the 3d point on the selected object.
Changed all Overlaps methods. Parameter theDepth replaced on object of the structure SelectBasics_PickResult. This approach will be able to add new fields to SelectBasics_PickResult structure without big changes in modules which contained Overlaps method.
2018-08-02 18:47:38 +03:00
kgv
c348746059 0030005: Visualization, OpenGl_Context - replace NCollection_SparseArray with NCollection_Array1 for myDrawBuffers 2018-08-01 18:17:04 +03:00
kgv
b11aef43d4 0030004: Visualization, AIS_Manipulator - disable detection of Rotating circle when picking ray lies on its plane 2018-08-01 18:16:17 +03:00
jgv
4a3610588f 0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
Methods GeomConvert::ConcatG1, GeomConvert::ConcatC1, Geom2dConvert::ConcatG1, Geom2dConvert::ConcatC1 are corrected to prevent exceeding maximum degree of BSpline curve in case of closed contour.
2018-08-01 16:42:35 +03:00
vro
31e8d3c185 0029940: The method TPrsStd_AISPresentation::SetSelectionMode() seems useless for transactions
A boolean parameter is added with a default value to the method TPrsStd_AISPresentation::SetSelectionMode().
By default, behavior of the method is not changed. But if the parameter's value is changed to FALSE, change of selection mode for the object will not influence the transaction. In other words, the attribute will not set modified and will not put into transaction delta. This behavior suits the usual notion of the object in an application: the object has color, material, transparency, but selection mode is not a property of the object. It is a property of an operation involving the object. Therefore, it has sense to remove the method SetSelectionMode() from TPrsStd_AISPresentation. For a while, it is marked as obsolete.
2018-08-01 16:39:24 +03:00
nbv
6487fb1c9c 0029994: Misprint in IntWalk_PWalking::Perform(...) method
In the fragment

        if (aNewPnt[0] < u1min || aNewPnt[0] > u1max ||
            aNewPnt[1] < v1min || aNewPnt[1] > v1max ||
            aNewPnt[2] < u2min || aNewPnt[2] > u2max ||
            aNewPnt[3] < v2min || aNewPnt[3] > v2max)
        {
          break; // Out of borders, handle this later.
        }

the parameters are compared with values obtained by IntPolyh_MaillageAffinage algorithm and do not have any relations to the domain boundaries.

This misprint has been eliminated.
2018-07-31 19:23:42 +03:00
nbv
94783b5111 0028085: Incorrect result of CUT operation
Before the fix, small arc of circle returned as intersection result. It was connected with the fact that the circle always was limited in 0 and 2*PI points. Currently the bounds of the circle (retrieved as an intersection curve) are computed from the real domain of the arguments (there is not a snap to the fixed 0 and 2*PI points).
2018-07-31 19:21:41 +03:00
kgv
39b7b2a465 0029997: Coding Rules - eliminate GCC compiler warnings -Wmaybe-uninitialized in Select3D_InteriorSensitivePointSet.cxx 2018-07-30 18:40:21 +03:00
ifv
73a7509fde 0029573: ConcatenateWireC0 crashes on two edges wire
Wrong setting first/last vertices is fixed
Test case added
2018-07-30 18:39:01 +03:00
abv
7686e915e2 0029911: Porting to Debian80-64 : Regressions in Foundation Classes
Test for handles is updated according to behavior expected from modern compilers.

Performance test perf ncollection A1 is updated (valid range extended) according to measurements made on Debian 8 with GCC 4.9 and on Ubuntu 16.04 with CLang 3.8 and 6.0 and GCC 4.7, 4.9, and 5.0.
2018-07-27 16:19:38 +03:00
abv
9dc6c9b8d4 0029859: Coding - GCC compiler warning -Warray-bounds in IntPatch_InterferencePolyhedron.cxx 2018-07-27 16:19:31 +03:00
kgv
1f26f80bb7 0029967: Draw Harness - command bounding has annoying syntax
Bnd_OBB constructor from Bnd_Box is fixed for VOID input.

DRAW command bounding command is adjusted:
- Support of old syntax 'bounding shape'is restored.
- Exception on VOID bounding box is avoided.
- Arguments are handled in case-insensitive way.
- Options -s, -perfmeter, and ability to set result as first argument are removed as redundant.
- Help is moved to command definition.

Separate command OCC29311 is added (in QADraw) to do the same as option -perfmeter did; tests are updated.
2018-07-27 16:19:26 +03:00
emv
3dc5809557 0029973: Modeling Algorithms - access violation within BRepAlgoAPI_Cut on empty input shape
Boolean Operations algorithm has been improved to handle the cases with empty shapes arguments correctly.
Test cases for the issue.
2018-07-27 16:19:20 +03:00
emv
d3578357e3 0029711: General Fuse operation produces invalid result
The following improvements have been introduced in Boolean Operations algorithm s:
1. UBTree is replaced with EBTree in Boolean operations to be able to add/remove elements into the tree of bounding boxes.
2. Repeated (nested) intersection of sub-shapes is performed with argument vertices whose tolerances increased during the operation.
3. The algorithms of Edge/Edge and Edge/Face intersection have been improved for the cases when the intersection point is located close to the edge boundaries .
4. New procedure has been implemented to ensure forced creation of Edge/Face common blocks in cases when the edge is really close to the face.
5. Post-processing of Face/Face intersection results has been improved.
6. Extension of the planar faces for Plane/Plane intersection is avoided.
7. Builder Face now better classifies potentially internal edges relatively to new faces with filtering by bounding boxes.

Side effect changes:
1. IntTools_ShrunkRange now keeps the length of the valid range of the edge.
2. The method BOPDS_DS::UpdateEdgeTolerance() has been removed as unused (replaced by the BOPAlgo_PaveFiller::UpdateEdgeTolerance()).

Test case for the issue 0029900.
Test case for the issue 0029711.
Adjustments of the existing test cases.

Avoid using uninitialized variables.
2018-07-27 16:19:15 +03:00
kgv
fb60181a3a 0029958: Visualization - add method Graphic3d_ArrayOfPrimitives::AddEdges() taking up to 4 edges 2018-07-27 16:19:09 +03:00
kgv
6f26baa0fc 0029975: Visualization - Graphic3d_ClipPlane::ProbeBox() returns Out for fully In box 2018-07-27 16:19:04 +03:00
abv
321659b075 0029981: Coding - Clang 6.0 warning [-Wenum-compare-switch]
In implementation of DRAW command "mkplane", the case labels of the switch statement are corrected to use values of the enum matching the type of the switch argument.
2018-07-27 16:18:58 +03:00
kgv
27a4b067ff 0029980: Configuration, CMake - impossible to override CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS
Variables are not assigning only if have not been previously defined.
2018-07-27 16:18:52 +03:00
kgv
8f521168b4 0029740: Draw Harness - eliminate redundant casts to AIS_InteractiveObject
NCollecton_DoubleMap has been extended with two new methods Find1() and Find2()
performing lookup and returning found key withoout throwing an exception
(similar to NCollection_DataMap::Find()).

ViewerTest_DoubleMapOfInteractiveAndName has been redeclared to define
Handle(AIS_InteractiveObject) key instead of Handle(Standard_Transient).
2018-07-27 16:18:47 +03:00
kgv
a6df1715ed 0029974: Visualization - OpenGl_Layer::Render() produces inconsistent state of Polygon Offset settings
OpenGl_Layer::Render() now calls OpenGl_Workspace::SetDefaultPolygonOffset()
for managing default polygon offset settings considering OpenGl_Workspace applied aspect logic.
2018-07-27 16:18:41 +03:00
kgv
9427bc1d1e 0029949: Draw Harness - simplify vtriangle command implementation
vtriangle and vsegment commands now share presentation created by vdrawparray command.

Added missing accessors to Graphic3d_ArrayOfPrimitives properties
VertexNumberAllocated(), EdgeNumberAllocated() and BoundNumberAllocated().
2018-07-27 16:18:35 +03:00
kgv
288fff89cc 0029969: Modeling Algorithms - BRepPrimAPI_MakeHalfSpace::Shape() returns NULL shape while reporting IsDone() 2018-07-27 16:18:26 +03:00
emv
edc9567475 0029955: Face and Solid BOP: Building 2D curve of edge on face has failed
Test case for the issue as it is not reproduced anymore.
2018-07-27 16:18:20 +03:00
emv
4ccdb6f675 0028113: BOPAlgo_Builder produces invalid shape
Fast rebuilding of the face is now avoided if its edges have been unified during the intersection.
Full rebuilding of the face is required in this case (using BuilderFace algorithm).
2018-07-21 13:45:00 +03:00
kgv
6e3a8b035d 0029970: Coding Rules - StdSelect_BRepOwner::Set() method is declared but undefined
Undefined method has been removed.
2018-07-20 17:18:11 +03:00
emv
67740c81cf 0028123: Boolean Cut produces faulty shape
Test case for the issue as it is not reproduced anymore.
2018-07-20 17:18:11 +03:00
emv
ae276302f6 0029968: Modeling Algorithms - BRepAlgoAPI_Cut produces an empty result with half-space
IntTools_Context::IsInfiniteFace() - Make the conclusion about infinity of the face basing on its bounding box only. No need to check NaturalRestriction flag.
2018-07-20 17:15:53 +03:00
msv
63cdf48ec1 0029830: STEPCAFControl_Reader poor performance - quadratic dependence
Various performance improvements in STEP read/write algorithms:
- Search for the  label of a shape or component shape is improved using map mechanism instead of brute force iteration.
- Invariant FindEntities() is moved out of the loop in the method getStyledItem in STEPCAFControl/STEPCAFControl_Writer.cxx.
- A pointer to the end of binders chain is added in Transfer_Binder class to speed up adding a binder to the chain.
- Small fixes are added  to eliminate excess copying of handles, calls of handle DownCasts and so on.

Stack overflow is removed during destruction of STEP model with long chains of Transfer_Binder.
It is possible to use the Draw commands ReadStep and WriteStep to read/write from the session without accessing the disk file (use '.' for the file name).

Performance test cases for STEP reading/writing have been added.
2018-07-20 17:15:53 +03:00
abv
0a96e0bbc4 0029769: Uninitialized data with BSplCLib_Cache, BSplSLib_Cache
Implementation of classes BSplCLib_Cache and BSplSLib_Cache is revised:
- Common functionality dealing with spans along one parametric direction is separated to new struct BSplCLib_CacheParams
- Empty constructors are removed; copying is prohibited
- Code reconsidering degree and other parameters on each call to BuildCache() is eliminated; curve parameters must be the same in constructor and all calls to BuildCache()
- Extra call to BuildCache() from constructor is eliminated
2018-07-20 16:59:22 +03:00
skl
3388cf17dc 0025852: Visualization - Font_BRepFont produces bad faces for circled symbols
Font_BRepFont now uses a dedicated algorithm for text-to-BRep transformation instead of relying on ShapeFix.
It orders wires based on wire classification, analyzes internal zones and creates a few faces (if needed).
TKService dependency from TKShHealing has been dropped.
2018-07-20 16:58:37 +03:00
jgv
59694b5da3 0029861: Modeling Algorithms - BiTgte_Blend gives exception
The algorithm has been corrected to avoid exception.
Now both Draw commands "brollingball" and "rollingball" give correct results.
Test cases "offset faces_type_a A3, A4, A9" are good now.
2018-07-20 16:58:12 +03:00
gka
b5ea631975 0029959: Coding - new warnings after integration 29846
Erroneous label declaration has been removed in function SetMaterial from XDEDRAW_Props.cxx
2018-07-20 16:57:42 +03:00
emv
feaedd5756 0027230: Boolean operations fails on attached shapes
Test case for the issue as it is not reproduced anymore.
2018-07-20 16:56:55 +03:00
kgv
45117bfc1d 0029961: Foundation Classes - NCollection_Shared constructor passes arguments by copy
New NCollection_Shared constructors taking arguments by reference have been added.
2018-07-20 16:56:24 +03:00
kgv
ca0962a1e9 0029960: Foundation Classes - disarm OSD_ThreadPool copy constructor
Private copy constructors have been added to OSD_ThreadPool
and Standard_Condition to protect misuse.
2018-07-20 16:55:59 +03:00
gka
ffe1b14331 0029846: Data Exchange - STEP validation properties support is obsolete
Name of the PROPERTY_DEFINITION entity for validation properties is changed to "geometric validation property" according to the current version of the recommended practices.
For compatibility with older definitions (with underscores) the check is made using string with underscores replaced by spaces.
2018-07-13 16:38:08 +03:00
ysn
07f2b74116 0029817: Documentation - avoid excessive use of "please"
"Please" is now used in the documentation only in sensitive cases.
2018-07-13 16:38:08 +03:00
skl
3b7f55e9d1 0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
Output information about failure during reading of external file has been added (it can be checked by using Draw command "tpstat").
If the reader cannot find an external file at the first found location
(using entity APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT) it checks other information about file path
(using entity DOCUMENT_FILE related with the above-mentioned entity) and uses a new location for import of the external file.
2018-07-13 16:38:07 +03:00
kgv
6f498847fa 0029935: Foundation Classes - introduce OSD_ThreadPool class defining a thread pool
New class OSD_ThreadPool has been introduced to define a Thread Pool for multi-threading algorithm.
Thread Pool assigns a serial number for each thread allowing Multi-Threading algorithm to allocate thread-local storage variables as an array whose size is the same as the number of threads.

OSD_ThreadPool also redirects exceptions to a thread calling parallel execution and consistently initializes FPE exception handling.

New class Standard_Condition provides a platform-independent  tool similar to Event in WinAPI.

A new auxiliary function Standard_Atomic_CompareAndSwap() has been introduced
for performing atomic compare and swap of integer number.
Standard_Atomic_Increment/Standard_Atomic_Decrement fallback implementation
using ASM code for x86 processors for GCC has been dropped;
instead, it is expected that GCC should be properly configured targeting modern x86 architectures.

OSD_Signal now declares fFltExceptions as thread_local variable accessible through OSD::ToCatchFloatingSignals() property.
Standard_THREADLOCAL macro (wrapping thread_local attribute) has been moved to public header Standard_Macro.hxx.

OSD_Parallel::ForEach() has been extended with new optional parameter theNbItems and uses OSD_ThreadPool::DefaultPool().
2018-07-13 16:38:06 +03:00
kgv
be3d8cbc02 0029425: Visualization - AIS_InteractiveContext::SetAutomaticHilight() has no affect
AIS_InteractiveContext::MoveTo() and ::Select() now do not highlight entities
when ::AutomaticHilight() option is turned off.

vselprops command has been extended with new arguments -autoHighlight and -highlightSelected
(vhighlightselected command is now deprecated).
2018-07-13 15:06:22 +03:00
ika
df6f165a2b 0029945: Export body of revolution to STEP breaks the shape
Now vertex loops on surfaces of revolution are imported from STEP format in the same way as on spheres and b-spline surfaces: in case of a single vertex loop neutral bounds will be used.
2018-07-13 15:06:05 +03:00
kgv
1f886fae1b 0029936: Documentation - improve description of AIS_Animation class 2018-07-13 15:05:57 +03:00
kgv
e2aba8ebf3 0029947: Visualization - SelectMgr_SelectableObject::GetSelectPresentation() should copy object clipping planes
Methods SelectMgr_SelectableObject::GetHilightPresentation(), ::GetSelectPresentation() and ::UpdateClipping()
have been corrected to copy clipping planes of the object into highlighting and selection presentations.
2018-07-13 15:05:40 +03:00
nbv
73e403b8c6 0029948: Uninitialized variable in GeomEvaluator_OffsetSurface::CalculateD0(...) method
Variable "NStatus" from GeomEvaluator_OffsetSurface class is now initialized correctly.
2018-07-13 15:05:22 +03:00
nbv
92a55b01af 0029866: Intersector returns two overlapped curves as a result
Since now a new WLine is not created if its start point lies in another earlier computed WLine. It allows avoiding creation of duplicate WLines in the intersection result.

<!break>

1. Methods IsOutSurf1Box(...), IsOutSurf2Box(...), IsOutBox(...) for classes IntSurf_LineOn2S and IntPatch_RLine have been created.
2018-07-13 15:05:03 +03:00
kgv
8ff2e494f5 0029939: Modeling Algorithms - add NULL check to BRepGProp_Face::Load()
BRepGProp_Face::Load() has been protected against crash in case of edges without p-curves.
2018-07-13 15:03:55 +03:00
gka
e119b6c3c7 0029944: Porting to VC 2017 : Regressions on the gcc (Debian 4.9.2-10) 4.9.2. Exception is raised during load STEP file.
Boolean parameter "same_sence" from class RWStepShape_RWAdvancedFace.cxx is now initialized correctly.
2018-07-13 15:03:43 +03:00
nbv
c520fb2aa2 0029942: Porting to Debian80-64 : Regressions in Modeling Algorithms after integration fix for 29807
Correction in the test case perf/modalg/bug27021.
2018-07-13 15:03:14 +03:00
gka
39ab2e0c4d 0029916: Regressions in Data Exchange on VC 2017
The "end" file from folder "de" has been corrected to exclude comparing the number of edges in the shapes from current result with test data.
"TODO messages generated for differences were removed.
Data exchange tests were regenerated.
2018-07-13 15:02:58 +03:00
kgv
029594a052 0029934: Visualization - handle properly orthogonal clipping plane within SelectMgr_RectangularFrustum::computeClippingRange()
SelectMgr_RectangularFrustum now considers the direction of clipping plane orthogonal to picking ray.
2018-07-13 15:02:38 +03:00
mnv
98b15dbfce 0029823: Visualization, TKOpenGl - highlighting by Bounding Box mistreats Local Transformation
The problem when object transformation was applied to the bounding box twice has been fixed in OpenGl_Structure.
OpenGl_ShaderManager has been extended with GLSL program drawing bounding box.
OpenGl_Structure does not create extra Groups for drawing bounding box.
2018-07-06 15:56:27 +03:00
kgv
1b661a81d5 0029874: Visualization - capping plane transparency does not work
Interface OpenGl_RenderFilter and its implementations have been merged into OpenGl_Workspace.
This limits flexibility of interface, but simplifies logic.
- OpenGl_RenderFilter_FillModeOnly flag replaces OpenGl_CappingAlgoFilter;
- OpenGl_RenderFilter_NonRaytraceableOnly flag replaces OpenGl_RaytraceFilter;
- OpenGl_RenderFilter_OpaqueOnly flag replaces OpenGl_OpaqueFilter;
- OpenGl_RenderFilter_TransparentOnly flag replaces OpenGl_TransparentFilter.

OpenGl_CappingAlgo now:
- avoids redundant Stencil clearing when Layer contains at least one transparent Element;
- renders semitransparent capping plane within transparent elements pass.

vclipplane command has been extended by new argument -transparency.
2018-07-06 15:56:08 +03:00
kgv
14823c6f5e 0029929: Visualization, V3d_View - make method ::FitMinMax() public 2018-07-06 15:55:54 +03:00
apn
73b07eddd0 0029928: Regressions: a lot of warnings produced during generation Overview by Doxygen
Warnings in upgrade.md have been eliminated.
2018-07-06 15:55:03 +03:00
kgv
b053e5d673 0029927: Coding Rules - eliminate GCC compiler warnings -Wmaybe-uninitialized in BRepApprox
The code has been fixed to avoid taking a reference from a field of a temporary variable
(BRepApprox_ApproxLine::Point() returns non-reference structure).
2018-07-06 15:54:34 +03:00
abv
5efab28a44 0029834: Coding Rules - eliminate GCC compiler warnings -Wformat-overflow in IGESData_IGESWriter
String buffers have been increased to be sufficient to accommodate result of sprintf() for any possible printed integer values.
2018-07-06 15:54:06 +03:00
kgv
4c4420dfe9 0029868: Draw Harness - help message for readstl command is unclear
readstl syntax has been modified, so that it creates a single-face triangulation by default.
The argument "trinagulation" is no more supported.
The new argument "-brep" has been introduced to generate
a compound of per-triangle faces instead (old default behavior of the command).
2018-07-06 15:53:48 +03:00
kgv
b2cd90e2b6 0029909: Coding - GCC compiler warnings in Qt headers while building Samples in OCCT and Products on Debian80 64 bit
Standard_WarningsDisable.hxx has been extended by ignoring -Wunused-local-typedefs within GCC compiler.
2018-07-06 15:53:35 +03:00
nbv
3306fdd954 0029807: [Regression to 7.0.0] Impossible to cut cone from prism
The algorithm has been improved for the cases when the intersection line goes through the cone apex.

<!break>

1. All special points are put to the ALine forcefully (if they are true intersection point). Currently this step has not been implemented yet.

2. Now the tolerance of IntPatch_Point (put into ALine) is computed in order to cover the distance between it and the correspond ALine.

3. Test cases have been created.

4. Procedure of trimming IntAna_Curve has been improved.

5. Criterion when the discriminant of IntAna_Curve can be considered to be equal to 0 has been improved.

6. Methods IntAna_Curve::FindParameter(...) (and IntPatch_ALine::FindParameter(...)) currently returns list of all parameters corresponding the given point (IntAna_Curve can be self-interfered curve). Before the fix, this method always returned only one (randomly chosen) parameter.

7. Interfaces of the following methods have been changed: IntAna_Curve::FindParameter(...), IntPatch_ALine::FindParameter(...), IntPatch_ALine::ChangeVertex(...), IntPatch_SpecialPoints::AddPointOnUorVIso(...), IntPatch_SpecialPoints::AddSingularPole(...), IntPatch_WLineTool::ExtendTwoWLines().

8. Following methods have been added: IntAna_Quadric::SpecialPoints(...), IntPatch_ALineToWLine::GetSectionRadius(...), IntPatch_SpecialPoints::ProcessSphere(...), IntPatch_SpecialPoints::ProcessCone(...), IntPatch_SpecialPoints::GetTangentToIntLineForCone(...).

------------------
1) tests/boolean/volumemaker/C5
   tests/boolean/volumemaker/C6
   tests/boolean/volumemaker/E7

They are real IMPROVEMENTS. In the FIX (in compare with MASTER), section result between pairs of faces f2&f6 (C5), f3&f7 (C6) and f1&f5 (E7) is closed. Separated test cases have been created in order to focus on the problem with section. Bug #28503 has been fixed.

Correction in test cases.
2018-07-06 15:52:48 +03:00
kgv
d9d3107d8d 0029925: Foundation Classes - add missing cast to LowerCase() and UpperCase() arguments
Argument of LowerCase() and UpperCase() is cast to int via unsigned char to avoid passing negative integer in the case if the argument char is in the extended part of ASCII table (which would result in undefined behavior according to C++ standard).
2018-07-06 15:45:01 +03:00
abv
70aac17140 0029924: Configuration - remove obsolete folders from .gitignore
Folders drv, sun, sil and ao1 have been removed from .gitignore
2018-07-06 15:44:30 +03:00
ifv
1dbdf099cd 0029857: Incorrect behavior of Point-Curve Extrema
Check for double solutions has been  added in algorithms Extrema_ELPCOfLocateExtPC and  Extrema_ELPCOfLocateExtPC2d
that find extrema between point and curve.
2018-06-29 12:11:45 +03:00
mnv
35cbf341d1 0029894: Visualization - AIS_ColorScale ColorRange returns only min color
A typo in AIS_ColorScale::ColorRange function has been fixed.
2018-06-29 12:11:03 +03:00
ika
fcdb829c25 0029890: Data Exchange - Problem in Expand Compounds
XCAFDoc_ShapeTool::Expand method now avoids creation of subshapes under assemblies.
XCAFDoc_ShapeTool::AddSubShape now avoids creation subshapes under all labels except for simple parts.
2018-06-29 12:10:37 +03:00
ika
8cbf1f8d41 0029888: [Regression] Data Exchange - XCAFDoc_Editor::Expand() removes names
XCAFDoc_Editor::Expand function avoids expanding references to assemblies.
2018-06-29 12:09:25 +03:00
nbv
4680b22c2c 0029887: Wrong result of CUT operation due to incorrect point-face classification
Use of input tolerance has been eliminated in Geom2dInt_GInter algorithm called from BRepClass_Intersector::Perform(...) method.
Now the input tolerance is used only for checking ON-status of classification.
2018-06-23 13:34:38 +03:00
kgv
12280e4bfc 0029885: Visualization, AIS_Manipulator - Translation is done in wrong direction depending on Camera orientation
AIS_Manipulator::ObjectTransformation() has ceased to use undefined point for myStartPick initialization within AIS_MM_Translation mode.
AIS_MM_Scaling cas has been merged into AIS_MM_Translation to reduce code duplication.
Extrema_ExtElC/IntAna_IntConicQuad are now used directly instead of more generic GeomAPI_ExtremaCurveCurve/GeomAPI_IntCS.
2018-06-23 13:33:10 +03:00
kgv
68dcee028d 0025467: Visualization - Possibility to remove AIS_LocalContext class
Deprecated functionality related to Local Context has been removed.

The following classes and types have been removed:
AIS_LocalContext, AIS_DataMapOfILC, AIS_LocalStatus, SelectMgr_SequenceOfSelector, SelectMgr_DataMapOfObjectSelectors.
Value AIS_DS_Temporary has been removed from enumeration AIS_DisplayStatus.

The following methods related to Local Context have been removed from AIS_InteractiveContext:
::HasOpenedContext(), ::HighestIndex(), ::LocalContext(),
::LocalSelector(), ::OpenLocalContext(), ::CloseLocalContext(),
::IndexOfCurrentLocal(), ::CloseAllContexts(), ::ResetOriginalState(),
::ClearLocalContext(), ::UseDisplayedObjects(), ::NotUseDisplayedObjects(),
::SetShapeDecomposition(), ::SetTemporaryAttributes(),
::ActivateStandardMode(), ::DeactivateStandardMode(), ::KeepTemporary(),
::SubIntensityOn(), ::SubIntensityOff(),
::ActivatedStandardModes(), ::IsInLocal()
and ::AddOrRemoveSelected() taking TopoDS_Shape.

The methods AIS_InteractiveContext::Display() and ::Load()
taking argument theToAllowDecomposition have been marked as deprecated;
the new methods without this unused argument should be used instead.
AIS_InteractiveContext::DisplayedObjects() - removed argument theOnlyFromNeutral.

SelectMgr_SelectionManager has been simplified so that now it support only single Viewer Selector.

The argument -local has been removed from Draw Harness commands vselmode, vremove, vdisplay, vdisplayall, verase.
2018-06-23 13:21:03 +03:00
kgv
d9f79dae49 0029882: Visualization - AcceptDisplayMode() should be redefined in class AIS_TexturedShape 2018-06-23 13:20:55 +03:00
ifv
4b114473ef 0029734: Modeling Algorithms - Compute global properties of tessellated shape
New algorithms calculating global properties on mesh data have been added:
- BRepGProp_MeshCinert computes the global properties of polylines represented by a set of points;
- BRepGProp_MeshProps computes the global properties of a surface mesh.

Existing tool BRepGProp now automatically uses new algorithm for triangulation-only faces.
By default, algorithm will use exact geometry objects (surfaces), when it is available (as before the patch);
this behavior can be switched by a new flag UseTriangulation, forcing usage of triangulation instead of exact geometry when both defined.
2018-06-23 13:12:36 +03:00
abv
a820bd4f13 0029859: Coding - GCC compiler warning -Warray-bounds in IntPatch_InterferencePolyhedron.cxx
Code is corrected to avoid copying uninitialized element of the array
2018-06-14 14:03:14 +03:00
dipts
56cc44e0f5 0029847: Visualization, Image_Diff - Tolerance is not effective for 24/32bit image formats
Image_Color - removed semibroken summ/difference operators.
Image_Diff now uses signed integer for computing differnce between ubyte3 components;
properly compare squared tolerance.

Image_Diff - dropped declaration of Image_ColorXXX24.
RGB color difference is now computed using Chebyshev distance instead of Euclidean distance
Image_PixMap - added methods RawValue()/ChangeRawValue() returning a pointer
to image where specified pixel data is defined.
2018-06-14 14:03:13 +03:00
emv
cf12784f94 0029845: UnifySameDomain does not account the accumulated angle when unifying edges
Check that the accumulated angle does not exceed the given angular tolerance while merging the linear edges.
Test case for the issue.
2018-06-14 14:03:12 +03:00
nds
0c44027cb9 0029841: Test cases from tools/dfbrowser periodically hang on Windows platform
Do not start new thread if the thread has been already started. Restart the thread after the previous has finished.
2018-06-14 14:03:12 +03:00
kgv
bc37935836 0029825: Foundation Classes, NCollection_Vec4 - workaround gcc optimizer issues with xyz() method
Methods of NCollection_Vec3 and NCollection_Vec3 that returned reference to internal buffer as vector of lower dimension (non-const xy(), xyz() etc.) are eliminated.
Use of these methods could led to generation of incorrect binary code by GCC.
Instead added new method SetValues() accepting vector of lower dimension and additional value.

DRAW test command QANColTestVec4 reproducing one situation where the bug occurs is added, along with a test case.
2018-06-14 14:03:11 +03:00
abv
4e73d75b03 0029826: Tests - test case perf/fclasses/strtod is unstable
Check of performance of accelerated Strtod() vs. standard strtod() in the test is relaxed: now test passes if Strtod() is at least 1.5 times faster
2018-06-14 14:03:10 +03:00
vro
bd6f0d2ff9 0029116: [Regression] OCAF attributes insertion order is violated again 2018-06-14 14:03:10 +03:00
kgv
b2d1851c43 0029814: Modeling Data - add method TopoDS_Shape::NbChildren() for simple check of sub-shapes number
TopoDS_Shape::NbChildren() - new method has been introduced.
TopoDS_Shape.lxx, TopoDS_TShape.lxx - inline methods have been moved to hxx.
TopoDS_TShape_Flags has been redeclared as enumeration instead of preprocessor macros.

Cyclic dependency between headers TopoDS_Shape.hxx and TopoDS_TShape.hxx eliminated.

Places where TopoDS_Iterator is used only for calculation of number of sub-shapes are updated to use NbChildren() instead
2018-06-14 14:03:09 +03:00
jgv
e67e482d99 0029511: Section fails for these two faces
Modified method: Approx_ComputeLine::Compute
Check of multicurve is now always unconditional, the procedure of check is modified to avoid infinite loops.

Modified classes: GeomLib_CheckBSplineCurve and GeomLib_Check2dBSplineCurve
Correction of poles at the ends of curve is modified to fit the direction of tangent defined by two first points or two last points of walking line.

Also modified:

BOPAlgo_PaveFiller: modified methods PostTreatFF, RemoveUsedVertices - now unused vertices are included in the list of vertices to be absorbed by other ones.
2018-06-14 14:03:08 +03:00
jgv
d60e8ddedc 0029813: BRepFill_PipeShell algorithm produces invalid result
Modified method: BRepFill_Sweep::BuildShell
case of global closedness of path containing several C0-connected parts is corrected.
2018-06-14 14:03:08 +03:00
ika
f277ba3771 0029821: Data Exchange - Wrong processing of subshapes in ShapeTool
Improve FindSubShape method in ShapeTool.
Update Expand compounds, according to changes in ShapeTool.
Add FindSubShape and AddSubShape commands for Draw.
2018-06-14 14:03:07 +03:00
emv
948fe6ca88 0028747: Incorrect result of the section operation after edge refinement
Implementation of the method for simplification of the result of Boolean Operation on the API level.
The method BRepAlgoAPI_BuilderAlgo::SimplifyResult has been added, so the derived classes such as BooleanOpeation and Splitter can also use this method.
The result shape simplification should be called after the operation is done. The simplification is performed by the means of ShapeUpgrade_UnifySameDomain algorithm.

Draw command "bsimplify" has been added to control the simplification options.
Documentation for new functionality and draw commands controlling the options of Boolean operations.
Test cases for the new functionality.

Side-effect change:
The algorithms in Boolean component have been changed to use the BRepTools_History as a History tool.
Now it became possible to disable the collection of shapes modifications during Boolean Operations, which may be useful for performance sake (in draw the option is controlled by *setfillhistory* command).
Draw command "unifysamedom" has been changed to accept the angular tolerance in degrees instead of radians.
2018-06-14 14:03:06 +03:00
nbv
894dba72a3 0029694: Geom2dGcc_Circ2dTanCenGeo crash
The reason of this issue is in incorrectly interpreted the generic class "TheExtPC" (eliminated after the fix 0024773) as Extrema_ExtPC2d. Correct interpretation must be "Extrema_EPCOfExtPC2d" class.

Now this problem has been fixed in the class Geom2dGcc_Circ2dTanCenGeo.

New testgrid "lowalgos 2dgcc" has been created.
2018-06-14 14:03:06 +03:00
nbv
638ad7f3c5 0029712: Extrema algorithm raises exception
1. Extrema algorithm calls Curve-surface intersector. This intersector returns flag about infinite solution (in spite of extrema's returning not-parallel status correctly - axes of considered cylinder and circle are not parallel). In this case, attempt of obtaining number of intersection points leads to exception.

So, the fix adds check of infinite solution after the intersection algorithm.

2. The methods IsDone(), IsParallel(), NbExt(), SquareDistance() and Points() (of Extrema_* classes) have been corrected to make them consistent to the documentation.

3. Revision of some Extrema_* classes has been made in order to avoid places with uninitialized variables.

4. Currently Extrema does not store any points in case when the arguments are parallel. It stores the distance only.

5. Some cases on Extrema-algo have been moved from "fclasses"-group to "modalg"-group.
2018-06-14 14:03:05 +03:00
msv
395a5977d5 0029777: Foundation Classes - The methods of moving of one NCollection_Sequence to another are unsafe
Make the methods Append, Prepend, InsertBefore and InsertAfter, which take another sequence as an argument, copying the sequence instead of joining if the allocators are different.

Add test cases for collection classes.
2018-06-14 14:03:04 +03:00
nbv
ef33df518a 0029691: Constructor of BRepFill_MultiLine adjusts V-parameter of sphere in the range -PI/2 ... +PI/2 mistakenly.
1. Sphere is not V-periodic surface. See the section "Periodicity concept" written in frame of the fix 0029115. Therefore, applying ElCLib::AdjustPeriodic(...) method is unreasonable.

2. Default U work range of sphere is 0 ... 2*PI. Therefore, adjusting U parameter in range -PI/2 ... +PI/2 is unreasonable.
2018-06-14 14:03:04 +03:00
ifv
7e4ff64898 0029586: Revolution creates solid with degenerated edges shared among faces
Substitution of degenerated edges by their copies is implemented to make edges not shared
in BRepPrimAPI_MakeRevol::Build().
Method BRepPrimAPI_MakeRevol::Generated(...) is changed in order to use history of substitutions.
Test case is added.
2018-06-14 14:03:03 +03:00
drazmyslovich
9f785738a1 0029719: Modeling Algorithms - GeomPlate_BuildPlateSurface has no progress information and is not abortable
The Message_ProgressIndicator handle is added as a parameter to the function LU_Decompose and the the member functions of math_Gauss, Plate_Plate and GeomPlate_BuildPlateSurface classes.
2018-06-14 14:03:02 +03:00
kgv
25c35042b6 0029729: Visualization, Graphic3d_ClipPlane - add support of clipping plane chains
Graphic3d_ClipPlane now can define a Chain of Planes (logical AND).
OpenGl_ShaderManager - added new GLSL sub-programs for clipping plane chains.
Bnd_Range::TrimFrom(), ::TrimTo() - added auxiliary methods for trimming the range.
SelectMgr_ViewClipRange now handles non-continuous clipping range.
Graphic3d_SequenceOfHClipPlane now aggregates NCollection_Sequence instead of inheritance.
OpenGl_CappingPlaneResource - triangulation has been adjusted to make front face following CCW order.
2018-06-14 14:03:02 +03:00
Benjamin Bihler
012264339e 0029765: BOPTools_AlgoTools::MakeSplitEdge Creates Illegal Edge
Method MakeSplitEdge checks arguments order.
This makes the method more generic.
Taking vertex orientation into account.
2018-06-14 14:03:01 +03:00
kgv
e52ba46e3b 0029520: Visualization - drop deprecated V3d_View::Export() functionality and dependency from gl2ps 2018-06-14 14:03:00 +03:00
bugmaster
7775636a15 Switching #define OCC_VERSION_DEVELOPMENT "dev" 2018-06-14 14:03:00 +03:00
bugmaster
ec86d65faf Update version of OCCT up to 7.3.1 2018-06-14 14:02:59 +03:00
bugmaster
42da0d5115 Correction of corrupted png file 2018-05-29 13:14:02 +03:00
abv
d25f052208 Raise OCCT version up to 7.3.0 (comment out "beta") 2018-05-25 21:55:01 +03:00
abv
60fddce474 0029669: Crash on opening a document with same Ocaf attributes with different IDs
Added protection against clash of attributes with the same GUID when more than one attribute of the same type but with different GUIDs are stored in the file.
If attribute with default GUID has already been read, then adding next empty attribute of the same type (done at start of its reading) will fail; in such case another attempt is made with Null GUID.
2018-05-25 21:55:00 +03:00
isn
61ace3dc72 0029816: Add possibility to get/set shape presentations for GD&T label through one function
new methods GetGDTPresentations(.) and GetGDTPresentations(.) for Dimension Tool
2018-05-25 21:55:00 +03:00
apn
2e32a64577 0029407: Generating static libraries on macOS
Update "Building with Xcode" documentation
2018-05-25 21:54:59 +03:00
apn
6acbb1c641 0029266: Configuration - CMake install does not copy pdb files in Debug mode due to the changes in 0028287
Define variable "OCCT_INSTALL_BIN_LETTER" only if compiler is some version of Microsoft Visual C.
2018-05-25 21:54:58 +03:00
kgv
fad3eca77f 0029791: Visualization - Wrong result of SelectMgr_RectangularFrustum::IsClipped
SelectMgr_RectangularFrustum::computeClippingRange() fix skipping depth range starting behind the ray.
2018-05-25 21:54:57 +03:00
drazmyslovich
3e782664b8 0029715: Mesh - Estimate the grid size of the acceleration structure by the complexity of the face
The circles acceleration structure sizes are estimated using the required deflection and the complexity of the face.
2018-05-25 21:54:56 +03:00
abv
64e93ce135 0029640: OCAF - add information on replacement of CDM_MessageDriver in upgrade guide.
Information on replacement of CDM_MessageDriver by Message_Messenger is added in the upgrade guide.
This replacement is recorded as rename in upgrade.dat
2018-05-25 21:54:55 +03:00
snn
8c7fab9b4d 0029621: Application Framework - Impossible to attach existing tessellation to XCAFDoc_Note
- XCAFNoteObjects_NoteObject transfer object for note's auxiliary data was added. It contains the following fields:
  text and attachment positions, note plane and tesselated presentation
- GetObject/SetObject methods were added to XCAFDoc_Note attribute. The following sub-labels were added to handle transfer object:
  1 - text position
  2 - note plane
  3 - attachment point
  4 - tesselated presentation
- documentation updated

Off-topic: procedure genproj now gives meaningful error message if new package is added but not listed in UDLIST
2018-05-25 21:54:54 +03:00
kgv
c9ebb2dd0e 0029811: Tests - unstable tests demo\draw\binpersist_* due to usage of the same temporary file name 2018-05-24 16:59:20 +03:00
nds
ab5b3c22e0 0029800: Upgrade Guide - TInspector correction documentation
TInspector documentation is updated
2018-05-24 15:36:30 +03:00
Benjamin Bihler
340549b052 0029775: Modeling Data - BRepAdaptor_CompCurve Parameterization Is Incorrect
Added wire connectivity requirement to class documentation of
BRepAdaptor_CompCurve.
2018-05-24 15:36:28 +03:00
kgv
8f1384072c 0029754: Coding Rules - replace Standard_Integer with Graphic3d_ZLayerId for consistency 2018-05-24 15:36:27 +03:00
ysn
57f84042ff 0029139: Overview contains old screenshots of occt
Numbers and screenshots have been updated in the overview to correspond to V7.3.0.
2018-05-24 15:36:27 +03:00
gka
ea7ffc2802 0029784: Crash at STEP file reading with enabled sub-shapes
In the method STEPCAFControl_Reader::ExpandShell protection for case when entity ""Connected_Face_Set" contains not only "FACE" entities ( for example "VERTEX_POINT" entities) was added.
2018-05-24 15:36:26 +03:00
ysn
f841d372e9 0029790: Upgrade Guide - problematic grammar and formatting
Grammar errors and formatting issues have been fixed.
2018-05-24 15:36:25 +03:00
ysn
14deaf427f 0029755: Proofread changes in the user guides from v7.2 to v7.3
Recent modifications and additions in the user and dev guides have been reviewed (except for upgrade.md and inspector.md).
2018-05-24 15:36:24 +03:00
kgv
3d77e9620e 0029764: Foundation Classes, TColStd_MapIteratorOfPackedMapOfInteger - workaround Visual Studio Linker bug with enabled CLI 2018-05-24 15:36:23 +03:00
kgv
32ca771129 0029768: Visualization, TKOpenGl - structure is entirely clipped by suppressed clipping
OpenGl_Structure::Render(), added missing check for disabled state of the plane.
vclipplane command has been extended with new option -setOverrideGlobal.
2018-05-24 15:36:23 +03:00
msv
9ce99357a4 0029746: Modeling Algoriothms - declare Boolean operation classes in BRepAlgo package as deprecated
The API classes in the package BRepAlgo providing access to old Boolean operations (Fuse, Common, Cut, Section) are marked as deprecated.
Corresponding classes from the package BRepAlgoAPI should be used instead.
2018-05-24 15:36:22 +03:00
emv
8bca7d76a5 0026493: BRepProj_Projection failed to project a wire on a shell
Problem is fixed by the fix for the issue #0028599 (porting of the BRepProj_Projection to modern Boolean Operations algorithm)
Thus, only test case is integrated here.
2018-05-24 15:36:21 +03:00
kgv
8a5905801c 0029724: Visualization - add AIS_InteractiveContext::ClearDetected() undoing MoveTo() dynamic highlighting
Introduced new method AIS_InteractiveContext::ClearDetected() allowing
to reset the list of detected objects and clear dynamically highlighted
entity under mouse cursor after previous AIS_InteractiveContext::MoveTo().

vmoveto command has been extended with new argument -reset.
2018-05-24 15:36:20 +03:00
kgv
be480fe752 0029744: Visualization - SelectMgr_ViewerSelector::PickedPoint() returns wrong 3D point for objects with transformation persistence
SelectMgr_RectangularFrustum::DetectedPoint() now takes into account myScale.
2018-05-24 15:36:18 +03:00
nds
0e4e721c6b 0029779: Visualization, SelectMgr_SelectableObject - sensitivity change for object not activated in given mode leads to crash 2018-05-24 15:36:17 +03:00
nds
26b004e9e8 0029743: Samples - Inspector tool - crash by selecting TNaming_UsedShapes tree item
- TNaming_UsedShapes is corrected to do not call methods of empty TopoDS_Shape
- TNaming_NamedShape is corrected to have not NULL TNaming_RefShape even if TopoDS_Shape is NULL(TNaming_Builder::Delete).
- DFBrowserPane presentation tree item for this is corrected in the same way and obsolete methods of processing SortedReferences are removed.
2018-05-24 15:36:16 +03:00
nds
b2300241d1 0029749: Samples - Inspector tool - remove "modified" column in TNaming_NamedShape presentation 2018-05-24 15:36:16 +03:00
nds
042e09aa36 0029748: Samples - Inspector tool - use recently opened files in TInspectorEXE
- recently files using in open file dialog
- correction of TInspectorEXE title to show opened file path by Start
2018-05-23 19:09:35 +03:00
nds
d0fbc7e5dd 0029781: Samples - Inspector tool - history tree model is not set into external callback in VInspector
- AIS_InteractiveContex and VInspector_ViewModelHistory are set into VInspector_CallBack
- minor correction of displaySelectedPresentations () to Hide/Show(by popup menu) any AIS_InteractiveObject, not only AIS_Shape (e.g. AIS_Trihedron)
2018-05-23 19:09:34 +03:00
nds
ed667b9069 0029747: Samples - Inspector tool - start DFBrowser inside FuncDemo qt sample
new Model->DFBrowser action to start Inspector tool with active DFBrowser plugin filled by the sample OCAF application.
To update content of the DFBrowser, use <F5> shortcut.
2018-05-23 07:00:35 +03:00
nds
2e93433ee5 0029735: Draw Harness - command to set 2D mode for viewer in ViewerTest package
vinit command has been extended with new option -2d_mode.
Added new command v2dmode to switch On/Off the mode.
2018-05-23 06:59:53 +03:00
nds
0c80bdbf5e 0029741: Samples - Inspector tool - wide icon size in table of TNamingNamedShape attribute in DFBrowser plugin 2018-05-23 06:58:41 +03:00
nds
72e4db54e7 0029733: TInspector can't open several cbf files
The issue is not reproduced anymore. The integration contains DRAW test for described functionality.
2018-05-23 06:57:54 +03:00
nds
b4dfd43648 0029739: Draw Harness - vdonly does not hide displayed objects 2018-05-23 06:57:17 +03:00
ika
fbcef69b1a 0029737: Data Exchange - Revert optimization in XCAF for format compability
Revert changes from 0029338, which were affected on order of GDT attribute sublabels.
2018-05-23 06:55:15 +03:00
emv
e50ebf1f0f 0029701: BRepTools::Update(Face) unexpectedly updates UV points of pcurve
The method *BRepTools::UpdateFaceUVPoints* has been modified to resets the UV points of the edge to the bounding points of the parametric curve of the edge on the face.

Test cases for the issue.

Adjust test cases heal split_angle_advanced ZC3, ZE6, ZE9 for current behavior as they show less faulty shapes now.
Adjust test case bugs modalg_6 bug21246 as it works correctly now.
2018-05-23 06:39:49 +03:00
szy
94443b4811 0029730: OCAF User's Guide correction for case of attributes with User defined GUID
Added description of attributes usage with User defined GUID
2018-05-23 06:15:11 +03:00
ifv
4563cf3e6c 0029655: [Regression to 6.9.1] Distance between cylinder and straight line
Trimming line by corner points of surface bounding box is added to reduce rang of line
Test case added
2018-05-23 06:02:39 +03:00
emv
80d55adf7c 0029698: Regression vs 7.2.0: Common operation raises FLT_INVALID_OPERATION exception
When checking if the split edge is oriented as the original one (BOPTools_AlgoTools::IsSplitToReverse()) the tangent vectors should be computed for both edges at the same point. This point is taken on the split edge and projected on the original edge.
The fix is intended to ensuring that the reference point will be taken inside the valid range of the split edge (i.e. not covered by the tolerance spheres of its bounding vertices) and the projection of this point on the original edge will be successful. Moreover, several sampling points are now taken on the split edge and processed until first valid point is found.

If requested (by a not null pointer) all *BOPTools_AlgoTools::IsSplitToReverse()* methods are now return the error status of the check. Before using the returned flag, the calling program should check this error status. For successful check the error status should be equal to zero.

New warning *BOPAlgo_AlertUnableToOrientTheShape* is now returned in the algorithms in Boolean component in case the check for correct shape orientation failed.

Test case for the issue.
2018-05-23 05:44:12 +03:00
gka
ea1114eb85 0029695: Shape Healing - infinite loop in ShapeFix_IntersectionTool
Avoid splitting of wrong edge in ShapeFix_IntersectionTool.
Added protection for case when index of edge to be split is out of range.

Added test bugs heal bug29695
2018-05-23 05:43:36 +03:00
bugmaster
fc87027267 Increment of OCCT version up to 7.3.0beta 2018-04-13 12:37:14 +03:00
nbv
698faabef3 0029682: Boolean intersection with fuzzy-option hangs
Algorithm of step re-computation has been improved.
2018-04-12 14:14:06 +03:00
emv
4f7d41eac3 0029604: Uniform mechanism providing History of shape's modifications for OCCT algorithms in DRAW
Implementation of the mechanism for unification of the history commands for all OCCT algorithms.
The following Draw commands should be used to track the history of shapes modifications of any operation:
- modified - to find the shapes modified from the given shape in the given history.
- generated - to find the shapes generated from the given shape in the given history.
- isdeleted - to check if the given shape has been deleted during operation.

The mechanism allows fast & easy enabling of the DRAW history support for the algorithms supporting the history on the API level (i.e. the algorithm should have the methods Modified(), Generated() and IsDeleted()).
To enable the draw history support it is necessary to store the history of the algorithm into the session. For instance:

TopTools_ListOfShape Objects = ...; // Objects
TopTools_ListOfShape Tools = ...; // Tools

BRepAlgoAPI_Cut aCut(Objects, Tools); // Boolean cut operation

BRepTest_Objects::SetHistory(Objects, aCut); // Store the history for the Objects (overwrites the history in the session)
BRepTest_Objects::AddHistory(Tools, aCut);   // Add the history for the Tools

To get the stored history in draw the command "savehistory" should be used. It saves the history kept in session into a Drawable object with the given name:

# perform cut
bcut r s1 s2

# save history of cut
savehistory cut_history

explode s1 f
modified m cut_history s1_1

The Draw History commands of the following algorithms have been removed:
- Boolean Operations;
- Defeaturing;
- Unify same domain;
- Sweep;
- Thrusections;

All these algorithms have been switched to support the new Draw history mechanism.

The Fillet and Blend algorithms have been also enabled to support history commands.
2018-04-12 13:30:56 +03:00
nbv
a3d3777de9 0029532: BOPCol containers used in the OCCT 720 do not support in the current development version.
The file upgrade.dat has been updated.
2018-04-12 13:05:08 +03:00
nds
510d969084 0029639: CMake - rename options for building samples
- BUILD_SAMPLES_MFC instead of BUILD_MODULE_MfcSample
- BUILD_SAMPLES_QT instead of BUILD_MODULE_QtSample
- sub-folder "mfc" of Samples folder in VStudio for mfc samples
- qt processing of *.ts resource files is corrected to avoid excessive projects creation under Samples folder in VStudio
2018-04-12 12:53:10 +03:00
nds
ae5225dfcd 0029684: Configuration: modification of build Inspector tool standalone on occt
- samples/tools/TStandalone is removed, to build Inspector out of OCCT, CMake should use tools/CMakeLists.txt fileName
- samples/tools/TInspectorEXE is moved to tools/TInspectorEXE
- TInspectorAPI_Version.hxx provides compilation inspector with earlier version of OCCT.
2018-04-12 12:49:07 +03:00
emv
1ccef79a2a 0029688: Regression vs 7.2.0: Wrong result of CUT operation
Boolean Operations - when splitting the face by the intersections with other arguments check if the face (e.g. really thin one) can be split by a vertex. In this case avoid simple face reconstruction and use the BuilderFace algorithm to split the face.
Test case for the issue.
2018-04-12 12:40:07 +03:00
nds
6822a3bef1 0029674: Improvements in Inspector tool
- preferences for dock windows geometry, tree view columns and current view projection;
- ViewControl package for common functionality between plugins;
- processing Location and Orientation for external TopoDS_Shape object
- 'F5' key to update content of each plugin
- visibility column in tree view (used now only in ShapeView)
- properties child item for context (presents tree of current Filters of context)
2018-04-12 12:38:38 +03:00
jgv
6dfdbb7ab8 Revert "0029369: ShapeFix_Face algorithm does not heal properly the face lying on a surface of revolution"
This reverts commit 7d13fd8ea3.
2018-04-11 16:43:07 +03:00
san
7373e19fa1 0029651: ViewerTest - vtexture command crashes
Missing null check added

Add test case bugs/vis/bug29651
2018-04-10 16:07:11 +03:00
szy
e13b9464ef 0029452: Application Framework - Failed to read an Ocaf XML document with 1.#QNAN value.
Method XmlObjMgt::GetReal() is improved to (a) recognize NAN and infinity written by old MSVC runtime (like 1.#QNAN and 1.#INF) and (b) detect situation when there are some trailing non-space symbols after the real value, returning False in such case.

Reading of real-valued attributes (single real, array, list) from OCAF XML format is improved to create valid attribute even if parsing of (some) members fails; warning is generated instead of error in such case.

Added test bugs caf bug29452
2018-04-10 16:07:06 +03:00
szy
cbc4faa980 0029574: Protection of attributes retrieval against zero ID in Ocaf XML.
//Impacts attributes supporting user defined IDs.
2018-04-10 16:07:02 +03:00
abv
9b74e2071c 0029680: Tests - command checkprops does not work for negative values
DRAW command checkprops is corrected to handle properly negative reference values.

Test case offset faces_face_i E5 is corrected (improvement due to #28903)
2018-04-09 11:07:41 +03:00
jgv
11af6cddf5 0029591: Improvements in the class BRepOffset_Tool
- Add the flag ExtensionMode in the method BRepOffset_Tool::EnLargeFace, defining the mode of extension of the surface of the face. Old behavior is to be remained the default one.

- Fix wrong building of extended face on a closed surface. Now, if the face is closed in U direction (like cylinder) but the seam edge is shifted from 0 position, the resulting extended face has properly connected seam edge.

- Add new public static method BRepTools::DetectClosedness(), which checks whether a face is closed in U and V directions.
2018-04-09 11:07:37 +03:00
nbv
c37f570215 0029663: Exception in BRepFill_PipeShell algorithm
BRepFill_Sweep algorithm is improved to handle cases when generated revolution surface has degenerated point in the middle.

Added test bugs modalg_7 bug29663

TODO added in test bugs modalg_1 bug1477_11: here two additional self-intersecting faces are now created, previously missing from the result.
2018-04-09 11:07:32 +03:00
kgv
759e2a15ca 0029659: Samples - Image is not displayed in Viewer2d MFC sample
Fixed wrong Display Mode assigned to Sample2D_Image presentation.
2018-04-09 11:07:28 +03:00
kgv
557916474b 0029658: Samples - light is not updated while moving mouse within Viewer3d MFC sample
Adding missing Viewer redraw calls.
2018-04-09 11:07:24 +03:00
nds
55a40de890 0028934: Coding - Eliminate compiler warnings in OCCT samples
- covering Qt warnings for compilation under MSVC 2013 and greater
- avoid warning about 'M_PI'(and others) redefinition warning of math.h: includes of QtWidgets should follow after other includes.
2018-04-09 10:18:38 +03:00
apn
41bf7e0b3c 0029643: Samples: create .bat files for building AndroidQt sample on Windows platform
Create environment (genproj.bat, msvc.bat, etc) for building AndroidQt sample on Windows platform (as well as it's done in other OCCT Qt samples)
2018-04-06 16:09:37 +03:00
nds
6664a9c233 0029668: Configuration: build Inspector aplication independently on BUILD_MODULE_QtSamples state 2018-04-06 16:09:33 +03:00
ifv
f84edf5816 0029606: [Regression vs 7.0] BRepClass3d_SolidClassifier classifies the point as IN while it is ON
Simple treatment of some analytical cases when curve is parallel or belongs surface is added in curve - face/surface intersection algorithm
Treatment such cases is added in classifier algorithm
Test case added
2018-04-02 16:36:31 +03:00
san
d051064495 0029667: Visualization, TKV3d - User-defined texture coordinates corrupted by StdPrs_ShadedShape
Add protection in fillTriangles() against void UV range of a face.
2018-03-30 19:36:20 +03:00
ika
a38b44f172 0029650: Data Exchange - possible exception in shape tool 2018-03-29 17:13:32 +03:00
ika
f0bef12142 0029633: Data Exchange - access violation in StepVisual_PresentationStyleAssignment while translating STEP file
Add several checks for null.
2018-03-29 17:13:29 +03:00
ika
bc728d2621 0029599: Data Exchange - Incorrect expand compound method in XDE
Improve processing of subshapes in ShapeTool
Fix sharing and calculating location for subshapes
Switch off autonaming for expand
2018-03-29 17:13:24 +03:00
snn
eacdb38f2e 0029525: PMI dimension names
Implemented semantic PMI names translation from STEP to XCAF in OCCT:
- [Get/Set]SemanticName functions added to XCAFDimTolObjects_*Object classes
- X[Get/Set]GDTSemanticName draw commands added
- test case added
2018-03-29 17:13:21 +03:00
nbv
10a55e0d05 0029660: Misprint in BuildEdge(...) static function of BRepFill_Sweep.cxx file
Misprint has been eliminated.
2018-03-29 17:13:17 +03:00
emv
f816395691 0029646: Boolean Operations algorithm produces a face with self-intersecting wire
Boolean operations - Allow repeated intersection of edges to find the coinciding pairs.
Previously, only the edges rejected by bounding boxes classification has been additionally checked on coincidence. The current patch removes this filter allowing all edges with coinciding vertices to be checked on coincidence.

Adjustment of the test cases for current behavior:
1. The following cases are improvements:
boolean volumemaker A8
bugs modalg_1 buc60703_1
bugs modalg_1 buc60703_2
bugs modalg_1 buc60703_4
bugs modalg_6 bug26789_1
bugs modalg_6 bug26789_2
bugs modalg_7 bug26883_4
bugs modalg_7 bug27948

2. bugs modalg_7 bug29580_1 is modified to extend the validity checks.
2018-03-29 17:13:12 +03:00
Benjamin Bihler
4563472c1e 0029394: IESample contains strange STEP reading code
All STEP roots are transferred first and then all shapes are read.
The resulting sequence is not discarded and recreated.
2018-03-29 17:13:09 +03:00
jgv
bad76cfc7a 0028903: BRepOffset_MakeOffset produces invalid shape (thickshell) in Intersection mode
1. Method BRepOffset_Tool::Inter3D is modified: now selection of proper edges is performed here, they are not concatenated into one edge if they go through a vertex on a boundary.

2. Method BRepOffset_Inter3d::ConnexIntByInt is modified: selection of edges is eliminated.

3. Method BRepOffset_Inter2d::ConnexIntByInt is corrected to be able to process seam edges correct.
2018-03-29 17:13:04 +03:00
akz
f84d6446a7 0029597: Data Exchange - unable to read VRML2 file
VrmlData_Scene::createNode() now handles Collision item.
VrmlData_ArrayVec3d::ReadArray() now handles a case with omitted brackets.

Added test bugs xde bug29597
2018-03-29 17:13:00 +03:00
kgv
060811b1b5 0027736: Samples - rectangle selection issues within MFC sample Viewer3d
CViewer3dView, CAnimationView3D, COCCDemoView now use AIS_RubberBand.
2018-03-26 16:00:24 +03:00
kgv
fe76088cc7 0027618: Visualization - selection returns entity overlapped by another entity on border cases
SelectMgr_ViewerSelector::updatePoint3d() - scale tolerance according to Camera defintion.
SelectMgr_RectangularFrustum::segmentSegmentDistance() now uses gp::Resolution() instead of Precision::Confusion().
2018-03-26 15:55:57 +03:00
apn
0e443e130c 0028097: Test system does not recognize 'fail...' messages as errors
Test parse rules are improved to recognize messages with word 'fail' or 'failure' as errors.
Test cases are corrected accordingly (TODO or REQUIRED statements added where fail messages were not noticed previously).
2018-03-26 15:40:11 +03:00
isn
229add784f 0029064: Copying of empty NCollection map takes excessive memory
Avoid resizing of NCollection maps in Assign() methods if source map is empty
2018-03-26 15:32:51 +03:00
nbv
8e45500e21 0029611: Misprint in the formula of Hessian computation in the file GeomLib_CheckCurveOnSurface.cxx
The formula of Hessian computation has been corrected
2018-03-26 15:24:10 +03:00
gka
0575de6d7e 0029526: Test Harness command "ReadIges" does not support "read.iges.onlyvisible" mode
Modification Test Harness command "ReadIges" to take into account value of the parameter "read.iges.onlyvisible" was made.
2018-03-26 15:04:21 +03:00
nds
41ea50ac6f 0029631: Samples: build AndroidQt sample together with OCCT on Windows platform
- _WIN32 definition provides functionality for sample on Windows
- CMake procedure is changed to have Qt5_FOUND variable defined before compilation modules. Searching of Qt packages is moved into qt.cmake.
2018-03-23 15:27:22 +03:00
emv
384db46a5a 0029627: BRepOffsetAPI_NormalProjection class changes orientation of the result
The problem is fixed by the fix for the issue #0029234.
2018-03-23 13:09:50 +03:00
jgv
7d13fd8ea3 0029369: ShapeFix_Face algorithm does not heal properly the face lying on a surface of revolution
Add field of class <myCheckMissingEdges> to ShapeFix_Wire to be able not to take into account possibility of missing edges.
2018-03-22 20:23:27 +03:00
kgv
f29de68237 0029602: Visualization, TKOpenGl - Size Culling is not properly handled within Perspective projection
OpenGl_BVHTreeSelector::isTooSmall() now takes into account distance
the distance between camera Eye and object Center
within perspective projection.
2018-03-22 19:51:37 +03:00
vsv
6ca66a7dea 0029595: Visualization - Wrong validation of Anchor point for Radius Dimension 2018-03-22 19:51:33 +03:00
kgv
834f289709 0027732: Visualization - AIS_ConnectedInteractive crashes on NULL handle returned by MeshVS_CommonSensitiveEntity::GetConnected()
Added NULL-check to AIS_ConnectedInteractive::ComputeSelection().
Added missing interface methods MeshVS_Mesh::AcceptDisplayMode()
and MeshVS_CommonSensitiveEntity::GetConnected().
2018-03-22 19:51:29 +03:00
abv
0f57ab750d 0029590: Coding - avoid usage of Standard_EXPORT attribute for inline methods
All occurrences of Standard_EXPORT attached to inline methods in OCCT code are eliminated.
Some unused classes and C++ files producing no code are deleted.
2018-03-22 19:51:25 +03:00
abv
0553a8ea99 0029589: Configuration - allow MFC samples to be built when OCCT is linked statically
CMake scripts are corrected to do perform search of libs and dlls of third-party libraries even for static builds of OCCT.
Treatment of errors in this case is relaxed: not found DLLs are reported as warnings, and not found libs as warning for static build, and continuable error for shared build.

Code of samples is corrected to allow building with OCCT linked statically.
Implementation of main application class is corrected to ensure that initialization is done after all global objects are created.
Note however that samples still fails to start for unclear reason (creation of MFC frame window fails).
2018-03-22 19:51:20 +03:00
nds
1fa1615244 0029571: Samples: build qt samples together with OCCT
Extending CMake procedure by 'BUILD_MODULE_QtSamples' variable to switch on qt samples build.
Implementation required:
- union of occt_toolkit_tool.cmake and occt_toolkit.cmake files;
- correction of qt samples sources by adding path to Qt 'plugins' folder. It helps to avoid definition of additional variable (QT_QPA_PLATFORM_PLUGIN_PATH) when staring sample.bat for qt samples;
- executable processing is extended in cmake procedure by providing 'EXECUTABLE_PROJECT' variable. Now we need not specify custom processing for DRAWEXE in occt_toolkit.cmake
2018-03-22 15:11:27 +03:00
emv
7f3408c8c8 0029580: Regression: invalid result of BOP Fuse
Boolean Operation - avoid creation of INTERNAL solid from unclassified faces in Solid Builder algorithm.
Instead warn the user that some of the faces have been unclassified and not used for solids creation.

Adjustment of the test cases.
Test cases for the issue.
2018-03-20 15:18:16 +03:00
apn
3c9f082bb9 0028090: Configuration - DRAWHOME environment variable missing in CMake
Replace variable DRAWHOME by CSF_OCCTResourcePath for successfully running DFBrowse command in Draw launched from Visual Studio.
Added missed icons of folders, attributes and named shapes used in DFOpenImage command in src\DrawResources\dftree.tcl.
2018-03-20 15:14:05 +03:00
abv
68df847802 0022651: Impossible to build OCC as static library due to using Standard_EXPORT instead of Standard_API
All library-specific macros for defining export / import properties of symbols on Windows (like Standard_API, __Draw_API, _math_API etc.) are eliminated.
Common macro Standard_EXPORT is used in all places where it is necessary.

New macro OCCT_STATIC_BUILD is defined for disabling Standard_EXPORT, to be used instead of HAVE_NO_DLL, though the latter is still supported as well (for compatibility).

To allow building OCCT in static mode on Windows after these changes:
- Files OSD_WNT_1.hxx and OSD_WNT_BREAK.hxx are removed; useful declarations are moved to OSD_WNT.hxx
- In the class IVtkVTK_ShapeData, static fields ARRNAME_MESH_TYPES and ARRNAME_SUBSHAPE_IDS are converted to static inline functions
- Global array ChoixRef defined in IntImp_ComputeTangence.cxx is converted to static function returning element of the array by index
- Unused class Quantity_Convert is removed (it had static field accessed by inline method)
- Struct Approx_Data defined in the same way in BRepApprox_Approx.hxx and GeomInt_WLApprox.hxx is made private member of these classes to avoid name clash
- Some C++ files producing no object code are removed
- In NCollection_EBTree.hxx and StdLPersistent_Collectio.hxx, definition of template virtual method is moved to class definition to avoid MSVC linker warnings on unused symbols
2018-03-19 13:13:39 +03:00
kgv
8662560e2c 0029582: Coding Rules, Bnd_Range - inconsistent methods pair GetMin()/GetMAX()
Cosmetics - removed redundant semicolons.
Method ::GetMAX() has been renamed to ::GetMax().
Added method ::Add() taking another Bnd_Range as argument.
Added methods ::IsOut() mimicing a Bnd_Box interface.
Methods ::Shift() and ::Shifted() no more modify Void range.
2018-03-16 15:09:30 +03:00
kgv
39a349fdcb 0029576: Coding Rules - remove unused declarations from package Aspect
The following unused declarations have been removed:
  Aspect_TypeOfPrimitive, Aspect_TypeOfLayer, Aspect_TypeOfEdge,
  Aspect_TypeOfDrawMode, Aspect_TypeOfConstraint,
  Aspect_DriverDefinitionError, Aspect_BadAccess.
2018-03-16 15:06:25 +03:00
mpv
f46c2b39e6 0029531: Exception on Redo 2018-03-16 15:06:05 +03:00
nds
130eb11405 0029310: Coding - multiple compiler warnings in Inspectors
1. Added specific header files to disable and restore compiler warnings: Standard_WarningsDisable.hxx, Standard_WarningsRestore.hxx.
   (Currently only MSVC compiler is handled.)
2. Inspector: compiler warnings are disabled for all includes of Qt headers.
3. Inspector: minor code correction to avoid warning due to use of floating point values in integer calculations.
2018-03-16 15:06:00 +03:00
inv
50c4757387 0029140: Samples - Viewer is not updated in MFC Modeling and Viewer3D samples
OCC_3dBaseDoc::OnUpdateObjectDisplayall() - allow re-displaying hidden presentation of non-Shape types.
OCC_3dBaseDoc::OnObjectErase() - removed redundant call AIS_InteractiveContext::ClearSelected().

CModelingDoc::OnFuse(),::OnCommon(),::OnExplorer() - removed redundant
viewer updates and add missing ones.
2018-03-16 15:05:56 +03:00
abv
9fb8f3f174 0029412: Huge Memory leak since I upgraded to OC 6.9.0
Added non-regression test bugs vis bug29412
2018-03-16 15:05:52 +03:00
apn
b1f350a2e1 0029266: CMake install does not copy pdb files in Debug mode due to the changes in 0028287
OCCT_INSTALL_BIN_LETTER is used only on Windows (isn't depended on type of generator) because bind/libd/bini/libi folders are not used on Linux (only bin and lib)
2018-03-16 15:05:48 +03:00
bugmaster
fcd9a94e76 0029560: Jenkins - Control of license statements and non-ascii characters in integrated code
Removing non-ascii characters
2018-03-16 15:05:44 +03:00
ifv
56c5a5979e 0029535: Modeling Algorithms - BRepExtrema_DistShapeShape returns only one solution but the wires have two intersections
The subdivision of long curve is added in algorithm GenExtCC, if length of curves are too different.
Test case added
2018-03-16 14:57:01 +03:00
abv
97e9660965 0029515: Foundation Classes, OSD - 'Spawn' contains function that isn't available on iOS
Method OSD_Process::Spawn() is removed as useless (not used across OCCT or products).
Note that on Linux, macOS, and Windows standard C function "system()" can be used directly instead, while iOS apparently does not support spawning separate processes at all.
2018-03-16 14:56:57 +03:00
abv
0a0eec807d 0027070: Segfault when transferring HLR-created shapes via STEPControl_Writer
Added protection against null shape on writing: status IFSelect_RetVoid will be returned in such case (instead of access violation)
2018-03-16 14:56:53 +03:00
apn
1167d6cc50 0029129: Incomplete support of MSVS2017
MSVC_VERSION is used instead of MSVC10, MSVC11, MSVC12, etc.
2018-03-16 14:56:48 +03:00
apn
967905a364 0029559: Samples - wrong copyright statement in FuncDemo
Update FuncDemo sample according to new elasticnodes example in Qt.
2018-03-16 14:56:44 +03:00
kgv
8c088c52fc 0029470: Samples - eliminate references to deprecated Local Context from MFC sample
AIS_InteractiveContext::MoveTo(), ::Select(), ::ShiftSelect() now throw
an exception on invalid V3d_View argument instead of returning empty results.
AIS_InteractiveContext::DetectedShape() and ::BeginImmediateDraw() now can
be called without opened Local Context.

Draw Harness - removed unused commands vsetam, vunsetam.
Removed unused methods ViewerTest::StandardModeActivation(), ::PickObject(), PickObjects().
Interactive input of Selection modes 0..7 now redirects to vselmode
instead of removed ViewerTest::StandardModeActivation().
2018-03-16 14:56:40 +03:00
emv
d9ca2e0cb1 0029481: Implementation of the Feature Removal algorithm
Implementation of the 3D model De-featuring algorithm intended for the removal of the unwanted parts (or features) from the model consisting of solids. The features can be the holes, protrusions, gaps, chamfers, fillets etc.
The algorithm removes all possible requested features from the shape and builds the new shape as a result. The input model is not modified.

On the API level the algorithm is implemented in the class *BRepAlgoAPI_Defeaturing*. The actual features removal is performed by the low-level algorithm *BOPAlgo_RemoveFeatures*.

Documentation of the new classes.
Implementation of the DRAW commands for working with new algorithm.
Test cases for the new functionality.

Changes in other algorithms used by De-featuring algorithm:
- Provide history support for the solids in *ShapeUpgrade_UnifySameDomain* algorithm;
- Implementation of the mechanism to merge History of any Algorithm with standard history methods such as IsDeleted(), Modified() and Generated() into *BRepTools_History*.
2018-03-16 14:56:36 +03:00
kgv
9e04ccdcf8 0026127: Visualization - Default camera is not copied in copy constructor of V3d_View
V3d_View copy constructor now copies DefaultCamera() from specified View.
Draw Harness command vinit - added new argument -cloneActive.
2018-03-16 14:56:32 +03:00
kgv
81ce8c4de3 0028988: Visualization - AIS_InteractiveContext::SetLocation() does not reset location properly
SelectMgr_SelectionManager - removed broken HasTransformation() checks.
2018-03-16 14:56:28 +03:00
kgv
49225e2f5c 0029545: Documentation, visualization.md - article incorrectly specifies that AIS_ConnectedInteractive can define own Material 2018-03-16 14:56:24 +03:00
nds
d4efee2bfa 0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
While UV Iso parameters are obtained in StdPrs_Isolines, UV limits should be applied only if face bounds has infinite values.
In the issue case, the UV values are greater than UVLimits and not infinite. This fix makes possible to have correct Iso lines in presentation without modification of UV limits beforehead.
2018-03-16 14:56:20 +03:00
emv
06084bb8ec 0029544: Regression vs 7.2.0: ShapeUpgrade_UnifySameDomain fails to merge linear edges
When measuring the deviation of the end of the added edge from the resulting edge take the point on the curve, not from the vertex.

Test cases for the issue.
2018-03-16 14:56:16 +03:00
nds
410dd2c903 0029542: Coding - CMake compiler warnings in Inspector
Avoid using CMAKE_AUTOMOC, collect header files with Q_OBJECT iterating through a project files.
2018-03-16 14:56:12 +03:00
kgv
a468bca87c 0029547: Сonfiguration, upgrade.dat - include deprecated enums into section [rename]
Added V3d_TypeOfShadingModel->Graphic3d_TypeOfShadingModel and
V3d_TypeOfLight->Graphic3d_TypeOfLightSource renames.
2018-03-16 14:56:08 +03:00
kgv
726b5d9e92 0029529: Volume Rendering - crash on re-displaying the object
Added missing getters: OpenGl_TextureBufferArb::TextureFormat() and OpenGl_ShaderManager::OitState().
2018-03-02 15:27:57 +03:00
kgv
c40eb6b950 0029517: Visualization - introduce AlphaMode property defining alpha value handling options 2018-03-02 15:27:53 +03:00
kgv
ff6d145402 0029524: Modeling Algorithms - access violation in HLRBRep_PolyAlgo while computing HLR for triangulation-only surface 2018-03-02 15:27:49 +03:00
kgv
db5d29de1c 0029519: Visualization, TKOpenGl - fallback to Graphic3d_TOSM_FACET from Gouraud/Phong when nodal normals are undefined 2018-03-02 15:27:44 +03:00
anv
dc89236fee 0029097: Visualization - allow picking Graphic3d_TypeOfShadingModel per-object
Graphic3d_AspectFillArea3d has been extended by new property ::ShadingModel(),
which is set to Graphic3d_TOSM_DEFAULT by default.
The new API allows assigning Shading Model to specific Primitive Array groups
instead of entire Viewer, which was the only possibility before.

Graphic3d_TypeOfShadingModel has been extended with Graphic3d_TOSM_DEFAULT value
meaining that Shading Model defined as default for the Viewer should be used.
Graphic3d_TOSM_NONE has been renamed to Graphic3d_TOSM_UNLIT.
Documentation of Shading Models has been improved by more details.

V3d_TypeOfShadingModel enumeration has been merged into Graphic3d_TypeOfShadingModel
avoiding duplicated definitions and confusion.
Old values has been left for compatibility with old code and can be marked deprecated in future.

Draw Harness command vaspects has been extended by new argument -setShadingModel
for testing Shading Models assigned to entire objects.

OpenGl_SetOfShaderPrograms now holds an array of Shading Models.
OpenGl_ShaderManager interface has been modified and now requires enumeration as input
in several places where Boolean flags have been used previously
(methods ::BindFaceProgram(), ::BindLineProgram(), ::BindMarkerProgram()).

OpenGl_Workspace now defines default (undefined) OpenGl_AspectFace as Graphic3d_TOSM_UNLIT
to simplify indication of primitive groups with undefined Fill Area aspects,
and so that Graphic3d_TOSM_UNLIT set as default Shading Model will not make artifacts on Lines and Markers.

AIS_Manipulator::Axis::Compute() - added missing initialization of Fill Area aspects (leading to undefined behavior).
2018-02-22 11:32:55 +03:00
apn
8bf738e673 0029514: Configuration, CMake - OpenGL ES should be available for Linux
Allow optionally building OCCT with GLESv2 and EGL on Linux
2018-02-22 11:25:17 +03:00
kgv
94807a7d97 0029492: Coding Rules. NCollection_IndexedDataMap - add missing documentation to method ::Add() 2018-02-22 11:15:42 +03:00
apn
0b35e9d037 0029513: Replace OCC logo in user guides
Replace OCC logo by occ_logo.png in higher quality
2018-02-16 17:17:02 +03:00
apn
3f912eb289 0027747: Incomplete section curves between faces
Added test case bugs/modalg_7/bug27747
2018-02-16 15:12:43 +03:00
nbv
5c655dd566 0029510: IntWalk_PWalking:: PutToBoundary(...) method results in appearing several coincident points in Walking-line
Places have been detected where coincident points are created. The problem has been fixed.
2018-02-16 15:11:12 +03:00
nbv
8dc56d0f88 0029494: Intersection line between two parametric surfaces is restricted incorrectly if it matches the surface boundary
Creation of IntPatch_Points is forbidden in tangent-zones exceptionally domain boundaries of intersected surface.
2018-02-16 15:09:10 +03:00
nbv
7797eb389a 0029496: No intersection curve between faces if starting points are given
Now, bounded IntPatch_Points are found in case when starting points are used in intersection algorithm. Before the fix, these points were not looked for (even).
2018-02-16 15:07:01 +03:00
kgv
e3744452bb 0029509: Visualization, TKOpenGl - Weighted OIT + MSAA shader compilation errors
Fix implicit cast ivec2->vec2 and specify GLSL version to "320 es" on appropriate devices.
2018-02-15 16:56:25 +03:00
kgv
c5a65111c4 0029508: Visualization, TKOpenGl - visual artifacts on Adreno 305/308
OpenGl_ShaderManager now:
- prefers GLSL ES 100 over GLSL ES 300 on devices reporting OpenGL ES 3.0;
- prefers GLSL ES 300 on devices reporting OpenGL ES 3.1+.
to workaround known buggy implementations of OpenGL ES 3.0 drivers.
2018-02-15 16:55:32 +03:00
kgv
12d6e15582 0029507: Visualization, TKOpenGl - uninitialized class field OpenGl_FrameBuffer::myIsOwnDepth 2018-02-15 16:54:29 +03:00
kgv
0793c4f942 0029503: Visualization, TKOpenGl - fix access violation due to misprint in OpenGl_AspectMarker
Misprint mySprite->mySpriteA has been corrected.
2018-02-15 16:53:44 +03:00
apl
b17e5bae1a 0029337: Visualization, TKOpenGl - visual artifacts on Intel Broadwell GPU
Enable multiple draw buffers in shader program only if its required by specific application.

occSetFragColor() - a new GLSL function has been introduced
as an alternative to setting occFragColor/occFragCoverage variables.
2018-02-15 16:52:50 +03:00
emv
12d71ad6a5 0029502: Improve performance of the ShapeUpgrade_UnifySameDomain::UnifyEdges() method
Avoid repeated merging of the same chains of edges by processing all edges at once.

Test cases for the issue.
2018-02-15 16:51:46 +03:00
dipts
db60634ed1 0029500: Visualization - AIS_Point dynamic highlighting is not drawn on RedrawImmediate
ZLayer for Dynamic highlighting of AIS_Point has been set to Graphic3d_ZLayerId_Top
and of Selected highlighting to Graphic3d_ZLayerId_UNKNOWN,
to follow the behavior of normal AIS object.
2018-02-15 16:50:30 +03:00
dipts
5f6e3a0711 0029395: Visualization, V3d_View - Grid disappears forever after enabling RayTracing
Custom Graphic3d_Structure implementation has been added to V3d_RectangularGrid and V3d_CircularGrid to trigger recompute in case of device lost.
Primitive arrays are no more (re)computed while grid is not actually displayed.
2018-02-11 12:06:57 +03:00
kgv
f8e0c6c48a 0029491: Visualization, AIS_Shape - filter unsupported Display Modes within ::AcceptDisplayMode()
AIS_Shape::AcceptDisplayMode() now accepts only modes 0,1 and 2.
AIS_ColoredShape::Compute() no more computes presentation for unknown display mode.
2018-02-09 16:13:39 +03:00
emv
8a7476a622 0029488: Regression: boolean operation " general fuse" creates solid containing 5 not connected shells lying on the one level.
Boolean Operations - when checking two faces with the same bounds on Same Domain, take into account possible deviation of the edges from the faces surfaces.

Test cases for the issue.
2018-02-09 16:12:40 +03:00
gka
a8fea2a924 0029473: DRAW command "splitshape" produces invalid result on the cylindrical face.
Added taking into account distance between edges in the UV space for periodical surfaces in the LocOpe_SplitShape.cxx method ChoixUV
2018-02-06 18:58:05 +03:00
emv
a981082925 0029484: Avoid inheritance of the BRepAlgoAPI_Check from BRepBuilderAPI_MakeShape
Inherit BRepAlgoAPI_Check class from BOPAlgo_Options instead of BRepAlgoAPI_Algo, as the latter is too excessive for checking purposes.

Implementation of the Draw command "bopapicheck" for testing the BRepAlgoAPI_Check algorithm.
2018-02-06 18:57:01 +03:00
nbv
03a3ba9ebe 0028886: infinite loop at intersecting two faces / surfaces
The reason of constantly increasing/decreasing steps has been eliminated for the problem case.
2018-02-06 10:50:13 +03:00
kgv
161e0e95b7 0029477: Visualization, TKOpenGl - MSAA FBO initialization failure on OpenGL ES 3.2 device
OpenGl_View::myFboColorFormat now initialized using sized texture format GL_RGBA8
on mobile platforms (as in case of desktop platform).
2018-02-02 20:39:53 +03:00
emv
f9ffd4f9f3 0029465: Regression relation to 691 version: Extrema_ExtCC returns IsParallel equal to true for not parallel curves
Strengthening of the criteria of the parallel status of the curves by additional checking if the ends of the curves do not diverge.
Test cases for the issue.
2018-02-02 17:17:47 +03:00
kgv
05fb2b05af 0029474: Visualization, TKOpenGl - GLSL compilation errors on buggy OpenGL ES driver for PowerVR SGX 544MP
OpenGl_ShaderProgram::Initialize() now defines THE_MAX_LIGHTS/THE_MAX_CLIP_PLANES
to zeros to workaround issues with some buggy OpenGL drivers.
2018-02-02 16:43:48 +03:00
emv
03cca6f742 0028599: Replacement of old Boolean operations with new ones in BRepProj_Projection algorithm
The usage of *BRepAlgo_Section* has been replaced with the usage of *BRepAlgoAPI_Section* in *BRepProj_Projection* algorithm.

The TODO statements have been removed from the failing test case in the "prj" grid as they are working correctly now.

The following changes have been made to improve the performance *BRepAlgoAPI_Section*:
1. Revision of the *IntPolyh_Intersection* class to avoid repeated calculation of the deflection of the same triangulation.
2. Small revision of the Edge/Face intersection algorithm to perform Extrema computation on the whole intersection range of the edge instead of discrete ranges.
3. Implementation of the extrema computation for the Circle and Sphere.
4. Correct computation of the parameter of the point on the Circle.
2018-02-01 18:46:36 +03:00
kgv
95f688263d 0029069: Samples - handle UNICODE filenames within C++/CLI CSharp sample 2018-01-31 17:23:29 +03:00
msv
1d53219a28 0029463: Regression relation to 691 version: Method BndBox::IsOut() returns true for point lying on the planar face
Correct the method BRepBndLib::Add so that to enlarge the bounding box on the tolerance of edges which curves participate in calculation of the box.
2018-01-31 17:22:16 +03:00
aml
9b1d4e7fbe 0028176: Draw Harness - "reshape" command usage is not properly documented
Help message is corrected for "reshape" command. Command implementation is corrected according OCCT coding rules.
2018-01-31 17:20:29 +03:00
abv
32712d67c1 0029447: The constructor of Message_PrinterOStream mixes up cout and cerr
Use of cerr or cout is corrected in Message_PrinterOStream constructor
2018-01-29 21:11:51 +03:00
aml
ca4e36ae5b 0029453: Draw Harness - unclear syntax of "add" command
Help message is corrected for "add" command.
2018-01-29 07:06:51 +03:00
abv
07bbde451a 0029399: Optimize reading of floating point values from text strings
Function Strtod() is reimplemented using open source (MIT-style license) code by David M. Gay instead of strtod() provided by standard run-time library. This improves its performance by 3-10 times.

Functions Atof(), Strtod(), Printf(), Sprintf(), Fprintf() are declared as extern "C" to be usable from C programs.

Strtod() is used in Interface_FileReaderData::Fastof() and in RWStl_Reader to accelerate their work.

DRAW command QATestAtof and test perf fclasses strtod are added to check correctness and performance of Strtod().
Test perf draw restore is added to monitor performance of reading BREP files.

Minor off-topic corrections:
- method Standard_GUID::Assign (const Standard_UUID&) is implemented (was empty);
- Precision.hxx is included in BRepMesh_Vertex.hxx that uses it.
2018-01-26 20:11:03 +03:00
abv
0edbf10564 0029399: Optimize reading of floating point values from text strings -- base dtoa.c
Fast implementation of strtod downloaded from www.netlib.org/fp/dtoa.c (base version) is integrated as Standard_Strtod.cxx.
2018-01-26 20:10:56 +03:00
msv
ca9faa284d 0029448: The method Extrema_FuncExtCS::GetStateNumber mixes up parameter on curve with parameter U on surface
The code has been corrected to eliminate the mess.
2018-01-26 16:33:03 +03:00
nbv
779d6bc6a5 0028102: Problem cutting a plate with several holes (670)
Algorithm of processing cases when point of splitting Walking-line is near to the boundary of the intersection domain but does not match this boundary has been improved.
2018-01-25 19:36:37 +03:00
vro
93445088d8 0029443: It is not possible to store an ExtStringArray Ocaf attribute to any previous version in XML file format 2018-01-25 19:35:50 +03:00
ika
00dfcc765a 0029436: Data Exchange - Extend Expand compounds functionality.
Extend permissions for expand in ShapeTool
Fix processing of subshapes
Fix misprints
Add test cases
2018-01-23 20:13:11 +03:00
emv
b6cf8ffa35 0028385: Improve drawing isolines (DBRep_IsoBuilder algorithm)
1. When computing the iso-lines for the face (*DBRep_IsoBuilder*) prepare the Hatching algorithm with the following elements:
a. Trimmed p-curves of edges. The trimming parameters are computed by intersection with p-curves of the neighboring edges. The trimming will be performed only if the intersection point is covered by the tolerance of common vertex.
b. 2D segments connecting the p-curves of the neighboring edges. These segments will close the 2D gaps, which are closed in 3D by the tolerance of vertices shared between edges. This will allow trimming correctly the iso-lines passing through such gaps.

2. Implementation of the additional Init() method for WireExplorer algorithm taking UV bounds of the face to avoid their repeated computation when work working with a face having multiple wires.

3. Test cases for the issue.
2018-01-23 20:11:08 +03:00
nbv
f24150b851 0029430: [Regression] Curve evaluation at boundary point.
Before the fix, BRepAdaptor_CompCurve considered the input wire to be periodic with period LastParameter()-FirstParameter().
Now, method IsPeriodic will always return FALSE because it is impossible to obtain correspondence between the members of BRepAdaptor_CompCurve class and its periodicity status.
New behavior has been documented in upgrade-guide.
2018-01-17 16:44:57 +03:00
msv
4bc805bfc6 0029368: Incorrect intersection state of the intersection point of two 2d curves
In the algorithm math_FunctionRoots, improve the case when it is needed to find the extremum of the function. Earlier, to solve this task the method of gold section was used. With the patch, firstly the algorithm tries to find zero value of the derivative function. In most cases it gives precise result. Secondly, the algorithm tries to find zero value of the function using the old approach. The algorithm chooses the best solution among two computed by different methods.

In the method PutStickPavesOnCurve of BOPAlgo_PaveFiller, forbid putting a vertex to the end of the curve if this end already has a vertex assigned to it. This allows getting rid of unwanted colliding of vertices.

In the method UpdatePaveBlocks of BOPAlgo_PaveFiller, make the check for micro edges more precise.

New category of tests "lowalgos" has been added. Tests for low level algorithms are to be put there. "2dinter" is a new group of tests in this category.

Introduction of the new key for "2dintersect" command, allowing printing the intersection state for each point.
It has the following syntax now:
"2dintersect curve1 [curve2] [-tol tol] [-state]"
Options:
-tol - allows changing the intersection tolerance (default value is 1.e-3);
-state - allows printing the intersection state for each point.

Correct the test case bugs/modalg_7/bug28274 to make proper checks of the result.
2018-01-17 16:43:31 +03:00
szy
14abe5dc81 0029385: OCAF - TDataStd_IntPackedMap lacks interface to set map as TColStd_PackedMapOfInteger
Added method ChangeMap (const TColStd_PackedMapOfInteger& theMap).
2018-01-17 16:42:28 +03:00
abv
fcca9d7cd0 0029422: OCAF, old persistence - wrong implementation of writing a reference 2018-01-12 16:34:41 +03:00
msv
2651bb324e 0028211: Modeling Algorithms - Boolean fuse operation produces incorrect result
Correct procedure of initialization of BRepTopAdaptor_FClass2d and IntTools_FClass2d classifiers so as to produce more tight polygon in the case of self-intersections on very thin faces.

The idea is concluded in checking the condition:
defl < 2 * S / P, where S - is the surface area computed on produced polygon, P - its perimeter, defl - deflection computed on it.
If the condition is not true the polygon is discretized again using QuasiUniformDeflection tool.
2018-01-12 14:54:59 +03:00
kgv
67b3d2a8ad 0029419: Make V3d_Viewer::PrivilegedPlane() return const reference rather than a temp object 2018-01-12 12:25:59 +03:00
isn
1f59dfa9c2 0028681: UnifySameDomain distorts face boundary when merges a chain of small linear edges
In case of sequence of edges based on lines (which are going to be unified into one line-segment), take into account a linear tolerance  value.
Get rid of regressions.
Updates of USD-tests.
2018-01-12 12:25:02 +03:00
abv
2c3f1a579b 0029409: Configuration, macOS - "Appkit" is spelled in CMake scripts using wrong case for "K"
Spelling error is corrected in name of AppKit library in CMake and genproj scripts for macOS
2018-01-12 12:25:02 +03:00
ifv
5d010b1d05 0028499: Checkshape incorrectly reports BRepCheck_NotClosed when gap is covered by vertex tolerance
Calculation of 2d tolerance is improved
2017-12-29 15:44:06 +03:00
szy
409095ba18 0029402: In OCCT7.2.1-dev the names written into a FSD_File are associated with the wrong shapes.
The issue of incorrect Roots indexing is fixed by changing DataMap to IndexedDataMap.
Draw command fsdread was improved to allow restoring of shapes with kept names.
2017-12-28 16:34:19 +03:00
ika
44f2982356 0029403: Data Exchange - subshapes names are not imported from step
Fix processing of subshape names in STEP in reading and writing.
Replace creating subshapes in Document as tree (invalid) with plain subshapes structure.
Update test cases.
2017-12-27 19:13:08 +03:00
msv
62a672fb35 0029358: Unifysamedomain is unable to merge faces with the same underlying surface
The documentation has been updated to avoid misunderstanding of algorithm behavior.
2017-12-26 19:07:48 +03:00
emv
bfb6523573 0029387: Incorrect result of cut a face with several shapes
Remove section edges having no valid range.
Test case for the issue.
2017-12-26 19:06:10 +03:00
szy
4a5eefb909 0029371: The problem of the attributes constructor call
Default Guid is assigned in constructor.
Add test case: tests\bugs\caf\bug29371.
2017-12-25 18:33:05 +03:00
skl
153fee015d 0029391: Invalid import of TrimmedSurface
Fix and test for bug 29391.
2017-12-25 18:31:36 +03:00
msv
d9f2bc6b08 0029380: Delete "checknbshapes" from bugs/modalg_6/bug27341* test cases 2017-12-25 18:30:29 +03:00
emv
e25185fff0 0029400: Fuse of two edges creates self-interfered shape
Avoid creation of the edges with too small valid range (not allowing to split the edge) and interfering vertices.
Test case for the issue.
2017-12-25 11:47:53 +03:00
ski
8197951d7e 0029396: Configuration, Cmake: restore 3rd-party libraries into INTERFACE_LINK_LIBRARIES property of installed OCCT targets
Changes from branch CR29277 were reverted.
2017-12-22 13:16:32 +03:00
bugmaster
2e473bb049 0029398: Configuration - list lex and yacc files in the StepFile/FILES to avoid CMake warnings
Adding step.lex and step.yacc to StepFile/FILES
2017-12-22 10:31:15 +03:00
szy
83ae35919c 0029220: Application Framework - replace CDM_MessageDriver interface by Message_Messenger. 2017-12-21 13:02:39 +03:00
anv
31e026ba63 0029352: Adding support of GBK and Big5 code pages
Added methods to convert GBK and Big5 encodings to Unicode
2017-12-21 13:02:07 +03:00
msv
0ab4e62183 0028248: [Regression] HLR Algo result is retrieved from the last added shape only
Mistakes in retrieving of HLRBRep_EdgeData by value instead of reference have been corrected.
2017-12-20 18:51:43 +03:00
kgv
81a2800c0d 0029393: Samples - AndroidQt sample build fail
AndroidQt - dropped removed arguments within V3d_View::SetWindow() usage [0024776].
AndroidQt_Window - add missing NativeFBConfig() method declared in the interface [0026732].
2017-12-20 18:51:29 +03:00
ifv
c805f9a8f8 0028722: Conversion of a spherical face to a spline produces an invalid shape
Correction of 2d tolerance calculation for BSpline/Bezier surfaces
Test cases are corrected according to current behavior of algorithm
2017-12-20 18:51:13 +03:00
ika
5b7f8e0a69 0029362: Data Exchange - Crash during reading step file
Additional check for wires into searching of attached shapes,
Fix Dimension value processing,
2017-12-20 18:50:58 +03:00
kgv
77cd443b99 0029377: Configuration, CMake - linkage errors while using static OCCT libraries on Windows platform
HAVE_NO_DLL is now defined when building Static libraries.
2017-12-20 18:50:45 +03:00
kgv
683d15cbd4 0029376: Coding Rules, TColStd_PackedMapOfInteger - declare Iterator as nested class of map collection 2017-12-20 18:50:35 +03:00
emv
803a8cafe5 0029363: No history for shapes which were produced as a result of intersection
1. Implementation of the *Generated* method for the algorithms in Boolean Component.
In terms of these algorithms the shape from the arguments can have Generated shapes only if these new shapes have been obtained as a result of pure intersection (not overlapping) of this shape with any other shapes from arguments.
Thus, the Generated shapes are always:
* VERTICES created from the intersection points and may be Generated from edges and faces only;
* EDGES created from the intersection edges and may be Generated from faces only.

So, only EDGES and FACES could have information about Generated shapes. For all other types of shapes the list of Generated shapes will be empty.

2. Optimization and simplification of the Modified and IsDeleted methods based on the correct filling of the BOPAlgo_BuilderShape::myImagesResult map.

3. Provide history of unification of the solids in the CellsBuilder algorithm.

4. Update of the documentation of Boolean Operations User guide with new chapter "History Information" describing rules for filling history for operations in Boolean Component.

5. Test cases for the issue. New grid "history" has been added into "boolean" category.
2017-12-20 18:50:21 +03:00
nbv
6f1ea0f4b1 0029179: Result of Boolean common depends on an order of arguments
Usage of Bnd_Box-filtering is eliminated while putting a (definitely) common vertex between two faces on the intersection curve.

Algorithm of putting not-common (ON/IN) vertices has not been changed.
2017-12-14 17:44:27 +03:00
nbv
624c599cd3 0029359: Approximation algorithm computes multidimensional distance in Euclidean space incorrectly
Wrong distance computation has been corrected.

Some test-cases have been corrected according to their new behavior. Namely, built (by approximation algorithm) curve(s) has changed its geometrical position.

1. tests/blend/simple/X4

It is not a regression because the result is not correct on both MASTER and FIX (see explanation in the issue #26740). This problem is expected to be solved after porting Fillet-algorithm to new Boolean operation. Old Boolean operations do not cover Edge-Edge tangent-zone by vertex.

2. tests/bugs/modalg_6/bug27341_318

"checknbshapes" has been deleted in order to avoid non-stable behavior (see issue #29360) of this test case. New result is OK on both Linux and Windows platform.
2017-12-11 11:19:22 +03:00
emv
0a807dd9a3 0029351: Boolean Operations create invalid pcurves
When making pcurve for edge on face make sure that the produced 2D curve will have the same range as 3D curve of the edge.
2017-12-08 16:39:34 +03:00
vro
4e882c7153 0026570: Crash on attempt to rotate a shape.
An extended draw-command trotate (ttranslate, tmirror, ...) by an additional parameter "-copy".
New check of edge range is added in BRepCheck/BRepCheck_Edge.cxx
The same checking is added in ShapeAnalysis_Edge.cxx
Fixing this problem is added in ShapeFix_Wire.cxx
GeomLib::SameRange(...) and BRepTools_TrsfModification::NewCurve2d(...) are modified to avoid exception in TrimmedCurve
2017-12-08 16:39:30 +03:00
abv
472433e2c7 0029355: OCCT 6.9.1 persistence restored in OCCT 7.2.0 not working
Auxiliary classes StdObjMgt_ReadData::Object and StdObjMgt_WriteData::Object are renamed to "ObjectSentry" (to better reflect their nature); constructor is made explicit to ensure that such objects are always created intentionally.
These objects are instantiated explicitly in the body of relevant functions, instead of implicit creation as temporary objects when function requires such object as argument.
Variable used to get char from stream is nullified in several places in FSD_File and other classes, to avoid possible usage of uninitialized memory in case if stream is bad.
2017-12-08 16:39:26 +03:00
kgv
67160f4e79 0029372: Graphic3d_TransformPers - improve description of Local Coordinate system defined by Transformation Persistence 2017-12-08 16:39:22 +03:00
kgv
5dc0517d2d 0029365: Visualization, TKOpenGl - do not include hidden structures to Rendered within frame statistics
OpenGl_Layer::UpdateCulling() now considers structure as culled in case if it has Hidden state.
2017-12-08 16:39:19 +03:00
emv
944768d277 0029312: Using OBB to speed up Boolean Operations
1. Implementation of the user-defined option for usage of Oriented Bounding Boxes (OBB) in Boolean Operations for additional filtering (rejection) of selected for intersection pairs of sub-shapes.

By default the usage of OBB is turned off.
To enable/disable its usage the method SetUseOBB(flag) should be used. This method is available for all operations in Boolean Component.
To enable/disable it in draw the command "buseobb 0/1" should be used. Note, that this will affect all subsequent operations.

The OBB for the shapes are built by first necessity and stored into operation context (IntTools_Context).

2. Usage of the OBB in some test cases.
2017-12-08 16:39:15 +03:00
nbv
1a0339b464 0029311: Implementation of the Oriented Bounding Boxes (OBB) functionality
1. The class Bnd_OBB has been created to describe the Oriented Bounding Box.

2. Several key methods have been implemented: Bnd_OBB::IsOut(...), Bnd_OBB::Add(...) and Bnd_OBB::Enlarge(...).

3. Interface of Bnd_Box class has changed. New methods have been created. See Bnd_Box.hxx for detailed information.

4. BRepBndLib and Draw_Box classes have been amended in order to provide correct work with Bnd_OBB class.

5. Interface of "bounding" DRAW-command has been changed. Please see help for detailed information.

6. New DRAW-command "isbbinterf" has been created. Please see help for detailed information.

7. "boundingstr" and "optbounding" DRAW-commands have been eliminated because their function can be made by "bounding" DRAW-command (e.g. see tests/bugs/vis/buc60857 or samples/tcl/snowflake.tcl test cases).

8. Documentation has been updated.
2017-12-08 16:39:11 +03:00
kgv
8d1a539c4a 0029366: Visualization, OpenGl_Text - artifacts when using Aspect_TODT_SHADOW/Aspect_TODT_DEKALE at different zoom level
OpenGl_Text now applies Polygon Offset instead of Z-shift in world coordinates for drawing background.
OpenGl_Context::SetPolygonOffset() - polygon offset state has been moved from OpenGl_Workspace to OpenGl_Context.
2017-12-08 16:39:06 +03:00
nbv
faaa95cbe7 0029323: Intersection algorithm produces the curve with oscillation
Sometimes the algorithm of purging of extra points in the walking line makes enormous difference in distance between two neighbor segments of the line. This badly impacts the quality of approximation result. This patch balances the difference in distances by forbidding deletion of some points.

1. tests/bugs/modalg_6/bug27615

The reason of the correction is explained in the message ~0072580 (see issue #28557).

2. tests/bugs/modalg_7/bug28892*
   tests/bugs/modalg_7/bug28984

The reason of the correction is explained in the message ~0072583 (see issue #28984).
2017-12-08 16:39:03 +03:00
kgv
48a2dd2012 0029344: Foundation Classes, TCollection_AsciiString - replace confusing strncpy with memcpy
strncpy() usage within TCollection_AsciiString has been replaced by memcpy()
where string length has been already determined.

TCollection_AsciiString::SetValue() now throws exception
on attempt to set '\0' - TCollection_AsciiString::Trunc() should be used instead.
TCollection_AsciiString(const char* , int ) has been modified to properly set string length
in case of NULL-terminator appeared earlier then specified length.

Interface_LineBuffer has been revised for using NCollection_Array1 instead of TCollection_AsciiString
to avoid misusing TCollection_AsciiString interface.
2017-12-08 16:38:59 +03:00
kgv
15669413da 0029346: Visualization, TKOpenGl - collect frame statistics
Graphic3d_RenderingParams::ToShowStats - new option displaying rendering statistics.

OpenGl_FrameStats - new class for accumulating frame statistics.
OpenGl_Context::FrameStats() provides an access to the frame stats
used for currently rendered context.
OpenGl_View::Redraw() and OpenGl_View::RedrawImmediate()
resets counters within OpenGl_Context::FrameStats().

OpenGl_Layer::UpdateCulling() - simplified resetting of culling state for cullable structures.
2017-12-01 15:36:55 +03:00
vro
ab3ff92cc0 0029353: Optimization of TPrsStd_AISPresentation::SetSelectionMode() 2017-12-01 12:04:42 +03:00
kgv
992ed6b3c0 0029290: Visualization, TKOpenGl - allow defining Light source per ZLayer
Graphic3d_CLight is now defined as a class inheriting Standard_Transient,
so that it's fields now should be accessed through methods.
Graphic3d_CLight::IsEnabled() - new property allowing to disable light source everywhere.
Confusing alias OpenGl_Light has been removed.

Graphic3d_CLight::SetAttenuation() - the upper limit 1.0 of attenuation factors has been removed
since it contradicts to OpenGL specs and does not make sense.

Graphic3d_ZLayerSettings::Lights() - light sources list is now property of ZLayer.
When defined, it overrides light sources defined for View/Viewer.
New class Graphic3d_LightSet has been defined to define a set of light sources.

V3d_Light - removed obsolete interface for debug drawing lights sources.
V3d_Light is now an alias to Graphic3d_CLight.
V3d_TypeOfLight is now defined as a typedef to Graphic3d_TypeOfLightSource.
2017-11-30 23:09:23 +03:00
kgv
3cbd0a8e87 0029350: Visualization, OpenGl_Text - add Aspect_TODT_SHADOW text style
Within new style Aspect_TODT_SHADOW, a tiny shadow is drawn at right-bottom corner
with one pixel shift, producing a slightly nicer visual look than Aspect_TODT_DEKALE.
2017-11-30 23:09:22 +03:00
kgv
64c6d8df50 0029331: Visualization, TKOpenGl - make OpenGl_PrimitiveArray::IsFillDrawMode() as virtual method of OpenGl_Element 2017-11-30 23:09:22 +03:00
kgv
f47849f49e 0028416: Visualization - SelectMgr_SelectionManager::Activate() should not implicitly deactivate Global Selection Mode
Implicit deactivation of global selection mode has been removed from SelectMgr_SelectionManager::Activate().

Added new method AIS_InteractiveContext::SetSelectionModeActive() as replacement
of AIS_InteractiveContext::Activate() / ::Deactivate().
New method takes an argument AIS_SelectionModesConcurrency which defines
what to do with already activated selection modes in 3 ways:
- AIS_SelectionModesConcurrency_Single, only one selection mode can be activated at
  the same moment - previously activated should be deactivated
- AIS_SelectionModesConcurrency_GlobalOrLocal, either Global (AIS_InteractiveObject::GlobalSelectionMode()
  or Local (multiple) selection modes can be active at the same moment
- AIS_SelectionModesConcurrency_Multiple, any combination of selection modes can be activated.
2017-11-30 23:08:56 +03:00
emv
81a55a6996 0029333: Boolean Operations - Prevent modification of the input shapes in case their sub-shapes have not been modified
Prevent modification of the input shapes in destructive mode in case their sub-shapes have not been modified:
1. Prevent edge splitting for the pave blocks with old vertices if it is possible to use the existing edge (*BOPAlgo_PaveFiller::MakeSplitEdges*);
2. Prevent creation of the new containers (WIRES/SHELLS/COMPSOLIDS) if non of its parts have been modified (*BOPAlgo_Builder::FillImagesContainer*);
3. Prevent creation of the new face if non of its wires have been modified (*BOPAlgo_Builder::FillImagesFaces*);
4. If possible, use the original face to be the representative for the group of SD faces (*BOPAlgo_Builder::FillSameDomainFaces*).

Cosmetic changes:
1. Documentation of the *BOPAlgo_Builder* class.
2. Making simple methods of the *BOPAlgo_Builder* class inline.
3. Getting rid of the *BOPAlgo_Builder::mySplits* field as it is excessive. *BOPAlgo_Builder::myImages* can be used instead.
3. Moving the Check Inverted option from *BOPAlgo_Options* to *BOPAlgo_Builder*.

Test cases for the issue.
Adjustment of the test case to their current behavior.
Test case *blend/complex/H2* has been deleted as duplicate of the test case *blend/simple/Z1*.
2017-11-30 12:11:20 +03:00
emv
1155d05a06 0025609: Clean up the duplicate classes in TKBO project
1. The package BOPCol has been fully removed:
- *BOPCol_BaseAllocator* is replaced with *Handle(NCollection_BaseAllocator)*;
- *BOPCol_BoxBndTree* is replaced with *BOPTools_BoxBndTree*;
- *BOPCol_Box2DBndTree* is removed as unused;
- *BOPCol_DataMapOfIntegerInteger* is replaced with *TColStd_DataMapOfIntegerInteger*;
- *BOPCol_DataMapOfIntegerListOfInteger* is replaced with *TColStd_DataMapOfIntegerListOfInteger*;
- *BOPCol_DataMapOfIntegerListOfShape* is replaced with *TopTools_DataMapOfIntegerListOfShape*;
- *BOPCol_DataMapOfIntegerMapOfInteger.hxx* is removed as unused;
- *BOPCol_DataMapOfIntegerReal* is replaced with *TColStd_DataMapOfIntegerReal*;
- *BOPCol_DataMapOfIntegerShape* is replaced with *TopTools_DataMapOfIntegerShape*;
- *BOPCol_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*;
- *BOPCol_DataMapOfShapeInteger* is replaced with *TopTools_DataMapOfShapeInteger*;
- *BOPCol_DataMapOfShapeListOfShape* is replaced with *TopTools_DataMapOfShapeListOfShape*;
- *BOPCol_DataMapOfShapeReal* is replaced with *TopTools_DataMapOfShapeReal*;
- *BOPCol_DataMapOfShapeShape* is replaced with *TopTools_DataMapOfShapeShape*;
- *BOPCol_DataMapOfTransientAddress* is removed as unused;
- *BOPCol_IndexedDataMapOfIntegerListOfInteger* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeBox* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeInteger* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeListOfShape* is replaced with *TopTools_IndexedDataMapOfShapeListOfShape*;
- *BOPCol_IndexedDataMapOfShapeReal* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeShape* is replaced with *TopTools_IndexedDataMapOfShapeShape*;
- *BOPCol_IndexedMapOfInteger* is replaced with *TColStd_IndexedMapOfInteger*;
- *BOPCol_IndexedMapOfOrientedShape* is replaced with *TopTools_IndexedMapOfOrientedShape*;
- *BOPCol_IndexedMapOfShape* is replaced with *TopTools_IndexedMapOfShape*;
- *BOPCol_ListOfInteger* is replaced with *TColStd_ListOfInteger*;
- *BOPCol_ListOfListOfShape* is replaced with *TopTools_ListOfListOfShape*;
- *BOPCol_ListOfShape* is replaced with *TopTools_ListOfShape*;
- *BOPCol_MapOfInteger* is replaced with *TColStd_MapOfInteger*;
- *BOPCol_MapOfOrientedShape* is replaced with *TopTools_MapOfOrientedShape*;
- *BOPCol_MapOfShape* is replaced with *TopTools_MapOfShape*;
- *BOPCol_PListOfInteger* is removed as unused;
- *BOPCol_PInteger* is removed as unused
- *BOPCol_SequenceOfPnt2d* is replaced with *TColgp_SequenceOfPnt2d*;
- *BOPCol_SequenceOfReal* is replaced with *TColStd_SequenceOfReal*;
- *BOPCol_SequenceOfShape* is replaced with *TopTools_SequenceOfShape*;
- *BOPCol_Parallel* is replaced with *BOPTools_Parallel*;
- *BOPCol_NCVector* is replaced with *NCollection_Vector*;

2. The class *BOPDS_PassKey* and containers for it have been removed as unused;

3. The unused containers from *IntTools* package have been removed:
- *IntTools_DataMapOfShapeAddress* is removed as unused;
- *IntTools_IndexedDataMapOfTransientAddress* is removed as unused;

4. The container *BiTgte_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*;

5. The class *BOPTools* has been removed as duplicate of the class *TopExp*;
2017-11-30 12:11:15 +03:00
kgv
2da5126371 0029349: Foundation Classes, OSD_Timer - add missing theThisThreadOnly constructor option available in OSD_Chronometer
OSD_Timer constructor now has theThisThreadOnly option passed to OSD_Chronometer,
which is FALSE by default.

OSD_Chronometer now provides methods ::UserTimeCPU(), ::SystemTimeCPU() allowing
to fetch CPU times without akward syntax through overloaded ::Show().
2017-11-28 17:11:14 +03:00
ifv
18d8e3e794 0029289: Wrong derivatives in math_TrigonometricFunctionRoots.cxx file
Class MyTrigoFunction is removed from file math_TrigonometricFunctionRoots.cxx.
New class math_TrigonometricEquationFunction with the same functionality is created to provide possibilities
for individual testing.
Expressions for derivatives are corrected.
New Draw command "intconcon" for intersection 2d conic curves is created.
Test command OCC29289 (file QABugs_20.cxx) is created for individual testing math_TrigonometricEquationFunction.
It is used in tests/bugs/modalg_7/bug29289
2017-11-27 11:01:21 +03:00
ika
b8bf959578 0029338: Data Exchange - Add Planes for Tolerance zones in Geometric tolerances
Add new poles to Geometric Tolerance objects
Some code refactoring in GDT attributes
Add Draw functions for affected plane
2017-11-24 15:48:11 +03:00
mkv
c2e47bdd8d Update of tests database
Test for 0023171: Got wrong result after stitching
Test for 0023612: BRepPrimAPI_MakeTorus
Test for 0023610: checkshape command does not detect mismatch of the tolerance values among the sub-shapes of the shape
Test for 0023660: 'bsection' produces result with gap
Test for 0024397: BRepBuilderAPI_Copy works not correct
Test for 0023927: BRepProj_Projection produces Edge with one Vertex outside from curve
Test for 0023902: Cannot build fillet
Test for 0023669: Error in Boolean operations algorithm: section between cylindrical face and prism is incomplete
Test for 0023660: 'bsection' produces result with gap
Test for 0024100: Bad pcurve is built on a face while converting the shape from STEP format.
Test for 0024319: Sewing makes a solid transparent
Test for 0024302: Section operation modifies input argument
Test for 0024397: BRepBuilderAPI_Copy works not correct
Test for 0024418: Wrong section curves when intersecting analytical surfaces
2017-11-24 15:39:23 +03:00
szy
a7378539f1 0029142: Exception on Redo.
Order of attributes deltas is fixed.
2017-11-23 13:05:30 +03:00
emv
0ccd71060a 0029175: BRepOffsetAPI_MakeOffset problem
The problem is fixed by the fix for the issue #29162.
Creating test case for the issue.
2017-11-23 13:05:02 +03:00
emv
e7384fd437 0029321: Improve performance of the 3D offset algorithm for the planar cases
Disable additional intersection of the splits of offset faces implemented in method BRepOffset_MakeOffset::Intersection3D() for the mode "Complete" and join type "Intersection".
This method is insufficient, as it does not allow to detect the tangential faces, necessary for this mode.
Intersection is performed in the method BuildShellsCompleteInter() developed for this mode.
2017-11-23 13:04:58 +03:00
emv
b7cd7c2b7c 0029322: Unify faces classification procedures in Boolean Operations
1. Unify the faces classification procedure of the methods BOPAlgo_BuilderSolid::PerformInternalShapes() and BOPAlgo_Builder::FillIn3DParts() using the latter as a base.
The new method BOPAlgo_Tools::ClassifyFaces() has been created for that. Both methods mentioned above have been updated to use the new one.

2. Forced intersection of the edges after enlarge of the tolerance values of their vertices during the operation has been added into BOP's intersection algorithm (BOPAlgo_PaveFiller).
BOPAlgo_Tools::PerformCommonBlocks() method has been updated to avoid loosing faces of the already created Common blocks.

As a result the case "boolean gdml_private ZF6" became more stable, because the intermediate result is no longer invalid.
Additional test cases have been added to verify this improvement (bugs modalg_7 bug29322_*)

3. When building PCurves for edges on faces, check the existing PCurves on its validity for periodic surfaces and adjust PCurves if necessary.
The improvement helps to produce the valid result in the test case "bugs moddata_1 bug152".

4. Avoid creation of empty Edge-Edge interference if the intersection point is lying close to a shared vertex.
The improvement helps obtain the valid result of the "bopcheck" operation in the test case "bugs modalg_7 bug27683".

Adjustment of the test case to current behavior:
- Avoid usage of the self-intersecting torus in the test case "boolean gdml_public A9".
- Fix the input shape in the test case "boolean bopfuse_complex H1" to provide valid result.
- Test cases "bugs moddata_1 bug152_1 bug152_2" have been unified into single test case "bugs moddata_1 bug152". Now, the case rebuilds invalid input data and performs all types of Boolean operations.
- Change the test case "bugs modalg_7 bug22750" to produce valid intermediate results used in subsequent operations as arguments.
- The following test cases are improvements:
- "boolean volumemaker D8"
- "boolean volumemaker G1"
- "bugs modalg_7 bug27683"
2017-11-23 13:04:52 +03:00
aml
c5b89fa358 0025879: result of blend fails the bopcheck
Protection from the zero-length gp_Dir construction is added.
2017-11-22 15:45:26 +03:00
abv
e7174545eb 0029113: Coding Rules - fix convention to have one header per API type
Paragraph on naming of classes is revised to describe correspondence of names of public types and files.
2017-11-22 15:41:13 +03:00
msv
977ad98334 0029234: BRepOffsetAPI_NormalProjection produces INTERNAL edges and vertices
Make the algorithm BRepOffsetAPI_NormalProjection use section operation instead of common to get the edge-result of projection to be in face restrictions.

Correct Boolean operation algorithm to produce correctly oriented result in the case of common between face and edge.

The algorithm ShapeUpgrade_UnifySameDomain has been patched to correctly gather same domain faces in a compound.

The TCL script snowflake.tcl has been corrected to get rid of dependence on the order of edges in the result of Boolean operation.
2017-11-14 16:52:41 +03:00
kgv
2c26e60bf9 0029317: Configuration, CMake - CSF_d3d9 should be processed for building TKD3DHost using MinGW 2017-11-14 16:49:33 +03:00
msv
2829097547 0029287: Move package GProp from TKG2d to TKG3d 2017-11-14 16:48:12 +03:00
jgv
833e75611f 0029204: BRepOffsetAPI_MakePipeShell produces invalid result and raises exception in Draw
1.The algorithm searching the section in the corner (ChooseSection) is modified to be able to find simple cases with rather big tolerance.

2. The constructor of BRepFill_Section is modified: now it removes locations in the shape of section like it was done in BRepFill_Pipe.

3. Correction of U-edges by Same Parameter has been added to the method BRepFill_Sweep::Build.
2017-11-14 15:57:57 +03:00
aml
d193f101a7 0025968: boolean returning an invalid shape
Problem is not reproduced on current master.
Testing case was created
2017-11-14 15:57:02 +03:00
emv
8621854853 0029301: Improve performance of Boolean Operations
Improve performance of Boolean operations algorithm by:
- Improving the check of Same Domain faces (BOPAlgo_Builder::FillSameDomainFaces());
- Faster rejection of outer faces for solids using Bounding Box classification first (BOPAlgo_Builder::FillIn3DParts());
- Using IncAllocator for local containers.

Quality improvement has been made in BOPAlgo_PaveFiller class:
1. Method IsExistingPaveBlock() has been corrected to provide the correct edge tolerance and to obtain valid intermediate results in the test case "boolean gdml_private ZH3".
   New test case have been added to verify this improvement (bugs modalg_7 bug29301).
2. Method PutClosingPaveOnCurve() has been corrected to use the tolerance of the pave put on the bound for checking curve on closeness.
   Additional check for the curve to have valid range after addition of the pave on the other end has been added to prevent considering the small curves (covered by vertex tolerance) as closed ones.
   As a result of this modification the test case boolean gdml_public B2 has been fixed (TODO removed).

Adjustment of the test cases to current behavior:
- boolean bopcommon_complex J1 - the produced result was incorrect as it was self-interfered. There should be no common in this case.
- offset shape_type_i_c ZZ1 - the incorrect result is now produced instead of null shape.
2017-11-14 15:57:00 +03:00
aml
b39485d9e3 0025966: Booleans with tangent faces
Problem is not reproduced on current master.
Testing case was created
2017-11-14 15:56:57 +03:00
aml
90f0fdad2a 0025104: Prism from BSpline curve can not be chamfered
Protection from zero-length vectors has been added.
2017-11-14 15:56:55 +03:00
msv
f16a6cc5aa 0028467: Improve UnifySameDomain performance
This patch turns off some not needed modes of fix in the called ShapeFix_Face algorithm.

It stores pcurves on planes in the edges to avoid repeated computation of the same pcurves many times (it is done only when SafeInputMode is false).

It avoids unnecessary replace/apply actions in the modification context.

It removes the code that makes decomposition of surface of the face on several faces.

The new command buildpcurvesonplane has been added, which builds and stores pcurves of edges on planar faces. This is useful for investigations how presence of pcurves on planes influence performance of algorithms.

Make drawing of dimension line in snowflake test independent on the order of vertices in the result.
2017-11-14 15:56:53 +03:00
kgv
2b8832bb0e 0028760: Visualization, TKOpenGl - avoid excessive frustum culling traverse within extra OIT rendering pass
Culling traverse is no more called implicitly within OpenGl_Layer::Render().
Instead, all layers are traversed at onces within OpenGl_View::render() beforehand.

OpenGl_BVHTreeSelector methods have been renamed to better reflect their meaning.
Non-persistent culling options has been moved to dedicated structure OpenGl_BVHTreeSelector::CullingContext
so that OpenGl_BVHTreeSelector instance can be used for different Layers without modifying its state.
2017-11-10 07:34:58 +03:00
kgv
daf73ab7c9 0029283: Visualization - allow defining more than 8 light sources
OpenGl_ShaderManager now overrides THE_MAX_LIGHTS within built-in shading programs
so that maximum number of lights is now limited only by OpenGL hardware
(e.g. length of GLSL program, number of defined uniforms, result performance, etc.).
THE_MAX_CLIP_PLANES is now also defined by OpenGl_ShaderManager,
so that unused lights and clipping planes do not reserve extra uniforms in GLSL programs.

V3d_View::SetLightOn() does not throw exception anymore, when the number of lights exceeds 8.
Instead, OpenGl_ShaderManager::PushLightSourceState() emits warning
in case of usage of FFP providing consistent behavior with Clipping Planes number limit.
2017-11-09 18:08:34 +03:00
kgv
182bd7bc42 0029304: Draw Harness, DBRep_DrawableShape - fix inappropriate use of unordered map
TColStd_DataMapOfIntegerInteger has been replaced by NCollection_Vector.
2017-11-09 18:08:22 +03:00
kgv
b6a0525bcb 0029299: Foundation Classes, NCollection - define explicit empty constructor for map classes
Ambiguous constructors have been marked with explicit keyword for classes
NCollection_DataMap, NCollection_DoubleMap, NCollection_IndexedDataMap, NCollection_IndexedMap,
NCollection_List, NCollection_LocalArray, NCollection_Map, NCollection_Sequence,
NCollection_SparseArray, NCollection_UBTree,
2017-11-09 18:08:20 +03:00
kgv
510cb85241 0029302: Foundation Classes, NCollection - optimize iteration of indexed maps
NCollection_IndexedMap and NCollection_IndexedDataMap
now access Key by Index number without computing Hash code.
IndexedMapNode::myNext2 and IndexedDataMapNode::myNext2 fields
have been removed, so that indexed map now may utilize less memory.

TCollection::NextPrimeForMap() has been extended upto 2038431745
(almost full signed 32-bit integer range),
and NCollection_BaseMap::mySaturated property has been removed.

NCollection_IndexedDataMap::RemoveFromIndex(), FindKey(), FindFromIndex(),
ChangeFromIndex() - removed duplicating checks for out of range input.
2017-11-09 18:08:18 +03:00
kgv
f88457e638 0029300: Visualization, TKOpenGl - provide depth pre-pass option
OpenGl_LayerList::Render() now handles new option Graphic3d_RenderingParams::ToEnableDepthPrepass
which prepends additional pass to rendering pipeline filling Depth Buffer in advance.
2017-11-09 18:08:16 +03:00
kgv
21b2385fcb 0029292: Coding Rules - remove Graphic3d_Vector duplicating gp_XYZ
Graphic3d_Vector has been replaced by gp_Pnt/gp_XYZ/gp_Dir depending on context.
StdSelect_ViewerSelector3d::ToPixMap() - fixed unsafe float math causing out-of-range color results.
2017-11-09 18:08:13 +03:00
ifv
69f87d091e 0029162: Geom2dInt_GInter algorithm does not find intersection of ellipse and line
Analytical intersection algorithm is implemented for ellipse-line intersection
2017-11-09 18:08:11 +03:00
abv
a89a630e2a 0029297: [Regression] Configuration - Mingw-w64 build fails for TKOpenGl due to missing link to OpenGl
The order of external libraries is corrected in TKOpenGl/EXTERNLIB so that more higher-level libs are mentioned earlier than low-level libs on which the former depend (e.g. Gl2Ps before OpenGl) to ensure that GCC linker is able to resolve dependencies.
2017-11-09 18:08:09 +03:00
kgv
6286195cff 0029258: Foundation Classes - provide move constructors for string classes
New macro OCCT_NO_RVALUE_REFERENCE is introduced to disable methods using move semantics on obsolete compilers that do not support rvalue references.

TCollection_AsciiString, TCollection_ExtendedString, NCollection_UtfString - added method Swap(), move constructor, and move assignment operator.

Draw command QATestArrayMove is added to test for memory corruption if NCollection_Array1<> bound to local C buffer is returned from function by value.
2017-11-09 18:08:07 +03:00
kgv
4ecf34cce7 0029295: Visualization, TKOpenGl - provide distance culling option
Graphic3d_ZLayerSettings::CullingDistance() and ::CullingSize() - added
new properties configuring culling of small and distant objects, disabled by default.
OpenGl_BVHTreeSelector now handles size culling and distance culling in addition to frustom culling.
2017-11-09 18:08:05 +03:00
kgv
761d880766 0029285: Visualization, V3d_View::UpdateLights() - eliminate implicit redraw 2017-11-08 16:42:01 +03:00
kgv
dd1ae9df09 0029286: Visualization, TKOpenGl - do not update FFP state when OpenGl_Caps::ffpEnable is disabled 2017-11-08 16:41:59 +03:00
emv
93964cc239 0029293: Boolean Operations algorithm does not preserve the orientations of the faces
While building splits of faces (BOPAlgo_Builder::FillImagesFaces()) make sure that the orientation of the input face will be passed to its splits.

Extend draw command "normals" with new key "[-print]" which allows printing values of the normal vector.
2017-11-08 16:38:56 +03:00
mnt
53a1447a00 0029133: Unstable test cases
Adding new and early removed for some reasons test cases

Removing TODO ?

Adding necessary TODO ? on corresponding platforms for OK and BAD cases
2017-11-02 17:02:45 +03:00
ika
b2e3ec8d1c 0029282: Data Exchange - UpdateAssemblies is not working for located root assemblies
Add check for located root assemblies.
2017-11-01 17:28:26 +03:00
emv
98b3765966 0029237: Improve performance of Boolean Operations
In order to improve performance of Boolean Operations on the relatively fast cases the following improvements have been made:
1. Initialization of the FaceInfo information for the faces participating in Face/Face interference, even when the gluing is ON, to take into account intersection of their sub-shapes.
2. Code simplification & duplication removal - the methods BOPAlgo_ShellSplitter::MakeConnexityBlocks and BOPAlgo_WireSplitter::MakeConnexityBlocks have been unified into BOPTools_AlgoTools::MakeConnexityBlocks.
3. Avoid unnecessary bounding box computation for solids during DS initialization. The bounding boxes for solids will be computed during the building stage to find faces located inside solids.
   For the shape self-interference check (performed by the BOPAlgo_CheckerSI), the bounding box is still computed, as it is necessary to resolve Shape/Solid intersections.
4. Use only three sample points to check coincidence of line and plane.
5. Perform necessity of planes intersection only when the gluing is off.
6. Avoid repeated initialization of 2D classifier while building splits of the faces.
7. Post treat stage:
7.1. Method CorrectWires: Save edge's data (PCurve, parameter of the vertex, range) to avoid its recalculation.
7.2. Method CheckEdge: While checking vertices on edges avoid unnecessary calculation of their location.
8. Provide possibility to disable the classification of the input solids on the inverted status (to be the holes in the space).
9. Avoid building of bounding boxes for faces/solids during splitting of the input arguments for their classification relatively hole faces/shells if there are no holes created.
10. Avoid rebuilding of the faces/solids from arguments which does not acquire any inside parts from other arguments during the operation by using their draft versions as their splits.

Test cases for the issue.
Correction of the test cases boolean gdml_public A9 and bugs modalg_7 bug28485 as they are improvements.
Additional test case for the issue #28485 as it is fixed by the current changes.
2017-11-01 17:27:08 +03:00
aml
3cdf48fe62 0027784: Thickness fails on cylinder with draft
Incorrect calculation of intersection in 2D space is fixed.
2017-11-01 17:01:59 +03:00
ski
5891b8ba41 0029277: Configuration, Cmake - remove 3rd-party libraries from INTERFACE_LINK_LIBRARIES property of installed OCCT targets
3rd-party libraries were removed from INTERFACE_LINK_LIBRARIES properties of OCCT targets.
2017-11-01 16:51:12 +03:00
kgv
777ca20ad9 0029249: Configuration - Standard_Failure compilation fails on VS2013 + Intel Compiler due to unavailability of thread_local
Check __INTEL_COMPILER version in combination with _MSC_VER on Windows.
2017-11-01 16:48:19 +03:00
kgv
6194ee76fb 0029262: Visualization - AIS_InteractiveContext::Load() does not register Object in the Viewer
AIS_InteractiveContext::Load() now loads the object regardless specified selection mode and decomposition flag.
AIS_InteractiveContext::Load() and ::KeepTemporary() now register object in the Viewer
in the same way as ::Display() does.

Draw Harness command vdisplay has been extended with new flag -erased to load object into context in erased state.
2017-10-26 12:53:38 +03:00
apn
4f26118e3b 0029250: Configuration, TKIVtk - build failure with VTK 6.3+ due to vtkRenderingFreeTypeOpenGL being removed
Remove vtkRenderingFreeTypeOpenGL from EXTERNLIB if used vtk version is 6.3.0 and above
2017-10-25 18:41:32 +03:00
kgv
59e353b75d 0029251: Configuration - problem compiling OCCT 7.2 with glibc 2.26
Standard_CLocaleSentry does not include xlocale.h when using glibc anymore.
HAVE_XLOCALE_H has been renamed to OCCT_CLOCALE_POSIX2008 to avoid confusion.

Renamed macros OCC_CHECK_BASE_CLASS -> OCCT_CHECK_BASE_CLASS.
2017-10-24 18:32:01 +03:00
kgv
ab8566c904 0029255: Configuration, .gitignore - do not track generated files with extensions VC.db, VC.opendb 2017-10-24 18:29:42 +03:00
kgv
65ada1f174 0029252: Coding rules - eliminate GCC compiler warnings -Wformat-overflow
OSD_DirectoryIterator and OSD_FileIterator now uses TCollection_AsciiString instead of unsafe sprintf.
2017-10-24 18:27:00 +03:00
abv
cf0786daf1 0024574: ICC compiler warnings on Windows
NCollection_UtfString and NCollection_UtfIterator classes are refactored to use methods overloading instead of switches to dispatch implementation depending on character (Unicode code unit) size.

ICC-specific preprocessor directives are added to avoid warnings.
Unused local functions and variables, class methods, unreachable statements, and extra throw() declarations reported by ICC are removed.
Usage of "expl" for name of local variable is avoided as it conflicts with standard C function "expl" defined in math.h as preprocessor macro.

Non-standard (MS-specific) argument envp is removed in definition of main() function on Windows.
Functions _main_ and _WinMain_ are renamed to Draw_Main and Draw_WinMain, respectively, to avoid using names reserved in C++.

Doxygen warning is fixed in XDE User's Guide.
2017-10-23 16:54:48 +03:00
kgv
f6c2b39aac 0029214: Application Framework - TPrsStd_AISPresentation::AISUpdate() should not implicitly redraw 3D Viewer 2017-10-23 16:53:32 +03:00
apn
72bcf3c7be 0029247: Tests, CheckCommands.tcl - Tcl exception "expected integer but got 3dviewer" in test cases on macOS
Test cases on macOS (using native tcl from /usr/lib) fail when $lst starts with numeral, because upvar guesses that its first parameter is level rather than otherVar.
The fix is to explicitly supply level to 1 (default value if uplevel is omitted) to avoid tcl exception "expected integer but got 3dviewer".
2017-10-19 12:27:45 +03:00
ifv
47a2717138 0029183: Result of general fuse of shell and edge produces a shape with too large tolerance
Adjusting parameters on approximation (boundary condition) for case when projected curve is far from surface
Test case is created
2017-10-19 12:26:52 +03:00
msv
6da5b3004c 0029157: Modeling - suspicious pass-through of case labels in switch statements
Suspicious passes through case labels have been resolved either by using Standard_FALLTHROUGH macro or by redesigning the code.
2017-10-19 12:26:50 +03:00
msv
56c62737ee 0029182: BOPAlgo_PaveFiller sometimes raises exception in parallel mode
Data races have been prevented in the code of BOPAlgo_PaveFiller that makes pcurves of edges on faces. For that:
- Put into treatment only unique edge-face pairs.
- If the same edge is treated with different faces in different threads simultaneously this also causes data races. To avoid this make the edge's copy in each thread and update the copy. The original edge is updated only after finishing parallel processing.

The new method BOPTools_AlgoTools::CopyEdge has been added to make a copy of an edge with vertices.

Big screenshot in the test script tests/bugs/modalg_7/bug28200 has been replaced with a small one.
2017-10-19 12:26:47 +03:00
oan
5fbe3d01e6 0029186: Move AddTool(), SetTools(), Tools() and other common methods of BOP tools to separate interface class
Methods AddTool(), SetTools(), Tools() have been moved to BOPAlgo_ToolsProvider class;
BOPAlgo_BOP and BOPAlgo_Splitter are now successors of BOPAlgo_ToolsProvider
2017-10-19 12:26:45 +03:00
kgv
744d9c0d22 0029228: Coding Rules - define rule for avoiding header inclusion list pollution 2017-10-19 12:26:43 +03:00
dbv
4ea76aea75 0029229: Crash at Poly_Triangulation::Normal
Fixed creation of returning gp_Dir
2017-10-19 12:26:41 +03:00
emv
4b1a240135 0028763: Projection of a short line segment on a polar surface causes exception
Test case for the issue.
The problem has been fixed by the fix for the issue 0028150
2017-10-19 12:26:39 +03:00
kgv
82be4141b6 0029225: Visualization - Font_FTFont::AdvanceX() retrieves kerning value for incorrect characters pair
Fixed FT_Get_Kerning misuse within Font_FTFont::AdvanceX()/Font_FTFont::AdvanceY().
Font_FTFont::loadGlyph() has been corrected to not return TRUE
in case if method called with 0 argument second+ time.
2017-10-16 17:56:14 +03:00
emv
bc4a38670e 0029188: Null shape is produced by 3D offset algorithm (mode="Complete", Join Type="Intersection")
The following improvements have been made in the 3D offset algorithm for mode "Complete" and Join type "Intersection":
- RemoveInsideFaces() - Removal of the invalid parts outside of the solids built from the splits of offset faces is now performed. It helps to avoid their rebuilding and speed-up the computation.
- FindVerticesToAvoid() - Strengthening the criteria for the vertices to be avoided in the new splits.

Test cases for the issue.
Adjustment of the test cases to current behavior.
2017-10-16 17:54:42 +03:00
apv
dfc3f102e6 Update of tests database
Test for 0021134: checkshape command does not return faulty shapes.
Test for 0021494: Intersection between cone and sphere fails
Test for 0022642: Refactoring of ShapeFix_Wire::FixIntersectingEdges
Test for 0022732: Reading a STEP file produces invalid shape
2017-10-12 12:23:55 +03:00
abv
7f83633f7e 0029196: Tests - some test cases fail with Intel HD graphics
Test bugs vis bug26357 is revised to check colors in more robust way.
In tests bugs vis bug29091_*, size of produced file is checked to be within range of known valid sizes, rather than hard-coded (per-platform) exact sizes.
FPE signals are disabled for test bugs vis bug29127 to prevent exceptions cause by software OpenGl driver.

File data/occ/Box.brep is removed to avoid confusion with file box.brep in public data files used in tests.

Two additional non-alphabetic-order combinations of complex types are handled in RWStepAP214_ReadWriteModule.cxx
2017-10-12 12:23:18 +03:00
abv
9e4791171c 0029171: Foundation Classes - C signal handler does not work on MinGW
Setting signal handler is enabled in OSD::SetSignal() for MinGW (works only for SEH builds of MinGW, not for SJLJ builds).

Due to absence of function _set_se_translator(), handler is set using C signal() function and thus is called asynchronously.
Macro OCC_CONVERT_SIGNALS is enabled for MinGW build to support converting signals to C++ exceptions using long jumps (the same as on Linux).
Code raising exceptions in OSD::SetSignal() is corrected to use method Jump() instead of C++ throw.
2017-10-11 17:13:32 +03:00
kgv
022d142b24 0029158: Visualization - suspicious pass-through of case labels in switch statements
MeshVS_Mesh::ComputeSelection() - fixed incorrect fall-through
from MeshVS_SMF_Mesh to MeshVS_SMF_Group.
2017-10-11 17:11:59 +03:00
kgv
fc8918ad91 0029081: With Mingw-w64 Unicode Paths Do Not Work
OSD_OpenStream() now uses __gnu_cxx::stdio_filebuf extension for opening UNICODE files on MinGW when using C++ file streams.
Variant accepting filebuf returns bool (true if succeeded and false otherwise).

Checks of ofstream to be opened made via calls to low-level ofstream::rdbuf() are replaced by calls to ofstream::is_open(); state of the stream is also checked (to be good).
Unicode name used for test file in test bugs fclasses bug22125 is described (for possibility to check it).
2017-10-06 20:49:14 +03:00
kgv
cda06ac0e3 0029152: Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation when using MinGW
OSD_File::myFileHandle/myIO pair is now switched within class definition
instead of myFileHandle_is_only_for_Windows/myFileChannel_is_only_for_Linux macros.

OSD_Directory/OSD_Disk/OSD_File methods implementation of WinAPI/non-WinAPI
has been merged within .cxx file and reformatted.
Resolved several inconsistences on handling invalid input
between WinAPI/non-WinAPI implementations.
NCollection_Array1 is now used in several places instead of
raw memory allocation (HeapAlloc()/HeapFree()/new/delete).
TCollection_ExtendedString is used instead of StringCchCopyW.

Unused field OSD_Disk::myQuotaSize and not implemented methods OSD_Disk::*Quota*() have been removed.

Obsolete code fragment "for Visual Age compiler" is removed.
Macro __try is undefined before redefinition on MinGW to avoid warning.
2017-10-06 10:29:10 +03:00
apv
9026dea8d2 Update of tests database
Test for 0028167: Fillet has strange form at its end
Test for 0028168: Exception is raised during Boolean operation
Test for 0028194: BRepMesh - Standard_OutOfRange exception on valid shape
Test for 0028200: Invalid topology of the general fuse result
Test for 0028216: Intersection of a face and a solid is broken up leading to empty result of Boolean common operation
Test for 0028245: Result of Cells Builder algorithm becomes invalid after removal of internal boundaries on faces
Test for 0028247: Effect of minSize parameter of BRepMesh_IncrementalMesh seems to be too strong
Test for 0028274: BOPAlgo_MakerVolume fails to create solid
Test for 0028279: Greater oscillations and higher degree of resulting B-Spline in cylinder-cylinder intersections in 7.1.0
Test for 0028354: Filleting destroys shape if the filleted edge touches a seam edge
Test for 0028366: BOP Common fails with solid and planar face
Test for 0028379: BRepMesh produces mangled mesh for a cone
Test for 0028388: Boolean common of simple face and solid results in empty compound
Test for 0028393: Boolean cut produce wrong result.
Test for 0028402: Modeling - calculation of properties of complex compounds is slow
Test for 0028406: High tolerances after boolean operation on OCCT 6.9.1
Test for 0028694: IGES reader produces too small edge covered by its vertices
Test for 0028719: Mesh - Display issue for special model
Test for 0028108: Sweep fails in "Right Corner" mode
Test for 0028696: Offset 2D algorithm produces micro edges
Test for 0028700: BRepBuilderAPI_Sewing produces too small edge covered by its vertices
Test for 0028722: Conversion of a spherical face to a spline produces an invalid shape
Test for 0028739: Draft on face fails
Test for 0028662: Data Exchange - Exception during reading large STEP file.
Test for 0028768: ShapeFix slighly corrupts the source face
Test for 0028485: Fuse of two shapes using gluing and non-destructive options gives invalid result
Test for 0028500: Artifact in shaded view of the shape
Test for 0028523: Fixshape reverses the orientation of the face
Test for 0028544: Big tolerance value is returned by Implicit-parametric algorithm
Test for 0028571: BRepOffsetAPI_MakeOffset build invalid wire
Test for 0028572: Wrong result of the mkface command
Test for 0028595: Shifting 2d curves for non-periodic surfaces leads to incorrect result.
Test for 0028596: Erroneous fillet
Test for 0028640: BRepBuilderAPI_Transform build invalid shape
Test for 0028656: 3d offset modifies the input shape
Test for 0000077: BUC60866. The BRepFill_Pipe fails.
Test for 0000078: BUC60875. Pipe is created incorrectly on two wires.
Test for 0000082: BUC60908. Incomplete section of shell by plane.
Test for 0000083: BUC60912. Section of simple BSpline surfaces is performed too slow.
Test for 0000862: GeomAPI_ExtremaCurveCurve fails on given curves
Test for 0002442: Error in BRepClass3d_SolidClassifier
Test for 0003936: Face on a surface of extrusion is extended after import to IGES
Test for 0005081: BRepOffset_MakeOffsetShape algorithm does not return valid result.
Test for 0005145: Wrong result of projection of a circle on a sphere.
Test for 0014846: ShapeFix_Wireframe::FixWireGaps() works wrong on a shape with seam edge
Test for 0016424: Exception in reading of attached IGES file
Test for 0010377: Incorrect fuse result when objects tangent by planar face
Test for 0013565: Incorrect result of Common operation
Test for 0013566: Incorrect result of Extrema between a large circle and a line
Test for 0024632: Artifacts during Boolean cut operation on neighboring parts
Test for 0005582: Impossible to make offset on the shape with degenerated edge
2017-10-06 10:28:34 +03:00
emv
dcba2e5ce3 0029135: 3D Offset algorithm produces a NULL shape
UpdateValidEdges in BRepOffset_MakeOffset_1 - Perform the filtering of splits of the edges in two stages:
1. Separate filtering of the connected blocks using localized bounding edges taken only from the splits of offset faces from the block;
2. Combined treatment of the remaining splits using bounding edges from the splits of all offset faces.
2017-10-06 10:28:32 +03:00
abv
68beaa3c57 0029124: Visualization, Tests - failures when tests are executed via Remote Desktop connection
Protection against accessing null pointer is added in OpenGl_VertexBuffer::Create().
In command vreadpixel OpenGl-related warnings are redirected to cout so that they do not contaminate the command output.
Test grid caf presentation is configured to ignore OpenGl-related warning messages.
Tests in grid tools are configured to report status SKIPPED if tools are not available (OCCT is built without Qt).
2017-10-06 10:28:30 +03:00
anv
151da08bbe 0029117: Adding translation of Multileader entity
Scaling of width of glyphs is added om Font_FTFont class.
Font "SimSan" is specified as fallback alias for font "NSimSan" (contains Chinese hieroglyphs).
2017-10-06 10:28:28 +03:00
gka
2c25cc04e0 0029029: Exception Raised with no Result during reading file 2033zsh1_1.stp
Static function stepstrcmp() in StepData_StepReaderData.cxx is replaced by plain strcmp() to have the full strings compared (stepstrcmp() returned true if one of strings was longer than the other but common part was equal).
Protection is added to avoid exception for cases when representation entities are NULL
2017-10-06 10:28:25 +03:00
imn
385d47dde7 0028245: Result of Cells Builder algorithm becomes invalid after removal of internal boundaries on faces
When removing internal boundaries between faces of the same material do it once for the whole shape, and at this keep boundaries between areas with different material.
2017-10-06 10:28:23 +03:00
kgv
7c4ce93bab 0029184: Visualization - DrawWindow::Save() fails when using WinCodec with PNG codec
DrawWindow::Save() now uses Image_Format_BGR instead of Image_Format_BGR32
for better compatibility with image encoders when dumping WinAPI bitmap.
2017-10-06 10:28:21 +03:00
Zia ul Azam
fae1ae1182 0029109: Visualization, AIS_Trihedron - add option hiding arrows tips
Prs3d_DatumAspect::DrawDatumPart() now handles new flag ToDrawArrows().

vtrihedron - added new option -arrowTip.
Fixed misprint in command description -arrowscolor -> -arrowcolor.
2017-10-06 10:28:19 +03:00
ifv
f998596a10 0028909: Algorithm of BO is stuck while fusing shell and edges
Approximation parameters: degmin, degmax, max number of segments, boundary condition, maximal distance of projecting are added in interface of classes ProjLib_ProjectedCurve, ProjLib_ComputeApprox,
ProjLib_ComputeApproxOnPolarSurface
Algorithm of Approx/Approx_ComputeCLine is modified in order to treat maximal number of segments allowed for cutting.
Algorithm of method BOPTools_AlgoTools2D::MakePCurveOnFace(...) is modified in order to manage cases with big edge tolerances.
Test case added
Some test cases were modified according to new behavior of algorithms
2017-10-06 10:28:17 +03:00
nbv
23e8067c74 0029176: Exception while projection 2D-point on 2D-line
DRAW-command "2dproj" has been changed. Now, it can return not only 2D-line as extrema but 2D-point.

Test case has been updated.
2017-10-06 10:28:14 +03:00
abv
8157aa285b 0029160: Coding - AppleCLang 9 compiler warning "binding dereferenced null pointer to reference has undefined behavior"
Avoid returning reference to null in AppDef_MyLineTool
2017-10-06 10:28:12 +03:00
oan
00af0ebb9d 0028931: Eliminate dependency from TBB in OSD_Parallel header
Implementation of methods OSD_Parallel::For() and ForEach() is moved to CXX files to avoid direct dependency of client code that uses OSD_Parallel on TBB headers, and necessity to link with TBB explicitly.
Runtime polymorphism (virtual methods) is used to hide implementation (TBB or threads-based).
2017-10-06 10:28:10 +03:00
msv
b92bc5ab7c 0029159: Sewing fail when using a maximum tolerance
Force setting truly computed tolerance of the edge if BRepLib::SameParameter has put too large tolerance.
2017-10-06 10:28:08 +03:00
kgv
da2a6aee19 0029147: Visualization - D3DHost_FrameBuffer::BindBuffer() fails on some Intel drivers
D3DHost_FrameBuffer::BindBuffer() now implicitly detaches Depth+Stencil texture in case of driver failure.
D3DHost_View::d3dCreateRenderTarget() now does not request Depth+Stencil texture by default.
2017-10-06 10:28:06 +03:00
kgv
6cde53c431 0029138: Visualization - D3DHost_FrameBuffer should provide software fallback when WGL_NV_DX_interop is unavailable
D3DHost_FrameBuffer now provides fallback code copying OpenGL FBO content into D3D surface (slow).
OpenGl_FrameBuffer::BufferDump() - FBO dump implementation has been moved from OpenGl_Workspace::BufferDump().
2017-10-06 10:28:04 +03:00
kgv
c98fcb6456 0029137: Visualization - D3DHost_FrameBuffer does not release Depth texture and FBO index 2017-10-06 10:28:01 +03:00
abv
6a657c9247 0029170: GCC 7.1 warnings -Wstrict-aliasing in Graphic3d_ArrayOfPrimitives.hxx
Methods Graphic3d_ArrayOfPrimitives::SetVertexColor() accepting color as three double rgb values and Graphic3d_Vec4ub object are refactored to avoid using reinterpret_cast between pointers to complex types.

Similar correction is made in ViewerTest_ObjectCommands.cxx (static function VDrawSphere).
2017-10-06 10:27:59 +03:00
kgv
c85a994a37 0029169: Configuration - fix compilation with undefined UNICODE on Windows
Eliminated usage of TEXT macros, usage of OSVERSIONINFO instead of OSVERSIONINFOW.
LoadIcon/LoadCursor are now used instead of LoadIconW/LoadCursorW
when passing macros to standard resources (which depend on UNICODE flag).
2017-10-06 10:27:57 +03:00
abv
03d960b8de 0029165: Visualization - misuse of enumeration in Prs3d_DatumAspect
Methods SetDrawFirstAndSecondAxis() and SetDrawThirdAxis() of the class Prs3d_DatumAspect are corrected to ensure that myAxis may be set only to valid values of the enum, and avoid unsafe operations.
2017-10-05 13:18:15 +03:00
abv
9b372aa8ba 0029164: GCC 7.1 compiler warnings -Wmaybe-uninitialized in gp_XYZ and siblings
Code is corrected to avoid local variables of reference type pointing to fields of temporary objects.
2017-10-05 13:18:14 +03:00
abv
b1811c1d2b 0029151: GCC 7.1 warnings "this statement may fall through" [-Wimplicit-fallthrough=]
New macro Standard_FALLTHROUGH is defined for use in a switch statement immediately before a case label, if code associated with the previous case label may fall through to that
next label (i.e. does not end with "break" or "return" etc.).
This macro indicates that the fall through is intentional and should not be diagnosed by a compiler that warns on fallthrough.

The macro is inserted in places that currently generate such warning message and where fallthrough is intentional.

Doxygen comments are provided for this and other macros in Standard_Macro.hxx.
2017-10-04 15:28:02 +03:00
kgv
e2b4dea253 0029156: Coding Rules - eliminate deprecation compiler warnings when targeting macOS 10.12 2017-09-29 09:42:14 +03:00
kgv
b1c235dfce 0029062: Visualization, SelectMgr_ViewerSelector - add NULL-check within ::checkOverlap() method 2017-09-29 09:42:13 +03:00
anv
08b183fe0b 0028188: Improving layer color storage mechanism for DXF Import/Export
Attribute ColorByLayer was added for shapes that should be colored by the color of their layer or, if it's absent, by the parent component's layer color.

Fixing inconsistency of iterating through the map of Styles

Improving ColorByLayer mechanism

Fix for Map/IndexedMad differences.

Renaming according to convention of naming collection typedefs
2017-09-29 09:42:12 +03:00
ski
7fbc3bc5a4 0029118: Incorrect generation of reference documentation for modules
Generation of reference documentation for modules was corrected.
2017-09-29 09:42:11 +03:00
snn
a8a3b37c0d 0029119: Documentation for PMI in XCAF
Documentation is added to the XDE part of the User Guide for GD&T, Clipping planes and Saved view components.
2017-09-29 09:42:09 +03:00
nbv
6fd0eb0c1e 0028764: [Regression to 7.0] Intersection of faces gives exception in debug mode
Some point were incorrectly removed from the Walking-line.

In the current fix, new method IntWalk_PWalking::RemoveAPoint(...) has been added and implemented in order to provide safe removing.

So, now methods AddAPoint(...) and RemoveAPoint(...) are recommended to use for work with the Walking-line.
2017-09-29 09:42:08 +03:00
kgv
b5cce1ab23 0028987: Visualization, SelectMgr_SelectableObject - move out iterator from object
Added method SelectMgr_SelectableObject::Selections() and depreacted methods
Init(), More(), Next() and CurrentSelection().

Added method SelectMgr_Selection::Entities() and depreacted methods
Init(), More(), Next() and Sensitivity().

SelectMgr_SelectableObject::myAssemblyOwner has been moved to AIS_MultipleConnectedInteractive.
SelectMgr_SelectableObject::Selection() now returns NULL handle for not found selection.
SelectMgr_SelectableObject::HasSelection() is no more virtual and just retuns !Selection().IsNull().

SelectMgr_SelectionManager::mySelectors map is now declared using proper
key type Handle(SelectMgr_ViewerSelector) instead of Handle(Standard_Transient).
2017-09-29 09:42:01 +03:00
abv
746f3d7ab2 0029112: Visualization - compilation fails on Ubuntu with libavutil 54.x (FFmpeg 2.7.6)
Offending macro is undefined to allow compilation with libavutil 54.x
2017-09-28 10:47:48 +03:00
emv
ad8b073e19 0029073: Regression: General Cut produces invalid shape
Boolean Operations:
1. Face/Face intersection post treatment - Unify vertices put on the section curves, which were rejected as existing ones, with the vertices of edges by which these section curves have been rejected.

2. Extend Warnings Reporting system of Boolean operations with the new warnings:
- BOPAlgo_AlertIntersectionOfPairOfShapesFailed - to be added when the intersection of pair of sub-shapes of the arguments has failed;
- BOPAlgo_AlertBuildingPCurveFailed - to be added when the building of the 2D curve of the edge on face has failed;
- BOPAlgo_AlertAcquiredSelfIntersection - to be added when the positioning and tolerances of the arguments leads to creation of self-interfered shapes.

These new warnings allow completing the operation even if intersection of some of the sub-shapes or building of some of the PCurves has failed. Moreover, they allow getting the pairs of sub-shapes on which the intersection/projection has failed, providing the user ability to analyze the intersection results.

Note that if some of these warnings appear, the result of the operation should be carefully analyzed for validity.

3. Print messages for the Warnings/Errors met during checking of the shape on self-intersection ("bopcheck" command).
2017-09-28 10:46:50 +03:00
kgv
c7ba457824 0027869: Visualization - AIS_ConnectedInteractive does not support exact HLR mode
AIS_ConnectedInteractive now shares HLR computation code with AIS_Shape.

BRepTools_WireExplorer::Orientation() now returns TopAbs_FORWARD
instead of throwing exception in case of infinite Edge without vertices.

StdSelect_BRepSelectionTool::GetSensitiveForFace() now creates Select3D_SensitiveCurve
from 2 points in case of infinite Edge instead of Select3D_SensitiveFace.
2017-09-28 10:44:24 +03:00
abv
a966092904 0028452: VIS - MSVC 14 compiler warnings
Includes of VTK headers are wrapped in #pragmas to ensure that MSVC warning messages disabled by VTK headers are still enabled for OCCT code
2017-09-28 10:42:43 +03:00
kgv
c8fe0e2db4 0029127: Visualization - V3d_View::ToPixMap() crashes on tiled rendering without FBO
Fixed out-of-memory writing within fallback View dump mode.
2017-09-28 10:41:44 +03:00
kgv
e4f0cc46a0 0029122: Visualization - improve Font_BRepFont to handle one-line-fonts
Font_SystemFont - added a new property SingleStrokeFont().
Font_BRepFont::renderGlyph() has been extended to not close contours
when flag SingleStrokeFont() has been set.
2017-09-28 10:40:29 +03:00
abv
1a6726dabb 0029107: Visualization - SelectMgr_FrustumBuilder constructor without arguments is not exported
Standard_EXPORT is added
2017-09-28 10:39:01 +03:00
kgv
8c3237d451 0028069: Visualization, TKOpenGl - handle flat shading model within GLSL programs 2017-09-28 10:36:05 +03:00
kgv
048e1b3b03 0029125: Visualization, OpenGl_Text - fix access violation within OpenGL1.1 context
OpenGl_Context::DiagnosticInformation() - added OpenGL version check before retrieving GL_SHADING_LANGUAGE_VERSION string.
2017-09-22 11:52:07 +03:00
nbv
8444aedb1d 0028150: Exception is raised during Boolean operation
ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve2d - Using the correct number of points (computed in GCPnts_QuasiUniformAbscissa class) for creation of the initial curve.
2017-09-22 11:52:05 +03:00
nbv
cd803dcd59 0029103: No intersection curve between faces if starting points are given
Sometimes the algorithm of Walking-line creation finds points out of the domain. Some such places have been detected and fixed in frame of this issue.
2017-09-22 11:52:02 +03:00
oan
71c810df61 0028824: Possibility to build OCCT 7.1.0 and above using Visual Studio 2008
Possibility to build OCCT using Visual Studio 2008 (VC9) is restored.
For that:

- template functions and classes from namespace std or tr1 (for VC9) are imported to namespace opencascade which is then used instead of std in relevant places
- templates not provided by compiler (VC9) but required for OCCT are defined in this namespace (in Standard_Handle.hxx)
- methods implementing move semantics are excluded for VC9 compiler (which does not support && syntax)
- support of vc9 compiler is restored in build procedures and environment scripts
- check of type of the current class in macros DEFINE_STANDARD_RTTI* is refactored

VS 2008 is restored in the list of supported platforms on Overview / System Requirements.
2017-09-22 11:52:00 +03:00
oan
a4ab454c0f 0027356: BRepTools::Clean() does not clean free edges from Poly_Polygon3D
Added code to clean 3D polygons on edges in BRepTools::Clean().
2017-09-22 11:51:58 +03:00
msv
28c08a7d40 0029038: Modeling - IntTools_EdgeEdge::FindParameters() hangs on bad curve
Make possibility to dramatically increase the step during iteration on the curve when the global resolution of the curve is too small.
Correct the functions FindParameters, FindBestSolution, FindDistPC.

The change caused improvement of the test case "boolean bfuse_complex E4", so the bug #27697 has been fixed.

The change caused dramatic improvement of the performance of the test "bugs modalg_7 bug27160", and the bug #29080 has been fixed.
2017-09-22 11:51:56 +03:00
szy
4621622641 0026256: FSD_File and FSD_CmpFile are almost twins. 2017-09-22 11:51:53 +03:00
msv
bfd69b5f7b 0029102: Missing points using GCPnts_QuasiUniformDeflection
Correct the method PerformCurve of GCPnts_QuasiUniformDeflection to get the proper derivative at the end of the current curve.

Improve the Draw commands "crvpoints" and "crvtpoints" so that to work with wires as composite curves.
2017-09-22 11:51:51 +03:00
emv
ca685e63ef 0026795: Unable to perform General Fuse operation on the attached faces
The problem is not reproduced in current version of OCCT.
Correction of the test case into OK state.
2017-09-22 11:51:49 +03:00
emv
d68b195fb6 0029099: Extra shapes in result of General Cut (box by ellipsoid)
Boolean Operations - when looking for the splitting parameters on the degenerated edges try not only the intersection of the 2D curve of degenerated edge with 2D curves of other edges bounded by the vertex of degenerated edge, but also the projection of the end points of the edges corresponding to the vertex on the 2d curve of degenerated edge.
2017-09-22 11:51:47 +03:00
kgv
a2560cc90c 0029096: Coding Rules - eliminate several compiler warnings in Training Samples 2017-09-22 11:51:45 +03:00
kgv
1136702b93 0029075: Configuration - fix TKService linkage errors due to usage of GLX functions while using EGL
Xw_Window, fixed usage of GLX functions for choosing Visual
when building with HAVE_EGL/HAVE_GLES2 options.
2017-09-22 11:51:42 +03:00
kgv
be7fc29e2a 0029086: Visualization, SelectMgr_ViewerSelector - drop Owners detected only by part of Entities within Box selection 2017-09-22 11:51:40 +03:00
kgv
780ee4e25c 0022048: Visualization, AIS_InteractiveContext - single object selection should always clear multiple selection
AIS_InteractiveContext::Select() now clears multiple selection when selecting a single object.
2017-09-22 11:51:38 +03:00
kgv
8e0a2b19ab 0029074: Visualization, TKOpenGl - support Geometry Shader definition
Graphic3d_TypeOfShaderObject enumeration has been extended by Geometry shader object type.
OpenGl_ShaderProgram::Initialize() processes new shader object types when supported by OpenGL version.
Declarations.glsl has been fixed so that occFragColor is defined only for
Fragment Shader object only (by handling new FRAGMENT_SHADER macros).

Improved documentation of Graphic3d_ArrayOfPrimitives class.

vshader Draw Harness command has been extended to support definition
of Shader Object types other than Vertex and Fragment shader.
2017-09-22 11:51:36 +03:00
kgv
3ed88facdb 0029084: Visualization, AIS_Manipulator - broken transformation is applied at Rotation angles near to Pi
AIS_Manipulator::ObjectTransformation() - fixed using of manipulator axes
with temporarily applied transformation (when BehaviorOnTransform::FollowRotation is TRUE).
Start axes orientation (at the beginning of Rotation) is now used instead.
2017-09-22 11:51:33 +03:00
abv
3ba79772a0 0028660: Documentation - describe how to fulfill LGPL terms in OCCT-based applications
Points considered as necessary to fulfill requirements of LGPL when OCCT is used in proprietary applications are described in Overview.
2017-09-22 11:51:31 +03:00
Benjamin Bihler
fe21f79693 0029014: Managing Binary Format Version Is Not Possible for Own TDF_Attributes
CDM_Application has been extended to provide application name and version.

Application name and version is stored by BinLDrivers_DocumentStorageDriver.

BinLDrivers_DocumentStorageDriver propagates application name and version
by passing it to BinMDataStd.

Made BinObjMgt_RRelocationTable store a handle to the header data of the file
begin read in to make it accessible by binary attribute drivers.

Undone storing application name and version as static fields in BinMDataStd
which is bad style and not thread-safe.

Moved method implementations to .cxx files.

Clearing a BinObjMgt_RRelocationTable now nullifies the reference to the
file header data and BinLDrivers_DocumentRetrievalDriver therefore sets
the reference after the relocation table has been cleared before reading
in the document subtree.
2017-09-22 11:51:29 +03:00
mkv
bcb8fa43ea 0028157: Setting the tolerance of a face to a small value and then fixing it leads to a face with vertex-vertex intersections
Problem is not reproduced on current master. Issue must be closed on 7.2.0.
Test case was added only
2017-09-22 11:51:27 +03:00
abv
4eb6e8f464 0029077: Tests - improve command testfile
Command testfile is improved to be more usable by developers for checking data files used by the new test cases before their integration to the test data base:

1. Do not check and do not report problems found in the repo when checking new files -- this check is done only when argument is "-check"

2. Can check a file located in a directory listed in CSF_TestDataPath as new one without it being considered as already in the data base

3. For new BREP files, reports warning if the file contains triangulation, suggesting that it can be removed to minimize the size

4. Can identify the same (by content) file in the data base for the new files in DOS encoding (less than 1 MB)

5. Can detect duplicates among the input files

6. Outputs result in more clear form

7. When loading STL files, uses option "triangulation" to be efficient

Automated Testing System guide is updated to describe command testfile.

Added test demo testsystem testfile
2017-09-22 11:51:25 +03:00
kgv
e3368235ea 0029083: Samples - specify multiple Make jobs within make.sh for Qt sample 2017-09-22 11:51:22 +03:00
bugmaster
4514dc74e4 0029050: SKIPPED test cases are no listed in header of summary.html
Adding list of SKIPPED test cases in header of summary.html under header Skipped:, and in the end of text log file
2017-09-22 11:51:20 +03:00
bugmaster
30017a480e Incitement OCCT version to 7.2.1 dev 2017-09-22 11:51:18 +03:00
nds
d2c909178e 0029018: Documentation - Provide user guide for Qt browser
Documentation is added in a new "Inspector" page of "User Guides".
Inspector plugins has some improvements by the documentation needs.
New DRAW scripts are implemented for 'tinspector' command.
2017-08-31 15:47:56 +03:00
abv
434098193a Update of title page of documentation (overview)
- Copyright year is updated
- Links to 3rd-party libraries and their licenses are actualized
- Description and snapshot of iOS sample added
- Visual Studio 2017 is mentioned among supported compilers
2017-08-31 15:47:41 +03:00
ski
7d7a3e84d7 0028932: Add possibility to install Eigen along the OCCT
Added installation of Eigen.
2017-08-30 16:19:55 +03:00
vsv
f2f4e84dca 0025464: Visualization - provide package for Volume Rendering 2017-08-30 13:52:58 +03:00
abv
8574e3291f 0028968: Incorrect offset for the faces with singularities
Simple offset algorithm (BRepOffset_MakeSimpleOffset) is improved to handle the case when bspline surface has imprecise singularity at one of sides (when side is degenerated but not exactly to one point).
In such case, the algorithm tries to collapse all poles of singular side of the surface to the same point; this allows avoiding flapping of normal due to small fluctuations of surface.

If face being offset contains degenerated edges, then check for singularity is done using position and tolerance of corresponding vertices.
In addition, each side is checked with some user-defined tolerance (by default Precision::Confusion()); this helps to process cases when no edge is located at that side or if such edge is not encoded as degenerated.
New parameter Tolerance is introduced for that in BRepOffset_MakeSimpleOffset class.

Tests added:
bugs modelg_7 bug28968 - on isolated faces as reported in the issue, mostly for visual check (absence of loops)
offset simple F01-05 - on original shells, checking tolerances of resulting shell
2017-08-30 13:52:56 +03:00
bugmaster
230b2bff00 Incrementing OCCT version up to 7.2.0 2017-08-30 13:52:53 +03:00
kgv
6985e642f7 0029067: Visualization, AIS_ColoredShape - visibility of sub-shapes is ignored by ComputeSelection() 2017-08-30 13:52:51 +03:00
ski
c22e576d5e 0029056: Configuration - It is not possible to install VTK products
Added installation of vtk.
2017-08-30 13:52:48 +03:00
kgv
c22f67408d 0029057: Tests - unstable test case bugs/vis/bug5682
Test case has been corrected to reduce measurements error.
2017-08-30 13:52:46 +03:00
ski
81dc032664 0028977: FFmpeg libraries are not presented in the CMake configuration
Corrected search of FFmpeg libraries.
2017-08-30 13:52:44 +03:00
abv
66d61d8a06 0029015: Testdiff - possibility to visualize image differences by toggling - correction
Javascript code is corrected to not depend on values of URLs of images
2017-08-30 13:52:41 +03:00
snn
024d6f7775 0028985: XCAF data structures for generic text annotations linked to GD&T annotations and saved views
1. A tool to annotate items in the hierarchical product structure was added. The tool is located under
   fixed label 0:1:9. It operates two basic entities: notes and annotations located under 0:1:9:1 and 0:1:9:2
   hives correspondingly. A note is an attribute derived from base class XCAFDoc_Note that is attached to a separate
   label under the notes hive. An annotated item is represented by XCAFDoc_AssemblyItemRef attribute
   attached to a separate label under the annotated items hive. Notes are linked to annotated items by means of
   XCAFDoc_GraphNode attribute, where notes play parent roles and annotated items - child roles.
2. XCAFDoc_AssemblyItemRef defines a weak reference to a label with optional attribute GUID or sub-shape index.
3. A capability to store note/annotation labels in XCAFDoc_ViewTool was added.
4. XDE User guide was updated
2017-08-30 13:52:39 +03:00
mkv
80070d4915 0028388: Boolean common of simple face and solid results in empty compound
Problem is not reproduced on current master. Issue must be closed on 7.2.0.
Test case was added only
2017-08-30 13:52:36 +03:00
abv
6b55f8e398 0028478: Scope Names Are Swallowed in Message_ProgressSentry Constructors
Tests are added to control output and performance of progress indicator (bugs fclasses bug28478 and perf fclasses progress, respectively).

Implementation of class Draw_ProgressIndicator is improved to update indicator basing on achieved total progress (1% by default) instead of elapsed time since last update.

Method OSD_Chronometer::Restart() is fixed to actually reset the counter.

DRAW command readstl is improved to show progress indicator if configured (by command XProgress).

Description of class Message_ProgressIndicator is updated; code example is added in description of Message_ProgressSentry.
2017-08-30 13:52:33 +03:00
abv
7d3225b51a 0029004: DRAW - update help of chrono and dchrono commands
Help of DRAW commands chrono and dchrono is updated according to changes made within #27691
2017-08-30 13:52:31 +03:00
apn
249dd6ed46 0029063: Configuration - improve paths in environment files
Change absolute paths to relative in OCCT environment files.
Move content of vcver.bat to env.bat.
2017-08-30 13:52:29 +03:00
kgv
a975e06e70 0029055: Visualization, Image_AlienPixMap - fallback using Wincodec
Possibility to read and write images in BMP, PNG, JPEG formats without using FreeImage library is provided on Windows using system image library.
2017-08-30 12:42:53 +03:00
emv
cc77a38d94 0028995: UnifySameDomain produces invalid shape
Synchronization of the ShapeAnalysis_Edge behavior with the BRepCheck_Edge by adding check for 2d curves on planes.

Implementation of the BRep_Tool::CurveOnPlane method to avoid code duplication for making PCurve of the edge on planar face.
2017-08-30 12:42:41 +03:00
kgv
2f690078d7 0029058: Coding rules, OpenGl_Window - eliminate memory leak after XGetVisualInfo
Minor memory leak occurring at creation of the view is eliminated.
2017-08-30 12:42:39 +03:00
abv
2a9be0e22b 0028131: BRepOffset_MakeOffset can't create offset with a face which created by filling 3 bsplinecurve
Handling of degenerated points (with all derivatives zero) in GeomEvaluator_OffsetSurface is improved by iterative movement towards middle of the surface (extension of one-step approach implemented earlier in #28112).
2017-08-30 11:22:47 +03:00
abv
2111e96703 0028780: HLR with focus does not seem to work
Method HLRBRep_Curve::D1() is corrected to apply transformation to a point according to current projection parameters
2017-08-30 11:22:45 +03:00
abv
2fa4d230bb 0029048: Draw - avoid setting default paths to scripts and test data folders if set externally
Avoid adding default paths to test scripts when DRAW is started if relevant variables (CSF_TestStriptsPath) are already defined in the environment.
2017-08-30 11:22:43 +03:00
kgv
c0f08310cc 0029053: Configuration, CMake - fix env.bat for starting Draw Harness for MinGW build 2017-08-29 11:28:58 +03:00
kgv
e21fec8100 0029051: Visualization, TKOpenGl - wrong color of transparent dynamic highlight with OIT tuned ON
OpenGl_PrimitiveArray::Render() - removed obsolete code, which become redundant (and broken)
after moving rendering of transparent objects into OpenGl_LayerList::renderTransparent().
2017-08-29 11:28:51 +03:00
mkv
3dffe5f265 0028195: Boolean common returns empty result for a solid where some surfaces of revolution touch the axis
Problem is not reproduced on current master. Issue must be closed on 7.2.0.
Test case was added only
2017-08-29 11:28:43 +03:00
kgv
bb88f3ff6e 0029049: Visualization - restore removed class DsgPrs_DatumPrs 2017-08-29 11:28:35 +03:00
abv
4bcc20301e 0029047: Upgrade guide -- some changes in OCCT 7.2.0 are not described
Upgrade Guide is updated to describe:
- Removal of typedefs to double in Quantity and V3d
- Removal of support of orientation in classes BRepTools_ReShape and ShapeBuild_ReShape
- Removal of AIS methods taking/returning Quantity_NameOfColor instead of Quantity_Color
- Removal of active texture state from OpenGl_Workspace
2017-08-29 11:28:27 +03:00
nds
0cb512c013 0029025: TInspector include files are not installed to inc directory by CMake
TInspector headers are collected in 'inc/tools' directory.

Extending DRAW Commands;

Eliminating warnings;

Improve Export to ShapeView dialog;

Avoid crash with QML using;
2017-08-25 10:37:52 +03:00
apv
340054e17a Update of tests database
Test for 0027049: Make non-destructive mode be defined by default in Boolean operations
Test for 0027052: Test boolean gdml_private ZI5 failure
Test for 0027069: IGES parser does not recognize comments in Parameters section
Test for 0027090: Point is classified IN solid but actually it is OUT
Test for 0027170: Reading STEP files produces invalid shapes
Test for 0027186: IGES - reconsider creation of Undefined entity in case of failure
Test for 0027214: Duplicate of test cases
Test for 0027224: Incorrect result of boolean operation in boolean bcut_complex Q1 test case
Test for 0027227: Intersection curve is not continued to the surface boundary
Test for 0027246: ShapeFix_Shape destroys shape
Test for 0027251: Shape becomes invalid when exported to STEP and imported back
Test for 0027316: exception when XAddShape
Test for 0027378: BRepLib_MakeFace produces invalid faces on periodic surfaces in case the given parametrization does not match the default
Test for 0027390: Box and Ellipsoid shape boolean cut and common introduce invalid result.
Test for 0028119: Blend fails on fused identical but shifted tori
Test for 0028144: Step reader - regression in comparison of version OCCT654
Test for 0028151: Sewing faces results in a shell with very big tolerance
Test for 0027160: Weird results of the pipe algorithm
Test for 0027623: Cannot find intersection line between two trimmed planar surfaces
Test for 0027683: Inaccurate result by bopcut
Test for 0027687: Section between shells of hull and deck is not closed
Test for 0027711: Blend-on-blend corrupts the shape
Test for 0027784: Thickness fails on cylinder with draft
Test for 0027908: Exception during offset computation
Test for 0027909: Exception during offset computation
Test for 0027910: Sharing between edges was lost after offset operation
Test for 0027911: Exception during offset computation
Test for 0027912: Exception during offset computation
Test for 0027928: BOP common produces empty compound
Test for 0027948: Cut produces unexcpected shape
Test for 0027950: Result of intersection algorithm depends too much on surface trim bounds
Test for 0027701: Crash when export empty solid to STEP
Test for 0027722: STEP error for Ellipse revol shape
2017-08-24 21:24:34 +03:00
abv
c231f393d3 0029015: Testdiff - possibility to visualize image differences by toggling
Command testdiff is improved to make HTML elements in the report showing diff images interactive: when user clicks on a diff image by mouse, it triggers between the A and B images.
The diff image is shown back when the mouse cursor leaves the image.
2017-08-24 19:13:08 +03:00
abv
c3cca01534 0028964: Draw - need to have command to apply ShapeFix_FixSmallFace tool
DRAW command fixsmallfaces is added to fix (remove) small faces in the shape.
Command OCC22586 is removed (replaced by fixsmallfaces).

Test bug28112_2 using that command is added for the two last shapes in issue #28112; test bug28112 is renamed to bug28112_1.
Test bug22586 is changed to use the new command.
2017-08-24 19:13:04 +03:00
ski
956d63467f 0028287: CMake install does not copy pdb files in RelWithDebInfo mode
Installation of .pdb files was corrected.
2017-08-24 19:13:01 +03:00
ysn
a41ccd91d9 0027018: Documentation - blockquotes are incorrectly formatted in PDF
Trailing space is removed after ">" to avoid breaking the quote block in PDF output.

A section about quotes are added in the documentation guide.
2017-08-24 19:12:57 +03:00
ika
5b83cdb642 0028332: Unstable tests in group gdt export
Add initialization of variable GDTMode in STEP writer.
2017-08-24 19:12:53 +03:00
kgv
6ca8b6144b 0029031: Visualization - Prs3d_Drawer::SetShaderProgram() has no effect
Prs3d_Drawer::SetShaderProgram() now takes into account HasOwn*** flags.
2017-08-24 19:12:50 +03:00
emv
f523acf0b4 0028913: UnifySameDomain crashes with error: "a shape is modified and removed simultaneously"
Correct filling of the history of the modifications of the shapes in ShapeUpgrade_UnifySameDomain algorithm.

Test cases for the issue.
2017-08-24 19:12:44 +03:00
apv
192b22058b 0027936: [regression] BRepAlgoAPI_Common returns empty result for a solid and a face
Problem is not reproduced on current master. Issue must be closed on 7.2.0.
Test case was added only.
2017-08-24 19:12:41 +03:00
nds
4f4b893546 0028999: Modify Qt Browser build option
'BUILD_Inspector' CMake option switches ON/OFF Inspector in compilation procedure (add additional dependency to Qt third party product)
'inspector.bat' starts sample to demonstrate possibilities of this tool.
Replacing TOOLS to INSPECTOR key for 'pload' command in DRAW cases due to this change in DrawPlugin.
2017-08-24 19:12:26 +03:00
kgv
7c42f3f48d 0028997: Documentation - Visual3d_Layer removed, but still in the documentation
The User Guide has been checked for presence of removed functionality.
2017-08-24 19:12:22 +03:00
kgv
fd3f6bd069 0029011: Draw Harness - simplify diffimage command syntax
Command diffimage now accepts the following syntax:
  diffimage imageFile1 imageFile2 [diffImageFile]
            [-toleranceOfColor {0..1}=0] [-blackWhite {on|off}=off] [-borderFilter {on|off}=off]
            [-display viewName prsName1 prsName2 prsNameDiff] [-exitOnClose]

Command vinit now accepts the following syntax:
  vinit [-name viewName] [-left leftPx] [-top topPx] [-width widthPx] [-height heightPx]
        [-exitOnClose] [-display displayName]

Compatibility with old syntax is also preserved.
diffimage now can display compared images in 3D viewer.
The new option -exitOnClose can be used to exit application when closing the 3D View.
2017-08-24 19:12:18 +03:00
kgv
aa17dac878 0029021: Coding Rules - eliminate GCC warnings in Qt sample 2017-08-24 19:12:15 +03:00
kgv
41f97958c0 0029016: Configuration, genproj.tcl - add missing definition of CSF_dl 2017-08-24 19:12:09 +03:00
Benjamin Bihler
1aa738ddd6 0028854: The documentation should state where handle reference counting happens
The comment to class opencascade::handle<> in Standard_Handle.hxx now explains better the features differing it from std::shared_ptr<>.
2017-08-24 19:12:06 +03:00
apv
569c958248 0027760: [regression] BRepAlgoAPI_Common returns empty result
Problem is not reproduced on current master. Issue must be closed on 7.2.0.
Test case was added only.
2017-08-24 19:12:01 +03:00
apv
cba287d62a Update of tests database
Test for 0025930: thickness of spherical cap is invalid
Test for 0025939: SIGSEGV in MakeThickSolid
Test for 0025940: MakeThickSolid creates C0 continuous edges
Test for 0026604: GeomFill_Pipe doesn't fit given bounds
Test for 0026655: ChFi3d_Builder algorithm fails to build fillets if some input edges connect with seam edges
Test for 0026697: BRepFeat_MakePrism returns empty compound
Test for 0026716: Mesher cannot create a mesh of brep model due to ShapeFix_Wire::FixShifted()
Test for 0026735: Adjacent perpendicular edges are detected as overlapped by DRAW command checkoverlap.
Test for 0026793: General Fuse algorithm produces incorrect result
Test for 0026795: Unable to perform General Fuse operation on the attached faces
Test for 0026842: bopsection result does not contain any edges.
Test for 0026882: Edge/Edge intersection algorithm produces incorrect result
Test for 0026883: Wrong result of Boolean Operation
Test for 0026889: Very poor mesh result from shape
Test for 0026928: Edges are meshed too coarsly
Test for 0026933: Section works unstably due to incorrect work of the method IsExistingPaveBlock
Test for 0026943: Wrong projection of helix on cylinder by ShapeConstruct_ProjectCurveOnSurface
Test for 0026957: Unify same domain operation is slow for multiple shells
Test for 0026978: Interactive selection is insensitive to swept shell
Test for 0027004: ShapeUpgrade_UnifySameDomain produces invalid result
Test for 0026280: Mechanism 'ShapeFix' is unable to heal a shape
Test for 0026282: Mechanism 'ShapeFix' has errors revealed by wire tool 'FixTails'
Test for 0026291: BRepMesh produces mesh with gap on the attached shape
Test for 0026382: BRepMesh produces internal nodes outside the face interior
Test for 0027453: Wrongly meshed surface
Test for 0027524: The command checkshape does not find the maximal deviation between curves representations
Test for 0026225: Wrong result of chamfer in case of coinciding bound of chamfer's surface with bound of a face
Test for 0026295: Sweep fails with BRepFill_ContactOnBorder
Test for 0026374: GeomFill_Profiler fails to unify BSplines if one has knot distance less than PConf
Test for 0026558: Failing to build isoline for offset surface
Test for 0026563: Boolean cut operation in new API multi-tool mode performs fuse instead of cut
Test for 0026568: Exception when creating pipe
Test for 0027419: Incorrect result of Edge/Face intersection
Test for 0027469: Regression vs 6.9.1: Wrong result of Edge/Face intersection
Test for 0027471: Wrong result of pipe
Test for 0027472: Wrong result of cut
Test for 0027614: Sewing returns result with too high tolerance
Test for 0026154: Visualization - v3d viewer grid disappears due to automatic z-fit
Test for 0026174: Loss of color after the second write of file (iges).
2017-08-18 12:13:40 +03:00
apn
fe6c26dc50 0029010: Launch custom.bat in samples before calling general environment
Replace calling custom.bat and general env.bat in samples.
2017-08-18 12:13:27 +03:00
nds
9294c8f774 0028631: Modeling Algorithms - Crash while building a 2D circle tangent to another circle and passing through its center
Code correction includes also:
- extending GccEnt to have GccEnt_Position conversion to string value and backward;
- new GeometryTest_DrawableQualifiedCurve2d DRAW object to wrap GccEnt_QualifiedCirc/GccEnt_QualifiedLin.
  It is a DrawTrSurf_Curve2d with GccEnt_Position visualized in orange color.
- qcircle/qline DRAW command to create instance of GeometryTest_DrawableQualifiedCurve2d
- circ2d3Tan DRAW command to wrap GccAna_Circ2d3Tan taking qcircle/qline/point arguments.
2017-08-17 22:21:32 +03:00
kgv
905b0e3175 0028527: Visualization, AIS_InteractiveContext - custom selection presentation is never removed from View 2017-08-17 22:21:31 +03:00
emv
a743814be9 0029000: Update documentation of Boolean operations according to the new Error/Warning reporting system
The documentation of Boolean Component has been updated - calls to ErrorStatus() method have been replaced with calls to HasErrors() method.
2017-08-17 22:21:30 +03:00
abv
efe9d99730 0029009: Configuration - provide a way to get visual dif of SVG images
New helper script svgdiff.bat is added in adm folder.
It can be used for enabling visual diff for SVG images in TortouseGit; see Git guide for details.
2017-08-17 22:21:29 +03:00
abv
471a2ca0bf 0028959: Configuration, genproj - provide warning on update of scripts in root folder (msvc.bat etc.)
When updating files msvc.bat and draw.bat/sh in the root folder by copying template from adm/templates, procedure genproj will give a warning (unless the files are already the same); if the target file is newer, its copy is saved with additional extension .bak.
2017-08-17 22:21:16 +03:00
vro
f97095fada 0028972: A not useful message is printed on copying of data in OCAF 2017-08-17 15:49:17 +03:00
abv
22e7073865 0027561: Since OCCT 7.0.0, exporting a curve to STL creates a file that results in an endless loop when read
Add check for empty triangulation when writing STL file to report error instead of creation of empty file.

STL reader has been improved to properly handle case of empty or small files, and Ascii files without EOL at the end.
2017-08-17 15:49:11 +03:00
kgv
d21ddc4f17 0029007: Visualization, AIS_InteractiveContext - the method for accessing Detected owners iterator is missing
Added new method AIS_InteractiveContext::DetectedCurrentOwner().
AIS_InteractiveContext header has been restructured (methods moved into groups)
and description has been cleaned up.
2017-08-17 15:48:44 +03:00
kgv
51004f1cf9 0027381: Visualization - update description of method AIS_InteractiveContext::SetPixelTolerance() 2017-08-17 15:48:36 +03:00
abv
0ef598d064 0028249: Upgrade Guide - mention need to use option -std=c++0x when using GCC 2017-08-17 15:48:29 +03:00
mkv
fbd0023f75 0028967: Boolean cut fails the first time, works the second time 2017-08-17 15:48:22 +03:00
emv
2783b13ce6 0028893: BOP cut produces result with artifacts consisting of tools parts 2017-08-17 15:48:15 +03:00
kgv
cee2b5567d 0028323: Documentation - explain highlighting logic of AIS_InteractiveObject in the upgrade guide 2017-08-17 15:48:04 +03:00
abv
d7a28edad2 0028225: MFC sample on OCAF uses old-style definition of a Handle-class
Obsolete approach to definition of OCCT RTTI in sample classes generated by WOK from CDL is replaced by usage of standard macros
2017-08-17 15:47:58 +03:00
emv
7337535943 0028892: BOPAlgo_PaveFiller returns status "error: 11" in draw or raises exception in app on the given shapes set
Boolean Operations algorithm - Added processing of the untouched edges (without edge set) in the UpdatePaveBlocks method.

IntCurvesFace_Intersector algorithm - Avoid calculation of the number of sample points on the surfaces with too small UV ranges.
2017-08-17 15:47:50 +03:00
razmyslovich
359cdde7ed 0027358: ShapeAnalysis_Curve::GetSamplePoints iteration logic isn't robust
The iterating logic in ShapeAnalysis_Curve::GetSamplePoints() is made more robust: instead of iterative incrementing parameter by adding step, parameter at each point is calculated independently from index.
This avoids possible accumulation of numeric errors, and ensures that generated points are equally spaced and their quantity is respected in all cases.
2017-08-17 15:47:39 +03:00
skl
2bc6f71528 0028715: Invalid shape produced by reading of attached STEP file. Regression from OCCT-6.9.1 to OCCT-7.0.0.
Corrections: to use fixed shape as result in the non-manifold mode was made.

Regression was due to using modified initial shape as result in the previous version OCCT. At present initial shape is not modified during ShapeProcessing. Therefore modification to use fixed result was made.

Additionally using of nonManifold flag is added to ShapeProcessing.
2017-08-17 15:47:32 +03:00
apv
a2456ed88a 0026516: Creating revolved shapes fails in some cases 2017-08-17 15:47:25 +03:00
mkv
98f5d739e3 0026776: Bad result of section algorithm 2017-08-17 15:47:08 +03:00
apv
dfdfa61fb5 Update of tests database
Test for 0023838: Standard_OutOfRange in Geom_OffsetSurface::LocalDN (called by BRepFill_PipeShell)
Test for 0023866: GccAna_Circ2d3Tan does not find a circle
Test for 0023925: BRepFeat_SplitShape produces invalid shape
Test for 0023942: Pipe algorithms unrobust to number rounding
Test for 0025385: steep increase in tolerance by intersection
Test for 0025395: SIGSEGV in BRepOffsetAPI_MakeThickSolid
Test for 0025458: can a sweep be used to create 1-fold tori (using a closed wire as path)
Test for 0025478: Fillets can not touch
Test for 0025481: Edge must not contain obsolete curve representations
Test for 0025515: Boolean operation become worse for unknown reason.
Test for 0025521: Fillet creates shell with bad orientation of SubShape
Test for 0025551: BRepMesh can produce internal nodes outside the face interior based on distorted BSpline surface
Test for 0025586: Poor mesh quality, or failure of meshing for closed extruded surfaces with holes
Test for 0025626: Loft of ellipses shows wrinkle near seam edge
Test for 0025628: BRepMesh fails to mesh face with open wire, considered as correct by checkshape
Test for 0025693: Wire of BSplines fails bopcheck
Test for 0025730: result of MakeThickSolid aborts the BOPCheck in Geom_OffsetSurface::SetD0
Test for 0025738: BRepMesh fails to produce correct mesh for the face
Test for 0025776: HLR returns intersecting edges in OutLineV of helical sweep
Test for 0025798: BRepFeat_SplitShape returns invalid result
Test for 0025817: crescent face is not meshed
Test for 0025827: BRepMesh does not synchronize parameters of glued vertices on small edges
Test for 0025837: Bad triangulation when IGES loaded in meters
Test for 0025852: Text to BRep algorithm produces bad faces for circled symbols
Test for 0025856: BRepOffsetAPI_ThruSections returns an invalid shape if one wire contains degenerated edges
Test for 0025879: result of blend fails the bopcheck
Test for 0025967: Shape Healing fails to correct a face with missing poles and pcurves
Test for 0026052: Missing pcurves are computed incorrectly on two connected faces laying on the same surface
Test for 0025061: BRepMesh should skip internal wires with self intersections to produce mesh for the shape anyway
Test for 0024490: Computed surface properties differ substantially depending on NaturalRestriction flag
Test for 0024568: Split shape produces an invalid result
Test for 0024692: fuseedge corruption of spherical edge
Test for 0024772: Intersection of cylinder and cone produces incorrect results
Test for 0024954: BRepBuilderAPI_MakeFace adds wire with aribitary orientation
Test for 0025104: Prism from BSpline curve can not be chamfered
Test for 0025206: Fillet creates edge with C0 continuity
Test for 0025979: fillet creates faces with non-closed wires
Test for 0025983: Fusion of sweep and its mirror invalid
Test for 0025994: Boolean fuse result in invalid result.
Test for 0026034: Result of revolution aborts the bopcheck if translated
Test for 0026077: nurbsconvert of psphere fails the bopargcheck
Test for 0025989: toridial surface gets damaged in STEP export
2017-08-10 13:56:12 +03:00
Thomas Krijnen
d37ac0c26e 0028983: Configuration - HAVE_NO_DLL causes compilation to fail on MSVC 2017-08-10 13:56:10 +03:00
emv
a318d719e7 0028982: 2D offset creates faulty result from wire
Protection of the Edge/Edge intersection algorithm (IntTools_EdgeEdge) from incomplete type conversion due to presence of the Trimmed curves by using Adaptors for getting typed curves instead of direct casting.

Test case for the issue.
2017-08-09 18:11:03 +03:00
emv
9d8e074451 0027876: Draw mkoffset does not work
Updating the documentation for the Draw command *mkoffset*.
2017-08-08 18:17:41 +03:00
kgv
cd1918d6b7 0028980: Coding rules - suppress GCC compiler warnings -Warray-bounds within AdvApp2Var 2017-08-08 18:15:13 +03:00
kgv
7379f4424d 0028979: Coding rules - eliminate GCC compiler warnings -Wstrict-aliasing within Graphic3d_ArrayOfPrimitives.lxx 2017-08-08 18:13:51 +03:00
kgv
fdb8a039b4 0028978: Coding rules - suppress GCC compiler warnings -Warray-bounds within NCollection_Array1 2017-08-08 18:11:47 +03:00
aml
1428d37a1a 0028974: Test cases for STL reader/writer
Add new test grid for STL read/write.
2017-08-08 18:10:17 +03:00
kgv
e40d1acc28 0028975: Draw Harness - DBRep_DrawableShape::display() throws exception while displaying shape without free edges in Debug mode 2017-08-08 18:07:37 +03:00
vro
095e90a2c5 0028973: Undo/Redo changes the order of some attributes 2017-08-08 18:04:37 +03:00
kgv
e2c4ce4869 0028971: Configuration - fix compatibility with glibc 2.26+ due to xlocale.h removal 2017-08-08 17:45:40 +03:00
apv
b101eb1ff0 0025023: Check fails after cut operation 2017-08-08 17:44:01 +03:00
nbv
fc935b4f6b 0028944: Cannot find section between two faces
Test case has been created because the problem is not reproduced on the current version of OCCT.
2017-08-08 17:40:57 +03:00
abv
f7b6063134 0028112: Exception during offset computation
Methods D0, D1, D2, D3, DN of the class GeomEvaluator_OffsetSurface are extended by additional tweak to compensate failure of normal calculation in degenerated points on triangular surfaces.
If the point where normal has failed to calculate is located on parametric boundary of the base surface, one more attempt is made with the point shifted towards interior by Precision::PConfusion().
2017-08-03 17:52:51 +03:00
szy
e16302cee1 0028946: Exception on Undo.
//Added additional command ForgetAtt and test case E1 to test issue 28946.
2017-08-02 18:12:09 +03:00
bugmaster
82af2baefa Update of OCCT version up to 7.2.0 beta 2017-08-01 23:48:23 +03:00
abv
1d949423b7 0028680: Data Exchange - allow reading of multi-domain STL files
Method RWStl::Read() is improved to support reading multi-domain STL files.

Test added: bugs stlvrml bug28680
2017-08-01 23:48:20 +03:00
aml
4178b3531b 0028840: Data Exchange - rewrite the STL Reader/Writer
STL Reader and Writer tools have been refactored to improve performance and usability:
- Basic reading of STL file is separated to abstract class RWStl_Reader which is not bound to particular data structures; the target data model can be bound via inheritance.
- RWStl package uses class Poly_Triangulation to represent triangular mesh.
- Obsolete data structures and tools (packages StlMesh and StlTransfer) are removed.
2017-08-01 23:48:15 +03:00
abv
c5b39011b1 0028962: Configuration, genproj.bat - add /LARGEADDRESSAWARE option to 32-bit target executables 2017-08-01 18:15:53 +03:00
kgv
c727abe055 0028960: Coding Rules - eliminate GCC compiler warning -Wfor-loop-analysis 2017-08-01 17:38:55 +03:00
kgv
08f8a1854d 0025382: Visualization, TKOpenGl - improved video recording capability
Image_VideoRecorder - added new class for video recording using FFmpeg framework.
Draw Harness command vanimation has been extended with new options for video recording.
New optional dependency has been introduced - CSF_FFmpeg.
2017-07-31 17:37:07 +03:00
nds
14bbbdcbc1 0027398: Integrate Qt Browser Widget to Open CASCADE Technology
The following implementation has been made:
- CMake procedure is extended to compile Qt tools. This is optional and is handled by USE_QT_TOOLS option(OFF by default)
- It is possible to build Qt tools using Qt5 or Qt4, it is settled with USE_QT4 option.
- Sample of DFBrowser tool is available in samples/tools/TInspectorEXE. It is build with tools, executable is placed in binaries. To start the sample, use dfbrowser.bat command.
- DFBrowser tool may be started from DRAW
2017-07-28 15:35:16 +03:00
kgv
8dbf046236 0028956: Coding Rules - eliminate several trivial compiler warnings
Eliminated GCC warning -Wsign-compare introduced by patch for #0028786.
Eliminated (false) GCC warning -Wuninitialized introduced by patch for #0027117.

Suppressed GCC warning "-Wunused-but-set-variable" with OCCT_DEBUG defined
2017-07-28 15:34:55 +03:00
mkv
04db3d1cc9 Test for 0023638: Reading IGES file produced invalid shape 2017-07-28 15:34:53 +03:00
nds
948c552acd 0028850: Visualization - Length dimension along Horizontal/Vertical axes
AIS_LengthDimension interface was extended to allow setting a custom dimension direction.
The value of dimension in this case is equal to projection of the distance between dimension attributes(points) to this direction.

vlengthparam command is implemented to set custom length direction in DRAW.
2017-07-28 15:34:51 +03:00
kgv
a131689dc7 0028952: Configuration, CMake - define OCCT_NO_DEPRECATED while building OCCT by obsolete gcc versions 2017-07-28 15:34:50 +03:00
mkv
2508ca8e54 Update of tests data base for reproduced issues
Test for 0022602: Improvement in notched healing
Test for 0022750: Boolean operation: Bug in Fuse
Test for 0022821: Crash with BRepFilletAPI_MakeFillet
Test for 0023090: Reading a STEP file produces invalid shape
Test for 0023163: Intersection of tori fails to produce results
Test for 0023343: Crash (ACCESS VIOLATION) in GeomPlate_BuildPlateSurface / MakeApprox if init Surface is set
Test for 0023386: BRepAlgoAPI_Fuse on two disjoint shapes sometimes loses all geometry from one of the shapes
Test for 0023451: FixMissingSeam constructs intersecting wires
Test for 0023497: Units package raises exception for composite units
Test for 0023638: Reading IGES file produced invalid shape
Test for 0023667: checkshape command does not detect problems in the attached shape
Test for 0023671: pload function does not work if DRAWDEFAULT file has win format
Test for 0024185: Wrong projection of a wire to a face
Test for 0024215: Error in offset (bad curve)
Test for 0024251: Command checkshape does not report a problem on first call after fixshape
Test for 0024365: BRepAlgoAPI_Section wrong result, BRepAlgo_Section good result
Test for 0024421: Sewing changes orientations of some subshapes.
Test for 0024429: Cylinder-torus intersection throws an exception and produces no result
2017-07-28 15:16:41 +03:00
nds
fbfdf61abb 0028529: UnifySameDomain crashes on a shape with location
During gluing edges, when getting pcurve of an edge, consider the proper surface location.
2017-07-27 14:00:56 +03:00
szy
030ba6489b 0028862: Unification of empty labels saving procedure.
Added a possibility to save empty labels to a persistent document in case of need.
2017-07-27 14:00:44 +03:00
kgv
dc2cc1350e 0028945: Visualization - StdPrs_ToolTriangulatedShape::ComputeNormals() is extremely slow for triangulation-only surface
StdPrs_ToolTriangulatedShape::ComputeNormals() now calls Poly::ComputeNormals() for triangulation-only surfaces.
Poly::ComputeNormals() now averages normal considering triangle size.
2017-07-27 14:00:24 +03:00
apv
1f9eb89082 Test for 0024424: BRepAlgoAPI_Cut throws Standard_ConstructionError with disjoint, but adjacent solids 2017-07-27 14:00:09 +03:00
abv
cdec5927b3 0028950: Generation of draw_test_harness and upgrade pdf files is crashed
Template for LaTeX header used in generation of PDF manuals is corrected to avoid multiple errors during processing by LaTeX (which can eventually lead to LaTeX aborting if their count exceeds 100).

Names of log files generated by gendoc command are made dependent on target format and (for PDF output) document name.

Formatting bug is fixed in DRAW User Guide
2017-07-27 14:00:03 +03:00
vro
0f3d1d7c22 0028908: Improvement on attachment of attributes to the label 2017-07-27 13:59:52 +03:00
apn
bbf03a4e8e 0028951: MathJax CDN shutting down
Correct all links using old MathJax version.
2017-07-27 13:59:47 +03:00
kgv
17b45a2936 0028937: Tests, testdiff - link image in diff to the test cases log 2017-07-27 13:59:40 +03:00
kgv
6a2ed6e82b 0028938: Tests - remove useless file artifacts of test cases perf/de/bug26338 2017-07-27 13:59:34 +03:00
apv
d483647d5d Test for 0024145: OCCT fails to project a wire onto BSplineSurface using BRepAlgo_NormalProjection 2017-07-27 13:59:28 +03:00
anv
6319b55bc6 0028871: Various problems in SAT export 2017-07-27 13:59:22 +03:00
apn
48691eaa2c 0028920: Samples - fix msvc.bat for building samples without CMake
Added DevEnvDir to env.bat.
Added window title to "start" command in msvc.bat files.
2017-07-27 13:59:15 +03:00
mkv
751b10f25b Test for 0028551: Bad result of general fuse 2017-07-27 13:59:05 +03:00
kgv
67908e84d7 0028930: Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation 2017-07-27 13:58:59 +03:00
mkv
60afea0a98 Test for 0023025: OCC exception is raised when making an extrusion with draft angle from a simple line 2017-07-27 13:58:52 +03:00
mkv
63bd365eed Test for 0023176: Intersection of cylinder and cone produces open curve 2017-07-21 12:13:05 +03:00
kgv
b4fd9d00c2 0028927: Visualization - Graphic3d_StructureManager destructor should invalidate its pointer in Graphic3d_Structure
Graphic3d_Structure::myFirstStructureManager - removed unused class field.
~Graphic3d_StructureManager() now removes displayed Structures explicitly.
2017-07-21 12:10:47 +03:00
kgv
983fd6c02b 0028923: Foundation Classes - Message_Messenger::Send() implementation is not thread-safe
Use (Message_SequenceOfPrinters::Iterator instead of accessing sequence elements by index.
2017-07-21 12:10:44 +03:00
kgv
cc8cbabe5c 0028912: Visualization, TKOpenGl - multi-texture support
Graphic3d_AspectFillArea3d now stores array of textures.
Graphic3d_TextureParams stores texture unit for mapping texture.

OpenGl_Context::BindTextures() - context now manages the set of active textures.
Related code has been removed from OpenGl_Workspace.

OpenGl_Sampler has been extended to hold texture parameters structure.
OpenGl_Texture now holds OpenGl_Sampler instance as class field.
OpenGl_Texture inherits new class OpenGl_NamedResource and holds
texture identifier used for sharing resource in OpenGl_Context.

OpenGl_RaytraceGeometry now creates bindless textures taking
Sampler object directly from OpenGl_Texture.
OpenGl_Context::BindTextures() automatically recreates immutable
Sampler Object on texture parameters change.

Declared new structure OpenGl_ArbSamplerObject for platform-neutral
usage of related functionality.
Related functions are now loaded within OpenGL ES 3.0+.

Declarations.glsl - occActiveSampler has been renamed to occSampler0
with aliases occSamplerBaseColor (main) and occActiveSampler (for compatibility).
Additional texture samplers should be declared explicitly
within specific GLSL program as occSampler1, occSampler2, etc.

AIS_Shape and AIS_ColoredShape now computes Shaded presentation
with UV coordinates if texture mapping is enabled in Drawer.

vshaderprog now accepts Shader source code as parameter.
2017-07-21 12:10:41 +03:00
kgv
a6dee93dfa 0028811: Visualization - merge texturing support into AIS_Shape class and get rid of AIS_TexturedShape
AIS_Shape and AIS_ColoredShape now computes Shaded presentation
with UV coordinates if texture mapping is enabled in Drawer.

OpenGl_Context::SetTextureMatrix() - fixed inconsistent handling
of texture cooridnates translation vector.

vtexture command has been extended to handle new arguments:
* -trsfTrans, -trsfScale, -trsfAngle defining transformation matrix
* -setFilter, -setAnisoFilter to setup texture filtering
2017-07-21 12:10:37 +03:00
abv
798849860f 0028922: Configuration - remove useless Standard_EXPORT in SelectMgr_Frustum::hasOverlap() 2017-07-21 12:10:35 +03:00
mkv
775530d462 Test for 0023166: Intersection of plane and cone produces wrong result 2017-07-20 11:45:58 +03:00
mkv
7fc0e03544 Test for 0023187: Cut with a compound 2017-07-20 11:40:37 +03:00
kgv
f9801cf97a 0028915: Configuration, Font_BRepFont - do not include FreeType headers within OCCT headers 2017-07-17 11:14:24 +03:00
mkv
365a640d07 Test for 0022919: Shape Healing fails to correct a face with missing seam 2017-07-13 17:29:52 +03:00
kgv
a5460e9d98 0028887: TKJT - add option to cache file content
Added new auxiliary class Standard_ArrayStreamBuffer implementing
std::streambuf interface for defining std::istream from allocated memory.
2017-07-13 17:29:50 +03:00
apn
da67ffb75a 0028769: Unification of msvc.bat files.
Modify mfc and qt samples for supporting VS 2017.
Create general vcxproj files for all mfc samples.

Correction msvc.bat and msvc_D3D.bat in CSharp sample
2017-07-13 17:29:48 +03:00
abv
d6cda17a42 0028701: Configuration - add support of VS 2017
Added support of Visual Studio 2017 (15) in CMake build procedure.
CMake 3.7.2 or above is required to generate projects for VS 2017.

Since version of compiler and toolset remained at 14 (now they are 14.1), and they use the same run-time, the same third-party products as for VS 2015 (14) can be used.
Also the name of the folder for installation of OCCT binaries in OCCT-standard layout (default on Windows) remains "vc14".

Support of Visual Studio 2017 is added in genproj generator and relevant environment, with format specifier "vc141".

The syntax of the genproj command is revised:
- UWP is considered as separate platform ("uwp" alternative to "wnt"), not part of IDE specification
- Option "IDE" is renamed to "Format"
- Obsolete name of local variable "aWokStation" is replaced by equivalent "theFormat"

In environment scripts, additional variables are defined (derived from VCVER, see adm/vcver.bat):
- VCLIB defines name of the subdirectory specific to VS version; it is the same as VCVER except that for VCVER=vc141 VCLIB=vc14 and for VCVER=141-uwp VCLIB=vc14-uwp
- VCFMT is VCVER without optional suffix "-uwp"
- VCPROP is "NativeDesktop" for normal builds or "Universal" for UWP builds

Command genconf is amended to:
- Detect presence of VS 2017 (separately for desktop and UWP)
- Use only two first digits after "vc" in format specification for search of third-party libs
- Have more space in user interface for VS specification

All supported variants of VCVER variable are documented in dev guides / buiding / msvc
2017-07-13 17:29:45 +03:00
mkv
efd535aebf Test for 0022886: Bug in boolean 2017-07-13 17:29:44 +03:00
ifv
35dced1c14 0028856: Extrema between two curves gives wrong result
Treatment for large Lipschitz constant is added
Test case is added
2017-07-13 17:29:42 +03:00
kgv
1eeef710bb 0028895: Visualization, V3d_View::SetComputedMode() - HLR calculation is performed multiple times when 'hlr on' has been called
V3d_View::SetComputedMode() - removed implicit View update.

Graphic3d_CView::SetComputedMode(), ::ReCompute() - fixed
uninitialized bounding box of Computed structure.

PrsMgr_Presentation::Compute() - fixed computation of Computed structure
with transformation within Connected presentation.

StdPrs_HLRPolyShape::Add() now creates Graphic3d_ArrayOfSegments instead of
inefficient Graphic3d_ArrayOfPolylines with boundaries at every segment.

Fixed error in test case bugs/vis/bug24388_1.
2017-07-13 17:29:40 +03:00
kgv
851dacdbb9 0028890: Visualization - After closing all views and then display the view again, just the first view has object(s) displayed
DeviceLost flag has been moved from Graphic3d_GraphicDriver to Graphic3d_StructureManager,
so that all Viewers sharing the same Driver instance are properly invalidated.

Fixed clearing of objects by vclear command in case of multiple Viewers.
2017-07-13 12:42:47 +03:00
mkv
336a63f042 Test for 0022487: Reading IGES file produces invalid shape 2017-07-13 12:40:01 +03:00
mkv
ae572ec121 Test for 0022394: Not valid shape after read iges 2017-07-13 12:38:22 +03:00
mkv
e14d870c30 Test for 0022288: checkshape works wrong with attached shape. 2017-07-13 12:36:04 +03:00
mkv
5a7e1e7d00 Test for 0022283: Problem with reading of attached IGES file. 2017-07-13 12:32:57 +03:00
kgv
7f5945d688 0026213: Visualization - replace sequence in Select3D_SensitiveGroup
NCollection_IndexedMap is now used instead of NCollection_Sequence within Select3D_SensitiveGroup.
2017-07-13 12:27:48 +03:00
kgv
99cfc27757 0028907: Coding Rules, OpenGl_GraphicDriver - fix class fields accidentally marked public 2017-07-13 12:25:21 +03:00
duv
b27ab03d09 0028762: Visualization, Ray tracing - Implement depth-of-field effect
Graphic3d_RenderingParams - introduced new parameters CameraFocalPlaneDist and CameraApertureRadius managing DOF effect.
TKOpenGl - added new ray generation logic to RaytraceBase.fs.
vrenderparams command - added -focal and -aperture parameters.
OpenGl_View.hxx - function for ray generating was split into two functions (ray tracing and path tracing).
OpenGl_View_Raytrace.cxx - fixed interaction between adaptive sampling and stereo camera
2017-07-13 12:23:09 +03:00
kgv
475c2302d4 0028889: Visualization, V3d_View - View specific Graphic3d_Structure should be removed if the view is removed
V3d_View::Remove() - erase trihedron and grid structures from structure manager.
2017-07-10 08:54:15 +03:00
kgv
25e59720d6 0028832: MMgt_TShared can be replaced by Standard_Transient 2017-07-06 13:18:13 +03:00
kgv
e958a649c6 0028876: Tests, Image_Diff - the image difference is unavailable for test case bugs vis bug28205_1
Quantity_ColorRGBA - added method SetValues().
Image_PixMap::PixelColor() now returns Quantity_ColorRGBA instead of Quantity_Color.
Image_PixMap::SetPixelColor() now takes Quantity_ColorRGBA instead of NCollection_Vec4<float>.

Image_Diff has been improved to support Image_Format_Gray.
Image_Diff::SaveDiffImage() now saves image difference
in Image_Format_Gray format to reduce size of image file.

Image_Diff now uses TColStd_HPackedMapOfInteger instead of
TColStd_MapOfInteger with manual memory allocation.
2017-07-06 12:45:37 +03:00
kgv
4679d975dc 0028888: Visualization - AIS_InteractiveContext should not hold V3d_View handle which will cause accessing invalid removed V3d_View 2017-07-06 12:42:02 +03:00
emv
33ba856502 0028786: Refactoring of the Warning/Error reporting system of Boolean Operations Algorithm
0. Basic tools for defining classes representing alerts (errors, warnings etc.) and collecting them during execution of algorithms are added in Message package.

1. Refactoring of the Error/Warning reporting system of the algorithms in Boolean Component.
   To dump the description of the Error/Warning status of the algorithm the DumpErrors/DumpWarnings method should be called.
   Also, the methods GerErrorMsg(int Error) and GetWarningMsg(int Warning) have been implemented to get the description for the given Error/Warning.
   All Error/Warning statuses are now listed in the enumeration ErrorStatusEnum/WarningStatusEnum of the algorithm.
   It is also possible to get the shapes for which the warning has been set by using the method GetWarningShapes().

2. The new class BOPAlgo_Options has been created to unify the options of the BOPAlgo_* and BRepAlgoAPI* algorithms.

3. The new checks across the algorithms have been added to detect and report errors and warnings.

4. Test cases
  boolean bopcut_complex B9 E1 E5 E8
  boolean bopfuse_complex B4 B5 C9 D1 D4 D5 D6 D7
have been rewritten to use Cells Builder algorithm instead of Boolean Operations algorithm, because latter always returns error "Unsupported Boolean operation" for these cases.

5. New chapter has been added in the user guide for Boolean Operations - Error / Warning reporting system.

6. Added comment to NCollection_List::Remove(Iterator&)
2017-07-06 12:41:56 +03:00
aba
b09d86369b 0028884: Modeling - add Standard_EXPORT macro to methods of BRepExtrema_TriangleSet 2017-07-06 12:41:47 +03:00
abv
896faa7296 0028417: Using PRECOMPILED HEADER to speed up compilation time
Use of Cotire tool is introduced for acceleration of CMake builds, by usage of precompiled headers.
CMake option BUILD_USE_PCH is added to enable / disable use of precompiled headers

When precompiled headers are used, additional compiler macros are defined globally in the build system to avoid problems due to different order of included files:
- NOMINMAX is defined on Windows to prevent defining "min" and "max" as macros by windows.h
- STRSAFE_NO_DEPRECATE and _SCL_SECURE_NO_WARNINGS are defined on Windows to prevent declaring functions of standard C library as deprecated by #pragma, and other warnings in system headers
- GL_GLEXT_LEGACY and GLX_GLEXT_LEGACY are defined to ensure that only OCCT's own glext.h is used
- __STDC_FORMAT_MACROS is defined to have standard C print format macros always defined

Code is corrected to avoid conflicts with system headers and in case of compiling together as unity builds (partially):
- Some locally defined variables in TKV3d, TKHLR are renamed to be unique
- Duplicated definitions of macros and global functions are eliminated in TKSTEP
- Useless header WNT_UInt.hxx is removed
- Usage of local variables conflicting with X11 macro is avoided in Draw_Viewer.cxx
- Local variables in AIS_ConcentricRelation.cxx are renamed to avoid conflict with macros defined in windows.h
- HXX files containing code are renamed to PXX or merged with corresponding CXX files.

IVtkTools classes are corrected to avoid compiler warnings disabled in non-PCH builds by inclusion of VTK headers.

Useless pragmas disabling warnings on MSVC are removed
2017-07-06 12:41:41 +03:00
emv
a07cff6957 0028883: Invalid result of Section operation 2017-07-06 12:41:32 +03:00
mpv
fe4f17f018 0028853: TDF_AttributeIterator should give handles instead of pointers
Make "Value" method of the iterator return Handle (instead of pointer) to unify public interfaces.
2017-06-29 14:25:00 +03:00
apv
b721c02a6c Test for 0021414: GeomAPI_IntCS fails to find all intersections between line and surface of revolution 2017-06-29 14:24:54 +03:00
anv
1e636751d7 0028798: Updating SSP sample 2017-06-29 14:24:38 +03:00
apv
6916e17414 Test for 0021413: Pipe fails - very sensitive to spine parameterization 2017-06-29 14:24:31 +03:00
vro
68223adbc7 0028842: Attribute TNaming_NamedShape is not restored from .sgd document 2017-06-29 14:24:18 +03:00
kgv
a2a6c87265 0028877: Documentation - fix unclosed tag in coding_rules.md 2017-06-29 14:24:12 +03:00
abk
654c48b2b9 0028710: Implement 'BRepTools_History' history for algorithm 'ShapeUpgrade_UnifySameDomain'
'BRepTools_History' history was implemented for algorithm
'ShapeUpgrade_UnifySameDomain'.

The history of the changing of the initial shape was corrected to consider all
shapes created by the algorithm as modified shapes instead of generated ones.

The old history interface was replaced by the new one:
- to get the modified shapes use: History()->Modified();
- to check if the shapes has been deleted use: History()->IsRemoved().
2017-06-29 14:24:05 +03:00
abk
98ffe9dfdf 0028709: Extend type 'BRepTools_ReShape' to support 'BRepTools_History' history
Type 'BRepTools_ReShape' was extended to:
- support the 'BRepTools_History' history;
- merge several shapes to a single shape that
  the history of the merged shapes is presented by equal ways.

Type 'ShapeBuild_ReShape' was changed to support 'BRepTools_History' history.
2017-06-29 14:23:56 +03:00
apv
a3762901a6 Test for 0016740: XCAFDoc_ShapeMapTool is not restored 2017-06-29 14:23:49 +03:00
apv
85220a9c01 Test for 0017128: ShapeFix WireIntersector make bad shape 2017-06-29 14:23:31 +03:00
abv
66cfcd0f73 0028829: dsetsignal command does not work on Linux properly
OSD::SetSignal() is corrected to unset FPE exceptions on Linux if called with False argument
2017-06-29 14:23:03 +03:00
kgv
a228288f61 0028801: Visualization, Select3D_SensitivePrimitiveArray - add option to keep index map of detected elements
Select3D_SensitiveGroup - added option to force overlap check for all entities in the group.
Added interface for accessing last detected entity in the group.

Select3D_SensitivePrimitiveArray - added option to keep index map of detected elements
and option to split array into groups for faster initialization of extra-large arrays.

BVH_Geometry, BVH_Object - added missing accessor ::IsDirty() for checking BVH tree state.
2017-06-29 14:22:58 +03:00
nbv
e9a7ec7a2b 0028849: [Regression to 7.1.0] Exception in Boolean operation
The reason of exception has been eliminated.
2017-06-22 12:45:05 +03:00
mpv
c1a688e9fb 0028852: TDF_AttributeIterator should not be marked as "handle with care"
Warning lines have been removed.
Added a comment about usage of this class.
2017-06-22 12:38:27 +03:00
abv
21b1980f05 0028362: Documentation - Doxygen warnings
Formatting of user guide is corrected (code block properly closed)
2017-06-22 12:31:28 +03:00
emv
df119b4ed9 0028844: Regression vs 7.1.0: Exception is raised by the solid classification algorithm
Protection from normalization of the null vector.

Test cases for the issue.
2017-06-22 11:34:18 +03:00
ifv
f24f542856 0028490: Point located outside the solid is classified as inside
New method for building surface polyhedron (class IntCurveSurface_Polyhedron), which takes in account intervals of discontinuity of surface is added for constructor IntCurvesFace_Intersector.

Bug in methods NbU(V)Intervals and U(V)Intervals for Offset surfaces is fixed.
2017-06-22 11:31:00 +03:00
gka
b80d766ab9 0028797: Exceptrion is raised during reading attached STEP file.
Protection for null handle was added in the method RWStepVisual_RWPresentationStyleAssignment::ReadStep
2017-06-22 11:29:14 +03:00
apv
6ae0790866 0028841: testdiff DRAW command hangs or crash with arithmetical exception 2017-06-19 16:37:39 +03:00
jgv
2c26a53d85 0027079: Bad approximation of intersection curves with variable curvature
1. Method Approx_ComputeLine::Perform is modified: now it contains also recursive calls after new line computation made by new method ApproxInt_MultiLine::MakeMLOneMorePoint.
    2. New method MakeMLOneMorePoint is added to ApproxInt_MultiLine: it builds new sub-line as a part of main line with new point added into the middle of the longest interval between existing points.
    3. Method ShapeConstruct_ProjectCurveOnSurface::ApproxPCurve is modified to avoid regressions: now it takes care of the set of initial points to be enough close to each other so that an interval between two adjacent points is less than half-period of the surface.
    4. Modification in ShapeConstruct_ProjectCurveOnSurface: correction of pcurves of edges which extremities are in the singularities of surface.
2017-06-16 14:24:53 +03:00
kgv
6c060ff2c4 0028794: Regenerate .pxx file for Shaders/Display.fs resource 2017-06-15 15:27:38 +03:00
abk
2c02f319a4 0028708: Create a mechanism to serve shape history by a way common for algorithms accepting and producing shapes
A shape history mechanism was created. It supports history for shapes with types
'vertex', 'edge', 'face' and 'solid'. It allows define relations 'generated',
'modified' and 'removed' between the accepted and the produced shapes. It
provides functionality for the other widely used history mechanism 'Generated',
'Modified', 'IsDeleted'. It provides algorithm to merge two histories of
sequentially applied algorithms. Recommendations were formalized to choose
between relations 'generated' and 'modified'.
2017-06-15 15:27:37 +03:00
kgv
9fd2d2c382 0028838: Configuration - undefine macros coming from X11 headers in place of collision
The macros Status, Convex, Opposite, FillSolid (coming from X11 headers)
are now undefined in place of definition of methods with same name in OCCT headers.
The usage of variables with name Status is now avoided.

GL_GLEXT_LEGACY is now defined only if not already defined.

The macros AddPrinter (coming from WinAPI headers) is now undefined
within Message_Messenger class definition having method with the same name.
CurrentDirectory macro is now undefined in OSD_Process.hxx.
2017-06-15 15:27:36 +03:00
mkv
e3d02d1f84 0028843: Replacing @ symbol in v3d glsl tiles test case 2017-06-15 15:27:35 +03:00
jgv
bdae3beb87 0028802: The tolerance reached by approximator is used in creation of an edge, it is incorrect
Method IntTools_FaceFace::MakeCurve is modified: reached tolerances 2d and 3d of approximator are not used for edges.
2017-06-15 15:27:34 +03:00
apv
4201bf79fb 0023575: Bounding box for a planar edge has non-zero dimension in direction orthogonal to an edge plane
# Test case bugs/moddata_3/bug23575 creation
2017-06-15 11:41:24 +03:00
apv
9c80aadfd8 0003883: Problems of reading colors and layers in XDEDRAWEXE
# Test cases bugs/step/bug3883_1, bug3883_2, bug3883_3, bug3883_4, bug3883_5 creation
2017-06-15 11:37:34 +03:00
kgv
09324e85c8 0028799: Coding Rules - elimilate confusing Quantity aliases of Standard_Real type
Aliases to Standard_Real within Quantity package have been marked as deprecated.
2017-06-15 11:35:37 +03:00
msv
e57aedeb26 0028830: HalfSpace command chooses the wrong side of the given shell
Improve the algorithm BRepPrimAPI_MakeHalfSpace. Earlier it made projection of the point only on faces. If the nearest point does not conform to normal projection criterion the result is wrong. The fix includes search of projection on edges and vertices. This makes the algorithm robust for half spaces with boundaries.
2017-06-15 11:31:39 +03:00
apv
b36ebd49b6 0028813: Visualization, AIS_ColorScale - color scale title invalid placement
# Test case bugs/vis/bug28813 creation
2017-06-15 11:30:15 +03:00
abk
669cd76e53 0028707: Simplify type 'BRepTools_ReShape'
Type 'BRepTools_ReShape' was simplified:
- the functionality to process shapes different only in orientation by different ways was removed as it is not used anywhere;
- method 'Apply' with the build mode parameter was moved to type 'ShapeBuild_ReShape' as it is used only through the last type.
2017-06-15 11:27:54 +03:00
kgv
177781da92 0028826: Visualization, TKOpenGl - fix compatibility with strict OpenGL ES drivers
OpenGl_ShaderProgram::Initialize() - precision declarations have been moved
after the list of enabled extensions.

Declarations.glsl - the fragment shader outputs have been re-declared as array
for proper assignment of default locations (draw buffers).

OpenGl_FrameBuffer - GL_HALF_FLOAT is now used instead of GL_HALF_FLOAT_OES on OpenGL ES 3.2+.
OpenGl_Texture - fixed initialization of Image_Format_RGB32 image format on OpenGL ES 3.0+.
2017-06-13 12:01:42 +03:00
emv
8ae442a8cb 0028775: Code duplication removal across the BOPAlgo_PaveFiller algorithm
The methods PerformVerticesEE() and PerformVerticesEF() of the class BOPAlgo_PaveFiller have been replaced with the new PerformNewVertices() method.

While splitting the Pave Blocks with extra paves, check that the new Pave Blocks have the valid intersection range. If the new Pave Block does not have such range do not create it and unify its vertices making SD vertex.

Re-computation of the Shrunk Data for the modified Pave Blocks. The new method BOPDS_DS::IsValidShrunkData(const Handle(BOPDS_PaveBlock)& thePB) has been implemented to check that the Shrunk Data of the Pave Block is still valid. It may become invalid in case the tolerance values of the vertices of the Pave Block have been modified.

The test case bugs/modalg_6/bug27448_2 has been marked as BAD, because it uses the invalid shapes as inputs for BOP.

Test cases for the issue 0028690.
2017-06-09 13:01:32 +03:00
kgv
f5b7241978 0028789: Visualization, TKV3d - extend API for accessing and assigning BVH builders
Several methods in Selection classes have been moved to header files for better inlining.

BVH_Constants - added new enumeration defining common constant values used with BVH trees.
BVH - replaced NCollection_Handle with Standard_Transient handle
in classes BVH_Properties, BVH_Builder, BVH_Tree, BVH_Object.

Defined global BVH-builders instead of allocating a new one for each object set.
SelectMgr_ViewerSelector - added new method ::SetEntitySetBuilder() defining
default BVH Tree builder for SelectMgr_SensitiveEntitySet.

Added new method SelectMgr_SensitiveEntitySet::SetBuilder()
for overriding default BVH tree builder.
2017-06-09 12:59:11 +03:00
bugmaster
645f581fbe 0026303: Problem with test cases boolean/gdml_private L1-9 and K1-K9
Problem is not reproduced on current status of OCCT.
Test cases were reintegrated.
2017-06-09 12:59:08 +03:00
kgv
26cfd29cde 0028787: Configuration, genproj - add option HAVE_RelWithDebInfo for generating VS project files with Debug info in Release mode 2017-06-09 12:59:06 +03:00
age
eb85ed3649 0028794: Visualization, Ray tracing - Implement tone mapping
Added enum Graphic3d_ToneMappingMethod for choosing tone mapping mode.
Added new rendering parameters.
Added tone mapping to Display.fs shader.
2017-06-09 12:59:04 +03:00
ysn
d6b4d3d0d5 0028654: Existed tool (gendoc) for generation documentation does not take into account size of images.
The parameter defining image width has been added to all figures to improve their layout in PDF documents and tweaked depending on the nature of each image.
Additionally, some minor changes improving image and text layout have been introduced.

Remove temporary added possibility for setting image width automatically for generation of pdf documentation.
2017-06-09 12:59:02 +03:00
kgv
26e0b3353c 0028785: Configuration, CMake - handle OCCT layout within 3rdparty_macro.cmake 2017-06-09 12:59:00 +03:00
kgv
d2e4d7b92d 0028814: Documentation - suggest using # instead of // for temporary comments in commit description 2017-06-09 12:58:58 +03:00
ifv
5fdf69c9db 0028812: Regression. bugs modalg_6 bug28468_2 test case is crashed if CSF_FPE set to 1.
Test the possibility of line creation is added
2017-06-09 12:58:56 +03:00
kgv
b07ce12b5f 0028822: Configuration, XCAFDoc - fix name collision with macros GetObject() 2017-06-09 12:58:53 +03:00
kgv
b2857a7ef0 0028820: Samples - fix compilation of JAVA sample for Android 2017-06-09 12:58:51 +03:00
jgv
1fae7cdaf1 0028784: [HLR] Crash while getting hidden lines for a compound
Method HLRBRep_PolyHLRToShape::InternalCompound is modified: avoid creation an edge with null length.

Add testing Draw command.
2017-06-09 12:58:49 +03:00
kgv
5e3047fd4a 0028815: Visualization, StdPrs_WFShape - fix misprint in condition 2017-06-09 12:58:47 +03:00
kgv
bdb1e2f7af 0028809: Coding Rules - add .i files to .gitattributes 2017-06-08 11:48:33 +03:00
kgv
d4e12f61be 0028806: Coding Rules - remove not implemented method OpenGl_ShaderObject::Initialize() 2017-06-08 11:42:35 +03:00
nbv
b7a71e36aa 0028795: Boolean operations corrupt the p-curve of the source planar face if "non-destructive" option is switched off
Now, the range of BRep_CurveRepresentation of the edge is updated if at least one of its boundary is not infinite (earlier, it was updated if all two boundaries are not infinite only).
2017-06-02 11:47:42 +03:00
apn
c765ab619b 0028347: Reuse OCCT implementation for producing end-user documentation for Products
Remove unnecessary definition of PRODROOT
2017-06-01 16:24:53 +03:00
apv
3b337f77ed 0023378: BRepAlgoAPI_Cut returns wrong result
Adding test cases only
2017-06-01 13:55:29 +03:00
mpv
ec2039e9a7 0028714: XmlMFunction_ScopeDriver fail to read and write function label including 0 tag in label path.
Reproduced on TDF_Reference attribute that refers to label with zero-tags entry. Make checking of saved/retrieved tags in XML format pass zero-tags as correct.
2017-06-01 13:55:26 +03:00
bugmaster
4f0ba168fb 0028773: BRepAlgoAPI_Cut invalid result
Adding test case only
2017-06-01 13:55:24 +03:00
ifv
f6b08ecf71 0028346: Function ProjectOnSegments of ShapeAnalysis_Curve returns only single solution leading to projection result far from optimal
Subdivision of curve parametric interval based on deflection criteria is added for curve type OtherCurve in
Extrema_GExtPC.gxx. Algorithm of subdivision is implemented in Extrema_Curve(2d)Tool.cxx

New Draw command projpcurve for projection of point on CurveOnSurface is added in SWDRAW_ShapeAnalysis.cxx
projpcurve is modified to reflect "start parameter" in usage message and Draw help.
2017-06-01 13:55:22 +03:00
nbv
75b9688a9f 0023177: Intersection of plane and torus misses a result and never produces analytical result
Creation of the test case.
2017-06-01 13:55:20 +03:00
kgv
ee2be2a881 0028316: Coding Rules - Elimilate confusing aliases of Standard_Real type in V3d_View
Quantity_Factor, Quantity_Parameter, Quantity_Ratio, Quantity_Coefficient,
Quantity_PlaneAngle, Quantity_Length, V3d_Parameter and V3d_Coordinate
have been replaced by Standard_Real in visualization classes.
2017-06-01 13:55:18 +03:00
msv
3f5aa017e7 0028782: Shape sewing behavior not consistent for the same CAD file
Get rid of iterations on maps with shape key by replacing simple maps with indexed maps. So iteration is done on integer key.

The map containers have been updated to insert into them type definitions of key and value.

The new methods RemoveKey() and RemoveFromIndex() have been added to indexed [data] map to be able to remove an arbitrary key from the map.

All the code in OCCT has been updated where RemoveLast() and Substitute() methods were used to remove a key from indexed [data] map.
2017-06-01 13:55:15 +03:00
mpv
58e5d30edc 0028714: Dimension of TDataStd_Real is not serialized to document
Added a comments and Standard_DEPRECATED macros to obsolete methods that these methods will be removed and that the corresponding field myDimension is not stored in the document.
2017-06-01 13:55:13 +03:00
szy
fa6fc587b9 0028616: TNaming - DELETE evolution is not considered by TNaming_NewShapeIterator.
// Fixed TNaming_Builder.
2017-06-01 10:41:25 +03:00
kgv
e28f12b304 0028793: Visualization, TKV3d - make BVH_Builder::Build() const for propagating builder by value
Added const for method BVH_Builder::Build().
Added missing Standard_OVERRIDE to overridden methods.
Merged code from .lxx in BVH package directly into .hxx headers.
2017-06-01 10:39:35 +03:00
emv
edfa30deef 0028259: Method MakeBlocksCnx is duplicated in two different places in BOPAlgo
The methods BOPAlgo_Tools::MakeBlocksCnx(), BOPAlgo_Tools::MakeBlocks() and static method MakeBlocksCnx in BOPAlgo_Builder_2.cxx have been replaced with the new template method BOPAlgo_Tools::MakeBlocks(). The blocks of connected elements are now stored into the list of list instead of data map.
All methods BOPAlgo_Tools::FillMap() have been replaced with the new template method BOPAlgo_Tools::FillMap().

Making the Pave Block with the smallest index of original edge to be the first in the Common Block (i.e. the representing Pave Block).

The following improvements have been made in Boolean Operations algorithm to avoid regressions:
- When updating the existing common block update its pave blocks in a way that the parameters of the paves should be valid for the original edge (bugs/modalg_5/bug24809);
- When trying to reduce the tolerance of the section edge check the tolerance of all Face/Face interferences that created this edge (boolean/volumemaker/C4,D2);
- Avoid producing the different Pave Blocks for the same section edge (boolean/volumemaker/D6);

Adjustment of the test cases.
2017-06-01 10:20:25 +03:00
kgv
884cafd893 0028788: Visualization, StdPrs_WFShape - Add option to compute Isolines using multiple threads
StdPrs_WFShape::Add() now accepts new argument theIsParallel (FALSE by default)
for computing Isolines using multiple threads (if there is more then 1 Face).
StdPrs_Isolines::addOnTriangulation() - changed the iteration order (cosmetics).
2017-06-01 10:18:34 +03:00
kgv
3ae5dc8173 0028796: Coding Rules - fix declaration of Move constructor in NCollection_Array1 2017-06-01 10:17:31 +03:00
ika
1603a49799 0028790: Data Exchange - Wrong orientation of Annotation Plane in GD&T (Writing)
Fix building of Axis2Placement3d.
2017-06-01 10:14:34 +03:00
ifv
4560c05480 0028771: BRepOffset_MakeOffset incorrect result
Correction of tolerance of new edges, which belongs planar faces is improved
Test case added.
2017-06-01 10:10:46 +03:00
mpv
354c94b724 0025536: XmlMDataXtd_GeometryDriver doesn't support TDataXtd_SPLINE, TDataXtd_PLANE and TDataXtd_CYLINDER.
Added support of the missed geometrical types into the XML driver.
2017-06-01 10:05:04 +03:00
mpv
a38db39de6 0025537: XmlMPrsStd_PositionDriver::Paste runtime check crash.
Increased a size of buffer in array of 'char' to fit the largest possible conversion from 'double' to %.17g string.
2017-05-26 14:51:23 +03:00
kgv
87432b8278 0028726: Quantity_NameOfColor should be replaced by Quantity_Color in function input argument
AIS_InteractiveObject, virtual methods ::SetColor(), ::Color()
returning/accepting Quantity_NameOfColor have been removed.
Virtual method ::SetMaterial() accepting Graphic3d_NameOfMaterial has been also removed.

V3d_View, V3d_Viewer, V3d_AmbientLight, V3d_DirectionalLight,
V3d_Light, V3d_PositionalLight, V3d_SpotLight, Aspect_Window,
methods accepting Quantity_NameOfColor have been removed (duplicates)
or color argument(s) replaced with Quantity_Color.
2017-05-26 14:49:03 +03:00
vro
5ecc46c08e 0027667: OCAF binary persistence hangs on reading truncated CBF file
A check on "end of file" is added to the reader.
2017-05-26 14:49:01 +03:00
nbv
261b7d9e8a 0028222: Intersection of two cylinders fails
1. The reason of exception has been eliminated.

2. Algorithm in IntPatch_WLineTool::JoinWLines(...) method has been modified in order to forbid join curves in the point where more than two intersection lines meet. More over, joining is forbidden if local curvature in the connection point is too big (see function CheckArgumentsToJoin(...) in the file IntPatch_WLineTool.cxx).

3. Interface of IntPatch_WLineTool::JoinWLines(...) method has been modified in order to reduce number of arguments.

4. Small corrections in IsSeamOrBound(...) static function has been made. Namely, check has been added if two boundaries are in the same period region but are too far each to other (see IntPatch_WLineTool.cxx, IsSeamOrBound(...) function, line # 532).

5. "Reversed" flag has been made local. Now, it is pure local characteristic: the algorithm decides itself, shall we reverse the argument order. This correction makes the algorithm more commutative (see issue #25404). However, IntPatch_WLineTool::JoinWLines(...) method can return non-commutative result.

6. Algorithm of searching small intersection curves has been improved.

7. New methods have been added in Bnd_Range class.

Some test cases have been adjusted according to their new behavior.

1. tests\bugs\modalg_6\bug26310_3
   tests\bugs\modalg_6\bug26310_4
   tests\bugs\moddata_2\bug235
   tests\perf\modalg\bug26310_1
   tests\bugs\modalg_5\bug24915

Logic of these cases has been changed. Mover over, additional check has been added in "bug26310_1" test case. Therefore, its performance will be slower than on the current MASTER.

2. tests\bugs\modalg_5\bug25292*

Scripts have been rewritten in order to make it more readable. Logic of these cases has not been changed.
2017-05-26 14:48:59 +03:00
kgv
0609d8ee53 0028778: Coding Rules - clean up confusing code from Select3D 2017-05-26 14:48:57 +03:00
szy
69f1a8997e 0028446: Could not retrieve just kept document with Integer attribute 2017-05-26 14:48:55 +03:00
szy
5a1271c8b4 0027970: Improvement of standard attributes usability - containers. 2017-05-26 14:48:53 +03:00
emv
b18a83d4a7 0028776: Extend the field BOPAlgo_Builder::myOrigins so that the shape could have multiple origins
Change the type of the field BOPAlgo_Builder::myOrigins so that the new shape could have multiple origins in case of overlapping.
2017-05-26 14:48:40 +03:00
nbv
c8425f03ff 0028718: Section result has a break 2017-05-25 11:48:27 +03:00
age
38d90bb3d1 0028758: Visualization - Implement exporting generated image to HRD/EXR images
OpenGl_View::BufferDump() - added support for dumping RayTracing HDR buffers.
Added new buffer type Graphic3d_BT_RGB_RayTraceHdrLeft.
2017-05-25 11:46:47 +03:00
dbv
9e6cdbcad5 0028748: XCAFDoc_GraphNode does not restore child on Undo
Fixed calling Backup method. Now it called where data really changed.
2017-05-25 11:41:58 +03:00
ifv
8c745be5e0 0028692: Projection failed (projponf)
Tolerance criterion is improved:
P.SquareDistance(p1) < Tol -> P.SquareDistance(p1) < Tol*Tol
2017-05-25 11:37:04 +03:00
ifv
b493028765 0028637: [regression] Extrema curve - curve can not find correct solution between edge based on the line and BSpline edge
Adding condition for preventing decreasing Lipschitz constant if derivative are too small
Test case is created
2017-05-25 11:35:53 +03:00
ibs
53d696bf51 0028740: Visualization, AIS_RubberBand - add an option to decide either create or not create a closing boundary line
the flag is added and the Compute method is updated to consider this flag
2017-05-25 11:23:24 +03:00
age
58772a28af 0028744: Visualization, OpenGl_FrameBuffer missing GL_RGB8 format
Missing GL_RGB8 and GL_RGB formats added to getColorDataFormat function.
2017-05-25 11:22:09 +03:00
nbv
ff3f03870b 0028724: Extrema between circle and plane cannot be found
The main reason of the regression is that the Extrema algorithm finds the truth extrema point but cannot adjust it to the range of given circle. It is connected with the fact that Geom(2d)Adaptor_Curve::IsPeriodic() method returns false for given circle because adaptor contains a piece of the circle which is not closed.

New algorithm of IsPeriodic() method will return the information about periodicity of the curve itself (independently of first and last parameter of adaptor).

The documentation about Geom(2d)_TrimmedCurve and Geom_RectangularTrimmedSurface has been updated in frame of the information about IsPeriodic-methods.
2017-05-18 16:56:42 +03:00
emv
1709b02450 0028745: Wrong results of Boolean operations on hemisphere solids
Test cases for the issue.
2017-05-18 16:49:10 +03:00
kgv
d29b2469eb 0028727: Visualization, AIS_RadiusDimension - fix misprint in AIS_RadiusDimension::IsValidAnchor() check 2017-05-18 16:49:09 +03:00
kgv
d2e6068829 0028646: Draw Harness, ViewerTest - rename vsetfilter command with vselfilter
TopAbs::ShapeTypeToString() is now used instead of duplicating TopAbs_ShapeEnum printing code.
vselmode now accepts shape type string for activating standard AIS_Shape selection modes.
2017-05-18 16:49:07 +03:00
vro
c9776c7ac0 0028314: Application Framework - Display mode is not saved within XML OCAF document
A rebased up-to-date version:
    - a bug is fixed (storage and retrieval of display mode in XML file format)
    - draw-commands to manipulate the display and selection mode are implemented
    - a test command "caf presentation M1" is created
2017-05-18 16:49:06 +03:00
vro
41fbbba8c4 0028736: An error to read a binary OCAF document of > 2Gb
A binary file of OCAF document contains file-position of several sections (header section, shape section).
This file-position represents an integer value.
For document files of less than 2Gb it is enough to use "int" type to keep the file-position.
But for greater document files we need more digits.
The fix consists in extension of the type for keeping of file-position within the document file on disk: it was "int", now it is "uint64_t".
2017-05-18 16:48:50 +03:00
akz
a71a71de09 0028738: Data Exchange, XCAFPrs_Style - add transparency property
Use Quantity_ColorRGBA as surface color to store a transparency in XCAFPrs_Style.
2017-05-18 12:17:44 +03:00
kgv
46710942db 0028664: Documentation of Graphic3d_CView::Activate and Deactivate does not seem to be correct 2017-05-18 12:10:07 +03:00
akz
a0b49de498 0028741: Visualization, TKOpenGl - eliminate GL errors within Core Profile in OpenGl_View::copyBackToFront() 2017-05-18 12:03:04 +03:00
isk
ff6665dc50 0028734: Visualization, OpenGl_Texture - fix initialization of 1D texture
OpenGl_Texture::Init() - fixed proxy check for 1D textures.
Declarations.glsl - defined occTexture1D/3D aliases similar to occTexture2D.
2017-05-18 12:00:03 +03:00
nbv
b7c18ef8b0 0028725: Degradation in performance of BRepExtrema_DistShapeShape
Test case has been created.
2017-05-18 11:57:39 +03:00
kgv
629362c6fa 0028704: Coding Rules - recommend adding the class header first in its source file 2017-05-11 15:55:29 +03:00
emv
6769ec6b34 0028683: Wrong result of CUT operation
Avoid creation of the small section edges in the Boolean Operations algorithm.
2017-05-05 12:11:23 +03:00
apn
7e3451c7a2 0028347: Reuse OCCT implementation for producing end-user documentation for Products
Updated destination directory for generated by gendoc proc pdf files.

Added additional option "-update_images_size" for gendoc procedure to update width of images in *.md files during pdf generation for @figure alias.

Documentation was updated to use alias @figure instead of outdated @image

Added support of svg image format in procedure OCCDoc_UpdateImagesSize.

Added generation of overview for product components.

Added generation of products refman/chm for each component.
2017-05-05 11:27:56 +03:00
nbv
b608f6a564 0028677: Avoid change of wire orientation in BRepLib_MakeFace if the wire is open
Method BRepLib_MakeFace::CheckInside() is not called for open wire. So, if the input wire is open its orientation is not changed in the result face.
2017-05-05 11:27:53 +03:00
emv
752f9d7201 0028675: Invalid result of Boolean Cut operation when running with fuzzy value
Avoid small edges with empty list of PaveBlocks (removed edges) in the result (BOPAlgo_Builder::FillImagesEdges()).
2017-05-05 11:27:51 +03:00
vro
c2f5b8211b 0028691: Storage of Ocaf documents in XML file format in old document version 2017-05-05 11:27:49 +03:00
apl
a1073ae267 0027925: Visualization - implement order-independent transparency algorithm within rasterization rendering
Weighted, Blended Order-Independent Transparency algorithm has been added rasterization pipeline.
In contrast to classical blending transparency it makes transparent objects look independent
from point of view. It also gives better depth occlusion when being used together with a weight factor
based on value of a GL depth buffer. The feature supports desktop OpenGL, OpenGL ES 3.0, ANGLE
and can be used together with MSAA on desktop GL.

To be used it require availability of:
1) Shaders pipeline.
2) Floating point color format for framebuffer (GL_ARB_color_buffer_float).
3) Multiple render targets (GL_ARB_draw_buffers).

Patch does not modify API and does not require application porting.
It adds new rendering options to Graphic3d_RenderingParams structure:
a) Transparency method from enumeration.
b) Scalar factor [0-1] controlling influence of a fragment's depth to its visibility.

Patch also simplifies processing of transparent objects for standard method:
rendering priority of transparent graphical structures is managed automatically,
therefore there is no need to care about it at application's side.
2017-05-05 11:27:47 +03:00
kgv
9151562167 0028698: Visualization, Graphic3d_CView - mark methods MinMaxValues() and NumberOfDisplayedStructures() virtual 2017-05-05 11:27:45 +03:00
msv
36cc26194c 0028673: getsourcefile Draw command return different output on Linux and Windows platforms
The method Draw_Interpretor::add() has been corrected so that the command getsourcefile returned the relative path starting with "src" without leading "/" on all platforms.
2017-05-05 11:27:43 +03:00
kgv
7c1a9a461b 0028693: Coding Rules - TDataStd_ExtStringArray and TDataStd_IntegerArray should return Array() with const reference 2017-05-05 11:27:40 +03:00
ifv
5be09a153b 0027981: BRepExtrema_DistShapeShape returns not null distance on interfered shapes
The reason of the bug is bad start points on surfaces, which are used by searching roots algorithm as start points for iteration process. Starting with these points algorithm for searching roots of set of equations cannot reach correct root. To find correct start points increasing number of sampling points is applied.
2017-05-05 11:27:38 +03:00
nds
bc001a4030 0027958: Visualization, AIS_Trihedron - add shaded presentation option
A new Shaded presentation flag configured through Datum aspect (NOT as usual Display Mode).
Creation of auxiliary Axis/Point/Plane presentations in Trihedron presentation is removed.
'vtrihedron' DRAW command to change parameters of trihedron is extended to cover whole functionality of AIS_Trihedron.

The following classes are redesignede:
AIS_Trihedron,
Prs3d_DatumAspect.

The followin enumermations are created to manage properties of trihedron:
Prs3d_DatumAttribute,
Prs3d/Prs3d_DatumAxes,
Prs3d_DatumMode
2017-04-28 12:48:54 +03:00
emv
68b0769935 0028639: Improve performance of the IntPolyh_MaillageAffinage algorithm
The following improvements have been made:
1. Linking edges to triangles while creating the edges.
2. Replacing the array of couples of intersecting triangles with the list to avoid unnecessary allocations of memory.
3. Using the algorithm of unbalanced binary tree when looking for pairs of interfering triangles.
4. Building bounding boxes for the triangles only once and then reusing it.
5. Making the simple methods of the IntPolyh_Point, IntPolyh_Edge, IntPolyh_Triangle, IntPolyh_Couple classes inline.
6. The following methods of the *IntPolyh_Triangle* class have been removed as unused:
  - *CheckCommonEdge*
  - *SetEdgeandOrientation*
  - *MultipleMiddleRefinement2*.
7. The method *IntPolyh_Triangle::TriangleDeflection* has been replaced with the *IntPolyh_Triangle::ComputeDeflection*.
8. The following methods of the *IntPolyh_MaillageAffinage* class have been removed as unused:
  - *LinkEdges2Triangles*;
  - *TriangleEdgeContact2*;
  - *StartingPointsResearch2*;
  - *NextStartingPointsResearch2*;
  - *TriangleComparePSP*;
  - *StartPointsCalcul*.
2017-04-28 12:48:40 +03:00
aan
a9bdd54d1d 0028148: Samples - add 3D Viewer sample for iOS platform
Sample that uses UIKit has been added.
- Import of STEP files is provided
- Zoom, Rotate, Pan actions are provided
- Selection of solids is supported
2017-04-28 12:44:56 +03:00
jgv
107f794fc9 0028661: BRepOffsetAPI_MakePipeShell throws an exception Standard_NoSuchObject: NCollection_DataMap::Find
1. Clearance of fields of class has been added to the method BRepFill_PipeShell::Prepare().
2. Calculation of error on surfaces has been corrected in the method GeomFill_Sweep::BuildKPart().
3. New Draw command "errorsweep" has been added to check the error reached on the surfaces built by BRepOffsetAPI_MakePipeShell algorithm.
2017-04-28 12:44:54 +03:00
ibs
505e241c8a 0028679: Foundation Classes - OSD_Process::UserName rises EXC_BAD_ACCESS on iphone simulator
check for a null pointer is added
2017-04-28 12:44:53 +03:00
imn
0af424c23c 0028601: ShapeFix_Shape increases tolerance of sub-shapes of a valid shape
- Avoid increase of edge/vertex tolerance if the distance between 3D curve and p-curve is within old tolerance.
2017-04-28 12:44:51 +03:00
snn
ec96437207 0028564: Support of applications using old persistence (ShapeSchema)
1. Bug fix in reading old persistent data using FSD_File storage driver
2. Persistence compatible with legacy format was restored for shapes
   a. Implemented a storage read / write wrapper for legacy persistence
   b. Added DRAW commands to read / write files in legacy format
   c. Added test cases for reading / writing operations with checking number of sub-shapes and physical properties
   d. Updated related sections of the development guide
2017-04-28 12:44:50 +03:00
imn
632175c3a8 0028227: ShapeUpgrade_UnifySameDomain modifies the edges even if it is not requested
- The option SafeInputMode has been added in the class ShapeUpgrade_UnifySameDomain. If it is set then the input shape is protected against modifications of any aspects of its sub-shapes. Default value is true.
- The option "-nosafe" has been added in draw command "unifysamedom". If it is not set the algorithm is run with SafeInputMode switched off.
2017-04-28 12:44:48 +03:00
msv
dfde2a3315 0028663: Integration of TortoiseGit with bug tracker
The file .tgitconfig has been added to the root.
2017-04-21 14:54:57 +03:00
oan
68ef63f9f3 0025209: Draw Harness - add command 'vnormals' and extend command 'normals' to show variable number of normals 2017-04-20 14:54:47 +03:00
msv
c0a1a35fac 0028605: Improve the algorithm of calculation of valid intersection range of an edge
- New method BRepLib::FindValidRange() has been added. It computes the range of the edge not covered by boundary vertices.
- The algorithm of calculation of valid intersection range in the class IntTools_ShrunkRange has been corrected to use the new method.
- The method BOPTools_AlgoTools::MakeSplitEdge() has been improved to protect against errors in the case of reversed orientation of the input edge.
- Two new Draw commands have been added:
  validrange - it calls the new method BRepLib::FindValidRange().
  tolsphere  - it shows tolerances of vertices by drawing a sphere around each vertex of the shape.
- The test cases "offset shape_type_i_c YE1,YE2" became better. The scripts have been corrected to reflect the new state.
2017-04-20 14:53:07 +03:00
emv
501d0d386a 0028652: Improve performance of the 3D offset algorithm for the planar cases
Perform intersection of the planar untrimmed faces using IntTools_FaceFace algorithm directly.
2017-04-20 12:36:42 +03:00
kgv
2d2b3d53b7 0028550: Foundation Classes - fix empty message passed to thrown exception 2017-04-20 12:36:36 +03:00
kgv
e87d0237d8 0027345: Foundation Classes, OSD_Environment - use consistent way to retrieve environment variable value on Windows
OSD_Environment::Value() now uses GetEnvironmentVariableW() instead of _wgetenv()
which might provide outdated variable value cached by C runtime library.
2017-04-20 12:36:30 +03:00
kgv
85719f0ef9 0027921: Visualization - add missing Graphic3d_AspectText3d method defining label transparency 2017-04-20 12:36:19 +03:00
ski
d51a0ff64a 0028658: Cannot execute DRAW.exe with draw.bat
Macro THIRDPARTY_PRODUCT was updated to create separate variable which contains all used 3rdparty dll/library directories (used custom.bat/sh files).

Name of Tcl/Tk libraries for search were updated.
2017-04-20 12:36:13 +03:00
kgv
f6d4c5cf8d 0028621: Visualization - AIS_ColoredShape::UnsetTransparency() is not implemented 2017-04-20 12:36:07 +03:00
kgv
b2ec0b4da5 0028657: Foundation Classes - OSD_Thread does not release thread resources on non-Windows platforms
~OSD_Thread(), OSD_Thread::SetFunction() and OSD_Thread::Run()
now detach old thread also on platforms using pthreads.
OSD_Thread::Wait() now closes thread handle after joining.
2017-04-20 12:36:01 +03:00
emv
6fd4ffd9eb 0028474: Boolean operations - General Fuse operator breaks validity of resulting shape
1. Re-orienting the shell before making solid from it (MakeShell in BOPAlgo_ShellSplitter);

2. The implementation of the BOPTools_AlgoTools::IsSplitToReverse() method has been changed to
   make the usage of the Hatcher for looking for the point in the face default.

3. Test cases for the issue.
2017-04-20 12:35:45 +03:00
isn
b60e8432dd 0028456: BRepBuilderAPI_MakeFace modifies the input shape
1) BRepLib::UpdateTolerances(..) & BRepLib::SameParameter(..) functions now support non-mutable input feature. reshaper is used to store modified copies of subshapes of original (input) shape(s) as substitutions.
2) IsNewShape(..) method has been added to BRepTools_ReShape to check if the given shape has been recorded as a value
2017-04-14 13:04:05 +03:00
kgv
c48e2889cd 0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation 2017-04-14 13:04:04 +03:00
kgv
14c4193d11 0028390: Visualization, AIS_InteractiveContext - add topmost-only picking strategy
AIS_InteractiveContext::PickingStrategy(), added new property
defining picking strategy SelectMgr_PickingStrategy.
Strategy SelectMgr_PickingStrategy_OnlyTopmost allows picking only
topmost detected entity not rejected by Selection Filters.
2017-04-14 13:04:03 +03:00
ika
973d410ea4 0028641: Data Exchange - Support alpha-channel of color
Use Quantity_ColorRGBA instead Quantity_Color in XCAFDoc_Color attribute
Add methods to color tool for processing RGBA
Update Color driver
Update Draw commands
2017-04-14 13:03:27 +03:00
jgv
1406e955b3 0028626: Boolean CUT operation fails due to exception while intersecting two conical faces
1. Modification in static function IntersectionWithAnArc of IntPatch_ImpImpIntersection :
  small offset <du> was hardcoded as 1.e-9, now it is adapted to parametric step.

2. Removal of duplicated points of IntPatch_WLine is corrected.
2017-04-12 17:54:45 +03:00
kgv
33cc703b16 0028647: Visualization, OpenGl_AspectMarker - invalid marker size on re-setting aspect without redraw
OpenGl_AspectMarker::Resources::BuildSprites(), fixed uninitialized theMarkerSize
in case if aspect has been already initialized for specified marker type.

Draw Harness command vaspects has been extended with new options -setMarkerType and -setMarkerSize.
2017-04-12 17:54:31 +03:00
kgv
003281f4e7 0028644: Visualization, AIS_MultipleConnectedInteractive - remove unused private class SelectMgr_AssemblyEntityOwner 2017-04-12 17:54:01 +03:00
msv
0bd575a716 0028636: Optimisation of gp_* classes in order to avoid unnecesary calling gp_Dir* constructors with normalisation
The improvement is concluded in replacement of calls to gp_Dir2d(1,0) with calls to gp_Dir2d(void).
Thus we avoid sqrt() that is called from within gp_Dir2d(double,double). The same is with direction in 3D space.
2017-04-12 17:53:55 +03:00
emv
aeee70d353 0028179: Update documentation of Boolean Component 2017-04-12 17:53:34 +03:00
kgv
e473b95fe9 0028625: Visualization, OpenGl_FrameBuffer - initialize Render Buffer with stencil 2017-04-12 17:53:27 +03:00
kgv
450c83adcf 0028630: Visualization, StdPrs_ShadedShape - do not create Poly_Connect without need 2017-04-12 17:53:22 +03:00
ski
4fecc3651c 0028335: Configuration, Cmake - 3rdparty library names present in two places and aren't sync with each other
Libraries names from file adm/cmake/occt_csf.cmake are used to search libraries.

Removed hardcoded variants of tcl/tk libraries names for searching.
2017-04-12 17:53:14 +03:00
emv
5652dc6272 0028591: BOP Cut creates wrong result
The Face/Face intersection procedure has been changed in Boolean Operations algorithm.
Previously, the intersection tolerance for all section curves between pair of faces has been calculated
as the maximal tolerance among all curves. Now, each curve has its own valid tolerance calculated
as the maximal deviation of the 3D curve from its 2D curves on faces or surfaces in case there are no 2D curves.

Thus, such methods of IntTools_FaceFace algorithm as TolReached3d(), TolReal() and TolReached2d() have been removed.
Now the tolerances of the curve can be obtained from the curve itself (IntTools_Curve - result of intersection):
- IntTools_Curve::Tolerance() - returns the valid tolerance for the curve;
- IntTools_Curve::TangentialTolerance() - returns the tangential tolerance, which depends on the size of the common
  between faces. Currently, this tolerance is computed for Plane/Plane cases only. For other case, the value
  of the tangential tolerance is the maximal tolerance of faces.

2D intersection tolerance (IntTools_FaceFace::TolReached2d()) has been completely removed from the algorithm as unused.
2017-04-12 17:53:03 +03:00
kgv
769a2e88e0 0028615: Visualization, TKOpenGl - enabling MSAA leads to black screen on OpenGL ES
Removed redundant macros check.
2017-04-12 17:52:53 +03:00
imn
353e6fa0cf 0028594: Geom2dAPI_Interpolate generated curve is not the same as proe
Boolean flag "Scale" has been added for methods "Load" in "Geom2dAPI_Interpolate" class
2017-04-12 17:52:43 +03:00
emv
2d0621bf94 0028579: Get rid of the obsolete QANewModTopOpe_* and QANewBRepNaming_* algorithms
1. The packages *QANewModTopOpe*, *QANewBRepNaming* and *QANewDBRepNaming* have been removed as containing obsolete features.
   The corresponding QA commands (such as OCC252, OCC307 and OCC294) and test cases have also been removed.

2. The QA command buc60609 has been removed. The corresponding test case bugs/moddata_1/buc60609 has been rewritten using b2dclassify command.
2017-04-12 17:52:33 +03:00
imn
90271a9003 0028207: Unexpected result of the unify same domain algorithm
- Now algorithm of merging edges uses angular tolerance
2017-04-12 17:52:17 +03:00
aml
83f32108f6 0028600: Bad performance of the checkshape command
Shell check has been improved to use well-known width-first search. It significantly reduces computation time on the big shells.

Test case has been added.

Minor correction in test case
2017-03-30 14:04:26 +03:00
ika
521efa926d 0028589: Data Exchange - Writing face with NaturalRestriction flag to IGES
Add additional check for infinite surfaces

Correction of test case for issue CR28589
2017-03-30 12:50:36 +03:00
nbv
bbdf3b5c66 0028585: Wrong value of area computation
Adding new test case.
2017-03-30 12:49:05 +03:00
emv
7868210dbc 0028574: Get rid of the TestTopOpe* packages
1. The TestTopOpe* packages have been removed.

2. The commands *compare*, *issubshape* and *projponf* have been moved to BRepTest package.

3. The possibility to change the Extrema options has been added to projection algorithm (GeomAPI_ProjectPointOnSurf).

4. Documentation has been updated.
2017-03-30 12:46:01 +03:00
ika
ea6e537889 0028449: Data Exchange - Wrong orientation of Annotation Plane in GD&T
Fix orientation.
update test cases
2017-03-30 12:39:51 +03:00
imn
811d6b7d4a Elimination of compiler warnings 2017-03-24 14:00:08 +03:00
emv
3b77eff652 0028577: Get rid of the TopOpeBRep* algorithms in TKOffset toolkit
The TKOffset toolkit has been cleared from the usage of the obsolete TopOpeBRep* classes.
2017-03-23 16:53:49 +03:00
emv
431d0f181e 0028573: Get rid of the old Boolean Operations in QA commands
The QA commands have been modified to use new Boolean operations instead of old.
2017-03-23 16:46:01 +03:00
emv
f1b2eddc0f 0028576: Get rid of the TopOpeBRep* algorithms in TKFeat toolkit
The TKFeat toolkit has been cleared from the usage of TopOpeBRep* classes.
2017-03-23 15:57:32 +03:00
emv
e8b9db57cd 0028508: Make the CellsBuilder algorithm to work with multi-dimensional arguments
1. The CellsBuilder algorithm has been extended to work with multi-dimensional arguments.
It has become possible not only simulate Boolean expressions, but also perform non-supported
Boolean operations, like cutting face from solid, or fusing face with edge.

2. Test cases with multi-dimensional input shapes have been created.

3. Documentation has been updated.
2017-03-23 15:57:30 +03:00
nbv
2967828dbf 0028580: Misprint in IntPatch_WLineTool.cxx file
Code correction.
2017-03-23 15:57:29 +03:00
emv
e45b5ff7f2 0028567: Get rid of the unused DRAW commands based on old Boolean Operations (BRepAlgo)
1. Removal of the traces of the usage of old Boolean operations in BRepFeat package.

2. The DRAW commands *fubl* and *cubl* based on old Boolean operations have been removed.
The alternative for these commands are the commands *bfuseblend* and *bcutblend* respectively.
The last two commands are based on the modern Boolean operations.

3. The DRAW command *ksection* based on old Boolean operations has been removed.
The command *bsection* should be used as alternative.

Test cases which have been using the *ksection* command have been modified to use the *bsection* command.

4. The class QANewBRepNaming_BooleanOperation has been modified to use modern Boolean operations.

The class QANewBRepNaming_BooleanOperation has been removed as not used.
The class QANewBRepNaming_BooleanOperationFeat has been renamed to QANewBRepNaming_BooleanOperation as it has nothing to do with Feat algorithm.
2017-03-23 15:57:27 +03:00
emv
8b956afe8e 0028562: Replacement of old Boolean operations (BRepAlgo) with new ones (BRepAlgoAPI) in BRepAlgo_NormalProjection
The usage of the old Boolean operations (implemented in the class BRepAlgo_BooleanOperations) in the
BRepAlgo_NormalProjection algorithm has been replaced with the usage of new Boolean operations
(implemented in the class BRepAlgoAPI_BooleanOperations).
2017-03-23 15:57:26 +03:00
emv
f80842e34c 0028556: Invalid result of Fuse operation in the test case bugs moddata_2 bug469
1. Using appropriate intersection tolerance for splitting the degenerated edges in Boolean operations (void BOPAlgo_PaveFiller::FillPaves()).

2. Avoid creation of the wires consisting of degenerated edges only (BOPAlgo_WireSplitter).

3. Test case bugs/moddata_2/bug469 has been corrected to obtain valid result of operation. TODO statements have been removed from the case.
2017-03-23 15:57:24 +03:00
msv
19e7092d1b 0028553: Incorrect result of the ShapeUpgrade_ShapeDivideContinuity algorithm
The cause of the bug was computation of incorrect UVBounds in the method ShapeAnalysis::GetFaceUVBounds. In this patch the computation of a box for a 2D curve in the method ShapeAnalysis_Curve::FillBndBox() has been improved taking into account intervals of C2 continuity.
Also the fix makes little extension of bounds when making the new surface in ShapeUpgrade_FaceDivide::SplitSurface(), so that all p-curves were fully inside.

Test case for issue CR28553
2017-03-23 15:57:23 +03:00
ski
1b9f3f674e 0028507: Extension of CShapr Wrapper 7.1.0 to support additional set of OCCT classes
Using of DEFINE_STANDARD_HANDLE macro was added to AIS_ColorScale class.
2017-03-23 15:57:21 +03:00
ika
63c71e2f68 0028427: Data Exchange - Update Reference Manual for STEP format
- Update STEP manual
- Fix code style in several files
2017-03-23 15:57:20 +03:00
imn
20aa0d3fdd 0028226: Incorrect history support in ShapeUpgrade_UnifySameDomain algorithm
- The methods "Modified" and "IsDeleted" have been added for history support in "ShapeUpgrade_UnifySameDomain" class.
- The new Draw commands "unifysamedommod" and "unifysamedomisdel" have been added.
- Adoption of other algorithms using this one to its new behavior.

Removing code duplication

Correcting regressions

Correcting remarks
2017-03-23 15:34:26 +03:00
mpa
f1191d3099 0026682: TopExp::MapShapesAndAncestors() will build map with duplicated ancestors.
The new method TopExp::MapShapesAndUniqueAncestors has been implemented, which excludes duplication of ancestors in the list items. The optional Boolean argument 'useOrientation' of this method points whether two same shapes with different orientation will be considered equal.
OCCT code has been inspected and MapShapesAndAncestors has been replaced with MapShapesAndUniqueAncestors where it is necessary.
2017-03-16 17:41:27 +03:00
abk
4d597f3e2f 0028537: Extend 'Draw' procedure 'checkprops' to specify the relative precision to compare corresponding values
'Draw' procedure 'checkprops' was extended by an option to set the relative precision to compare corresponding values.
2017-03-16 13:33:03 +03:00
nbv
3b6ffeaca7 0028492: Boolean common does not produce expected result
Generation of 3D-steps shorter than 3D tolerance has been allowed in the fix to build Walking-line.

Now, 3D-step is limited by Precision::Confusion value.
2017-03-16 13:31:01 +03:00
jgv
176a795920 0028558: Test bugs modalg_6 bug26150_17 is failed with FPE switched on
Avoid division by zero in the method BRepFill_CompatibleWires::SameNumberByACR.
2017-03-16 13:28:05 +03:00
emv
c58055adeb 0026874: Implementation of the Partition operator in OCCT
1. The partition operation allows splitting an arbitrary number of shapes of an arbitrary dimension
by other arbitrary shapes. The algorithm has been implemented in the class BOPAlgo_Splitter.

The API operator Splitter has been implemented in the class BRepAlgoAPI_Splitter.

2. The draw commands for usage the new algorithm have been implemented - bsplit and bapisplit.
The commands are identical, but one uses the BOPAlgo_Splitter, the other uses BRepAlgoAPI_Splitter.
Both commands should be used after Pave Filler is filled.

3. Test cases for the new algorithm.

4. Documentation has been updated.

Small corrections.
2017-03-16 11:09:54 +03:00
emv
093a3fe5bb 0028501: Incomplete result of offset operation in mode Complete with Join type intersection
1. The algorithm BOPAlgo_ShellSplitter has been improved for the cases with multi-connected edges
to produce as many shells as possible from the given input faces.

2. Building tool prism in BRepFeat_MakePrism has been changed in order to avoid self-intersections
in the cases when the limiting faces are intersecting.

3. Test cases for the issue.

4. Test cases boolean/bcut_complex/N9 and boolean/gdml_private/ZH3 are improvements.

5. Test cases boolean/volumemaker/C5 and boolean/volumemaker/C6 has been marked as BAD due to found problem in intersection algorithm.
The results in these cases obtained on the branch are better than on master, but still not complete.

Adjusting test case bugs/moddata_2/bug469 for its current behavior.
2017-03-16 10:54:35 +03:00
nbv
7581b642af 0028535: BOP Fuse reports "ErrorStatus : 11" on two attached faces
The reason of exception has been eliminated.
2017-03-16 10:53:09 +03:00
jgv
6c4c45b0f9 0028468: Sweep with different sections raises Standard_NoSuchObject: BRep_Tool:: no parameter on edge
Method BRepFill_SectionPlacement::Perform is modified to operate vertices and edges of path correct.

Add two test cases.

Minor correction.
2017-03-16 10:51:54 +03:00
kgv
4954e4970c 0028470: Foundation Classes, NCollection_Array1 - add Resize() method for re-allocating array with new limits
NCollection_Array1 now provides method Resize() for re-allocating array to new bounds.
Added Move Constructor and Move Assignment operator.
Added empty constructor defining array of zero size.

Poly_Triangulation, dropped duplicating fields myNbNodes and myNbTriangles.
Removed unused file Poly_Triangulation.lxx.

Use std::move within NCollection_Array1::operator=() [fix for 0028470]
2017-03-16 10:49:22 +03:00
emv
32e849ebc9 0028486: Fuse of several solids fails due to presence of common zones between faces
1. Exception in intersection of two analytical faces has been fixed by adding a simple check on number of vertices
in the resulting analytical curve;

2. Projection of the Circle on the Cone now checks if the Circle's normal direction is parallel to the Cone direction.
If it is not, the different, more advanced, algorithm will be used for projection - ProjLib_ComputeApprox;

3. Intersection of the Edge with the Face (IntTools_EdgeFace algorithm) in QuickCoincidenceCheck mode has been fixed to
avoid the checking of the type of the intersection result if the coincidence check gives the positive result;

4. All common IN edges of the intersecting faces has been added for intersection with section edges to avoid self-intersection in the result;

5. Post treatment of the section edges in Boolean operations has been improved with the new stage which treats the possible
common zones, not detected by the intersection algorithm, between faces by intersecting each section edge with all faces,
not participated in its creation, and in case of coincidence putting it as IN edge into FaceInfo structure of the face.
The new function has been implemented for that - BOPAlgo_PaveFiller::PutSEInOtherFaces().

6. Checking for the SameDomain splits of faces in Boolean Operations has been modified to process the pairs of faces in
which both the section curves and common zones are present.

7. Adjustment of the test case boolean gdml_private ZH3 as improvement.

8. Test cases for the issue.

9. Test cases for the parent issue - 0026789.
2017-03-16 10:47:51 +03:00
abk
e99816df7f 0028495: The maximal depth of the tree is used implicitly in type 'BVH_PrimitiveSet'
Type 'BVH_PrimitiveSet' was extended by a static constant to access the maximal depth of the tree.
2017-03-16 10:46:14 +03:00
emv
7a280da946 0028496: BOP Cut failed on two attached faces with error "ErrorStatus : 191"
While checking the SurfaceOfExtrusion on closeness (GeomLib::IsClosed())
it is necessary to take into account that the basis curve may be not trimmed.

Test case for the issue.
2017-03-16 10:44:27 +03:00
emv
b672545674 0028473: Incorrect result of 3D offset operation in mode Complete, Join type Intersection (spike is created)
Looking for inverted edges among the neutral ones while checking the offset edges on validity (BRepOffset_MakeOffset_1::FindInvalidEdges).

Test cases for the issue.
2017-03-03 17:01:20 +03:00
bugmaster
5c09f8e016 0012567: Swapped first/last vertices or incorrect curve orientation after reading IGES file
Adding test case
2017-03-03 16:11:30 +03:00
apn
9070a59fce 0028502: Compilation error on Arch Linux (clang compiler) 2017-03-03 16:11:28 +03:00
nbv
370101f340 0028491: Incomplete section curve
The main idea of the fix is to forbid check if intersection curve lies in the some face (with input tolerance) if we have 2D-intersection curve on this face (we consider that necessary tolerance has been computed in intersection algorithm honestly). If we do not have 2D-curve on this face then we need check as before.

New algorithm is implemented in IntTools_Context::IsValidBlockForFaces(...) method.

------
src\Extrema\Extrema_GenExtPS.cxx
No principled changes have been made.
2017-03-03 16:11:27 +03:00
imn
9ed6494b47 0028228: Provide possibility to keep the given edges during unification of faces in ShapeUpgrade_UnifySameDomain algorithm
- Added methods "KeepShape" and "KeepShapes" for "ShapeUpgrade_UnifySameDomain" class
- Updated "unifysamedom" command in Draw

Remarks correction

Additional remarks correction

Removed redundant checks

Removing compilation warning
2017-03-03 16:11:25 +03:00
jgv
50258e776a 0026150: BRepOffsetAPI_ThruSections doesn't implement history method Generated().
Virtual method Generated is redefined. Now it returns:

- chain of generated faces for sub-edge of a profile;
- chain of generated edges for sub-vertex of a profile;
- bunch of chains of generated edges for start or end vertex if it is degenerated section.

Correction according to the remarks.

Fix compiler's warnings and add 4 new test cases.

Correction of mistake.

Compilation warnings are gone.
2017-03-03 16:11:24 +03:00
kgv
56689b2700 0028487: Visualization, TKOpenGl - add option for rendering with lower resolution
Graphic3d_RenderingParams::RenderResolutionScale - added new option
defining scale factor for allocating off-screen rendering buffers
relative to native resolution of window buffer.

Scale factor can be below 1.0 (lower resolution) or higher (as analog of super sampling),
but can not be combined with MSAA settings.

Draw Harness command vrenderparams has been extended with option -rendScale
managing introduced option Graphic3d_RenderingParams::RenderResolutionScale.

vcaps has been extended with option -useWindowBuffer for managing
OpenGl_Caps::useSystemBuffer option.

vrepaint has been extended with option -immediate
for testing immediate layer redraw

OpenGl_View::blitBuffers() - eliminate compiler warning on Android
2017-03-03 16:11:22 +03:00
dbp
05aa616d6d 0028218: Visualization, Path Tracing - Redesign path tracing materials to support two-layered model
Existing OCCT path tracing engine used very simple additive material (BSDF) model, so it was possible to reproduce
behavior only of very basic materials such as metal, glass, or plastic. However, some important in CAD industry
materials like car paint or ceramic could not be modeled well. In this patch, OCCT BSDF was significantly improved
by replacing additive model with two-layered scattering model. Therefore, we have base diffuse, glossy, or transmissive
layer, covered by one glossy/specular coat. The layers themselves have no thickness; they can simply reflect light or
transmits it to the layer under it. Balancing different combinations of layer properties can produce a wide range of
different effects. At the same time, disabling the first (coat) layer allows to keep full compatibility with previously
supported scattering model. All new parameters are available via 'vbsdf' command.

Location of new sample for few material examples:
samples\tcl\pathtrace_materials.tcl

Fix shader compilation issue.

Fix test case sample_ball_alpha.

Shaders_PathtraceBase_fs.pxx - regenerate resource from origin
2017-03-03 16:11:21 +03:00
kgv
dc858f4c5a 0028441: Coding Rules - move out nested Image_PixMap::ImgFormat enumeration to dedicated enum Image_Format
Enumeration Image_PixMap::ImgFormat, previously declared as nested
enumeration within class *Image_PixMap*,
has been moved to global namespace as Image_Format following OCCT coding rules.

The enumeration values have suffix Image_Format_ and preserve
previous name scheme for easy renaming of old values.
E.g. Image_PixMap::ImgGray become Image_Format_Gray.
Old definitions are preserved as depreacated aliases to the new ones.
2017-03-02 12:32:02 +03:00
bugmaster
e6afb53983 0021750: Intersection of two cylindrical surfaces fails
Adding test case
2017-03-02 12:32:01 +03:00
bugmaster
0d0c99de4d 0026796: The result of General Fuse operation is self-intersecting shape
Adding test case
2017-03-02 12:32:00 +03:00
bugmaster
7a033414d5 0027615: [regression] Boolean operation returns invalid shape in 64 bit mode and valid shape in 32 bit mode
Adding test case
2017-03-02 12:31:59 +03:00
kgv
f40644350e 0028469: Visualization, StdPrs_ShadedShape - do not create redundant copy of normal array 2017-03-02 12:31:58 +03:00
kgv
2eacd0b872 0028466: Visualization, OpenGl_Context - read GPU memory using WGL_AMD_gpu_association extension 2017-03-02 12:31:57 +03:00
ifv
e525fd6ad2 0028458: Some faces are missing when loading a specific CAD. This is a regression from OCCT 7.0 and Express Mesh 7.0.
Function ACos and ASin are modified to avoid exception when argument is +-(1. + Epsilon(1.)) because of "numerical noise"
2017-03-02 12:31:56 +03:00
jgv
f48cb55d33 0027998: Self-intersection is not detected
New method CheckFaceSelfIntersection has been added to BOPAlgo_CheckerSI: now self-intersection of each face is found as well as pairs of intersecting faces;

-method IntPatch_Intersection::Perform(S1,D1,TolArc,TolTang) is modified for more effective search of self-interasections in case of Surface Of Extrusion;

-method IntCurve_IntPolyPolyGen::Perform(C1,D1,TolConf,Tol,NbIter) is modified to detect segments of intersections.

Small correction.

Test cases are corrected.

Correction of compiler error

Fix of regressions

Names of shapes correction
2017-03-02 12:31:55 +03:00
msv
15b2583e69 0028471: ShapeUpgrade_RemoveLocations breaks sharing of sub-shapes
- Add option 'remove_level' to the command 'removeloc'.
- Add test case.

Minor correction of test case
2017-03-02 12:31:54 +03:00
emv
0da0275c18 0028442: Incorrect result of 3D offset operation in mode Complete, Join type - Intersection
1. For the support of the new configurations of the input shapes for the 3D offset algorithm
(shapes containing the faces with holes, which are growing during offset operation and
sometimes (depending on the offset value) even kill the faces themselves) the new function
*FindFacesInsideHoleWires* has been implemented. This new function looks for the splits of
the offset face located inside the new hole wire built from offset edges of the edges of the
hole wires of the original face. All found splits are simply removed.

2. Test cases for the issue.
2017-03-02 12:31:53 +03:00
vro
b66f375869 0028463: OCAF loses an interactive object after copying 2017-03-02 12:31:51 +03:00
mpv
6d1e872b4d 0028428: BinMNaming_NamedShapeDriver fails if there are no nodes in NamedShape
Unit test and additional parsing rule for tests are added as well as a minor fix of the draw command for bug24164_2 unit test (in reference array it was impossible to set only one value).

Added the exception for the checking in issue 2269, when bad document is read.

It checks that there is no crash, but just an error message. If crash is appeared, this test will not skipped anyway.

Correction of test for bug2269 and parse.rules
2017-03-02 12:31:50 +03:00
kgv
e44b0af456 0028460: Visualization - V3d_View::SetZoom() performs checks which then ignored
Fixed variables misuse.
2017-03-02 12:31:49 +03:00
kgv
224f48fa0e 0028405: Visualization, V3d_Viewer - changes to Grid immediately updates view
V3d_Viewer methods ActivateGrid, DeactivateGrid, SetRectangularGridValues, SetCircularGridValues,
RectangularGridGraphicValues, CircularGridGraphicValues, SetPrivilegedPlane, DisplayPrivilegedPlane
do not redraw viewer anymore.
2017-03-02 12:31:49 +03:00
emv
18c066908f 0027182: Wrong result of General Fuse operation for two spheres
1. The static method Standard_Real MinStep3D(...) in the class BOPTools_AlgoTools is
now checks if the computed 3D step is too big (relatively UV range of the faces)
for any of the faces.

2. The method PointInFace(...) of the class BOPTools_AlgoTools3D has been redesigned.
The new PointInFace(...) methods have been implemented to add possibility for looking the point
inside the face in necessary direction and distance from the edge of the face.
Note: old implementation is also functional.

3. Make methods for finding points near edges and computing normal directions on faces
return error status (0 in case of success).

4. Test case for the issue.

5. Test cases offset shape_type_i_c XJ2,XJ4,XJ5,XJ6 are improvements.

Removing useless file
2017-02-27 15:09:44 +03:00
dbv
8ce97bc90b 0028425: Open/save NamedShape changes order of shapes
Changed order of shapes when reading from bin and xml document.

Small correction of test case for issue CR28425
2017-02-27 14:25:10 +03:00
abv
97f3782bb0 0028440: Documentation - Doxygen errors on Linux
Extensions of PNG files is corrected to be lowercase
Duplicate subsection tag is corrected in Draw user guide
2017-02-09 16:19:15 +03:00
abv
f87817bc03 0028431: Coding, Graphic3d - Eliminate GCC warning -Wstrict-overflow
Code amended to avoid warning issued by GCC optimizer
2017-02-09 16:16:27 +03:00
ika
9f984417b1 0028445: Data Exchange - Opening specific STEP file leads to application crash
Add check for null vertex during translation from STEP.
2017-02-09 16:16:25 +03:00
kgv
dace4784d1 0028439: Configuration - compilation error when using thread_local within XCode 7 or earlier
__has_feature(cxx_thread_local) check has been added
for using thread_local keyword within CLang.
2017-02-09 16:16:23 +03:00
ika
c4fa1c2c62 0028444: Data Exchange - Missed text blocks in Saved Views
Add new STEP entity to connect dimension semantic with presentation.
Fix number of GDTs in Saved View.
2017-02-09 16:16:21 +03:00
emv
e6ae74fd42 0028426: Implementation of the EdgesToFaces function
1. The two new methods have been implemented:
a. BOPAlgo_Tools::EdgesToWires - allows creating planar wires from edges.
The input edges may be not shared, but the output wires will be sharing the coinciding vertices and edges.
It is possible to skip the sharing if the input edges are already shared by passing the corresponding flag into the method.
The input edges are expected to be planar, but the method does not check it. Thus, if the input edges are not planar, the output wires will also be not planar.
In general, the output wires will be non-manifold and may contain free vertices.

b. BOPAlgo_Tools::WiresToFaces - allows creating planar faces from the planar wires.
In general, the input wires are non-manifold and may be not closed, but should share the coinciding parts.
The wires located in the same plane and completely included into other wires will create holes in the faces built from bigger wires

These two methods combined allow building faces from set of edges randomly located in 3D space.

2. The DRAW command *edgestofaces* has been implemented.

3. The documentation has been updated with the new section in Modeling Algorithms - Topological Tools.

4. Test cases for the issue.
2017-02-09 16:16:19 +03:00
aba
ea3193f52e 0028239: PMIVis - defined positions and number of places are not loaded properly in some cases
Corrected 'addTolModif' test command
2017-02-09 16:16:17 +03:00
abv
bf961e3c29 0028392: Shape Processing - some checks have no option to switch off
Added option ShapeFix_Solid::FixShellOrientationMode allowing to switch off analysis and fixing of orientations of shell(s) in solid.
Options FixVertexToleranceMode, FixShellOrientationMode, FixFaceOrientationMode are added to Shepe Processing resource file so that they can be manipulated.
2017-02-09 16:16:15 +03:00
msv
d3dadd2392 0027894: Crash when calling ShapeUpgrade_UnifySameDomain
- Avoid getting pcurve of edge on not connected face.
- Avoid building wire of empty set of edges.

Small correction of test case for issue CR27894
2017-02-09 16:16:13 +03:00
msv
d76b39abf1 0028326: Checking invariant shapes in revolve is incomplete
Check for bspline and bezier curves coinciding with the axis of rotation.
Minor correction of test case bugs/modalg_6/bug28003
2017-02-09 16:16:11 +03:00
msv
7c441da0d1 0028333: Draw Harness - whatis command hangs when selection is activated with no opened view
Added new method Draw_Window::IsMapped() for checked window state.
Draw_Window using XLib now does not exit application on closing window.
The method Draw_Viewer::Select() (called by whatis command)
has been corrected so as not to enter the loop if no views are initialized.
2017-02-09 15:30:25 +03:00
duv
e59839c8c2 0028360: Draw Harness - access for DRAW TCL interpreter needed for custom applications
Components of DRAW now use interpreter with static method Draw::GetInterpretor() instead of shared global variable
2017-02-09 15:22:29 +03:00
msv
c13de40280 0028327: BSplCLib can cause memory corruption in degenerated cases
The code of the methods BSplCLib::KnotForm and BSplCLib::MultForm has been made safe by giving up using of address of array item for iteration on the Array1. Also the checking for degenerated case has been added to prevent out of bounds exception.
2017-02-09 15:19:34 +03:00
apn
4cf17e1c04 Warnings on vc14 were eliminated 2017-02-03 11:57:09 +03:00
apn
d1d3e057ca Warning on windows in QABugs_11.cxx was eliminated 2017-02-02 19:01:54 +03:00
abv
6662fe6313 0028404: DRAW - avoid useless preparation of display data when shape is not shown
Class DBRep_DrawableShape is changed to postpone generation of display data until the shape is actually displayed (for the first time).

Test perf draw bug28404 is added.
2017-02-02 16:51:36 +03:00
ski
9775fa6110 0026937: Eliminate NO_CXX_EXCEPTION macro support
Macro NO_CXX_EXCEPTION was removed from code.
Method Raise() was replaced by explicit throw statement.
Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer.
Method Standard_Failure::Caught() is deprecated now.
Eliminated empty constructors.
Updated samples.
Eliminate empty method ChangeValue from NCollection_Map class.
Removed not operable methods from NCollection classes.
2017-02-02 16:35:54 +03:00
ika
0c63f2f8b9 0028389: Data Exchange - Import of STEP Saved Views and Clipping Planes
- new STEP entities for Saved Views
- import of STEP Saved Views
- new XCAF tool for clipping planes
- new draw commands
- update test
2017-02-02 16:26:18 +03:00
kgv
cfece3ef2e 0028407: Visualization - remove ::UpdateMode() from Graphic3d_StructureManager 2017-02-02 16:24:15 +03:00
abv
b0d96eb753 0028403: Avoid useless calls to BRepTools::Write()
Useless writes of intermediate shapes to hardcoded paths are removed in samples\mfc\standard\02_Modeling\src\ModelingDoc.cpp

Methods IGESBRep::WriteShape(), XSControl_Utils::WriteShape() are deleted; BRepTools::Write() can be used instead.
Method TopOpeBRepBuild_Tools::DumpMapOfShapeWithState() is moved to where it is used -- TopOpeBRepBuild_Builder1_1.cxx as static function (commented out).

Unused DRAW command OCC18612 is removed.

Upgrade Guide is corrected to avoid Doxygen warnings.
2017-02-02 16:22:59 +03:00
kgv
478ad1d19e 0028376: Visualization, AIS_ColoredShape - fix endless recursion due to misprint 2017-02-02 16:20:57 +03:00
kgv
1a0dfc1bfd 0028400: Visualization, Graphic3d_MaterialAspect - remove undocumented and unsupported flag EnvReflexion() 2017-02-02 16:18:56 +03:00
ski
59edf905b1 0023551: Move data models contained in samples subfolder of OCCT repository to common data folder
Data files from mfc samples were moved to $CASROOT/data directory.
2017-02-02 16:17:34 +03:00
ski
92345dc222 0027737: Remove hardcoded paths to data folders in mfc samples
Data shapes (used in samples) were moved into CSF_OCCTDataPath location.
2017-02-02 16:16:22 +03:00
emv
baaacd4683 0028387: Empty result of 3D Offset operation in mode Complete JoinType Intersection
1. The smarter conditions for removing the invalid faces with inverted edges have been implemented
   (BRepOffset_MakeOffset::RemoveInvalidSplitsByInvertedEdges).

2. Avoid removed (completely inside) edges in the filtering of invalid faces
   (BRepOffset_MakeOffset::FilterInvalidFaces).

3. Test cases for the issue.
2017-02-02 16:12:36 +03:00
apl
ff2bd6ef48 0028361: Visualization, TKV3d - buggy behavior of Transformation Persistence compiled on several Linux platforms in optimized mode
The patch fixes transformation persistence for various set of GCC compilers.
1) Optimized template-specialized operator /= for division (causes bugs)
   of NCollection_Vec4 was replaced with non-specialized version.
2) NCollection_Vec4::xyz() is not used since compiler uses modifiable-reference
   returning version, which invokes warning of possible strict-aliasing rules
   violation and leads to incorrect behavior of the reference.
2017-02-02 16:11:17 +03:00
nbv
8cc8a6925d 0028394: Not precise extrema solution of line and circle lying in the same plane
If the line is in the circle-plane completely (or parallel to the circle-plane) then extremas and intersections in 2D-space are looked for. These case are pure analytical and solutions will be found precisely.
2017-02-02 16:09:03 +03:00
msv
cbdcce0d64 0028375: Regressions after enabling floating point signals handling in DRAW
In Bisector_BisecCC.cxx avoid division by zero when the variable N1P2P1==0.
In Bisector_BisecPC.cxx avoid creation of gp_Dir2d with zero components.
2017-02-02 16:06:42 +03:00
vsv
f114566d01 0028401: Configuration - unresolved symbol OpenGl_VertexBuffer::unbindFixedColor() 2017-02-02 16:05:11 +03:00
nds
4d901cde7c 0028365: Visualization, AIS_InteractiveContext - apply selection filter in AddOrRemoveSelected at Neutral point 2017-02-02 16:03:48 +03:00
kgv
650efe05be 0028257: XCAFPrs_Style - uninitialized memory usage within ::HashCode()
XCAFPrs_Style::HashCode() function has been corrected.
XCAFPrs_Style::SetVisibility() does not reset assigned colors anymore.
2017-02-02 16:02:15 +03:00
abv
2a4611e19f 0028371: Configuration - update system requirements page
Table of supported operating systems with versions is removed, in favor of more general statement with simple list of supported OS and architectures.
Outdated list of tested graphic cards has been dropped.
2017-02-02 16:00:49 +03:00
msv
472634fa06 0028313: Extend Draw functionality with some new useful commands and features
1) In Views menu the check button item "Extended view commands" has been added. Pressing on it shows/hides the set of buttons in the main window that allow manipulating of view zoom/pan/rotate by mouse.

2) New category of commands "Vector and measurement Commands" has been added. The commands in this category allow simple calculations using 2D and 3D vectors, such as cross and dot products, computation of distances of points to other objects, and other functions.

3) The new command "pickf" has been added in "DRAW Variables management" category. It allows extracting a picked with mouse face included in some shape as a new variable.

4) New commands "del" and "era" have been added in "DRAW Variables management" category. They allow deleting (destructing) or erasing (from view) variables matched by glob pattern.

5) Missing help for some commands like "don", "disp" and others has been added.
2017-02-02 15:58:24 +03:00
kgv
2b3e2b780d 0028391: Foundation Classes - OSD_Directory returns incorrect protection flags for shared directory on Windows
Redirect Folder reading flags to File reading flags when Folder flags are not found.
2017-02-02 15:48:10 +03:00
apn
06bc0a59fa Correct warning on vc 14 (caused by #26007) 2017-01-26 20:05:11 +03:00
apn
89029d3342 Add new package XCAFView to UDLIST (issue #28044) 2017-01-26 16:51:00 +03:00
akz
624f732fb4 0026007: Standard attribute for surface meshes in TDataStd 2017-01-26 13:43:59 +03:00
nbv
e4780e5287 0026745: Boolean Cut produces invalid result
Creation of test cases for issues #26745 and #26748
2017-01-26 13:42:19 +03:00
emv
25dfc507be 0028284: Avoid classification of sub-shapes of arguments of BOPs relatively solids during Intersection phase
1. The methods PerformVZ, PerformEZ, PerformFZ and PerformZZ have been transferred from BOPAlgo_PaveFiller to BOPAlgo_CheckerSI class
to perform intersection of sub-shapes with solids only in self-intersection mode.

2. The checks for solids built from the same (shared) faces have been added into methods building the result of Boolean operations -
BOPAlgo_BOP::BuildRC() and BOPAlgo_BOP::BuildSolid().

3. Since the NonDestructive mode is now natively supported by the BOPAlgo_PaveFiller the methods providing the support of this mode by CheckerSI
(BOPAlgo_CheckerSI::PrepareCopy() and BOPAlgo_CheckerSI::PostTreatCopy()) are not needed and have been removed.

4. The pairs of sub-shapes with interfering bounding boxes are now sorted before real intersection to guarantee the constant order of
intersection of sub-shapes and produce more stable result. The class BOPDS_PassKey has been replaced with simpler class BOPDS_Pair.

5. The class BOPDS_SubIterator has been refactored.

6. Test cases for the issue.

7. Adjustment of the test case boolean volumemaker D2.
2017-01-26 13:39:02 +03:00
nbv
f542b7bbf1 0027252: Implicit-implicit intersection (Cylinder-Plane) loses intersection curve
1. Earlier we could not put any IntPatch_Point to the intersection curve. The fix makes the algorithm of IntPatch_Points searching more precise. It is achieved by redetermination of earlier found vertices with help of minimization the distance between boundary of one intersection argument and another intersection argument (surface).
2. Additional check has been added, if IntPatch_Point adjusted to the domain boundary is true intersection point.
3. Method Contap_ArcFunction::Surface() has been added.
4. Method LastComputedPoint() has been added for IntPatch_ArcFunction and Contap_ArcFunction classes.
5. Correction in FindMaxDistance() method (see IntTools_FaceFace.cxx file) according to pure Golden-ratio minimization algorithm. Earlier this function worked wrong with small searching intervals.
6. Insignificant correction in math_BrentMinimum.cxx file (elimination of "defines").
Creation of test case for issues #27221 an #27252.
Adjusting some test cases according to their new behavior.
Correction according to the last remarks.
Small correction of shape names for issue CR27252
Test case for issue 28210
Small correction of test case for issue 28210
2017-01-26 13:34:16 +03:00
ski
31211c6cfe 0028384: Add FPE signals enabling from MSVC
Variable CSF_FPE was added to the file adm/templates/DRAWEXE.vcxproj.user.in
2017-01-26 13:30:24 +03:00
ika
2df785d7f1 0028044: Data Exchange - implement data structures for Saved Views
Add new root label in Document for Views.
Add new attribute to store View in XDE.
Add object and tool to process Views.
Add new Draw commands for Views.
2017-01-26 13:27:19 +03:00
kgv
61887a4ade 0028367: Draw Harness - XSave should print an error on store failure 2017-01-26 13:22:29 +03:00
ifv
9f2d973602 0028261: Chamfer fails on edge connected to cone's seam
Method GetType() of class GeomAdaptor_SurfaceOfRevolution was modified to create plane instead Cone or SurfaceOfRevolution for "plane like" within Precision::Confusion() restricted object.
For infinite objects Cone with semiangle > PI/2 - eps is replaced by SurfaceOfRevolution for eps < Precision::Confusion()
Tests cases are added

Small correction of shape names for issue CR28261_28266
2017-01-26 13:19:44 +03:00
nbv
0f358da3e3 0028381: Draw Harness - DRAWEXE hangs up immediatly when redirecting input stream on Windows 2017-01-26 13:13:10 +03:00
dbp
4eaaf9d812 0028129: Visualization, Path Tracing - Improve interactivity in "steady" rendering mode
Re-basing the patch on current master.
2017-01-26 12:57:02 +03:00
nbv
952886f056 0028373: Incomplete section between cylinder and plane
Test case has been created.
2017-01-26 12:53:35 +03:00
ifv
2dad173d8b 0028230: Convert C0 2d curve to C1 raises exception
The treatment of small curves (length of curves is less then tolerance used for checking G1) is added in
Geom2dConvert_CompCurveToBSplineCurve.cxx
2017-01-26 12:51:31 +03:00
azv
712879c808 0027383: Modeling - improve handling of regularity on edges
1. There has been implemented calculation of all possible types of continuity for shared edges:
  * G1 is set if tangential planes are the same for connected faces in each control points through the edge;
  * C1 is set in addition to G1 conditions if derivatives, orthogonal to the edge on each face, are equal vectors;
  * G2 is set in addition to G1 if the centers of principal curvatures are the same for connected faces in each control points through the edge;
  * C2 is set in addition to C1 and G2 if directions of principal curvatures are equal;
  * CN continuity is set only if both connected faces are based on elementary surfaces (the conditions for this case are similar to C2 continuity).

2. ShapeFix::EncodeRegularity() is merged into BRepLib::EncodeRegularity().
3. Implemented several test cases to check correct handling of regularity.
4. Fix incorrect usage of BRepLib::EncodeRegularity() in BRepBuilderAPI_Sewing.
5. Implement a method for calculation of regularity on the given list of edges.
6. Documentation updates
2017-01-26 12:45:22 +03:00
kgv
4e1bc39a81 0028263: Coding Rules - clean up definition of the class Graphic3d_MaterialAspect
Fixed uninitialized fields in several classes.
Body of trivial methods have been moved to class definition (header file).
Ensure that non-primitive types are returned by reference, when possible.
Removed unused class Prs3d_PlaneSet.
2017-01-20 17:44:09 +03:00
apn
2b73a1d19f Correct QAcommand OCC28310 according to changes in CR28088_3 2017-01-19 19:38:41 +03:00
Benjamin Bihler
0e9fe060f3 0028355: Stating wrong parent class in DEFINE_STANDARD_RTTIEXT is not recognized during compilation
Added compile-time checks (static_assert) in DEFINE_STANDARD_RTTI*(A,B) macros to check that A is actually the class being defined, and B is its base class.
For GCC compiler version 4.7 and later on, check ensures that B is direct base class of A.

Fixed dubious RTTI definitions.
2017-01-19 17:25:56 +03:00
dbp
f63101c984 0028368: TKMath, BVH -- Fix invalid tree height in QBVH 2017-01-19 17:24:55 +03:00
dbp
b09447ed89 0028369: Visualization, Path Tracing - Expose radiance clamping setting in path tracing mode
New parameter was added in the vrenderparams command:
vrenderparams -maxrad <value>
2017-01-19 17:24:53 +03:00
ski
7a59f4ce9f 0028198: Add FPE signals enabling from CMake
CMake variable BUILD_ENABLE_FPE_SIGNAL_HANDLER was added to enable FPE signals during runtime.
Updated description of BUILD_ENABLE_FPE_SIGNAL_HANDLER_DESCR variable.
2017-01-19 17:24:51 +03:00
apl
f2a88e54e8 0028310: Visualization - crash on iteration through detected interactive objects
AIS_InteractiveContext::Remove (anIObj, ...) removes object from sequence of detected owners.
Therefore further iteration on detected will not require updating this list with ::MoveTo().
Additional modification includes incrementing properly the iterator of CurrentDetectedObject
and resets iterator of Highlighted detected objects, because nothing is really highlighted after that.
2017-01-19 17:24:49 +03:00
abv
c5ec75471a 0028058: TObj_Object::Clone() does not copy TagSource attributes of children of second level
Handling of children objects located on sub-labels of the main child label is enabled in method CopyChildren(); TagSource attributes for such children are copied in method Clone()
2017-01-19 17:24:48 +03:00
ski
44fae8b193 0027691: Remove dchrono from all test cases and move its to perf group
Remove performance comparing with hardcoded value.
Test cases for performance of some commands were moved to perf group.

Updated documentation.
2017-01-19 17:24:46 +03:00
aan
810b672ff3 0028324: Configuration, genproj.tcl - compilation error while targeting OS X 10.8 or lower in XCode
Specify libc++ as C++ library compatible with C++11 instead of libstdc++ which is no more updated within XCode.
2017-01-19 16:29:25 +03:00
kgv
ec7c343f23 0028306: Visualization - viewer crashes if style for shaded display is set to HATCH
Fixed NULL-dereference in OpenGl_Context::SetPolygonHatchStyle().
2017-01-19 16:28:13 +03:00
ssv
acc909a893 0028055: Add UpdateAssemblies() method for top-down update of assembly compounds
- Implement top-down update for assemblies in XCAFDoc_ShapeTool
- Get rid of UpdateAssembly() method used for partial (parent-only) update
- Adjust STEP and IGES translators to use the top-down update after filling OCAF
- Implement XUpdateAssemblies Draw command
- Add test cases bug28055_1 and bug28055_2 for component removal and part update
- Update XDE documentation to mention the new UpdateAssemblies() method

Correction for issue CR28055
Adjusting of test case bugs/fclasses/bug28217
2017-01-19 16:22:47 +03:00
kgv
7755fe829e 0028350: Draw Harness - DRAWEXE hangs up immediatly when redirecting input stream on Windows
Fallback using fgetws() instead of ReadConsoleW() for reading input from a pipe.
2017-01-19 16:20:54 +03:00
kgv
bda0b631c8 0027585: It is not possible to store OCAF documents to paths with special characters in their names
TCollection_AsciiString - fixed inproper convertion from UTF-16 string.
2017-01-19 16:19:41 +03:00
Benjamin Bihler
6cfc06f00d 0028353: Samples - IESample cannot write files to paths with special characters
Changed charcode conversion to UTF-8.
2017-01-19 16:18:05 +03:00
emv
10ce324694 0028343: Modeling: ShapeUpgrade_UnifySameDomain algorithm produces invalid shape
Check coincidence of the normal directions of the adjacent faces to understand if the merging of these faces is possible.

Test cases for the issue.
2017-01-19 16:16:27 +03:00
ika
1209c1b923 0028315: Data Exchange - Import/Export GD&Ts without semantic
Implement import/export of Dimensions without semantic.
Add new type of dimension for GDTs with presentation and connecting to shapes.
Update test cases.

Small corrections for issue CR28315
2017-01-19 16:05:25 +03:00
nbv
465e686173 0028214: Make the class GeomPlate_BuildPlateSurface accept Adaptor3d_HCurve instead of Adaptor3d_HCurveOnSurface
Now, GeomPlate_BuildPlateSurface accepts base class Adaptor3d_HCurve and of course array of Adaptor3d_HCurve.

Classes GeomPlate_Array1OfHCurveOnSurface and GeomPlate_HArray1OfHCurveOnSurface have been renamed to GeomPlate_Array1OfHCurve and GeomPlate_HArray1OfHCurve correspondingly.

Documentation has been updated.

Correction in documentation.
2017-01-19 16:02:48 +03:00
isk
0577ae8ca4 0028088: Visualization, AIS_InteractiveContext - drop default value for Update Viewer parameter 2017-01-10 14:52:57 +03:00
apn
9bcfd6f649 Fix compilation error on vc12 (MSVC++ 12.0) 2016-12-29 20:24:44 +03:00
apn
0fdbd10b91 Corrections for MacOS genproj.tcl (branch CR26866) 2016-12-29 20:02:35 +03:00
kgv
e22105a97c 0028312: Configuration, genproj.tcl - support CSF_ZLIB and CSF_LIBLZMA within project generator
Added CSF_ZLIB for searching zlib library, CSF_LIBLZMA for liblzma library
and CSF_FFmpeg for FFmpeg framework.
Unused CSF_AviLibs has been dropped.
2016-12-29 18:36:25 +03:00
emv
77a11d3df1 0028189: Result of Boolean operation is non-manifold wire
1. The result of Boolean operation on the arguments of collection type, containers WIRE/SHELL/COMPSOLID, is also a collection.
The containers of type WIRE included into result should now also (as the SHELLs) have coherent orientation of its sub-shapes.
For that the new method has been implemented (BOPTools_AlgoTools::OrientEdgesOnWire(TopoDS_Shape&)) which reorients edges for correct ordering.
The duplicating containers, i.e. containers with the contents completely included in other containers, are now avoided in the result of BOP.
2. The result of Fuse operation on Compsolids is now also will be Compsolid.
3. Documentation has been updated.
4. New test cases for the issue.
5. Adjusting test cases to current behavior.

Correction of test case bugs/modalg_4/bug726_2 according to the new behavior
2016-12-29 18:32:44 +03:00
ika
400af1bcf6 0028235: Data Exchange - DG&T datum XCAF object has incomplete list of shape references
Update STEP import and export of datums.
Update test cases.
2016-12-29 14:57:05 +03:00
ski
5da3dfdf08 0026866: Configuration, genproj - ensure consistency between FILES and actual content of inc and src folders
Added check of consistency between FILES and actual content of inc and src folders in genproj procedure.
2016-12-29 14:55:53 +03:00
ski
3b1a2e5158 0028197: Configuration - support Eigen template library as external dependency
Supporting of "Eigen" third party was added to CMake build procedure.
2016-12-29 14:54:51 +03:00
vpa
731c9b5bc0 0028047: Visualization - support objects with customized highlighting in AIS_InteractiveContext
- SelectMgr_SelectableObject::ClearHighlighted method is added to remove dynamic highlight data;
- interactive context will pass processing of dynamic highlight erase to the object if the owner returns false in SelectMgr_EntityOwner::IsAutoHilight;
- if owner returns true in SelectMgr_EntityOwner::IsForcedHilight, selection presentation will be re-highlighted at each ::Select call;
- redundant logic related to old object-oriented highlight mechanism was removed from AIS_InteractiveContext::MoveTo.
2016-12-29 14:53:36 +03:00
emv
a8232603a0 0028273: Inefficient implementation of the BRepOffset_MakeOffset::BuildSplitsOfFace function
The method for building splits of the face BRepOffset_MakeOffset::BuildSplitsOfFace has been redesigned to use the BOPAlgo_BuilderFace algorithm directly.
The methods FindInvalidFaces and TrimNewIntersectionEdges have been corrected to avoid possible instabilities.
The filtering of invalid edges by existing bounding edges has been corrected to avoid removal of valid splits.
The method BRepOffset_Analyse::Correct2dPoint has been modified to avoid unnecessary initialization of BRepAdaptor_Surface.

Adjustment of the test cases.
Test case bugs modalg_6 bug26513 has been modified to unify faces of the input shape before operation.
2016-12-29 14:50:24 +03:00
msv
0c5a6d479b 0028283: The command bopcheck crashes on the given shape
BOPAlgo_CheckerSI crashed due to building of pcurve for an edge not lying on surface. The fix avoids building of pcurves in this algorithm.
The new flag has been added in BOPAlgo_PaveFiller class (method SetAvoidBuildPCurve). It tells whether to avoid building pcurves. It is worth to set if the result is not used to create splits of faces, as in example with BOPAlgo_CheckerSI.
2016-12-29 14:48:36 +03:00
abv
b3d20c7f46 0028217: Error handling is not thread safe and causing memory corruption and sporadic crashes
Static variable holding handle to the last raised exception is made thread-local on compilers that support C++11 keyword thread_local (MCVC++ 14+, GCC 4.8+, ICC 14+, CLang).
Test bugs fclasses bug28217 is added (BAD on vc < 14 and gcc < 4.8).

Test case tuning bugs/fclasses/bug28217
2016-12-29 14:38:02 +03:00
isk
96fffdc609 0028285: Configuration - add missing macro Standard_EXPORT to OpenGl_StateInterface subclasses 2016-12-29 14:34:49 +03:00
kgv
5c20836e0d 0028281: Draw Harness - remove unused command vperf 2016-12-29 14:33:52 +03:00
kgv
09f30297f4 0028276: Visualization, Graphic3d_ArrayOfPrimitives - fix usage of 16-bit indices
Graphic3d_ArrayOfPrimitives now check the amount of vertex data rather than amount of indices.
2016-12-29 14:31:29 +03:00
ski
ad03c23449 0028110: Configuration - specify Unicode charset instead of multibyte in project files for Visual Studio
Eliminated usage of ANSI methods.
All Visual Studio projects generated by genproj or CMake use Unicode character set.

Draw Harness now handles Unicode input on Windows.
Tcl test scripts are now expected in UTF-8 encoding by default.
2016-12-29 14:29:16 +03:00
ifv
0a40a30da5 0028223: Projection of closed curve onto cylinder is wrong
Algorithm of calculation UV bounds of projected curve for periodic surfaces is modified.
2016-12-29 14:27:22 +03:00
ski
a20cce397a 0028135: Configuration - adopt building script for using built-in Android cross-compiling support in CMake 3.7
Added toolchain file for using built-in Android cross-compiling support in CMake 3.7

Added variable CMAKE_ANDROID_STL_TYPE for Android platform build via CMake.

Updated documentation about building of occt for UWP and Android via CMake.

Eliminated CMake warning CMP0054 for Android platform build.
2016-12-29 14:23:20 +03:00
apn
9f951ebc44 Warnings on vc14 were eliminated 2016-12-23 10:10:55 +03:00
isk
0f0f0c06d1 0028244: Visualization - AIS_AngleDimension throws exception for 180 degree
Small correction of test case for issue CR28244
2016-12-22 17:24:31 +03:00
ika
51663cb434 0028250: Data Exchange - Wrong number of geometric tolerance modifiers.
fix some copy paste mistakes,
update test cases.
2016-12-22 17:24:30 +03:00
kgv
b6826918fe 0028232: Visualization, StdPrs_ShadedShape - create WireFrame presentation for sole Vertex / Edge / Wire 2016-12-22 17:24:28 +03:00
kgv
8613985b2a 0028180: Visualization, TKOpenGl - Performance of Shaded presentation dropped due to FFP disabled by default
FFP state management (light sources, matrices, clipping planes) has been
moved to OpenGl_ShaderManager for consistency with Programmable Pipeline.

OpenGl_Context::BindProgram() does not re-bind already active Program.
OpenGl_PrimitiveArray::Render() does not reset active Program at the end.

OpenGl_Context::ApplyModelViewMatrix() now checks if matrix differs
from already set one before modifying state in Shader Manager.
This allows avoing redundant state changes, matrix uploads onto GPU
and re-computation of inversed matrices.

NCollection_Mat4 has been extended with equality check operators for proper comparison.

OpenGl_ShaderManager - the tracking Material state has been added.
Removed unreachable states OPENGL_NS_RESMAT, OPENGL_NS_TEXTURE and OPENGL_NS_WHITEBACK.

Fixed resetting FFP material state after displaying GL_COLOR_ARRAY vertices;
the Material state within Shader Manager is now
invalidated within OpenGl_VertexBuffer::unbindFixedColor().

OpenGl_Workspace::ApplyAspectFace() - fixed invalidating Material State
when only Highlighting style is changing.
2016-12-22 17:24:05 +03:00
isk
decdee7d3f 0028205: Visualization - add functionality for dumping results of detection algorithms into image
StdSelect_ViewerSelector3d::ToPixMap() - added new method for dumping
detection results into an image.
2016-12-22 12:46:49 +03:00
dbp
06e06389ea 0028241: Visualization, Path tracing - shader compilation error on Radeon 290 2016-12-22 12:45:17 +03:00
msv
4e66868ad7 0028221: General Fuse operation error
The method BOPTools_AlgoTools2D::AttachExistingPCurve has been corrected so that
to call BRepLib::SameParameter not on the target edge with the whole set of pcurves,
but rather on a temporary edge with 3D curve and copied pcurve only.
After that the updated pcurve is transferred to the target edge.

Small correction of test case for issue CR28221
2016-12-22 12:44:05 +03:00
abv
a061150b0b 0028240: Avoid redundant search for span index in evaluation of BSpline cache 2016-12-22 12:42:19 +03:00
ski
1ef277c369 0028204: TopoTools_ShapeSet::Dump() does not show flag Locked
Corrected command dump to show flag Locked for shapes in DRAW.
Test case for issue CR28204
Updated test case.
2016-12-22 12:41:16 +03:00
kgv
4b3d6eb1d2 0028004: Visualization, AIS_ColorScale - allow defining labels list not equal to intervals list
Cosmetics, code clean up.

AIS_ColorScale now draw labels using Graphic3d_VTA_CENTER
vertical alignment flag, instead of incorrect own alignment logic.
The color bar now adds margin on the top simmetrical to the bottom.

AIS_ColorScale::SetSmoothTransition() - added new property
for displaying colorscale with smooth transition between color intervals.

AIS_ColorScale::SetHueRange() - added new property defining the hue angles
corresponding to minimal and maximum values on the color scale.

AIS_ColorScale::SetLabels() now allows setting the sequence of free labels,
which number does not match the number of intervals.
In this case the labels will be displayed at positions of virtual
intervals corresponding to the number of labels.
2016-12-22 12:39:35 +03:00
msv
09a4804444 0028183: Modeling - BRepExtrema_DistShapeShape does not find all solutions
Disable SetSingleSolutionFlag when calling algorithm of curve-curve Extrema.
Now DistShapeShape will find all solutions, even if they are located on the same pair of edges.
The fix brings the speed down for the cases of coinciding curves.
2016-12-22 12:37:54 +03:00
msv
ac0cdacd09 0028233: lvarpop is needed for correct work of lmatch defined in StandardCommands.tcl
The proc lvarpop has been implemented.
2016-12-16 17:13:07 +03:00
apn
471b22dea3 Added procedure lmatch for test case in branch CR28196_1 2016-12-16 12:20:05 +03:00
apn
eadea5ea03 Warnings is IntPatch_ImpImpIntersection_4.gxx on unix platforms and in ViewerTest.cxx on win32 vc14 were eliminated 2016-12-16 12:17:19 +03:00
msv
24542bc056 0028017: Unexpected result of General Fuse operation
Several improvements have been made in BO code to fix the bug:

- Create empty edge-edge interference if intersection is close to an end vertex. This will help to avoid creation of unnecessary edge-face intersections.
- Improve PutPaveOnCurve() method to join nearly located vertices when they are put on the same section curve.
- Add processing of same-domain vertices for section edges in UpdatePaveBlocks() method.
- Improve the method CorrectWires() in order to not increase vertex tolerance if it will cover the major part of an edge.
- Replace vertices of section edges by same-domain equivalents.
- In the algorithm BOPAlgo_WireSplitter, correct angles computation and evaluation, taking into account periodicity.
- Modify PostTreatFF to properly take into account the orientations of coinciding section edges.
- In IntTools_Context::ComputePE, check distance from the point to vertices of the edge if the projection to the curve is failure.

Tests update:
- test offset\faces_type_i\C9 has been updated; now instead of returning bad shape it returns null result.

Notes for porting:
- Modify BopAlgo_PaveFiller so that on output each interference refers to the new vertex that will hit in the result (same-domain of the initial new vertex).
- Make the method BOPDS_DS::Index() returning valid index for new shapes.

// eliminate compile warning on VC14
2016-12-16 11:59:40 +03:00
abk
5200cc4aa3 Test for 0028196: Algorithm 'Extrema_GenLocateExtPS' failed to find the extremum in a case
Draw command 'proj' has been improved:
- Add possibility to pass the starting point. If it is passed than the algorithm Extrema_GenLocateExtPS is used instead of standard projection.
- Make the output of the command more clear.

Test case bugs/moddata_3/bug28196 has been added.
2016-12-16 11:58:12 +03:00
kgv
f838dac48b 0025695: Visualization, AIS_InteractiveContext - define default HilightMode
AIS_InteractiveContext - removed the following unused properties:
- PreSelectionColor(), DefaultColor(), WasCurrentTouched(), ZDetection().
AIS_InteractiveObject - removed unused property SelectionPriority().

Prs3d_Drawer - removed properties HighlightStyle() and SelectionStyle().
Graphic3d_HighlightStyle has been superseded by Prs3d_Drawer
inheriting from new class Graphic3d_PresentationAttributes.

Graphic3d_PresentationAttributes (as Graphic3d_HighlightStyle replacement)
has been extended with new properties:
- ZLayer() defining Z-Layer for highlighting presentation.
- DisplayMode() defining display mode for highlighting.

StdSelect_BRepSelectionTool methods have been corrected to take
SelectMgr_EntityOwner instead of StdSelect_BRepOwner.
StdSelect_Shape - duplicated field myDrawer has been dropped.

AIS_InteractiveObject - myDrawer->Color() is now used instead of myOwnColor,
myDrawer->Transparency() instead of myTransparency
and myDrawer->ZLayer() instead of myZLayer.

PrsMgr_PresentationManager::Unhighlight() now unhighlight all modes.
The method taking Mode as argument has been marked deprecated.

New enumeration Prs3d_TypeOfHighlight has been introduced
defining different highlight types.
AIS_InteractiveObject::HighlightStyle() now takes enumeration argument
and defines different styles for Global and Local selection.

ComesFromDecomposition() property has been moved
from StdSelect_BRepOwner to SelectMgr_EntityOwner.
2016-12-16 11:58:10 +03:00
isk
404c893694 0028162: Draw Harness - eliminate usage of deprecated Local Context
Create a general draw command 'VRelation' and drop the old 'relation' commands.
Add test cases for new draw command "vrelation".
Add two new methods: Activate and Deactivate which activate/deactivate the given selection mode for all displayed objects.
Eliminate deprecated local context methods in ObjectCommands, QABugs.
Eliminate deprecated local context methods in mfc standard sample and qt samples.
2016-12-16 11:58:08 +03:00
kgv
0a8630615d 0028213: Visualization, StdPrs_ShadedShape - compute face edges for triangulation-only Faces 2016-12-15 16:37:35 +03:00
kgv
3a4a396251 0028215: Visualization - define EMPTY type line for consistenct with Interior Style
Added new values Aspect_TOL_EMPTY (line type) and Aspect_TOM_EMPTY (marker type).
2016-12-15 16:34:35 +03:00
aml
f79b19a17e 0028175: Bad result of curve-curve extrema
Extrema between curves has been made producing correct result for the cases of solution located near bounds.

- Class math_GlobOptMin has been improved to use lower order methods of local optimization when high-order methods are failed.
- Add support of conditional optimization (in bounds) in the classes math_BFGS and math_BracketMinimum.
- Turn on conditional optimization in the case of usage of math_BFGS in the class math_GlobOptMin.
- Correct mistake in distmini command, which caused incorrect reading of deflection parameter.
- To avoid possible FPE signals, ensure initialization of fields in the class math/math_BracketMinimum.
- In the algorithms math_BFGS, math_Powell and math_FRPR, take into account that the function math_MultipleVarFunction can return failure status (e.g. when computing D0 out of bounds).

New test cases have been added.
Tests cases are updated.

// correct test case
2016-12-15 16:33:12 +03:00
vpa
640d5fe219 0028107: Visualization - provide a flexible interface to set custom hatch styles
- class Graphic3d_HatchStyle is added to provide a possibility to set up custom and predefined hatching;
- added the ability to set custom hatch patterns through bitmaps;
- test case for issue #28107
2016-12-15 16:28:58 +03:00
aml
dbe54d10f9 0028201: Add square PConfusion() method to the Precision class
Method SquarePConfusion has been added to simplify code.
2016-12-15 15:54:24 +03:00
nbv
4dba155d8e 0025187: Document the algorithm used in the fixes for issues ## 0024915 and 25194
1. Algorithm of orthogonalize of the transformation matrix (in gp_Trsf(2d) classes) has been documented.

2. Algorithm of computation of intersection line in case of two intersected cylinders (implemented in the fix for issue #24915) has been documented. Additionally, I would like to tell about some advantages of new algorithm in compare with old one.

2.1. Both algorithm generates intersection points for Walking-line (WL), which will be approximated to B-spline curve(s) in the future. At that, new algo (in compare with old one) uses another method for step computation. It based on attempts to provide equal steps (if it is possible) along V-direction (instead of U-direction used in old algorithm). It allows obtaining set of points, which are more uniform distributed in compare with old algo (this problem is the main reason why case #24915 was failed). Of course, we will get non-uniform distribution along U-direction. However, it can be compensated by small range (its length is less or equal 2*PI) of U-parameter change, whereas range of V-parameter can be very big.

2.2. More simple estimation of curvature "jump". New algo aims at provide equidistant distribution of points along V-direction. If it requires "jump" of U-parameter then we have "jump" of curvature in this point. This check is implemented in function AddPointIntoWL(...) (see place where SeekAdditionalPoints(...) is called).

However, in OCCT 7.1.0, curvature jumping is analyzed (it was not earlier, when the bug #24915 was fixed) - see fix for issue #27431.

2.3. New algorithm allows obtaining 7D-intersection point immediately. At that, old algorithm computed only 2D-intersection point (on some one surface). After that, it computed 3D-intersection point and, finally, projected(!) 3D-point to the second surface in order to obtain second 2D-intersection point. This second projection results in some problems. One problem is described in the issue #27968 (see message ~0058807). Second problem is the process of cases with singularity (significant improvement in this direction has been made in the fix #27431). Third problem is difficulties in projection itself (e.g. if we project point to a sphere when V-coordinate of the projection is near to PI/2 - projection point is found but not precise; the reason is not singularity but small radius of V-isoline).

Method used in new algorithm allows avoiding these problems. However, at present, it is implemented for case of two cylinders intersection (where most of these problems are not actual).

2.4. Algorithm of search of intersection point on surface boundary(ies) has been changed, too. Old algorithm sought point on boundary irrespective of intersection line. It resulted in problems described in the issue #27252 and related. New algorithm looks for intersection point of intersection line with surface boundary. It requires rectangular domain. However, it is not problem for current OCCT-version.
2016-12-15 15:52:09 +03:00
kgv
fcfda0392f 0028202: Coding rules - eliminate compiler warnings on HLRAlgo.hxx
Redundant forward declarations have been removed from HLRAlgo.hxx.
2016-12-15 15:49:54 +03:00
aml
4d9733588f Warnings in BRepOffset_SimpleOffset.cxx on vc14 were eliminated 2016-12-09 13:11:53 +03:00
kgv
2a79a1aeb4 0028186: Foundation Classes, NCollection_List - methods "Remove" and "Contains" prevent template usage
::Remove() and ::Contains() are now defined as template methods
to allow using NCollection_List with types without quality operator.
2016-12-08 17:02:48 +03:00
aka
20ef5652b7 0028193: missing "Standard_EXPORT"
missing "Standard_EXPORT" for "SetFuzzyValue" and "FuzzyValue" in IntTools_FaceFace was added
2016-12-08 17:01:44 +03:00
emv
fe1d4d6cff 0028191: Inefficient implementation of the BRepOffset_Tool::HasCommonShapes() method
The method to find common Vertices and Edges between faces
  BRepOffset_Tool::HasCommonShapes(const TopoDS_Face&,
                                   const TopoDS_Face&,
                                   TopTools_ListOfShape&,
                                   TopTools_ListOfShape&)

has been re-implemented using maps and renamed to BRepOffset_Tool::FindCommonShapes.

The new method
  BRepOffset_Tool::FindCommonShapes(const TopoDS_Shape&,
                                    const TopoDS_Shape&,
                                    const TopAbs_ShapeEnum,
                                    TopTools_ListOfShape&)

has been implemented to look for the common shapes of given type.
2016-12-08 17:00:37 +03:00
emv
291fced1e6 0028187: Add possibility to avoid creation of Internal parts in the result of Volume maker algorithm
1. The possibility to prevent addition of internal parts has been added into the following algorithms:
- BOPAlgo_BuilderFace;
- BOPAlgo_BuilderSolid;
- BOPAlgo_MakerVolume.

Setting the option to avoid internal parts for MakerVolume algorithm guarantees that the result solids
will be manifold and not contain any internal parts. But it does not prevent from occurrence
of the internal edges or vertices in the faces.

2. The Set/Get methods of the BOPAlgo_BuilderArea class have been made inline.

3. Draw command mkvolume has been updated to take into account the new option.

4. BRepOffset_MakeOffset::BuildShellsCompleteInter() has been modified to use the new option of BOPAlgo_MakerVolume
to speed up the construction of the final result solid.

5. Documentation has been updated with new section dedicated to BOPAlgo_MakerVolume algorithm.

6. Test case for the issue.
2016-12-08 16:59:25 +03:00
kgv
a699468165 0028181: Documentation - update porting note with missing information
Added information about removed classes StdPrs_WFDeflectionShape,
Prs3d_WFShape, StdPrs_ToolShadedShape and removed property
AIS_InteractiveObject::SelectionMode().
2016-12-08 16:55:10 +03:00
emv
51db017972 0028165: Improve performance of Boolean Operations
1. Unification of the usage of the BRepAdaptor_Surface in Boolean Operations algorithm.
For each face when it is necessary the Adaptor is initialized only once and stored in Context.

For that purpose the new IntTools_Context::SurfaceAdaptor(const TopoDS_Face&) method has been implemented.

To provide possibility to take the Adaptor from the context, the context has been added as
a parameter in following methods:
BOPTools_AlgoTools::MakePCurve()
BOPTools_AlgoTools::Sence()
BOPTools_AlgoTools2D::BuildPCurveForEdgeOnFace()
BOPTools_AlgoTools2D::PointOnSurface
BOPTools_AlgoTools2D::CurveOnSurface
BOPTools_AlgoTools2D::AdjustPCurveOnFace
BOPTools_AlgoTools2D::Make2D
BOPTools_AlgoTools2D::MakePCurveOnFace
BOPTools_AlgoTools3D::GetNormalToFaceOnEdge

It is also possible now to pass the context into BOPAlgo_WireSplitter algorithm.

Also, the new IntTools_Context::UVBounds(const TopoDS_Face&) method
has been implemented to get the UV bounds of a face.

2. Additional improvement is a calculation of reduced intersection range only for the intersection
type VERTEX during computation of Edge/Face interference.

3. The methods IntTools_EdgeFace::Prepare() and IntTools_EdgeFace::FindProjectableRoot()
and the fields IntTools_EdgeFace::myProjectableRanges and IntTools_EdgeFace::myFClass2d
have been removed as obsolete.

4. Test cases for the issue.
2016-12-08 16:53:22 +03:00
emv
483ce1bd89 0027878: Development of the Gluing operations based on the new Boolean component
The Gluing operation is an additional option for the algorithms in the Boolean Component
such as General Fuse, Boolean operations, Section operation, Maker Volume and Cells Builder algorithms.

The Gluing options have been designed to speed up the computation of the interference among arguments of the operations on special cases,
in which the arguments may be overlapping but do not have real intersections between their sub-shapes.

This option cannot be used on the shapes having real intersections, like intersection vertex between edges,
or intersection vertex between edge and a face or intersection line between faces.

The Gluing option is an enumeration implemented in BOPAlgo_GlueEnum.hxx. There are following items in the enum:
* BOPAlgo_GlueOff - default value for the algorithms, Gluing is switched off;
* BOPAlgo_GlueShift - Glue option for shapes with partial coincidence;
* BOPAlgo_GlueFull - Glue option for shapes with full coincidence.

For setting the Gluing options for the algorithm it is just necessary to call the SetGlue(BOPAlgo_GlueEnum) method with appropriate Glue value.

For using this option in DRAW the command bglue has been implemented:
* 0 - default value, Gluing is off;
* 1 - for partial coincidence;
* 2 - for full coincidence

Elimination of the warnings.
2016-12-08 16:50:17 +03:00
dbp
b4327ba8df 0028126: Visualization, Path tracing - Provide ability to use two-sided scattering models 2016-12-08 16:36:09 +03:00
aka
a148c938b0 0027434: Wrong result of classification of the point in "infinity"
In the case of infinite point due to not enough machine precision the distance from the point to each edge of the face is computed the same, and the algorithm cannot correctly select the nearest edge. To solve this problem checking of point was added, if the point is located too far from the bounding box of the face, then it will be replaced with another point located on the line between the point and the center of the bounding box.
    The new point has the same state as initial one but its state can be resolved without ambiguity.

Corrections in CheckPoint method
Small correction of test case for issue CR27434
2016-12-08 16:34:18 +03:00
aml
8013367c92 0027954: Create topology-preserving offset computation algorithm
New topology-preserving offset algorithm has been added. It allows to construct offset shape of build solid.
test cases have been added.
Documentation has been updated to be up to date.

Minor corrections.
Grid is renamed for simplification purposes.
Old constructors are restored with Standard_DEPRECATED macros.
2016-12-08 16:30:53 +03:00
emv
b443d53628 0028163: 3D Offset algorithm produces incorrect result on attached shape in mode Complete Intersection
1. Correct building of the lists of intersection faces connected to the same vertex.
2. For the artificially invalid cases with only one invalid face avoid usage of the edges having same origins as invalid edges.
3. Test cases for the issue.
4. Test cases offset shape_type_i_c XM1, ZW*,ZX*,ZY* have been modified to provide more clear result.
5. TODO statements have been removed from the test case offset shape_type_i_c XE6 as it is OK.
6. Test case offset shape_type_i_c ZZ2 is improvement.
2016-12-08 16:28:42 +03:00
anv
a8b5267725 0026026: XtControl_Reader hangs when processing specific data
Small fix for a specific case (was missing).
2016-12-08 16:24:56 +03:00
aka
851f870162 0027674: BRepOffsetAPI_ThruSections make invalid shape if sections are connected at ends
The edge which will be created between same vertexes should be degenerated and without 3d curve.

Small correction of test case for issue CR27674
2016-12-08 16:22:33 +03:00
apn
e3cb774f2e Change OCCT version to 7.1.1 and define OCC_VERSION_DEVELOPMENT to "dev" 2016-12-08 16:19:55 +03:00
msv
89aebdea8d 0027033: Modeling -- ensure stable result of area calculation
The method BRepGProp_Face::LKnots has been corrected to make proper initialization of the output data for the case of a circle.
Added test case bugs/modalg_6/bug27033
2016-11-25 13:50:18 +03:00
ski
168077a6dc 0025362: Samples - Conversion to B-Spline doesn't show bspline surface on Windows 8
Added constants WM_MOUSEFIRST and WM_PAINT in WaitForInput method for correct handling of system messages.
2016-11-25 12:38:22 +03:00
apn
d96fd48ee5 Fix warning on vc14 2016-11-24 12:00:58 +03:00
apn
7dd37838f7 Modify test case bugs/mesh/bug28118 2016-11-24 11:57:08 +03:00
apn
8f16a18454 Incrementation of OCCT version up to 7.1.0 2016-11-24 07:07:01 +03:00
apn
1dd28279c8 Modify test cases according using imagedir folder for saving tmp files 2016-11-24 07:07:00 +03:00
gka
cde381c4e2 0028118: Mesh generation hangs then crashes
Protection against hangs of mesh  and crash(made by epa)
Added test case bugs/mesh/bug28118
Tests mesh* standard_* W7 are corrected (TODO removed)
2016-11-24 07:06:49 +03:00
apn
10f55672df 0026450: Boolean operation is running endless
Added test case bugs/modalg_6/bug26450
2016-11-23 18:08:37 +03:00
kgv
aff1875311 0028147: Data Exchange - NULL dereference while reading color from STEP file
StepVisual_StyledItem::Item() now does not call IsKind() on NULL object.
Add several checks for NULL to import/export.

Add test case bugs/step/bug28147
2016-11-23 15:54:55 +03:00
msv
bb2cf06962 0025920: BRepAlgoAPI_Fuse makes invalid result
The command OCC426 for test case bugs modalg_2 bug426 has been modified in order to make the test passed. The modification concerns only the old Boolean operation branch (BRepAlgo_Fuse).
2016-11-23 13:13:11 +03:00
gka
946e65b9c5 0028143: In the method ShapeFix_Edge::FixAddPCurve initialized by face location of face is not taking into account.
Class ShapeAnalysis::Surface is initialized by transformed surface in the method
ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,const TopoDS_Face& face, const Standard_Boolean isSeam, const Standard_Real prec) in the case when face has location.
2016-11-23 13:12:08 +03:00
ski
7fbac3c240 0028077: Add option for genproj to generate UWP projects
Ability to generate UWP solution was added to genproj command, applied when VC version set to "vc14-uwp".
Environment variables are used to find installed Microsoft SDKs.

Visual Studio project option "Use precompiled headers" is set to "Not Using" by default.
Character set option of VS project Unicode is used instead of preprocessor definitions for UWP projects.
2016-11-23 13:10:48 +03:00
mkv
2fb5823d31 0028146: Data files with the same content in test cases
Names of used shapes were corrected in test cases
2016-11-23 13:09:48 +03:00
aiv
ce73cfd073 0028038: Incorrect documentation generated for "user guides/BRep Format"
References to external MathJax.js library were changed from HTTP to HTTPS alternative.
2016-11-23 13:07:45 +03:00
ski
4208cf1872 0028105: HLR rendering crash in MFC sample
User_Cylinder class was updated according to work as single object in Prs3d_Presentation.
2016-11-23 13:06:25 +03:00
kgv
b3eab8efc3 0028127: Visualization - transparent object breaks Z-Layer depth buffer clear
OpenGl_LayerList::Render() now calls glDepthMask(GL_TRUE) before clearing depth buffer.
Depth buffer is now cleared even if ZLayer with this command has no structures.
2016-11-23 13:05:18 +03:00
szy
5299b92ba1 0028134: TDataStd_Name attribute gets null ID.
'myID' field is initialized in constructor now.
2016-11-23 13:03:59 +03:00
emv
41aa3c3d5d 0028046: Incomplete result of offset operation in mode complete intersection
1. Special usage of the common edges not belonging to any invalidity while rebuilding the invalid faces (method IntersectFaces() in BRepOffset_MakeOffset_1.cxx).
Such edges could only be extended to the valid faces boundaries, thus could only split the face and not create any new part.

2. Test cases for the issue.
2016-11-23 13:02:53 +03:00
razmyslovich
f9ac4dc9ab 0027849: ResourceManager path computations fail for the folders containing dots
Treatment of paths in Resource_Manager is corrected to handle properly paths with dots inside.
Extraction of extension from path in DOS mode when working on Linux is corrected in OSD_Path.
Test case added.
2016-11-23 13:01:46 +03:00
ysn
ebcbd82410 0025560: Documentation - describe changes in AIS_InteractiveConnect and AIS_MultipleConnected introduced within 6.8.0
New section about scene-graph hierarchy and instancing.
 Proofreading of extended section about z-layers.
 Removal of obsolete information.

Remarks taken into account.
2016-11-23 12:57:55 +03:00
abv
45b9409aa4 0028130: Spelling error in description of class BOPAlgo_Section
Spelling error is corrected
2016-11-19 17:21:59 +03:00
abk
d673da182b 0028103: Foundation Classes - extend NCollection_Map to check whether two given maps are intersected
Mehtod HasIntersection added in NCollection_Map to check whether two given maps contain at least one same item.
'Draw' command and test to check the method were created.
2016-11-18 15:19:40 +03:00
dbp
f411f94fac 0027256: Visualization, Path Tracing - add support of alpha-channel of texture
Regenerate resource files.
2016-11-18 15:17:36 +03:00
dbp
383c6c9fb2 0028114: Visualization, Path tracing - Make path tracing mode interactive in high resolutions 2016-11-17 18:49:39 +03:00
kgv
8511408796 0028101: Visualization, Select3D_SensitiveSet - fix NULL dereference on re-adding the same sensitivity
Select3D_SensitiveSet now stores BVH_PrimitiveSet as class field (no dynamic allocation),
and BVH_PrimitiveSet subclass now stores raw pointer to Select3D_SensitiveSet (no smart pointer).

Select3D_BVHPrimitiveContent definition has been moved into Select3D_SensitiveSet
class definition to avoid confusion.

Unused field Select3D_SensitiveSet::myIsLeftChildQueuedFirst has been removed.
2016-11-17 18:49:37 +03:00
msv
c894a5fdfc 0027992: Modeling Algorithms - Extrema_ExtPS crashes on face without geometric surface
The algorithm BRepExtrema_DistShapeShape has been protected against exceptions when non-geometric shape data is given on input, like a face containing triangulation only or an edge containing polygon only. Such faces/edges are ignored by the algorithm.

BRepGProps::VolumeProperties() now ignores faces without geometric surface to avoid access violation.
2016-11-17 18:49:36 +03:00
dbp
6dd6e5c758 0028115: Visualization, Ray tracing - Fix crash on NVIDIA GPUs with driver version 373.06 when window is resized 2016-11-17 18:49:34 +03:00
kgv
f9f740d6b0 0028095: Draw Harness, ViewerTest - use RGBA format instead of BGRA within vreadpixel
OpenGl_Workspace::BufferDump() now implicitly converts RGBA dump
into requested BGR, BGRA and RGB image.

DRAW command dversion is improved to report OpenGL variant used (desktop or ES); reporting of version of MSVC is corrected for VC14 and above; reporting of HAVE_OPENCL option is removed.

Usage of command vdump is corrected in some tests to specify extension .png for an image file.

Compiler warning is eliminated in OpenGl_Text.cxx (OpenGL ES mode only).
2016-11-17 15:40:15 +03:00
kgv
564c82b4f2 0025144: Coding rules - consider rules for formatting pointers and constants placement in expressions 2016-11-17 15:38:19 +03:00
gka
16c93d97eb 0028094: Shape obtained after DRAW command "splitshape" has unnecessary high tolerance.
Check of the gap between ends of the p-curves having common vertex in the parametric space of face similar as in the class BRepCheck_Wire was added.
Check that face lies on the periodic surface was added.
Added check between ends of 2D curves in the 3D space and vertex the same which used in the BRepCheck_Wire::SelfIntersect
Test case for issue CR28094 has been created.
2016-11-17 15:36:26 +03:00
kgv
ef9a9362ae 0028093: Visualization - access violation on removal of dynamic highlighting after device loss
OpenGl_Layer::Remove() now tries to remove object from myAlwaysRenderedMap
if it was not removed from other groups.
2016-11-17 15:32:47 +03:00
ysn
8022338566 0028079: Proofreading of updates section and possible documentation changes since 7.0
Added some content from the bugtracker to porting notes.
Reviewed some other recent changes.
2016-11-17 15:31:36 +03:00
ysn
f3495b0139 0027828: Reference documentation of AIS_Trihedron contains invalid information about default size.
Fixed the description of AIS_Trihedron
2016-11-17 15:30:18 +03:00
kgv
6fe58c66d9 0028099: Visualization, OpenGl_Text - handle DIMENSION and SUBTITLE styles within Core Profile
OpenGl_Text now creates VBO for drawing background rectangle.
2016-11-17 15:28:28 +03:00
abv
45d0af05b9 0028096: VC14 compiler warnings of 7.1.0.beta
Warnings are eliminated
// minor corrections in headers
2016-11-17 15:14:42 +03:00
msv
197cddcfc9 0028092: Wrong statement in reference manual for Geom_ToroidalSurface::Bounds
Description has been corrected.
2016-11-17 14:56:19 +03:00
vpa
424392e0d8 0028061: Samples - Highlighting of any object with "Hidden On" option leads to crash in mfc Modeling
Graphic3d_Structure::Highlight() does not call UnHighlight() anymore.
2016-11-17 14:54:24 +03:00
msv
eca0539260 0028081: Fix regression in HLR introduced by the fix for 28053
The whole piece of the walking line between two vertices is no more checked for having length greater than Precision::Confusion(). Instead, only full duplicate points (comparing with gp::Resolution()) are removed, allowing the resulting line have any non-null length.

The test bugs modalg_6 bug27720_5 has been reverted to its original state.
2016-11-17 14:48:57 +03:00
nbv
326b3e283a 0028076: Test bugs moddata_2 bug469 fails when FPE are enabled
The reason of FPE exception has been eliminated.
2016-11-17 14:47:38 +03:00
kgv
bf7b2cebbe 0028056: Draw Harness, ViewerTest - correct vanimation command to produce stable timestamp on seek 2016-11-17 14:46:27 +03:00
gka
72523826de 0027575: Reading STEP file gives an empty result
Exception is raised during translation BSpline curve having only one unique knot.
Protection for such case was added
Added protection against exception during reading BSpline curve with number of control points equal to 0
Added protection against exception due to using null binder during writing XDE document

Test case for issue #27575
2016-11-17 14:45:16 +03:00
abv
7a1b96cb98 0023639: Exception on attempt to save to XmlOcaf format
Variant FULL is removed from the options of DRAW command pload; ALL can be used in all cases
2016-11-17 14:41:50 +03:00
emv
3b2af789dd 0027428: DRAW command "bsection" did not built section line between two faces (one face based on the plane)
Adjusting test case for the issue.
2016-11-09 13:12:51 +03:00
apn
aa7b761d4c Incrementing OCCT version up to 7.1.0 beta 2016-11-09 12:12:43 +03:00
apn
9d420e021d Update test case offset/shape_type_i_c/Q9 according to new behavior 2016-11-09 12:08:50 +03:00
apn
d102153bc0 Updated dependencies in mfc OCAF sample 2016-11-09 12:07:07 +03:00
kgv
baed683824 0028040: Foundation Classes, Message_Printer - handle Standard_CString messages as UTF-8 2016-11-09 11:41:20 +03:00
ysn
d5cdd12a38 0027678: Draw User's guide contains wrong example for for-loop
Signs have been restored in draw UG as per its DOC version.
2016-11-09 11:40:49 +03:00
kgv
3bae95c8a2 0028062: Samples - Shading model functionality does not work in mfc Viewer3d
Unsupported shading models have been removed from the sample dialog.
2016-11-09 11:38:32 +03:00
apn
17d16f7887 0027923: Environment variable INSTALL_DIR_LAYOUT is not documented
Added description of INSTALL_DIR_LAYOUT variable
2016-11-09 11:37:50 +03:00
szy
fa53efefc3 0027932: Improvement of standard attributes usability.
OCAF attributes TDataStd_AsciiString, TDataStd_Integer, TDataStd_Name, TDataStd_Real are extended by possibility to use custom GUID.

Now multiple attributes of any of these types can be placed at the same label using different user-defined GUIDs.
For this new "Set" methods were added into each attribute, which takes this custom GUID as an argument.
Other aspects of management of attributes on labels remain the same.

Version number of persistent OCAF documents is incremented.
However, the attributes are stored in the same way unless non-standard GUID is used for particular attribute.
Previously saved documents are fully supported, but the new documents with this extension used will be non-readable by the previous version of OCAF libraries.
2016-11-08 19:30:59 +03:00
kgv
9c86076b21 0028036: Visualization, AIS_ColoredShape - handle correctly nested compounds within Shaded display mode
AIS_ColoredShape::Compute() now parses nested compounds in two passes
to handle complex cases with compounds used for grouping styles.
2016-11-08 19:29:58 +03:00
msv
4af9e8a8b7 0028053: Regressions in HLR when FPE signals are enabled
Protect Contap_Contour from creation of null-length curves.
2016-11-08 19:29:56 +03:00
nbv
b070046674 0028054: Regression: Class BRepProj_Projection gives invalid result after projection edge based on the line on the conical surface
Problem of projection of line on the cone in the special case when starting point of the line coincides with the cone apex is fixed (by shifting this point along the source line).
2016-11-08 19:29:55 +03:00
kgv
2a8d1e7bcf 0028072: Samples - remove deprecated vector export from MFC sample 2016-11-08 18:59:10 +03:00
ski
71c089e99b 0028068: Samples - Add dimension functionality shows incorrect tip for an Edge in mfc Viewer3d
Warning message was updated to show actual information.
Additional checking of type of shape was added to prevent exceptions for Add Dimension functionality.
2016-11-08 18:57:42 +03:00
abv
2915f0b590 0028066: Samples - mfc ocaf sample could not read/save any document without environment variables
Persistence libs are loaded using DefineFormat() in OCAF sample
2016-11-08 18:52:26 +03:00
msv
e7b01db7c4 0028065: [Regression to 7.0] The method HLRAppli_ReflectLines::GetResult must be const 2016-11-08 18:50:50 +03:00
ski
a1565817f1 0028064: Samples - Raytracing does not work in Qt samples
QAction signal activated() was changed to signal triggered() to support Qt5.
2016-11-08 18:49:13 +03:00
kgv
0e5ef9264f 0028060: Samples - Objects in Geometry/Viewer2d have incorrect color
Broken custom presentations Sample2D_Text and ISession_Text
have been replaced by AIS_TextLabel.

ISession2D_Curve::Compute() - fixed defining the group without presentation aspects.
GeomSources - fixed assigning custom attributes.
2016-11-08 18:45:07 +03:00
msv
63dbfc04f8 0028059: Correction of upgrade guide for 7.1
Correction of upgrade guide for 7.1
// minor corrections
2016-11-08 18:43:33 +03:00
emv
c2bf27a6fb 0028050: Empty result of offset operation in mode complete join type intersection
1. BRepOffset_Inter3d::ConnexIntByInt
Create unique offset edge for each localized part shared between pair of faces of the input shape.

2. Test cases for the issue.
2016-11-08 18:08:01 +03:00
emv
ecf4f17cb8 0026917: 3D Offset algorithm produces incorrect result
Extension on the 3D Offset algorithm (Mode="Complete", Join Type = "Intersection")
for colliding cases to add support for new configurations of the shapes.
In the previous approach the result of the offset operation was build from
the offset faces using MakerVolume algorithm, without checking of the validity of these faces.
The new extension is based on this approach, but now the offset faces are being checked
on invalidity and rebuild in case of any. This allows (in case of successful rebuilding) to avoid creation
of the unforeseen parts such as dangling parts, spikes, inverted faces in the result of offset operation.
The main criteria for the validity of the faces is the coincidence of the normal
direction of the offset face with the normal direction of the original face.
Check for removal of invalid faces has been removed as obsolete.

BRepOffset_Inter2D: Avoid excess trimming of the edges due to coincidence with other edges.
BRepOffset_Inter3D: Careful treatment of the intersection of the faces connected only through vertices.

Eliminating the compiler warning.

Small corrections of test cases for issue CR26917
2016-11-08 18:05:05 +03:00
dbp
6e728f3b5c 0027974: Visualization, ray tracing - Improve ray tracing engine
* Multiple importance sampling for path tracing
* Improved light sources sampling (better handling several light sources)
* Fixed issues in light source intersection (light distance is taken into account)
* Add new TCL sample - OCCT Ball model for demonstrating physically-based materials
* Fix potential issue on NVIDIA GPUs ("Error: Failed to upload light source buffer")
* Path tracing materials reviewed; directional light source was smoother by default
2016-11-08 16:43:23 +03:00
msv
0d0481c787 0026738: Make Boolean operations safely treating arguments when running with fuzzy option
When fuzzy option is in force prevent increasing tolerance of input shapes. Instead pass increased by fuzzy value the tolerances of sub-shapes everywhere where it is needed by intersection algorithms.

The following changes in API have been made:

- The methods SetFuzzyValue and FuzzyValue have been moved from the classes BOPAlgo_ArgumentAnalyzer, BOPAlgo_Builder, and BOPAlgo_PaveFiller to the base class BOPAlgo_Algo.
- The public method BOPDS_DS::VerticesOnIn has been renamed to SubShapesOnIn, and the new output parameter theCommonPB has been added.
- In BOPTools_AlgoTools, a new argument "theFuzzyValue" has been added in the methods ComputeVV and AreFacesSameDomain.
- In IntTools_Context, a new argument "theFuzzyValue" has been added in the methods ComputeVE and ComputeVF.
- The methods SetFuzzyValue and FuzzyValue have been added in the classes IntTools_EdgeEdge, IntTools_FaceFace.
- In the class IntTools_EdgeFace, the methods SetTolE, SetTolF, TolE, TolF have been removed, and the methods SetFuzzyValue, FuzzyValue have been added.
- The new argument "theTol" has been added in the method IntTools_WLineTool::DecompositionOfWLine.

Some improvements in algorithms have been made during fighting with regressions:

- Correct initialization of pave blocks for degenerated edges.
- In BOPAlgo_PaveFiller::MakeBlocks(), filter out paves on intersection curve that were put on the curve accidentally due to wide range of E-F intersection vertex.
- In the method IntTools_Tools::ComputeTolerance the margin added to the computed tolerance has been increased up to 0.001%.
- The method BOPAlgo_PaveFiller::PutPaveOnCurve has been corrected in order to use the original vertex tolerance instead of the value increased during putting it on other curves.
- The new method BOPDS_PaveBlock::RemoveExtPave has been added.
- The vertex tolerance computation in BOPTools_AlgoTools::CorrectCurveOnSurface has been improved, taking into account intersection segments between p-curves (to avoid regression on "bugs modalg_6 bug22794").
- Improve IsExistingPaveBlock to make more stable catching of coincidence of common block with section curve (against regression "bugs modalg_4 bug697_2" on Linux).

Test case for the bug has been added.

The following test cases have been updated as improvements:
boolean gdml_private ZH2 ZI7 ZJ7
boolean volumemaker C4

The test case bugs/modalg_4/pro19653 has been corrected to make it stable. See comment inside the script for details.

The test case bugs/modalg_6/bug25880 has been corrected to suppress wrong bfuse commands.

The test bugs/modalg_6/bug26954_3 has been corrected to compare the result with more precise reference value.

The "faulty" TODO in boolean/volumemaker/A8 has been made actual for Linux as well.

//Eliminate compilation error on Linux.
2016-11-08 16:42:44 +03:00
ski
b2134621cc 0028027: Configuration - option BUILD_RESOURCES does not work on CMake 2.8
CMake command "string (APPEND ...)" was replaced by SET equivalent to support CMake 2.8
2016-11-08 15:15:25 +03:00
msv
a0ad45bf9a 0027802: [Regression to 7.0] Solid classifier raises exception ConstructionError
Test case has been created.
2016-11-08 15:15:24 +03:00
ski
997e128f88 0024788: Foundation Classes - remove Dico_Dictionary
Class Dico_Dictionary was replaced by NCollection_DataMap/NCollection_IndexedDataMap classes.
Changed argument name in template class NCollection_Datamap to eliminate redefinitions of static members in dependent code.
2016-11-08 15:15:22 +03:00
kgv
be70005cb5 0028039: Coding rules, TObj - pass file name by reference 2016-11-08 15:15:20 +03:00
azv
9c189bd8dc 0028028: Solid becomes invalid after scaling
The shape after scaling contains PCurves with incorrect parametrization, because of too large tolerance given.

1. Set Precision::PConfution() as a tolerance for GeomLib::SameRange.
2. Do not take into account tolerances of vertices while calculating tolerance of transformed PCurve for edge.
3. Test case bugs/modalg_6/bug28028
2016-11-08 15:15:18 +03:00
kgv
1475265b58 0028035: Visualization - V3d_Trihedron::compute() endlessly creates new graphic groups
V3d_Trihedron::compute() now reuses existing groups in the structure
and resets the flag myToCompute.
2016-11-08 15:15:16 +03:00
ifv
e841c38c71 0028030: Algorith GeomLib_CheckCurveOnSurface takes too much time for Bspline curves with big number of knots
Checking of number of knots is added. If number of knots more then allowed value, algorithm does not search distance between curves for each knot interval, but uses predefined sample point distribution.

This change was born in the scope of work on the issue 26329, but does not have direct connection to it. Therefore it has been postponed to be integrated later in its own context.

Test case for issue #28030
2016-11-08 15:15:14 +03:00
pdn
579f2938a8 0028034: Application Framework - stack overflow in LDOM destructor 2016-11-08 15:15:12 +03:00
nbv
f73c584ceb 0027896: Prm-Prm intersection algo returns wrong result if it is called with start intersection point, which lies in the domain boundary
Purger has been disabled (in IntPatch_PrmPrmIntersection algorithm) if some points have been added in the Walking line (it is stupidly, first, to insert some points in the line and, after that, to delete points from this line).

Some improvements in IntWalk_PWalking::SeekPointOnBoundary(...) method have been made (see comments in the code for detail information).

Some test cases have been adjusted according to their new behavior.
2016-11-08 15:15:11 +03:00
vpa
a3d4053c15 0027868: Visualization - AIS_InteractiveContext::Remove() might keep removed object in selection list
- AIS_InteractiveContext::unhighlightOwners is corrected to handle all objects in selection regardless of owner's selection state
2016-11-07 16:32:39 +03:00
apn
10c5aa00b0 Fixed compilation warnings on vc14 caused by CR27431_5 2016-11-03 18:04:54 +03:00
jgv
953d87f32c 0027386: BRepOffsetAPI_MakePipeShell does not provide history of generations
The method BRepOffsetAPI_MakePipeShell::Generated now returns generated shapes for sub-edges and sub-vertices of sections.

The method BRepFill_PipeShell::BuildHistory is redesigned: now it builds generated shapes for sub-edges and sub-vertices of sections.

New Draw command "gensweep" is added to sweep commands for testing of history building.
2016-11-03 18:04:33 +03:00
abk
681f3919f0 0027870: Modeling - refactoring of HLR algorithms
Toolkit 'TKHLR' was fully refactored for 'Standard_Address' and macros except about half of package 'HLRBREP' there 'Standard_Address' is used through the 'generic' mechanism.
2016-11-03 14:16:56 +03:00
ika
4a6d278356 0028014: PMIVis - some tolerances are attached to points out of the models
Fix a misprint.
2016-11-03 14:15:59 +03:00
osa
434ffc0909 0028031: Visualization, TKV3d - do not use height/width ratio of window during V3d_View::FitAll() 2016-11-03 14:15:57 +03:00
isk
62ef08dfc8 0028010: Visualization, Prs3d_Arrow - add Shading presentation builder
StdPrs_ToolCylinder, StdPrs_ToolDisk, StdPrs_ToolQuadric and StdPrs_ToolSphere
have been moved from StdPrs package to Prs3d.
2016-11-03 14:15:55 +03:00
vpa
d4507e82ba 0027008: Visualization - polygonal selection algorithm does not work with MeshVS_Mesh
- correct calculation of normals for SelectMgr_TriangularFrustum;
- test case for issue #27008
2016-11-03 14:15:53 +03:00
anv
bc9a61ec69 0028012: Exception while intersecting two surfaces
Test case for issue CR28012
2016-11-03 14:15:51 +03:00
msv
ff1541f179 0026673: BOPTools_AlgoTools::ComputeVV incorrectly checks two vertices for intersection
Test case has been created.
2016-11-03 14:15:49 +03:00
msv
8878d0ecce 0024932: addsweep does not check if the supplied variable contains a shape
Check for null shape has been added in the command addsweep implementation.

// eliminate warning

Test case for issue CR24932
Test case has been corrected.
2016-11-03 14:15:47 +03:00
vpa
f0cddd16eb 0027530: Visualization - AIS_InteractiveContext::HilightNextDetected() doesn't work in Neutral Point
- added implementation of mentioned methods for neutral point;
- sequence of detected objects was replaced by sequence of detected owner's indexes in AIS_InteractiveContext;
- commands vselnext and vselprev were corrected to update viewer properly;
- test case for issue #27530.
2016-11-03 14:15:45 +03:00
nbv
c9c7286e56 0028009: [Regression vs OCCT7.0.0] Cut produces not valid shape
The algorithm in WorkWithBoundaries::BoundaryEstimation(...) did not take into account opposite directions of cylindrical axes (when the angle between them is obtuse). After the fix it does it.

Small correction of test cases for issue CR28009
2016-11-03 14:15:43 +03:00
nbv
e2e0498b17 0027431: [Regression to 6.9.1] Huge tolerance obtained during intersection of cylinder and sphere
The root of the problem is incorrect processing of cases when intersection line goes through the apex(es) of sphere. The fix improves this situation. The algorithm is taken from DecomposeResult(...) function (see IntPatch_ImpPrmIntersection.cxx file). Before the fix, faltering steps were done to solve this problem. As result, it worked in some particular cases. Now, its possibilities have been extended significantly.

Following changes have been made in the fix:

1. Class IntPatch_ALineToWLine has been rewritten cardinally. It touches as interfaces of existing methods as adding/removing some methods/fields. Correction touches both cases: going through seam of Cone/Sphere and through pole(s) of sphere. Old interface did not allow making some actions with analytical line (ALine), e.g. splitting it on several Walking-lines (WLine).

2. Restriction-line support has been removed from Implicit-Implicit intersection result (see IntPatch_Intersection::GeomGeomPerfom(...) method). It connects with the fact that the intersection algorithm itself returns precise intersection line in analytical cases (in compare with parametric intersector). Therefore, we do not need in additional (restriction) line.

3. New class IntPatch_SpecialPoints has been added. This class contains methods to add some special points (such as apex of cone, pole of sphere, point on surface boundary etc.) in intersection line (IntPatch_PointLine). It is based on the static functions, which already exist in IntPatch_ImpPrmIntersection.cxx file (these functions have been moved to the new class).

4. Method IntPatch_WLineTool::ExtendTwoWlinesToEachOther(...) has been renamed to IntPatch_WLineTool::ExtendTwoWLines(...). It is connected with changing main idea of the method. Now it allows extending WLine to the surface boundary or to the singular point (if it is possible): cone apex, sphere pole etc. Interface of this method has been corrected, too. At that, old functionality (extending to each other) has been kept. For implementation of this algorithm, new enumeration "IntPatchWT_WLsConnectionType" has been created.

5. Method IntPatch_PointLine::CurvatureRadiusOfIntersLine(...) has been added. See IntPatch_PointLine.hxx for detail information. It allows correct step computing depended on the local curvature of the intersection line. This method uses geometrical properties of intersected surfaces to compute local curvature. Therefore, it can be applied in wide range of cases even if the intersection curve is not represented in explicit form (e.g. in case of param-param-intersection).

6. Method IntSurf::SetPeriod(...) has been created.

7. Additional check has been added in Draft_Modification::Perform() method for better choice of correct fragment of intersection line for processing DRAFT operation.

8. New overload method IntPatch_Point::SetValue() has been added.

9. Some refactoring of the code has been made.

Creation of test case for issue #27431.

---------------------------------------------------------------------------------------------
Some test cases have been adjusted according to their new behavior.

   tests\bugs\modalg_4\bug62
It is really IMPROVEMENT (but fortuitous).

   tests\bugs\modalg_5\bug25838
The behavior of this test has been reverted to the state before fixing the issue #27341. Main problem has not been fixed in #27341. It was fortuitous improvement.

    tests\bugs\moddata_2\bug565
Quality of intersection curve was not checked. And the curve is bad on both MASTER and FIX. Input data are really wrong: plane-like-cone. However, on the MASTER, four intersection curves (the quality is insignificant) are expected. On the fix, not empty intersection result is expected simply.

   tests\boolean\volumemaker\A8
Differences in images and CPU is expected. Difference in images is expected to be fixed in the issue #26020. Now, we should apply this behavior.
Much CPU time is spent by IntTools_FaceFace::ComputeTolReached3d(...) and GeomInt_IntSS::BuildPCurves(...) methods calling. These methods are not touched by the algorithm. It is the result of change of intersection curve(s) form. However, the new Curve(s) seems to be valid and can be applied. As result, new behavior can be applied, too.

   tests\boolean\volumemaker\F8
   tests\boolean\volumemaker\F9
   tests\boolean\volumemaker\G5
   tests\boolean\volumemaker\G6
CPU difference is expected. Much CPU time is spent by IntPatch_PointLine::CurvatureRadiusOfIntersLine(...) method calling. This method is really new (it does not exist on the MASTER) and is really useful. Therefore, we should apply new behavior.

   tests\boolean\volumemaker\G1
CPU difference is expected. Much CPU time is spent by IntTools_WLineTool::DecompositionOfWLine(...) and IntTools_FaceFace::ComputeTolReached3d(...) methods calling. These methods are not touched by the algorithm. It is the result of change of intersection curve(s) form. However, the new Curve(s) seems to be valid and can be applied. As result, new behavior can be applied, too.

   tests\bugs\modalg_6\bug26619
Differences in images is expected. The test keeps its BAD status on the FIX. But the result on the fix is nearer to expected than on the MASTER. Issue #27014 is still actual. As before, it is not clear, why the number of entities is different. The number of section curves has not been changed. Interfered entities are the same as on the MASTER.

   tests\bugs\modalg_5\bug25319_1(2)
The reason is described in the issue #27896.

Small correction in the test case
2016-11-03 14:15:41 +03:00
emv
416022a12f 0027441: The method IntTools_Context::IsVertexOnLine incorrectly computes parameter of the point on the curve
Choosing the closest bound to the checking point.
2016-11-03 14:15:39 +03:00
gka
320a322080 0026524: ShapeFix_Face crash when performing fix on an invalid face.
Check that method Context() returns not null handle was added.
2016-11-03 14:15:37 +03:00
ika
43d3f6d8d8 0027975: Data Exchange - Add possibility to connect DGTs to vertices.
Implement new function to find Product_Definition_Shape entity.
Modify Reader to add possibility of import DGTs, connected to some geometry items.
Update test cases.
2016-11-03 14:15:34 +03:00
kgv
4d19a2c5e7 0027991: Modeling Algorithms - BRepGProp_Face crashes on face without geometric surface
BRepGProps now ignores faces without geometric surface to avoid access violation.
BRepExtrema_DistShapeShape::DistanceMapMap() now skips comparison between void bounding boxes.
BRepBndLib::Add() now ignores useTriangulation flag for faces without geometric surfaces, and uses triangulation if any for updating of the box.
2016-10-28 17:26:51 +03:00
ski
ee5befae97 0027258: Configuration - generate built-in replacement for mandatory resource files
Generation of header files from resource files was added to CMake and genproj procedures.

Message_MsgFile has been extended with new method ::LoadFromString()
for loading messages from embedded resources.
Message_MsgFile::LoadFromString() is now a preferred way
for loading message resources by application
as alternative to environment variables.

TObje/TObj.msg is now embedded into TObj_Application.cxx.
TObj_Application now loads its global messages
on instantiation of the first class instance.

UnitsAPI/Lexi_Expr.dat now completely embedded into Units_Lexicon.cxx.
UnitsAPI/Units.dat now embedded into Units_UnitsDictionary.cxx
but can be regenerated from resource file.
The definition of the following units have been removed:
benne à charbon, calorie (diététique).

Unused message files XSMessage/IGES.us and IGES.fr have been removed.
Related code IGESData.cxx has been removed as well.

XSMessage/XSTEP.us is now embedded into Interface_StaticStandards.cxx
and used for fallback initialization in case when file resources
defined by CSF_XSMessage environment variable are missing.

SHMessage/SHAPE.us is now embedded into ShapeExtend.cxx
and used for fallback initialization in case when file resources
defined by CSF_XHMessage environment variable are missing.
Duplicating code has been removed from ShapeProcess_OperLibrary.cxx.

Shaders/Declarations.glsl and Shaders/DeclarationsImpl.glsl
are now embedded into OpenGl_ShaderProgram.cxx.
CSF_ShadersDirectory is no more required for using OCCT 3D Viewer.

Ray-Tracing GLSL programs from Shaders are now embedded into OpenGl_View_Raytrace.cxx.
File resources are still used instead of embedded programs
when CSF_ShadersDirectory is defined, but this functionality
is intended for OCCT development.

Enumeration Graphic3d_ShaderProgram::ShaderName_Phong
demonstrating custom GLSL program usage has been removed.
2016-10-28 14:30:28 +03:00
apn
30f5e1a74b Modify test case v3d/raytrace/bug25221 according to new draw commands. 2016-10-28 14:28:42 +03:00
apn
91764a8f6d 0025792: BRepAlgoAPI_Section fails depending on order of arguments
Added test case bugs/modalg_6/bug25792
2016-10-27 17:54:31 +03:00
emv
e2a37a80f6 0027244: Test case with workaround for issue 0027240
Test case for issue CR27404
2016-10-27 17:53:28 +03:00
gka
a965c45b2d 0027404: Data Exchange - access violation when reading STEP file
Added check on the null handle
Test case for issue CR27404
2016-10-27 17:50:59 +03:00
nds
ee905e847d 0027692: Visualization, AIS_AngleDimension - exterior angle and arrows visibility improvements
Extension of angle presentation to provide this functionality
2016-10-27 17:48:30 +03:00
emv
0391af0aa1 0028002: Invalid result of Boolean Fuse operation
The SolidClassifier algorithm does not take into account the internal parts of the solid and its faces.
But in some cases the parts which are internal on some shapes can be included in other shapes of
the same solid with FORWARD/REVERSED orientation and therefore should be counted as well.

The fix changes the procedure of the initialization of the tree of bounding boxes of the edges and
vertices of the solid in SolidExplorer algorithm to treat the internal/external parts of the solid correctly.
2016-10-27 17:43:43 +03:00
apn
964e27d91c 0027260: Incorrect result of General Fuse operation
Added test case bugs/modalg_6/bug27260
2016-10-27 17:42:37 +03:00
ski
d26375e22c 0027514: Configuration, CMake - relative paths are not correctly handled for INSTALL_DIR
Relative path can be used as INSTALL_DIR.
2016-10-27 17:41:37 +03:00
anv
dc6ae350f3 0027971: Intersection with degenerated conical surface is translated incorrectly
Added check for infinite surfaces.
2016-10-27 17:38:41 +03:00
kgv
15173be5c9 0027960: Configuration - fix compilation of OSD_Directory with MinGW-w64
Check _NATIVE_WCHAR_T_DEFINED only within _MSC_VER since it is msvc-specific.
2016-10-27 17:30:26 +03:00
duv
be86ba90c4 0025221: Visualization - Depth test errors in ray-tracing scene containing face outlines
Calculation of polygon offset for ray tracing has been changed.
Issues with wrong data in FBO depth buffer has been resolved.
2016-10-27 17:29:00 +03:00
msv
6b8f3bdc36 0025214: HLR fails to project edges
Avoid getting non-existing array items. Use reference to array items instead of pointers where it is possible.
Create test case. Before the fix this test raised exception in debug mode.
2016-10-27 17:27:26 +03:00
nbv
95f8c6082d 0027856: Regression vs 6.7.1: General Fuse operation fails to fuse the solids
Method WorkWithBoundaries::BoundaryEstimation(...) has been brought in balance with IsParallel(...) method, which checks if cylinder axes are parallel.
2016-10-27 17:26:00 +03:00
msv
dd6b34fda4 0027782: Hidden Line Removal algorithm fails to handle filleted edges
Create test case for the bug.
Minor correction in test case bugs/modalg_6/bug27782
2016-10-27 17:24:41 +03:00
ika
9bba178dce 0027570: Unacceptable performance during reading large STEP files
Improvement of translating assemblies from STEP.
2016-10-27 17:22:41 +03:00
kgv
1beb58d745 0027764: Visualization - add functionality for animation of 3D camera and interactive objects
Added classes AIS_Animation, AIS_AnimationCamera, AIS_AnimationObjectLocatio.

Draw Harness command vanimation has been modified to manage animation timeline.
Command vfit has been extended with option -noupdate.
Formatting of vviewparams command output has been improved.
Functionality of commands vlocreset, vlocmove, vloctranslate, vlocrotate,
vlocmirror, vlocscale has been merged into vlocation/vsetlocation.
vlocation now can print the current local transformation of the object.

v3d/ivtk test group does not call vfit anymore.

Fixed misprint in test cases bugs/vis/bug24623_3 and bug25532.
2016-10-27 17:21:02 +03:00
oan
f204ec4c37 0025264: Mesh very slow for Revol shape
Test case added
Small corrections of test case
2016-10-27 17:18:42 +03:00
ski
75378f50ea 0027339: CMake install should launch generation of overview documentation
Documentation is generated automatically during build/install process
Added check of minimum Doxygen version.
Install process causes generation of Overview documentation (unless already generated) by checking of occt_logo.png file existing.
Overview project regenerates documentation if any source file was changed.
2016-10-27 17:16:42 +03:00
emv
4945db69e5 0028001: Remove unused BOPCol_VectorOfInteger.hxx
Removing the remains of BOPCol_Array1, which was replaced with BOPCol_NCVector.
2016-10-27 17:14:19 +03:00
kgv
7bbccb5f4e 0027986: Visualization - AIS_InteractiveContext::SetLocation() does not update dynamic highlighting
AIS_InteractiveContext::SetLocation() - update HilightMode instead of DisplayMode.
PrsMgr_PresentationManager::UpdateHighlightTrsf() - fix accessing NULL presentation.
2016-10-27 17:11:33 +03:00
kgv
d94bed0e26 0027988: Visualization, AIS_InteractiveContext - fix inconsistent methods for setting highlight styles
Methods ::ChangeHighlightStyle() and ::ChangeSelectionStyle() have been
replaced by ::SetHighlightStyle() and ::SetSelectionStyle().
2016-10-27 17:09:31 +03:00
ika
0b622d670d 0027934: Data Exchange - implement STEP common labels
implement import/export
update test cases
2016-10-27 17:08:04 +03:00
emv
3f317e7d0c 0027984: Volume maker algorithm is unable to build all possible solids from the given faces
While checking the section edges between pair of faces on coincidence with the
existing edges use for checking only the edges from these two faces.

Test case for the issue.
2016-10-27 17:06:03 +03:00
vpa
871dcdc201 0027969: Visualization - add interfaces to access selecting volumes from SelectMgr_SelectingVolumeManager
- getter for selection frustum computed during last run of selection mechanism was added to SelectMgr_SelectingVolumeManager;
- getters for frustum planes were added to SelectMgr_BaseFrustum and its successors;
- an API for applications to get frustum planes was added to SelectBasics_SelectingVolumeManager.
2016-10-27 17:04:44 +03:00
emv
dd115e1227 0027987: CellsBuilder algorithm does not find shared common parts of the arguments
Treatment of the possibility of shared parts has been added.
2016-10-27 17:03:24 +03:00
nds
73ddbb9acc 0027688: Visualization, AIS_Dimension - add possibility to set custom text value
Implementation of custom text in dimension presentation;
Test case is provided for this bug;
Code correction: Standard_EXPORT is removed for inline method.
Minor correction of test case bugs/vis/bug27688
2016-10-27 17:02:18 +03:00
aka
b969ebe7cf 0027769: BRepOffsetAPI_MakePipeShell produces a face based on degenerated toroidal surface
method BuildKPart was modified in order to create sphere instead of torus in case of major radius <= tolerance
Minor corrections in test case bugs/modalg_6/bug27769
2016-10-27 16:59:49 +03:00
kgv
7c3ef2f752 0024393: Visualization - objects position with enchanced precision
Graphic3d_ZLayerSettings - public fields have been replaced by methods.
Added new property Origin defining local coordinate system for all Layer objects.

Syntax of Draw Harness command VZLayer has been redesigned.

Graphic3d_CStructure now stores bounding box with double precision floats.
OpenGl_BVHTreeSelector - frustum culling now works with double precision floats.
2016-10-21 11:12:13 +03:00
kgv
ebc369da1d 0027972: Visualization - remove unused and not implemented property V3d_View::EnableGLLight() 2016-10-21 11:12:11 +03:00
oan
df18769ea6 0027959: BRepMesh_Delaun produces mesh with gaps on internal edges
Check both sides of internal link for adjusted triangle and process left and right polygons separately
Small correction of test case for issue CR27959
2016-10-21 11:12:08 +03:00
isk
caf231b050 0024291: Visualization - move Z-buffer trihedron presentation from TKOpenGl to TKV3d
Not implemented method V3d_View::TriedronEcho() and enum Aspect_TypeOfTriedronEcho have been removed.
The following methods have been removed from Graphic3d_CView class:
TriedronDisplay(), TriedronErase(), ZBufferTriedronSetup(), TriedronEcho().
New class V3d_Trihedron has been added as replacement of removed OpenGl_Trihedron
which now uses Graphic3d_TMF_TriedronPers persistence.
2016-10-21 11:12:05 +03:00
kgv
2ec85268a1 0027957: Visualization, AIS_InteractiveContext - protect from displaying the same AIS_InteractiveObject within multiple contexts
AIS_InteractiveContext methods adding object to the context now throws Standard_ProgramError exception
if object has been already displayed in another context.
AIS_InteractiveContext::Remove() now NULLifies context assigned to the object.

AIS_InteractiveContext now inherits from Standard_Transient instead of deprecated MMgt_TShared
and defines C++ destructor instead of method Delete().

AIS_InteractiveObject - undocumented property State() has been removed.
Undocumented property Users() has been moved to AIS_IdenticRelation.

Draw Harness command vclose now clear AIS_InteractiveContext content
before nullifying it to ensure that objects have been properly removed.

AIS_MultipleConnectedInteractive now overrides method ::SetContext()
to assign context for children objects.
2016-10-21 11:12:03 +03:00
kgv
1be4179947 0027961: Visualization - remove unused and no more working OpenGl_AVIWriter 2016-10-21 11:12:00 +03:00
mpv
bf95447514 0027604: Application Framework - memory is not released after closing XBF file
Virtual method *BinLDrivers_DocumentRetrievalDriver::Clear* now allows to Clear a cash data accumulated during a reading.
So, in successor class BinDrivers_DocumentRetrievalDriver this allows clearing the BinMNaming_NamedShapeDriver set of stored shapes when it is not needed anymore.
2016-10-21 11:10:44 +03:00
kgv
c8c250a59d 0027963: Coding Rules - eliminate GCC compiler warnings -Wmissing-field-initializers in OSD_File.cxx 2016-10-14 14:24:36 +03:00
kgv
8b1441e374 0027945: Visualization - handle correctly view clipping planes within zoom-persistent objects
OpenGl_Structure::Render() and SelectMgr_ViewerSelector::checkOverlap()
now clip entire zoom/rotate persistence object
by checking anchor point with global clipping planes.

Image dump has been added to the new test case.
2016-10-13 14:01:37 +03:00
kgv
a8122531ce 0027953: Foundation Classes - eliminate global variables from OSD_Path 2016-10-13 14:00:06 +03:00
kgv
922da0a825 0027931: Coding rules, Precision.hxx - eliminate dead code within PRECISION_OBSOLETE macros 2016-10-13 13:57:56 +03:00
kgv
5f4bd4d4d2 0027943: Visualization - fix broken shading by positional light for object with local transformation
OpenGl_ShaderManager, per-vertex shading and per-fragment shading
- do not apply model-world matrix on the light sources
which are expected to be defined in world-space.
2016-10-13 13:56:39 +03:00
kgv
bd6a845441 0027952: Visualization - do not reset RayTracing state on changing structures not in main Z-Layer 2016-10-13 13:55:35 +03:00
anv
bbbca107a2 0027824: Parasolid XMT file generates weird geometry after conversion
Fixed adapter for C0 offsets
2016-10-13 13:52:56 +03:00
nbv
d07a6c39cf 0027930: XMT file conversion loops infinitely
Now, the algorithm tries to estimate U- and V-ranges of future intersection curve(s) on the surface. This information is used in stop-criterium of the algorithm instead of full surface range used earlier. It allows reducing dependencies of intersection result on the surface ranges.
Tuning of test case bugs/modalg_6/bug27937_1
2016-10-13 13:49:02 +03:00
aml
d1d68ce714 0027946: Out of range item access in offset algorithm
Out of range access has been eliminated.
2016-10-13 13:46:39 +03:00
vro
c4a2f61e57 0027619: Improvement on manuipulation of data by TPrsStd_AISPresentation attribute.
The branch contains a fix on Undo/Redo for TPrsStd_AISPresentation attribute + an opportunity to deselect the interactive object.
getData() now calls FindAttribute(), the field myData disappeared.
A fix of regression on bug73_3.
A cleverer solution.
2016-10-13 13:45:25 +03:00
kgv
0f5ea4b5f8 0027941: Foundation Classes - NCollection_Vector::Iterator::offsetV() does not match NCollection_Vector::end() 2016-10-13 13:43:07 +03:00
kgv
b88b0cf7fc 0027944: Visualization, V3d_View - filter duplicates within ::AddClipPlane() 2016-10-13 13:41:36 +03:00
ski
3c1624950a 0027915: Foundation Classes - remove the class NCollection_QuickSort
Class NCollection_QuickSort was removed.
Direction of dimension lines was corrected.
Updated porting notes.
minor corrections in AIS
2016-10-13 13:40:36 +03:00
nbv
4e283d3379 0027895: Correction in the constructor Extrema_ExtElC::Extrema_ExtElC (const gp_Lin&,const gp_Lin&,const Standard_Real)
Computation algorithm is made more simple.
Adjusting some test cases according to their new behavior.
2016-10-07 13:37:35 +03:00
nbv
e146ef9a93 0026894: Intersection algorithm between two infinite cylinders is hanging
1. VRange of intersection curve has been limited. As result, too oblong intersection curve(s) will be never returned.
2. Now, purger algorithm is not called for lines obtained by Geom-Geom intersection method.
3. New statuses are entered in IntPatch_ImpImpIntersection class. It makes intersection algorithm more informative and flexible for using.
4. Method IntPatch_ImpImpIntersection::GetStatus() has been created.

Tuning of test case bugs modalg_6/bug26894
2016-10-07 13:37:33 +03:00
nbv
d30895f5da 0023178: Intersection of cylinders fails to produce results
1. Unification of trimmed and not-trimmed cylinders processing (IntPatch_Intersection::GeomGeomPerfomTrimSurf() method has been removed).
2. Interface of IntPatch_ImpImpIntersection::Perform(...) method has been changed.
3. Now, WLine purging is forbidden for Geom-Geom-Intersection.
4. Bnd_Range class has been created. See Bnd_Range.hxx for detail information.
5. Algorithm of AddBoundaryPoint function has been improved in order to obtain intersection points in both boundaries (VFirst and VLast of every surface).
6. Earlier, method Geom2dConvert::ConcatG1(...) increased resulted B-spline degree (in case of not succession of previous iteration). Now increased value has been limited by Geom2d_BSplineCurve::MaxDegree() value (max degree = 25).
7. Algorithm of B-spline closure definition has been changed in the methods Geom2dConvert::C0BSplineToC1BSplineCurve(...) and Geom2dConvert::C0BSplineToArrayOfC1BSplineCurve(...).

Creation of test case for this issue.
Adjusting test cases according to their new behavior.

Small correction in the code according to KGV's remark.
2016-10-07 13:37:31 +03:00
apn
fe4fc02d7b 0027864: Add vtk support to products java wrapper
Fix redefinition IVtkVTK_EXPORT error during wrapping in products java sample.
Removed defined(__WIN32__)
2016-10-06 12:36:21 +03:00
ski
90b858262b 0027905: Visualization - randomly directed arrows on test v3d mesh B7
Behaviour of command meshvectors is stable now.
It shows default vector (0,0,1) for volume entity.
Test cases for issue CR27905
2016-10-06 12:31:34 +03:00
nbv
95ae6ebb1b 0027929: Methods D0 and D1 for trimmed offset surface return different values if the surface has osculating surface
Using osculating surface is forbidden if the normal to basis (for offset) surface is well defined.

Creation of test case for this issue.
Adjusting test cases according to their new behavior.
2016-10-06 12:27:40 +03:00
nbv
41ce5887ad 0027892: Construction error in offset
Provide proper initialization of the field Geom_OffsetSurface::myOscSurf in the case of creating offset of the trimmed bspline surface.

Adjusting test cases according to their new behavior.
2016-10-06 12:26:21 +03:00
kgv
88e55ec7ef 0024073: Coding rules - ambiguous call to overloaded function StdPrs_DeflectionCurve::Match()
Default parameters values have been removed from the methods
StdPrs_DeflectionCurve::Match() to avoid ambiguity.
2016-10-06 12:21:18 +03:00
dbp
d877e61038 0027899: Visualization, Ray Tracing - Provide ability to rebuild GLSL shaders on the fly
For debugging and performance analysis it is reasonable to provide the ability to rebuild ray tracing shaders on the fly.
In this way, it will be possible to analyze the impact of different shaders modifications
without re-launching and re-configuring the scene.
This functionality can be used in the following way:
> vrenderparams -rebuild
2016-10-06 12:19:06 +03:00
kgv
ede89abcb9 0027916: Visualization - access violation occurs within AIS_ColoredShape::Compute() for NULL shape
AIS_ColoredShape::Compute() - add NULL shape check.
AIS presentations - removed redundant clearance within ::Compute()
which is always done in advance within PrsMgr_PresentationManager::Update().
2016-10-06 12:16:28 +03:00
kgv
b2bafb33a9 0027883: Visualization - AIS_InteractiveContext::IsDisplayed() does not return displayed state for specified Display Mode 2016-09-30 11:19:19 +03:00
isn
ece3f95012 0027890: BndLib_Add2dCurve::Add(..) works incorrect on some curves
Draw Harness command 'gbounding' has been extended
to pass curve2d as args and to work in two modes ('normal' and optimal).
2016-09-30 11:17:21 +03:00
msv
c58b30780a 0027888: Fuse of valid untouched solids leads to result with faulties
Incorrect result of classification of a point relatively a solid leads to faulty interferences between vertices/edges of one solid with another one.  Classification has been corrected by checking if an auxiliary point in face coincides with the face boundary in 3D space.

Test case has been created.
2016-09-30 11:17:20 +03:00
abv
c381fda2d6 0027713: Test bugs fclasses bug6143 is not OK for Linux after restoring FPS (26329)
Use standard (POSIX-compliant) macro "__linux__" for identification of Linux system, instead of obsolete "linux"
2016-09-30 11:17:19 +03:00
ifv
f4dee9bb20 0026329: Restore floating point signals handling in DRAW
Added DRAW command dsetsignal, resetting OSD signal handler with either armed or disabled FPE handler, according to an option.
If called without arguments, it sets FPE handler only if environment variable OSD_FPE is defined (with value different from 0).
On start, DRAW calls dsetsignal to set FPE signal if CSF_FPE is defined.
Test bugs fclasses bug6143 uses dsetsignal to set FPE handler unconditionally before the test command, and resets it to default at the end.

A number of changes in the code have been done in order to fix floating point exceptions that became generated after enabling signals:

- Global functions Sinh() and Cosh() defined in Standard_Real.hxx are improved to raise Standard_NumericError exception if argument is too big (greater than 710.47586), instead of relying on system treatment of floating point overflow. These functions are used instead of sinh and cosh in ElCLib.cxx.

- Maximal value of parameter on hyperbola is restricted by 23 (corresponding to ~1e10 in 3d) in order to avoid FP overflow in Extrema_GenExtCS.cxx, ShapeFix_EdgeProjAux.cxx.

- Interface of the root curve adaptor class Adaptor3d_Curve has been updated to add new virtual methods BasisCurve and OffsetValue. They complement the adaptor for the case of offset curves. These methods are used in Extrema_GenExtCS.cxx to restrict domain search in the case of offset of hyperbola, in order to get rid of floating point overflow. All classes inheriting Adaptor3d_Curve have been changed to implement the new virtual methods.

- Protection against division by zero has been implemented in ApproxInt_KnotTools.cxx, BRepClass3d_SClassifier.cxx, BRepGProp_Face.cxx, BRepMesh_FastDiscretFace.cxx, Geom2dGcc_Circ2d2TanOnIter.cxx, Geom2dInt_Geom2dCurveTool.cxx, IntPolyh_MaillageAffinage.cxx.

- Protection against calling of math functions of infinite arguments has been added in BRepCheck_Edge.cxx, BRepLib.cxx, CSLib_NormalPolyDef.cxx, Extrema_FuncExtPC.gxx, Extrema_GExtPC.gxx, Extrema_GLocateExtPC.gxx, Intf_InterferencePolygonPolyhedron.gxx, ShapeAnalysis_Surface.cxx, ShapeAnalysis_TransferParametersProj.cxx, ShapeAnalysis_Wire.cxx, math_FunctionSetRoot.cxx.

- Proper initialization of local variables is done in BOPAlgo_PaveFiller_6.cxx, XSDRAWSTLVRML.cxx.

- Inconsistent usage of Standard_Boolean* to access integer data in HLR (caused by #27772) is corrected

Some test cases have been updated to actual state.
2016-09-30 11:17:17 +03:00
abv
73594f7248 0027901: Resource_Manager creates directory with insufficient permissions
Resource_Manager now sets RWXD permissions for the created directories to allow their removal.
Method OSD_Directory::Build() will create intermediate directories if they do not exist yet.
OSD_FileNode is corrected to clean error status in method Exists().

Tests bugs fclasses bug181_1 and bug181_2 are corrected to check existence of generated resource files; TODO is removed in bug181_2.
2016-09-30 11:17:16 +03:00
abv
3a5a656c15 0027794: A danger in the 'NCollection_Vector' initializing constructor
Constructor of NCollection_Vector is now declared as explicit.
2016-09-30 11:17:15 +03:00
vpa
0d5880e11a 0027893: Visualization - AIS_InteractiveContext::SetSelected does not work
- misprint in check of global selection existence in AIS_InteractiveContext::SetSelected was corrected;
- remaining occurrencies of hard-coded 0 selection mode were corrected to use global selection mode;
- test case for issue #27983
2016-09-30 11:17:13 +03:00
kgv
949c9b7f28 0027891: Visualization - FPE due to use of DBL_MAX in SelectMgr_SelectingVolumeManager::DetectedPoint() 2016-09-30 11:17:12 +03:00
vpa
8e5fb5eabc 0027818: Visualization - provide an interface to define highlight presentation properties
- introduces a wrapper for setting up highlight properties: Graphic3d_HighlightStyle;
- API of all methods that use highlight or selection color is changed to deal with Graphic3d_HighlightStyle;
- highlight in shading mode now supports transparency, implemented via blending;
- transparency for selection can also be set, but implementing custom entity owners with additional presentation on application level;
- methods PrsMgr_PresentationManager::Highlight, PrsMgr_PresentationManager::BoundBox that highlight object with hard-coded color are removed;
- deprecated methods of SelectMgr_EntityOwner, that use presentation manager's highlight method, were removed;
- methods of IsHilighted AIS context with selection color checks were replaced;
- added API to store dynamic and selection highlight to Prs3d_Drawer class;
- customization of dynamic and selection highlight for particular objects is now available through SelectMgr_SelectableObject::HilightAttributes();
- AIS_InteractiveContext highlight methods were updated to support individual highlight styles of interactive objects;
- introduced new command - vselprops, that allows to customize global selection and highlight properties like autoactivation, pixel tolerance and colors;
- Draw Harness commands vautoactivatesel and vselprecision were removed, use vselprops instead;
- fixed bug in command's parser;
- test case for issue #27818
2016-09-30 11:17:11 +03:00
dbp
3a9b5dc86a 0027607: Visualization - Implement adaptive screen space sampling in path tracing
This commit provides useful functionality for path tracing rendering core.

1) Graphic3d_RenderingParams class was extended with additional AdaptiveScreenSampling option (disabled by default).
   If this option is enabled, path tracing tries to adjust the number of samples for different screen areas.

   In this way, the more complex areas (from the point of light conditions) are sampled more intensively,
   while the simple areas are sampled very rarely.
   For example, caustics and glossy reflections are typical candidates for more precise sampling.

   In general, this allows to equalize image convergence and not to waste resources for already converged areas.
   It is also possible to visualize sampling densities by enabling ShowSamplingTiles option
   (activating and deactivating this option does not affect on the accumulated image).

2) Mixing OpenGL and ray-tracing output has been changed.
   Now blending is performed using OpenGL functionality, while ray-tracing shaders only output correct Z-value.

Test case bugs vis bug27083 has been updated,
since the alpha value is now correctly set by Ray-Tracing to 1, opaque.
2016-09-30 11:17:10 +03:00
kgv
6a24c6ded9 0027900: Coding rules - drop redundant Name parameter from V3d_Viewer constructor
Removed unused methods AIS_InteractiveContext::DomainOfMainViewer(),
V3d_Viewer::NextName(), V3d_Viewer::Domain().

NCollection_List - added methods Contains() and Remove() taking item value.
V3d_Viewer now uses V3d_ListOfLight, V3d_ListOfView instead of V3d_ListOfTransient.

Removed obsolete ZFit workaround from command XShow.
2016-09-30 11:16:53 +03:00
kgv
1f7f5a900f 0025180: Visualization - Homogeneous transformation API in TKV3d
PrsMgr_PresentableObject, Graphic3d_Structure now consistently
take and store Handle(Geom_Transformation) instead of
TColStd_Array2OfReal / Graphic3d_Mat4.
Low-level advanced methods have been modified to pass Handle(Geom_Transformation).
High-level methods have been preserved accepting old syntax taking gp_Trsf.

Geom_Transformation now inlines most methods.
2016-09-30 09:43:26 +03:00
kgv
778cd66786 0027860: Visualization - clean up Transformation Persistence API
Graphic3d_Camera::TransformMatrices redundant NCollection_Handle usage
has been replaced with validity flags.

Graphic3d_TransModeFlags now defined as enumeration, not integer bit flags.
Graphic3d_TMF_PanPers and Graphic3d_TMF_FullPers have been removed.
Graphic3d_TMF_ZoomRotatePers has been introduced.

Graphic3d_TransformPers is now inherits Standard_Transient.
Graphic3d_TransformPers now defines dedicated constructors
for 3D persistence (zoom / rotate) and 2D persistence (2d / trihedron).
2D persistence now supports dedicated values for X and Y offsets.
The corner is now specified by enumeration Aspect_TypeOfTriedronPosition
instead of indirect interpretation of anchor point values.
Fixed handling of Graphic3d_TMF_ZoomRotatePers (combination of Graphic3d_TMF_RotatePers + Graphic3d_TMF_ZoomPers).

PrsMgr_PresentableObject, Graphic3d_CStructure now hold
Handle(Graphic3d_TransformPers) instead of a value.
Method ::SetTransformPersistence(), ::TransformPersistence()
now works with Handle(Graphic3d_TransformPers).
Old methods have been marked deprecated.
2016-09-30 09:43:12 +03:00
aml
27ba9c6006 0027696: Return max distance in xdistcs Draw command
Message about maximal distance is added for xdistcs command.
2016-09-30 09:15:32 +03:00
nbv
e8e26df06c 0027873: Exception is raised in BRepFill_Filling::FindExtremitiesOfHoles()
The reason of exception has been eliminated.
Creation of the test case for this issue.
Correction of unstable test case.

Some test cases have been adjusted according to their new behavior.
2016-09-23 09:57:52 +03:00
kgv
14cb22a1a4 0027879: Draw Harness, ViewerTest - disable VSync within non-interactive mode 2016-09-23 09:57:51 +03:00
jgv
8d795b5130 0027720: HLRBrep_Algo BSpline missing edges
The algorithm that builds outlines ("silhouettes") makes an outline in 2d parametric space of the surface starting from some previously detected point where normal is orthogonal to direction of view. So, the surface is previously discretized into (m*n) sample points and some of them become starting points for future outlines.

    If the surface has non-uniform parametrization and/or some local extremums of curvature, the outlines can not be built without breaks, so there are several groups of consequent outlines in this case. Unfortunately, it leads to the situation when current number of sample points becomes insufficient to build all the parts of outlines.

    The idea is to detect the "holes" between already constructed parts of outlines and then complete the construction.

New auxiliary draw command for testing of HLR.

Correction according to the remarks.

Update of test case according to the developer's directive
2016-09-23 09:57:50 +03:00
bugmaster
b1c5466550 0006768: Problems making offset wires
Adding testing case
2016-09-23 09:57:48 +03:00
kgv
e620e2857f 0027880: Samples - fix handling of Unicode paths within MFC import/export sample 2016-09-23 09:57:47 +03:00
bugmaster
b357dcc225 0014531: Boolean Operation Algorithm fails
Adding test case
2016-09-23 09:57:46 +03:00
nbv
84bd25527c 0027875: GeomFill_NSections constructor crash on sequence of curve containing only one curve
The GeomFill_NSections algorithm cannot create any surface from sequence with single curve only.

Therefore, return is provided in corresponding place of the code. Additionally, some public methods of GeomFill_NSections class checks if the surface has been created earlier.

Test case for this issue has been created.

Compiler error has been eliminated.
2016-09-22 12:27:14 +03:00
jgv
5da005403b 0027822: Exception access violation is raised in BRepOffsetAPI_MakePipeShell during of build
New public method IsDone() is added to abstract class BRepFill_SectionLaw.

Test case bugs/modlag_6/bug27822 has been added
2016-09-22 12:26:07 +03:00
bugmaster
aea33d0ab8 0010234: BRepOffsetAPI_MakePipeShell fails on spine built from two segments and profile built from arc
Adding testing case
2016-09-22 12:19:45 +03:00
rkv
a2f76b15f1 0027567: VIS - possible memory leaks due to use of plain pointers: Fix also the VIS guide. Add the test v3d/ivtk/bug27567. Add a draw command "ivtkremove".
0027734: Configuration - TKIVtkDraw build fails with TBB: Remove unnecessary define statement (windows specific).

Small correction of test case for issue CR27567
2016-09-22 12:14:30 +03:00
kgv
fb0b05319f 0027838: Foundation Classes - support wchar_t* input within TCollection_AsciiString and TCollection_ExtendedString
TCollection_ExtendedString/TCollection_AsciiString description
has been updated to reflect usage of this classes for Unicode strings.

TCollection_ExtendedString now defines constructor taking wchar_t* (all platforms)
and method ::ToWideString() returning wchar_t* (Windows only).
TCollection_AsciiString now defines constructor taking wchar_t*.

TCollection_ExtendedString/TCollection_AsciiString now defines
auxiliary methods ::StartsWith() and ::EndsWith().

TCollection_ExtendedString internals has been updated to eliminate
duplicated code for converting between UTF-16 and UTF-8.

Code has been cleaned up from redundant explicit conversions to wchar_t*.
Global method OSD_OpenStream()/OSD_OpenFileBuf() have been replaced
by C++ template to eliminate copy-paste for different STL collections.

OSD_SharedLibrary now uses wide-char system API call LoadLibraryExW()
on Windows for consistency.

New macro Standard_UNUSED has been added for marking possibly unused functions and variables
(to suppress gcc/clang compiler warnings).
2016-09-15 12:33:55 +03:00
ika
935069d23d 0027808: Some geometric_tolerances are not imported.
Process datum_feature entity during collecting shape_aspects of GDT.
Update test cases.
2016-09-15 12:22:16 +03:00
msv
14ea8abd0a 0027830: Infinite HLR looping
Make protection of HLR algo against garbage data in faces. In particular case, there are faces built on a periodical surfaces, which U bounds exceed period thousands times. Such faces are excluded from the process of edges hiding.

In addition, while fitting the intersection point in period for periodical faces, replace looping with the single call to AdjustPeriodic method.

- Add new test case.
- Update tests of HLR according to new numbers of subshapes.

Update of test cases according to the new behavior
2016-09-15 12:19:52 +03:00
Sergey Solomin
4aaadad7bc 0027867: Visualization - AIS_InteractiveContext::HasSelectedShape() returns true if selected interactive is instance of AIS_Shape only 2016-09-15 12:16:18 +03:00
kgv
49e5d23824 0027861: Configuration - include ApplicationFramework to UWP list 2016-09-15 12:14:31 +03:00
bugmaster
46f4a251a0 0022037: Exception (Construction Error) during splitting face with hole by another face
Adding test case
2016-09-15 12:13:18 +03:00
bugmaster
d0aafb064b 0025138: SIGSEGV when sweeping along helix
Adding test case
2016-09-15 12:11:58 +03:00
kgv
3202bf1e9e 0027816: Visualization - provide an API for overriding clipping planes list
Graphic3d_SequenceOfHClipPlane now inherits Standard_Transient.
PrsMgr_PresentableObject, Graphic3d_Structure, Graphic3d_CStructure,
V3d_View, OpenGl_View now manages the plane list by Handle.
The getters ::GetClipPlanes() has been removed,
setters taking non-handle ::SetClipPlanes() has been marked deprecated.

OpenGl_Structure::Render() and SelectMgr_ViewerSelector::checkOverlap()
now disable global (view) clipping planes for objects
with flags Graphic3d_TMF_TriedronPers and Graphic3d_TMF_2d
or with new flag Graphic3d_SequenceOfHClipPlane::ToOverrideGlobal().

OpenGl_Clipping now implements interface for managing clipping planes
without copying the sequences.
The filtering of duplicates is no more performed by OpenGl_Clipping
- application is responsible to not do this.
OpenGl_Clipping tries avoiding unnecessary allocations for managing
list of active planes.

MFC sample has been updated to use V3d_View::ClipPlanes() method.
2016-09-15 12:09:20 +03:00
msv
ef444297f5 0027862: Exception in BRepOffsetAPI_MakePipeShell
Check if the shape is not null before querying its ShapeType.
Create test case for the bug.

Small correction of test case for issue CR27862
2016-09-15 12:04:32 +03:00
kgv
4897e58dcd 0027854: Foundation Classes - OSD_Parallel::NbLogicalProcessors() should handle Android specifically
Read CPU info from sysfs.
2016-09-15 11:55:53 +03:00
kgv
70ca46fecc 0027844: Foundation Classes - remove method OSD_File::Print() 2016-09-15 11:53:32 +03:00
kgv
d2edda76a9 0027853: Visualization, OpenGl_Texture - optimize sequential upload of texture image
Graphic3d_TextureRoot - added methods Revision() and UpdateRevision()
for marking updates in texture data source.
OpenGl_AspectFace handles Graphic3d_TextureRoot::Revision() changes.
OpenGl_Texture::Init() now patches already allocated texture image when possible.

Graphic3d_Texture2D - added methods HasMipMaps()/SetMipMaps()
for configuring MipMap usage (as alternative to sub-classing).
2016-09-15 11:50:32 +03:00
nbv
c204d492ae 0027851: Wrong result of classification of the point relative to the solid
Test case creation.
2016-09-15 11:38:53 +03:00
razmyslovich
a165f00280 0027863: Geom_BSplineSurface::SetVKnot(const Standard_Integer, const Standard_Real) has no effect
Fix Geom_BSplineSurface::SetVKnot function to have the same behavior as SetUKnot.
2016-09-15 11:36:45 +03:00
apl
099f351396 0027739: Visualization, TKV3d - implement individual acceleration data structure for selection of 2D persistent objects
Low-level selection algorithms has been improved to explicitly support 2D
transformation persistent objects. This patch generally touches:

1) SelectMgr_SelectableObjectSet - the lists of objects has been split onto three
subsets (regular, 3d-persistent, 2d-persistent). Each subset has individual BVH
tree. The algorithms are now have more flexibility to update only those trees
that is really required for actual camera state.

2) SelectMgr_ViewerSelector - explicitly supports Eye space selection operations
on BVH tree for 2d-persistent subset. Change of camera position does not
anymore affect acceleration data structure (BVH tree) of 2d-persistent selectable objects.

3) Other classes from SelectMgr have been fine-tuned to provide appropriate API.

Porting notes:

This patch touches very low-level selection classes. If the low-level features were used
the following modifications may need to be considered for porting:

1) Iteration over objects of SelectMgr_SelectableObjectSet should now
be implemented with corresponding Iterator class.

2) SelectMgr_BaseFrustum::ScaleAndTransform and derived classes return
Handle(SelectMgr_BaseFrustum) instead of NCollection_Handle<> type.

Small correction of test case for issue CR27739
2016-09-15 11:35:10 +03:00
ika
c10703215e 0027313: Exception during WriteStep with PMI
Add check for datum position during export of datum_system
Add Draw commands for set/get datum position
update test cases

Correction of case bugs/step/bug27313
2016-09-15 11:30:46 +03:00
bugmaster
7b3aef359f 0025423: Incorrect result of splitting some shapes
Adding testing case
2016-09-15 11:20:16 +03:00
bugmaster
15b9dfc95d 0022609: Cut operation between two solids produces not valid shape
Adding test case
2016-09-15 11:18:16 +03:00
bugmaster
849c137461 0022454: Export /Import of valid model leads to lost of tolerances
Adding testing case
2016-09-15 11:16:18 +03:00
nbv
5c7744eaef 0027842: Exception in intersection algorithm if FPE is switched on
1. The reason of exception has been eliminated.
2. Interfaces of DistanceMinimizeByGradient and DistanceMinimizeByExtrema methods of IntWalk_PWalking class has been changed.

Creation of test case for this issue.

TODO has been added with reference to the issue #26329
2016-09-08 11:44:49 +03:00
kgv
71d8ccc753 0027836: Visualization, TKOpenGl - gradient background is lost at some camera positions
OpenGl_View::ZLayerBoundingBox() now adds screen background plane for proper Z-fit.

Graphic3d_TransformPers::Compute() - projection matrix has been excluded
from the math to eliminate floating point computation error.
2016-09-08 11:43:01 +03:00
ski
1ae83f5727 0027827: Samples - fix compilation errors in XAML (UWP) sample.
Error about deployment target version was fixed.
Check of export to VRML format was added to sample XAML (UWP).

Add freetype.dll to the sample project for correct execution of sample from Visual Studio.
2016-09-08 11:41:35 +03:00
bugmaster
6b5b9abf8b 0025152: Incorrect result of Boolean Union by BRepAlgoAPI_Fuse
Adding testing case
2016-09-08 11:32:43 +03:00
bugmaster
7f3bf449a9 0025102: A part of intersection cannot be found
Adding testing case
2016-09-08 11:30:31 +03:00
emv
c45fefa76e 0027222: Empty result of making volume operation
1. BOPAlgo_MakerVolume - Taking into account the possibility of Same Domain faces
   while collecting the faces for building the solids;
2. BOPDS_DS - Making the check on coincidence of edges consistent with the intersection
   algorithm which also adds the Precision::Confusion() to the intersection tolerance;
3. Test case for the issue.
4. Adjusting test cases (improvements) to their new behavior.
2016-09-08 11:28:14 +03:00
kgv
02974a19c6 0027805: Visualization - AIS_InteractiveContext::FitSelected() is broken for global selection
AIS_Selection class has been cleaned up:
- SelectMgr_EntityOwner is now used in interface instead of Standard_Transient.
- Method ::Select() has been renamed to ::Clear() for clarity.
- Dropped unused class fields.
- Owners without Selectable are not added to the list (should never happen).

SelectMgr_SelectableObject::BndBoxOfSelected() has been modified
to properly compute bounding box of ALL selection Entities
for specified Owner (only first Entity has been used before the patch).

Methods of AIS_InteractiveContext::DisplaySelected(), ::SetSelectedAspect(),
::FitSelected(), ::SubIntensityOff() have been fixed (wrong DownCast).
AIS_InteractiveContext::AddSelect() now handles properly AIS_InteractiveObject as argument.
2016-09-08 11:24:28 +03:00
msv
3065019c99 0027804: Two breps cause intersections to loop for too long/infinitely
In ProjLib_ComputeApprox algorithm, compute correct parametric tolerance from the input 3D tolerance using surface resolution, in order to pass it to low-level 2D algorithm Approx_FitAndDivide2d (instantiation of the generic class Approx_ComputeCLine). Earlier 3D tolerance was used as parametric tolerance directly, which was a problem for surfaces with too small radius of curvature.

Also, eliminate redundant creation of the object of type AppParCurves_MultiCurve on each iteration in the method Approx_ComputeCLine::Compute.

The post treatment of the Edge/Edge intersections has been improved. Namely:
a. Making the procedure of sharing Edge/Edge intersection vertices consistent with intersection algorithm by enlarging bounding box of each vertex on half of Precision::Confusion();
b. Algorithm of computation of vertex tolerance (in order to cover tangent zone between Edges) has been changed for Line/Circle cases.

Test cases for issue CR27804
Adjusting test cases according to their new behavior.

Mark the test boolean/volumemaker/A8 as unstable between different versions of MSVS (2010 and 2013).
2016-09-08 11:22:40 +03:00
emv
84caaf81a0 0027759: Invalid result of a Boolean fuse operation
Test case for the issue.
2016-09-08 11:13:56 +03:00
bugmaster
4e785ab59b 0025055: Incorrect shape copying in BRepBuilderAPI_Copy
Adding testing case
2016-09-08 11:09:27 +03:00
mpv
1f9fb70723 0025534: TObj_Application unicode path issue. 2016-09-08 11:07:11 +03:00
kgv
f1fb0901d6 0027835: Application Framework, BinXCAF - handle correctly faces with NULL surface within BinTools_ShapeSet
BinTools_ShapeSet::AddGeometry() now writes NULL surface with 0 index.
myWithTriangles is ignored for TopoDS_Face with NULL surface so that
triangulation-only faces are not lost with defaults.

Added Draw Harness command StoreTriangulation defining
WithTriangulation flag for BinXCAF/BinOcaf storage drivers.
2016-09-08 11:04:51 +03:00
san
e5d7e24960 0027815: Visualization, TKV3d - AIS_InteractiveContext has inconsistent display mode API 2016-09-08 11:01:42 +03:00
kgv
aa75c0cf9d 0027834: Visualization, SelectMgr_ViewerSelector - iteration through detected Entities should be sorted
SelectMgr_SortCriterion now stores detected SensitiveEntity and 3D point.
SelectMgr_ToleranceMap class definition has been moved out to dedicated file (from SelectMgr_ViewerSelector).

SelectMgr_ViewerSelector - the methods implementing class-as-iterator
Init(), More(), Next(), Picked() and InitDetected(), MoreDetected(),
NextDetected(), DetectedEntity() have been deprecated.
User should access detection results by using index.
New methods PickedData(), PickedEntity(), PickedPoint() have been added
for accessing auxiliary information about picked object in sorted order.
2016-09-08 11:00:15 +03:00
kgv
1ce0716bb1 0027811: Configuration - allow building TKOpenGl with OpenGL ES on Windows
OpenGl_ShaderManager::prepareStdProgramFboBlit() now tries using extension
GL_EXT_frag_depth within OpenGL ES 2.0 when OpenGL ES 3.0 is not available.
OpenGl_View::blitBuffers() now disables Depth test
when copying depth values is not supported by OpenGL ES 2.0 hardware.

Fixed building for UWP with SDK 10.0.10240.0
Fixed building TKService, TKV3d and TKOpenGl for UWP.

OSD_Environment now defines global environment map
for emulating desktop behavior on UWP.
2016-09-08 10:46:58 +03:00
vpa
21a2b7ccf4 0027819: Visualization - provide a possibility to redefine SelectMgr_SelectableObject::UpdateSelection
- SelectMgr_SelectableObject::UpdateSelection calls redefineable SelectMgr_SelectableObject::updateSelection
2016-09-08 10:45:02 +03:00
kgv
26d9c83516 0027813: Visualization - add method V3d_View::DiagnosticInformation() similar to vglinfo command
New method V3d_View::DiagnosticInformation() has been introduced
providing the access to low-level OpenGL context information
for diagnostic automated reports or displaying in application About System.
2016-09-01 15:05:10 +03:00
kgv
e7879c5796 0027817: Visualization, StdSelect_BRepOwner - copy transformation persistence flag 2016-09-01 13:19:14 +03:00
akz
413b1c1a97 0027821: Visualization, AIS_Shape - add NULL checks for displaying TopoDS_Face with NULL surface NULL surface 2016-09-01 13:19:13 +03:00
ika
fe0d928d97 0027807: Units are lost during import presentation of GDT.
Add entities to import a subtype of draughting_model,
Add units calculating during STEP reading.
2016-09-01 13:19:12 +03:00
osa
3bffef5524 0022582: Visualization - provide an API for dumping a sub-region of the viewport
Graphic3d_Camera definition has been exended by optional Tile property (Graphic3d_CameraTile structure).
V3d_View::ToPixMap() now performs tiled dump when image size exceeds hardware limits.

OpenGl_View::Redraw() - fixed dump of immediate Z layers in no stereo and no MSAA case.

OpenGl_Context now tracks viewport values.
Draw Harness command vdump has been extended with new argument -tileSize.
2016-09-01 13:19:11 +03:00
oan
1ede545fef 0027810: Compilation error on NCollection_UBTree::Kill() 2016-09-01 13:19:11 +03:00
kgv
150ed3d5ef 0027796: Visualization - allow 3D objects with Graphic3d_TMF_2d flag
Graphic3d_TransformPers::Apply() now does not reset projection matrix
for objects with Graphic3d_TMF_2d flag.

Useless flag Graphic3d_TMF_2d_IsTopDown has been removed.
SelectMgr_SelectableObjectTrsfPersSet now does not skip Graphic3d_TMF_2d presentations.
OpenGl_Layer::BoundingBox() now takes into account Graphic3d_TMF_2d presentations for proper Z-fit.

AIS_ColorScale now uses "lazy" mode for rendering labels
(considering 2D persistence to be already defined within entire structure).

OpenGl_Layer::updateBVH() now updates myAlwaysRenderedMap to handle
dynamic transformation persistence flag change without redisplaying the object.
2016-09-01 13:19:10 +03:00
apn
0766573201 0027626: Attempt to display shape in 3d leads to very long calculation loop
Added test case bugs/mesh/bug27626

Small correction of test case for issue CR27626
2016-09-01 13:19:09 +03:00
msv
8b1e055f0b 0027781: [Regression to 6.9.0] Exception in ShapeFix_Shape algorithm with option FixSmallAreaWireMode
The matter was that during checking wires of a shape for small area, non-outer wires were checked with constructing a new face with BRepBuilderAPI_MakeFace. If a face has location an edge from original face has no pcurve on the constructed face, which leads to exception in BRepGProp::SurfaceProperties. The fix constructs new face using EmptyCopy.

The method ShapeAnalysis_Wire::CheckSmallArea() has been changed so as to check area of the outer wire without hole-wires. API of this method has been changed, as the second argument theIsOuterWire is not needed any more.

The test cases have been updated, below are explanations of changes:

test de iges_2 G7
The fixed version leaves a wire in a face, but the master version considered it small and removed. The master version works wrong. It is because the face built with this wire has negative area, but the code in CheckSmallArea function does not get absolute value before comparing area with the tolerance. The left wire leads to splitting of the face on two, checkshape error in the face, and statshape faulty due to increased number of faces in the second pass.

test de iges_2 G2
The fixed version leaves a wire that is removed in the master version. The cause is the same as in G7 test case. However, here the problematic wire has very big tolerance. So, when the fixed version left it in the shape, the overall maximal tolerance became much greater than in reference data.

test de step_3 E6
In fixed version a really bad small wire is removed from the face, while in master version it is left and produces an error in checkshape report. So, it is an improvement.
2016-09-01 13:19:09 +03:00
bugmaster
87b48b40c6 0025220: Using BRepFill_OffsetWire withs wires containing arc edges throws exception "Standard_NullValue"
Adding testing case
2016-09-01 11:21:49 +03:00
bugmaster
45396f870c 0026910: General fuse does not find intersection between line and circle
Adding testing case
2016-09-01 11:15:35 +03:00
kgv
dde6883382 0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead of "unsigned int"
Code has been updated to remove no-op casts and implicit casts to Standard_Boolean.

Places of inproper use of Standard_Boolean instead of Standard_Integer
have been corrected:
- Bnd_Box, Bnd_Box2d
  Bit flags are now defined as private enum
- HLRAlgo_BiPoint, HLRAlgo_EdgesBlock, HLRBRep_EdgeData, HLRBRep_FaceData
  Bit flags are now defined as enum
- HLRAlgo_EdgeStatus, HLRBRep_BiPnt2D, HLRBRep_BiPoint
  Bit flags are now defined as bool fields
- HLRAlgo_PolyData
  Bit flags are now defined as Standard_Integer
- OSD_DirectoryIterator, OSD_FileIterator
  Boolean flag is now defined as Standard_Boolean
- ShapeAnalysis_Surface::SurfaceNewton()
  now returns Standard_Integer (values 0, 1 or 3)
- ChFi2d_FilletAlgo
  now uses TColStd_SequenceOfBoolean instead of TColStd_SequenceOfInteger
  for storing boolean flags

Method IFSelect_Dispatch::PacketsCount() has been dropped from interface.

ShapeFix_Solid::Status() has been fixed to decode requested status
instead of returning integer value.

TopOpeBRepBuild_Builder1 now defines map storing Standard_Boolean values
instead of Standard_Integer.

Persistence for Standard_Boolean type has been corrected
to keep backward compatibility:
- BinMDataStd, BinTools, FSD_BinaryFile

Broken Draw Harness commands vdisplaymode and verasemode have been removed.

BRepMesh_FastDiscretFace::initDataStructure() - workaround old gcc limitations

BRepMesh_IncrementalMesh::clear() - avoid ambiguity
2016-08-26 10:16:17 +03:00
kgv
3fe9ce0edd 0027793: Visualization - object drifts at zoom within Graphic3d_TMF_TriedronPers applied
Graphic3d_TransformPers now takes Graphic3d_Camera definition as argument
for methods applying transformation.

Graphic3d_TransformPers::Apply() now computes Graphic3d_TMF_TriedronPers
transformation in the following way:
- The object is moved onto Z focus distance.
- The object is expected to be defined in pixels.
- The Z coordinate on anchor point is used as offset from the view corner in pixels.
- It is now possible to define not only corners of the view, but also middle of the side.
- Graphic3d_TMF_TriedronPers now works with perspective projection.

OpenGl_LayerList::ChangeLayer() - fixed removing of the element in old ZLayer.

OpenGl_Layer::BoundingBox() now takes into account bounding box
of Graphic3d_TMF_TriedronPers presentations for Z-fit operation.
2016-08-26 09:46:43 +03:00
ski
742cc8b01d 0027350: Support for Universal Windows Platform
- Toolchain file to configure a Visual Studio generator for a Windows 10 Universal Application was added (CMake).
- There is no support for environment variables in UWP.
- SID is not supported (were excluded).
- Windows registry is not supported (were excluded).
- Mess with usage of Unicode/ANSI was corrected.
- Added sample to check UWP functionality.
- Excluded usage of methods with Unicode characters where it is possible.
- Minor corrections to allow building OCAF (except TKVCAF) and DE (except VRML and XDE)
- Building of unsupported modules for UWP platform is off by default .
- Checking of DataExchange functionality was added to XAML (UWP) sample.
- Added information about UWP to the documentation.
- Update of results of merge with issue 27801
2016-08-26 09:43:29 +03:00
ika
f3ec3b372c 0027645: Data Exchange - access violation when reading STEP AP242 file
Fix exceptions, add test cases.

Small correction of test cases for issue CR27645
2016-08-25 15:10:51 +03:00
kgv
1593b4eeab 0027797: Visualization - consider ZLayer properties while sorting list of picked entities
OpenGl_GraphicDriver::ZLayers() / V3d_Viewer::GetAllZLayers() now return
the layers sequence following rendering order (taking into account IsImmediate flag).

StdSelect_ViewerSelector3d::Pick() now sort result taking into account ZLayers flags.
2016-08-25 15:10:50 +03:00
kgv
94afca11a0 0027801: Configuration - fix compilation of Standard.cxx when using MinGW-W64 2016-08-25 15:10:49 +03:00
kgv
e5b8456d5b 0027783: Visualization, XCAFPrs_AISObject - override method SetMaterial()
XCAFPrs_AISObject::SetMaterial() now changes the default material of the object
but preserves custom XDE styles.

XCAFPrs_AISObject::Compute() now does not reset map of custom aspects each call,
so that to keep in sync aspects across multiple presentations.

AIS_InteractiveContext - private methods and class fields
are now protected to allow inheritance.
2016-08-25 15:10:48 +03:00
kgv
0deb6f045f 0027789: Visualization, TKOpenGl - improve compatibility with new OpenGL ES devices
OpenGl_ShaderManager::prepareStdProgramStereo() - fixed definition of global constants
in optimized Anaglyph shader.

OpenGl_Context now loads GL_KHR_debug extension within OpenGL ES context.
2016-08-25 15:10:48 +03:00
msv
5185b1617a 0027780: Face-face intersection produces 2D curve that has reversed derivative at its end
The matter was that with starting point paased into intersector the walking line goes one point outside of the surface domain. Then during purging this extra point is removed from the line but its geometry is used for the last vertex. This makes a set of points invalid for approximation, and as a result we obtain the curve with reversed tangent direction at the end.

The API of the method IntPatch_WLineTool::ComputePurgedWLine has been changed to insert a new Boolean parameter RestrictLine. If this parameter is false than the step of removing of outside points is skipped, and the result line is not distorted. This flag is determined inside IntTools_FaceFace to tell the intersector if it is needed to limit intersection line by surface domain.

Test case has been added.
2016-08-25 11:26:05 +03:00
skv
2613378e60 0027726: List of formats supported by TDocStd_Application
Minor corrections and implementation of ABV remark
2016-08-25 11:18:52 +03:00
dbp
1a7ece8f23 0027787: Visualization, TKOpenGl - Optimize rendering by additional check whether the object is fully clipped or not
OpenGl_Structure::Render() now checks if structure is entirely clipped to skip rendering at all,
or entirely NOT clipped to disable clipping / capping plane.

OpenGl_ShaderManager now defines dedicated GLSL programs for one and two clipping planes
to optimize rendering on slow hardware.
2016-08-25 11:17:45 +03:00
bugmaster
afa6834bcd 0023585: Boolean Fuse Operation Fails.
Adding test case
2016-08-25 11:14:13 +03:00
bugmaster
4eb65ae9ee 0022794: Boolean Cut operation produces incorrect result.
Adding testing case
2016-08-25 11:11:59 +03:00
kgv
60273f7774 0027763: Visualization - remove V3d_View::Print() method
Dependency from FreeImagePlus.dll (but not FreeImage.dll) has been removed.

Method V3d_View::Export() has been marked as deprecated.

Added Standard_DISABLE_DEPRECATION_WARNINGS and Standard_ENABLE_DEPRECATION_WARNINGS
to eliminate compiler warnings for using deprecated APIs within Draw Harness for testing.

compatibility with gcc 4.5-
2016-08-18 15:02:37 +03:00
bugmaster
3a17b16845 0022634: Cut operation on closed solids returns opened one
Adding testing cases
2016-08-18 14:46:38 +03:00
nbv
ae54125247 0027766: Incorrect section curves between attached cylinders
2d-tolerance has been bounded above (earlier it was too big for precise computation).

Creation of the test case for this issue.
Adjusting some test cases according to their new behavior.

Adjusting test case according to its new behavior.
2016-08-18 14:46:35 +03:00
bugmaster
2cc873e2a2 0021246: checkshape command does not return faulty shapes.
Adding testing case
2016-08-18 14:46:31 +03:00
nbv
5146b5baa3 0027775: Different behavior of GeomFill_BSplineCurves algorithm in DEBUG and RELEASE mode
Throw an exception in case of incorrect input data.
2016-08-18 14:46:27 +03:00
bugmaster
bf3220cfc5 0008040: Offset direction is wrong for a closed circle
Adding testing case
2016-08-18 14:46:24 +03:00
emv
e91a710c7e 0027773: Empty result of section operation between line and offset of a circle
In Edge/Edge intersection the Resolution for the Offset Curve based on the elementary
curve (Line/Circle/Ellipse) is computed using this basis curve.
2016-08-18 14:46:20 +03:00
nbv
032881f4fb 0027774: Constructor GeomPlate_BuildAveragePlane crashes if two input normals are parallel to each other
Normalization has been avoided in case of impossibility.
2016-08-18 14:46:17 +03:00
isn
b47bcd7ea7 0025957: nurbsconvert modifies original shape
- Ensure that the subshapes from the original shape will not be changed after nurbsconvert operation.
For that create the new vertexes (NewPoint(..)) as well as new curves (NewCurve(..)) and new surfaces (NewSurface(..)) before calling of Rebuild() method. Make copies of all vertexes impacted by curve or surface modifications. This eliminates necessity of creation of new vertices during recursive rebuilding of the entire shape.

- Compatibility with the old behavior of BRepTools_Modifier has been retained as an option. For that the new flag MutableInput has been added in the interface of the class.

- This patch also impacts other operations based on BRepTools_Modifier, in the sense that they also become safe regarding input shapes.

- Create new test cases. Some test cases with nurbsconvert command are changed to lock input shapes from modifications.

fix regressions
2016-08-18 14:46:13 +03:00
msv
5a0fc7ce60 0027762: Incorrect result of General Fuse operation
The algorithm of finding of extrema solutions of a point and a torus in Extrema_ExtPElS has been corrected for the case of torus having major radius equal to zero.

Test cases are added.
2016-08-18 14:46:09 +03:00
msv
2ba9eb3059 0027729: UnifySameDomain: allow the user to specify linear and angular tolerances
- New methods SetLinearTolerance and SetAngularTolerance have been added in the class ShapeUpgrade_UnifySameDomain.
- The algorithm has been modified to consider these tolerances when checking if two faces are same domain.
- The draw command unifysamedomain has been changed to accept new parameters.
- The internal method MergeSeq has been changed to avoid exception connected with access to unknown key in the data map.

Create test case

Small correction of test case for issue CR27729
2016-08-18 11:19:15 +03:00
emv
7cb2f40993 0027761: Intersection loops infinitely
The static method CorrectSurfaceBoundaries() in the class IntTools_FaceFace,
which is used for correction of the boundaries of the faces before their intersection,
contains two inconsistent adjustments of the boundaries of the faces based on periodic surfaces.
One of these adjustments has been removed. The remaining adjustment, the one that is based on the
2D bounding boxes of the closed curves, should be sufficient.

Test case for the issue.
2016-08-11 17:47:36 +03:00
kgv
3e05329c4c 0027751: Visualization, Graphic3d_ClipPlane - add option to inherit material from object
Graphic3d_ClipPlane - Graphic3d_AspectFillArea3d is now stored as class field.
OpenGl_CappingAlgo::RenderCapping() now handles special mode
preserving material from rendered object.

MeshVS_ElementalColorPrsBuilder::Build() now creates single primitives group
for triangles, thus Closed flag is correctly applied.

Redundant methods OpenGl_Structure::DrawGroups() and ::renderClosedGeometry()
have been removed.

Draw Harness, ViewerTest - vaspects now preserves display mode
and location when assigning sub-shape aspects.
The syntax of command vclipplane has been revised
(preserving compatibility with old syntax):
- Use "-param" style syntax for all arguments.
- Eliminate redundant arguments "change", "view", "object".
- Allow passing multiple parameters withing single call.
- Do not require "create" command - create new plane implicitly.
- "maxplanes" argument does not require view name anymore.
- "delete" does not throws TCL exception for non-existing plane.
- "view" argument without list now applies to active view.
- Handle * and ALL withing "delete" to remove all defined planes.

update test case bugs/vis/bug26028
2016-08-11 13:55:33 +03:00
kgv
89a929ea26 0027750: Visualization, V3d_View - remove unused functionality ZClipping and ZCueing
Methods V3d_View::SetZClippingType(), ::SetZClippingDepth(), ::SetZClippingWidth(),
::SetZCueingDepth(), ::SetZCueingWidth(), ::SetZCueingOn(), ::SetZCueingOff()
have been removed.
2016-08-11 12:46:34 +03:00
kgv
4ad142d9cb 0027756: Visualization - add Draw() method taking Graphic3d_Group to tools Prs3d_Arrow, Prs3d_Text
and deprecate Draw() methods taking Prs3d_Presentation.
2016-08-11 12:41:24 +03:00
kgv
521b0d7f81 0027755: Visualization, V3d_View::ToPixMap() - fix image dump with MSAA turned on
OpenGl_View::Redraw() now handles correctly myTransientDrawToFront
with MSAA turned on and resolution not equal to window size.
2016-08-11 12:37:01 +03:00
vpa
520cde8769 0027757: Visualization - handle child objects in selection manager regardless of HasOwnPresentations() flag
- all methods of SelectMgr_SelectionManager now processes children first, then check HasOwnPresentations() flag;
- test case for issue #27757

Small correction of test case for issue CR27757
2016-08-11 12:33:21 +03:00
kgv
c885cfda24 0027676: Foundation Classes - define Standard_ExtCharacter, Standard_Utf16Char using C++11 types char16_t 2016-08-11 12:17:03 +03:00
kgv
deb02f8655 0027735: Visualization, OpenGl_ShaderManager - fix clipping state management
OpenGl_CappingAlgo::RenderCapping() now updates clipping state in Shader Manager.
OpenGl_View::render() clipping state setup has been moved to OpenGl_View::renderScene().

OpenGl_ShaderManager now converts position to homogeneous coordinates within clipping code GLSL.
This fixes capping plane rendering with clipping planes applied.

Fixed possible Clipping planes misconfiguration when FFP is used;
error-prone OpenGl_Clipping::AddWorldLazy() method has been dropped.
2016-08-11 12:10:11 +03:00
kgv
c58b1b6257 0027754: Configuration - fix compilation of Standard.cxx on non-x86 desktop systems 2016-08-11 11:58:30 +03:00
kgv
9016c8bd2e 0027563: Foundation Classes, opencascade::handle - make operator*() consistent with operator->() 2016-08-11 11:54:22 +03:00
bugmaster
3cb0f659d8 0021427: Invalid result of cutting attached shapes
Adding test case
2016-08-11 11:43:24 +03:00
isk
3db69e4133 0021306: Visualization, AIS_InteractiveContext - revise DisplayedModes() semantics
Remove the AIS_InteractiveContext::DisplayedModes() method.
Remove list of active display modes from AIS_GlobalStatus.
2016-08-11 11:39:53 +03:00
jgv
57fbfb8e7b 0027719: HLRBrep_Algo incorrect output
Intersection of curves and surfaces in HLRBRep is corrected: parametric limits of face are used instead of parametric limits of surface

Building of outlines (Contap_Contour) is corrected: method ComputeCloseLine is now used in all cases.

Correction of HLRBRep_Surface: usage of UVbounds-option

Correction of test cases according to the new behavior.
2016-08-09 14:14:04 +03:00
aba
d5514578e8 0027573: AIS_ColorScale::FindColor does not take into account custom colors
Modified AIS_ColorScale::FindColor (Standard_Real, Quantity_Color&) to take into account custom colors
2016-08-04 16:55:00 +03:00
kgv
8cea17de84 0027749: Configuration - drop remaining occurences of GLU dependency 2016-08-04 16:54:56 +03:00
emv
a4785842e4 0027746: Incomplete result of SECTION operation
Test cases for the issue.
2016-08-04 12:11:02 +03:00
nbv
bb526112b1 0027665: BrepExrtrema_DistShapeShape bad performance on OCCT 6.7.0
Creation of test case for issue #27665.
2016-08-04 12:08:05 +03:00
mgn
3475df12a6 0027724: Visualization, TKV3d - Null handle check missing in AIS_InteractiveContext::SelectedShape()
Null handle check has been added.
2016-08-04 12:05:07 +03:00
abv
82cf4904ea 0025448: Coding - remove useless header Quantity_Color_1.hxx
Useless header file Quantity_Color_1.hxx is deleted, its content moved to Quantity_Color.cxx
The meaning of special Hue value -1.0 has been added to Quantity_Color methods description.
2016-08-04 12:03:15 +03:00
isk
e2d7642f14 0027680: Visualization - AIS_InteractiveContext::Remove() should remove all presentation of the object 2016-08-04 12:01:14 +03:00
apl
6d0e6be5a2 0027700: Visualization - glPolygonMode() used for frame drawing affects label text shading
Patch extends GL-state caching mechanism of OpenGl_Context by new methods.
The methods allow setting/inquiring polygon rasterization and hatching modes:
- OpenGl_Context::SetPolygonMode
- OpenGl_Context::SetPolygonHatchEnabled
- OpenGl_Context::SetPolygonHatchStyle

With these methods OpenGl_Text is able to configure shading as necessary.
And this configuration is done irrespectively of currently defined face aspect.
Code of OpenGl_Workspace is also modified to use these methods as well.

Porting notes:
- OpenGl_LineAttributes now require OpenGl_Context instance for calling GL API.
- OpenGl_LineAttributes has new flag IsEnabled, it turns on/off hatching without changing the hatch type.
  By default this flag is turned on and can be never modified for compatibility with old code.
- OpenGl_LineAttributes is not anymore a field of OpenGl_Workspace::myLineAttrib.
  This resource is directly created by an OpenGl_Context instance on demand.
  If you use custom implementation of hatch patterns please create and share custom resource
  under resource-key "OpenGl_LineAttributes" in corresponding OpenGl_Context before using
  methods SetPolygonHatchEnabled, SetPolygonHatchStyle.
2016-08-04 11:56:59 +03:00
kgv
d509e5a43f 0027731: Visualization, OpenGl_AspectMarker - handle fractional marker Scale when sharing resources
OpenGl_AspectMarker::Resources::SpriteKeys() now encodes decimal number of marker scale into resource key,
since built-in markers are defined with 0.5 scale step.
2016-08-04 11:45:38 +03:00
san
6887652ac6 0027717: Visualization - drop broken Prs3d_Drawer::ShadingAspectGlobal() flag 2016-08-04 11:41:28 +03:00
kgv
cde2e2f0ca 0027583: Visualization, MeshVS - handle MeshVS_DA_SupressBackFaces flag within MeshVS_NodalColorPrsBuilder
and within MeshVS_ElementalColorPrsBuilder builders.
2016-08-04 11:36:20 +03:00
kgv
2e5139af6b 0027360: Visualization - remove obsolete anti-aliasing API
The methods V3d_View::SetAntialiasingOn(), ::SetAntialiasingOff()
and Antialiasing() have been removed.
2016-08-04 11:34:25 +03:00
kgv
d01ed5fdd1 0027543: Samples - flickering when view is resized in MFC samples
Define proper window class for OpenGL window within
overridden method CView::PreCreateWindow().
2016-08-04 11:26:14 +03:00
kgv
458e3c0deb 0027728: Visualization, OpenGl_Text - handle correctly object local transformation
OpenGl_Context::ApplyWorldViewMatrix() - reset ModelWorld matrix to identity for consistency with FFP.
2016-08-04 11:24:22 +03:00
ika
c6f530b8d9 0027721: Add possibility to read STEP file with invalid shape_representation entity.
Add special parameter, which allow reading of all top level (not shared by any other entities) solids (manifold_solid_brep) and shells (shell_based_surface_model).

The examples how to use a new parameter:

DRAW:
switch on a parameter:
    param read.step.all.shapes On
update model to apply new parameter value:
    newmodel
read as usual:
    stepread test.stp res * // each top level solid or shell will be read as res_i shape.
    or
    ReadStep Doc test.stp

CXX Code:
switch on a parameter:
    Interface_Static::SetIVal("read.step.all.shapes", 1);
read as usual
2016-08-04 11:22:40 +03:00
kgv
30c1ef75af 0027727: Visualization, Graphic3d_ArrayOfPrimitives::SetVertexColor() - define opaque color for RGB input 2016-08-04 11:20:12 +03:00
nbv
990ab183dd 0027718: Class GeomPlate_CurveConstraint contains two same constructors
Two constructors have been combined to one.
2016-07-29 14:23:05 +03:00
bugmaster
a85215df86 Update test cases after integration issue 27707 2016-07-29 11:57:45 +03:00
bugmaster
79cbd2cf60 Elimination of compiler warning on VC++ 2015 after integration 27448 2016-07-29 11:39:08 +03:00
kgv
be3752526f 0027715: Visualization - turn off deprecated OpenGL fixed-function pipeline by default
OpenGl_Caps - flag ffpEnable is now initialized to false on desktop OpenGL.
OpenGl_Context::init() - now prints error if OpenGL version does not support GLSL
and switches OpenGl_Caps::ffpEnable to true.

update test cases
2016-07-28 15:14:12 +03:00
emv
66cce03ae5 0027704: Numeric inaccuracy due to huge extension of the offset faces
The max extension value of the faces in offset operation has been decreased
to 1.e+7 value to avoid the lack of precision in the calculations.

Update of test cases according to the new behavior
2016-07-28 15:00:31 +03:00
ibs
4c6b4bc75a 0027706: Foundation Classes - OSD_Path::DownTrek() crashes on empty argument
a required check added
2016-07-28 15:00:29 +03:00
isn
07ef8bdfa2 0027552: Wire creation fails depending on the order of edges
1) BRepBuilderAPI_MakeWire::Add (const TopTools_ListOfShape &L) method have been completely rewritten. The order of edges is not significant now.
2) The geometric proximity of free vertices from already existing wire and from input list of edges are also have been taken into account. If such vertices are coincident with each other then they are fused into the one. The original wire remains untouched topologically (yet the tolerances and points can be modified).
3) UBTreeFiller is used to speed up the process of picking of coincident vertices.
4) BRepLib now contains the 'new' method - BoundingVertex(..). The implemenation of this method are taken from BOPTools_AlgoTools::MakeVertex(..).
5) The '-unsorted' argument have been added to 'wire' command.

Conflicts:
	src/QABugs/QABugs_20.cxx

Add missing include.

Eliminate warning.
2016-07-28 15:00:28 +03:00
emv
01b5b3df55 0027448: BOPTools_AlgoTools::IsMicroEdge does not correspond to shape validity criteria
1. IntTools_ShrunkRange::Perform
The algorithm of building shrunk range on the edge has been redesigned to make this range as big as possible.
By new definition it has to have the length not less than Precision::Confusion().
Although, the possibility of splitting of the edge has been taken into account. If it is impossible to put
vertex on edge in such a way that the tolerance spheres of the edge's vertices do not intersect the tolerance
sphere of the putting vertex the edge cannot be split. This possibility is saved in the new field
IntTools_ShrunkRange::myIsSplittable. It can be checked by the corresponding method IntTools_ShrunkRange::IsSplittable().
It returns TRUE if the shrunk range is computed successfully and it has the length more than the value of sum of two tolerance
values of the edge (for putting vertex, as its tolerance should not be less than the tolerance value of edge) and
two Precision::Confusion() values (to make two new edges valid by Shape validity criteria).

IntTools_ShrunkRange::myErrorStatus and IntTools_ShrunkRange::ErrorStatus() have been replaced by
the IntTools_ShrunkRange::myIsDone and IntTools_ShrunkRange::IsDone(). IntTools_ShrunkRange::IsDone() returns TRUE
if the shrunk range has been computed and it has length more than Precision::Confusion().

All computations of the parameters are performed using the GCPnts_AbscissaPoint, but if AbscissaPoint is unable to
compute the parameters the Resolution of the curve is used.

2. Boolean Operations algorithm now partially works with the edges that cannot be split or does not have the ShrunkData
at all (previously such edges have been considered as micro and just ignored). If by the result of some intersection such
edges should be split, i.e. the intersection vertex should be created, the algorithm just ignores them and no vertex is created.
But if such edges coincide with other shapes (other edges or faces) the algorithm uses them for creation of common blocks.
The information of the possibility for the edges to be split is saved in its PaveBlocks, in the new BOPDS_PaveBlock::myIsSplittable field.
It can be retrieved by the BOPDS_PaveBlock::IsSplittable() or BOPDS_PaveBlock::ShrunkData(), but these methods
make sense only after filling of the shrunk data for the pave block.

BOPTools_AlgoTools::IsMicroEdge() has an additional parameter that defines whether it is necessary to take into account
the possibility for the edge to be split or not. By default it is set to TRUE, i.e. by default the edge will be considered as micro
even if the shrunk range is computed, but it is too short for the edge to be split.

3. BOPAlgo_PaveFiller::PerformEF
To avoid creation of too close intersection vertices the intersection ranges of the edges participating in Edge/Face
intersections are reduced taking into account the common ranges computed during Edge/Edge intersections.
Thus, the Edge/Face intersection vertex is not created if it gets into a common range of the Edge/Edge intersection
between that edge and one of the face's edges. The tolerance value of Edge/Edge intersection vertex is increased
to reach the Edge/Face intersection.

4. Unification of the vertices of the section edges considered as micro edges.
If by the result of some Face/Face intersection the section edge is considered as micro edge,
the vertices of this edge will be united and the edge itself will be removed.

5. Test cases for the issues.

6. Adjusting test cases for issue CR27448.
2016-07-28 15:00:26 +03:00
msv
1aee6c8210 0027703: BinTools_ShapeSet stream read bug
Avoid out of array bounds read/write.
2016-07-28 15:00:24 +03:00
ema
056072196c 0026270: GeomFill_NSections constructor crash
Correction of code to avoid of usage of undefined associated parameters in order not to get exception in constructor.
Creation of test case for this issue
2016-07-21 12:49:08 +03:00
kgv
59ec40f804 0027684: Coding rules - drop unused declarations from Graphic3d
The following headers have been removed:
- Graphic3d_TypeOfPolygon
- Graphic3d_TypeOfPrimitive
- Graphic3d_Array1OfVector.hxx
- Graphic3d_Array1OfVertex.hxx
- Graphic3d_Array2OfVertex.hxx
- Graphic3d_CBitFields4.hxx
- Graphic3d_CBitFields8.hxx
- Graphic3d_CBitFields16.hxx
- Graphic3d_CBitFields20.hxx
- Graphic3d_CStructurePtr.hxx
- Graphic3d_CycleError.hxx
- Graphic3d_DataStructure.pxx
- Graphic3d_HSequenceOfStructure.hxx
- Graphic3d_InitialisationError.hxx
- Graphic3d_ListIteratorOfListOfShortReal.hxx
- Graphic3d_ListOfShortReal.hxx
- Graphic3d_NListOfHAsciiString.hxx
- Graphic3d_StructureManagerPtr.hxx
- Graphic3d_StructurePtr.hxx

Graphic3d_StructureManager - remove default aspects, which have been never used.

do not include non-existing header Graphic3d_Array1OfVertex.hxx from MFC sample

Graphic3d_Group::MinMaxValues() - add missing Standard_EXPORT
2016-07-21 12:47:49 +03:00
isn
0f1deae3b4 0024056: error LNK2019: unresolved external symbol
Clean out the TopOpeBRep* classes

Remove unused private fields.
2016-07-21 12:47:49 +03:00
kgv
fb66bb2892 0027682: Visualization - provide method Prs3d_Drawer::SetShaderProgram() for setting program
AIS_ColoredDrawer has been moved to dedicated file.
AIS_ColoredShape::CustomAspectsMap() - added public method for accessing aspects map.

AIS_InteractiveObject::SynchronizeAspects() - added method for synchronizing
all primitive aspects at low-level (TKOpenGl) after their modification.
2016-07-21 12:47:48 +03:00
ifv
c65f82013b 0027679: Wrong offset: overlapping edges
Method BRepFill_OffsetWire::UpdateDetromp(...) is modified for correct treatment of closed bisectors.

Test case for issue #27679
2016-07-21 11:20:34 +03:00
isn
56091b56ac 0027199: Unifysamedomain regression issue in OCCT 7
Allow to process the compounds in UnifySameDomain algorithm. Earlier only faces from shells were allowed to be unified.

Test case for issue #27199
2016-07-21 11:16:35 +03:00
azv
758bacbb66 0027677: Incorrect CUT of a solid by semi-infinite solid
The problem of incorrect CUT is wrong Pcurve after projection onto cylinder of a small edge orthogonal to cylinder's axis. The result of projection is a line along V direction, but it should be along U.

ProjLib_Cylinder has no specific functionality to build projection in most common case, so it should return "not done" flag to start projection based on curve approximation.

Following changes are done:
1. ProjLib_Cylinder returns isDone=false in the following cases:
  * the projected line is not parallel to cylinder's axis
  * the plane of projected circle is not orthogonal to cylinder's axis
2. Test case added

Minor correction of test case
2016-07-21 11:14:57 +03:00
kgv
ce0594b85e 0027675: Foundation Classes - handle Unicode path to CSF_UnitsLexicon and CSF_UnitsDefinition on Windows
Units package now uses Unicode-aware functions OSD_OpenStream
and OSD_FileStatCTime (introduced for fetching file timestamp).
2016-07-21 11:07:03 +03:00
isn
4aa09e317f 0027264: Weird difference between two BRepTools::Write() overloads
Assume that the brep file contains DBRep_DrawableShape variable if the file header is absent

test cases
2016-07-21 11:05:39 +03:00
kgv
b2fbf11a4f Remove overloaded method Graphic3d_AspectFillArea3d::SetTextureMap(bool) 2016-07-14 14:55:42 +03:00
kgv
b647266461 0027670: Visualization - avoid duplication of structures defining primitive array presentation aspects
Quantity_ColorRGBA has been introduced as convenient structure holding Vec4 for OpenGL.
Graphic3d_PolygonOffset has been added as replacement for TEL_POFFSET_PARAM.

Duplicating definition of Hatch Styles TEL_HS_*** has been removed;
Aspect_HatchStyle enum now follows values of TEL_HS_*** for compatibility.
TelCullMode enum has been removed.

Aspect_AspectLine has been merged into Graphic3d_AspectLine3d.
Aspect_AspectMarker has been merged into Graphic3d_AspectMarker3d.
Aspect_AspectFillArea has been merged into Graphic3d_AspectFillArea3d.
Graphic3d_CAspectFillArea have been removed.

OpenGl_AspectLine now stores Graphic3d_AspectLine3d as class field.
OpenGl_AspectMarker now stores Graphic3d_AspectMarker3d as class field.
OpenGl_AspectText now stores Graphic3d_AspectText3d as class field.
OpenGl_AspectFace now stores Graphic3d_AspectFillArea3d as class field.

Graphic3d_AspectFillArea3d - back face culling is now enabled by default.
TKOpenGl now relies on Graphic3d_Group::IsClosed() flag to disable face culling.
StdPrs_ShadedShape now does not modify aspect for different culling modes.

Headers InterfaceGraphic_Graphic3d.hxx, InterfaceGraphic_telem.hxx, InterfaceGraphic_tgl_all.hxx
defining obsolete structures CALL_DEF_COLOR, CALL_DEF_POINT,
CALL_DEF_MATERIAL, CALL_DEF_TRANSFORM_PERSISTENCE, TEL_POINT, TEL_COLOUR
have been removed.

Useless and broken test case bugs/vis/buc60821 has been removed.

OpenGl_Workspace::myAspectFaceApplied and myAspectMarkerApplied have been replaced
from OpenGl_AspectFace*/OpenGl_AspectMarker*
to Handle(Graphic3d_AspectFillArea3d)/Handle(Graphic3d_AspectMarker3d).
This eliminates reading from freed memory
(e.g. when OpenGl_AspectFace is allocated on stack like in OpenGl_Trihedron).

OpenGl_PrimitiveArray::drawEdges() - fix drawing non-indexed array from VBO (access violation due to NULL handle).

AIS_Dimension::DrawArrow() - added missing initialization of 3D arrow aspect.
AIS_Manipulator::Compute() now creates dedicated Face Aspect for each axis.
V3d_CircularGrid, V3d_RectangularGrid now create dedicated line aspects with different color.
AIS_InteractiveObject::SetMaterial() - do not modify global ShadingAspect.
2016-07-14 13:24:40 +03:00
apn
28cab3768f 0027638: Optimisation of testdiff command
Added functionality to compare image, memory and CPU differences separately.
2016-07-14 13:23:11 +03:00
ski
536a3cb80c 0027525: Coding - eliminate warnings on Windows for OCCT with static type of libraries
Useless *.cxx files were removed to eliminate linker warning LNK4221.

Package TopOpeBRepDS was cleaned up from old debugging routines.

Merged OSD_signal_WNT.cxx into OSD_signal.cxx

Class Standard_ErrorHandlerCallback was moved into the Standard_ErrorHandler class as nested class Callback

Eliminated warning about unused variable.
2016-07-14 13:21:33 +03:00
kgv
593dfe97ea 0027632: Visualization, XCAFPrs_AISObject - provide method for assigning new Label in the document 2016-07-14 13:16:35 +03:00
kgv
60adbe67f2 0025576: Visualization - implement AIS_ConnectedInteractive::AcceptDisplayMode()
by redirecting to myReference->AcceptDisplayMode().
2016-07-14 13:15:12 +03:00
nbv
f7991731de 0027664: Incomplete intersection curve from the attached shapes
Computation of correct offset values in order to make correspondence (with adjusting to periods) between Domain of WLine and surface domain.

Creation of test cases for this issue.

Small correction in the test case.
2016-07-14 13:05:15 +03:00
ssv
a7cc4fdd0d 0027671: Basic IVtk tools do not allow easy sub-classing
Add missing Standard_EXPORT, change private with protected in shape data source.
2016-07-14 13:03:45 +03:00
kgv
c4684140fb 0027668: Visualization, TKD3DHost - fix accessing function list within Core Profile 2016-07-14 13:02:09 +03:00
bugmaster
693c4bbe60 0027127: Implementation of compilation of OCCT Products samples on all platforms under support in Jenkins test system.
Removing old VC environment
2016-07-12 15:44:10 +03:00
msv
6482df8152 0027362: Meshing performance
Remove warning on VS2015
2016-07-11 11:52:35 +03:00
kgv
fd59283a7b 0027633: Visualization, TKOpenGl - point sprites are inconsistent within Core and Compatible Profiles
OpenGl_ShaderManager::pointSpriteAlphaSrc() now does not return alpha from Red channel
for RGBA marker texture in Core profile.
OpenGl_ShaderManager::prepareStdProgramFlat() - restored code for drawing points without texture.

Built-in GLSL programs now flip .y in shaders instead of
relying on GL_POINT_SPRITE_COORD_ORIGIN unavailable on OpenGL ES.

Added sample markers.tcl (moved from test cases).
Sample now includes marker_kr.png for testing marker orientation.
2016-07-07 15:15:50 +03:00
isk
1d92133e83 0026641: Visualization, TKOpenGl - handle correctly transformation persistence within perspective projection.
Add a new method AIS_InteractiveContext::SetTransformPersistence, which sets transform persistence to object and selection.
Add a new method SelectMgr_SelectionManager::UpdateSelection, which re-adds selectable object in BVHs in all viewer selectors.
Add a new method SelectMgr_ViewerSelector::MoveSelectableObject, which moves object from set of not transform persistence objects to set of transform persistence objects (or vice versa).
Add a new method Graphic3d_TransformUtils::Convert, which converts gp_Trsf to Graphic3d_Mat4.
Remove the method PrsMgr_PresentableObject::SetTransformPersistence(flag, point).
2016-07-07 14:30:18 +03:00
apn
fbad941bd4 0026372: Meshing of surface of revolution fails in debug mode
Added test case bugs/mesh/bug26372
2016-07-07 14:27:17 +03:00
msv
8109385697 0027362: Meshing performance
1) BRepMesh_FastDiscretFace.cxx:
- exclude planes from procedure of inserting internal points.
- localize declaration of the container aNewVertices in each method where it is needed.
- correct the logic of the method insertInternalVerticesOther, so that to separate the processes of removing extra points and addition of new points in different cycles, thus making the code more clear and in addition stable.
- insert useful output of intermediate mesh to a file in control() method for debug purposes (with definition DEBUG_MESH).

2) Add global functions MeshTest_DrawTriangles and MeshTest_DrawLinks to draw mesh data in debug session.

3) BRepMesh_FastDiscret:
- in the method Add calculations of deflections have been simplified for non-relative mode.
- replace the attribute MinDist with Deflection in EdgeAttributes structure. Correct its computation so that later to store this value as deflection of the polygon.

4) Make protection against exception in the method BRepMesh_Delaun::addTriangle() when an added triangle creates a third connection of a mesh edge.

5) BRepMesh_EdgeTessellator.cxx, BRepMesh_EdgeTessellationExtractor.cxx: use Geom2dAdaptor_Curve in order to use b-spline cache while computing value on a curve.

6) In BndLib_Box2dCurve::PerformBSpline, avoid creating new b-spline in case of requested parameter range differ from natural bounds insignificantly.

7) In GeomAdaptor classes, postpone building of cache till the time of its actual usage. So, creation of an adapter to compute intervals of continuity does not lead to creation of internal cache.

8) In the methods BRepAdaptor_Curve::Bezier and BSpline do not call Transformed() if transformation is identity.

9) In the classes Geom_BSplineCurve, Geom_BSplineSurface, Geom_BezierCurve, Geom_BezierSurface, Geom2d_BSplineCurve, Geom2d_BezierCurve change the method Pole() to return the point by const reference.

10) In CPnts_AbscissaPoint.cxx, compute derivative by D1 instead of DN to make use of b-spline cache.

11) Change test cases to actual state:
  - Number of triangles/nodes can grow due to more accurate work with deflection of edges. Now the edge is tessellated using its own tolerance instead of maximal tolerance of all shapes in the face.
  - Accept new numbers of mesh errors (free links, free nodes) for really bad shapes.
  - Correct the test "bugs/mesh/bug25612" to produce stable result.
  - Disable redundant checks in test cases bug25378* (lower limit for computation time).

- Speed up iso-lines computation for offset of bspline surfaces. For that use adaptor instead of original surface in evaluator of approximation.
- Add output of polylines for debug of insertInternalVerticesOther().

Reference data in test case bugs\moddata_2\bug453_3 have been changed to be close to expected theoretical values. This makes the test give stable result on different platforms.
2016-07-07 14:24:39 +03:00
isk
4f51d9d704 0027621: Highlighting with color remains visible when shape is erased. 2016-07-07 14:16:23 +03:00
isk
dcc1741921 0027655: Visualization - AIS_Triangulation disappears after setting non-zero transparency
Add a new methods in AIS_Triangulation: SetTransparency, UnsetTransparency, HasVertexColor, updatePresentation.
Add a new methods in Graphic3d_ArrayOfPrimitives: AddVertex(gp_Pnt, Graphic3d_Vec4ub) and SetVertexColor(Standard_Integer, Graphic3d_Vec4ub).
Type of color of array in AIS_Triangulation is Graphic3d_Vec4ub now.
2016-07-07 14:13:52 +03:00
bugmaster
caee72a96e 0027127: Implementation of compilation of OCCT Products samples on all platforms under support in Jenkins test system.
Update mfc samples for current state of OCCT

Removing vc8 and vc9 from environment

Update qt samples for compilation with QT5

Update OCCT qt pro files system

Removing from projects files FWOSPlugin.lib.
2016-07-07 10:45:05 +03:00
ski
3eabbe1b4e 0027639: Add possibility to build OCCT 7X without TCL/TK
draw.bat/sh files will not be generated/installed to binary/install directories if DRAWEXE toolkit is excluded from build.
2016-07-05 11:26:25 +03:00
ifv
3ba87fdb66 0027352: Optimal axis-aligned bounding box for a shape
Add method for exact calculation of bounding boxes

Modifications made according to remarks.

Small correction of test case for issue CR27352

Small correction of test cases for issue CR27352

Avoid warning on VS2015
2016-07-01 12:40:40 +03:00
msv
745c138678 0027245: DRAW command to test binary persistence for shapes
- Added new static methods Read and Write in BinTools class to store/retrieve a shape in binary format.
- Added new draw commands "binsave" and "binrestore"
- Added test cases to test the new methods.
- Updated documantation with desription of the new BinTools class methods and corresponding BRepTools class methods.
2016-07-01 12:28:43 +03:00
oan
782467fd42 0027595: Mesh - faces without triangulations due to gp_VectorWithNullMagnitude exception
Zero magnitude check has been added before gp::Vec::Angle() usage
2016-07-01 12:28:39 +03:00
kgv
576e306647 0027643: Coding rules - eliminate GCC warning -Wmaybe-uninitialized 2016-07-01 12:28:34 +03:00
isk
04be500328 0027629: Visualization - apply a correct model-world matrix to normals in fixed function pipeline with enabled zoom persistence.
Small correction of test case for issue CR27629
2016-06-30 13:56:33 +03:00
isn
8009d0702c 0027357: Geom2dGcc_Circ2d2TanOn: check status of sub-algorithms to avoid exceptions
Additional checks for underlying algorithms have been added

test case

get rid of the warning
2016-06-30 13:49:20 +03:00
kgv
d52651755e 0027401: Configuration, Plugin - allow using statically linked plugins
CMake script now defines OCCT_NO_PLUGINS for static builds,
so that linking with OCAF plugins does not lead to duplicated symbols.
2016-06-23 19:15:11 +03:00
abv
6fe96f8416 0025812: Replace dynamic loading mechanism of OCAF persistence with dynamic-link one
Fields to store cached instances of reader and writer drivers for each format are added in CDF_Application.
Method DefineFormat() is added in TDocStd_Application, allowing defining format completely by single call, including drivers to be used for persistence.
All OCAF driver packages provide static method DefineFormat() that defines standard OCAF persistence format supported by corresponding package; these methods are called in DRAW to enable all persistence by default.

DRAW commands (except TObj-specific ones) now use single instance of OCAF Application, returned by DDocStd::GetApplication(). Other instances are eliminated, as well as method DDocStd::Find(const Handle(TDocStd_Application)&).
Method MessageDriver() and relevant field are moved to TDocStd_Application from its descendants.

Method CDF_Application::ReaderFromFormat() is made virtual to allow its redefinition in descendants.
Creation of storage driver is moved from PCDM::StorageDriver() to new virtual method CDF_Application::WriterFromFormat().
The code loading driver as plugin is retained in both these methods for compatibility.

Test command OCC24925 is converted to use virtual methods instead of defining plugin resource.

Migration table for old OCAF types is hard-coded in Storage_Schema::CheckTypeMigration().

Removed obsolete and unused items:
- FWOSPlugin library (driver is created directly)
- Methods in classes CDM_Document dealing with unused parameters of format
- DRAW command OCC23010 for testing non-reproducible issue #23010
- Methods PCDM::StorageDriver(), PCDM::FindStorageDriver()
- Method Formats() from CDF_Application and descendants
- Methods LoadExtensions and SchemaName from PCDM_StorageDriver
- Method Plugin::AdditionalPluginMap()
- Method BinLDrivers_DocumentStorageDriver::SchemaName()
- Method CDF_Application::DefaultExtension(), Reader(), FindReader(), FindReaderFromFormat()
- Method CDF_Store::Check()
2016-06-23 19:14:31 +03:00
Timo Roth
8072aba1ae 0027610: Some spelling mistakes in documentation of "Building with CMake"
Spelling corrected in documentation of "Building with CMake"
2016-06-23 18:15:17 +03:00
dbp
f2474958ef 0027590: Visualization, Ray Tracing - port to quad BVH trees (QBVH)
In frames of this issue binary BVH tree produced by building algorithms was collapsed into 4-ary BVH (QBVH).
The BVH traversal code in GLSL was modified to process such trees correctly.
This allows to implore thread coherence, decrease BVH memory consumption (~2 times), and use traversal stack of the half size.
As a result, ray tracing scalability is improved, as well as rendering performance. For various setups, speedup is 12-18%.
2016-06-23 18:15:13 +03:00
aml
9cc4e7e2db 0027529: Invalid result of CUT operation
Test case is added.
2016-06-23 18:15:08 +03:00
kgv
f9ba5c4ddd 0027617: Visualization, TKOpenGl - apply highlighting color without disabling lighting
Update colors in test cases
2016-06-23 18:15:04 +03:00
kgv
2831708b17 0026885: Visualization - drop redundant aspects from structure level
Graphic3d_CStructure and OpenGl_Structure do not store structure aspects anymore.
Graphic3d_Structure, Prs3d_Presentation - structure aspect methods have been removed.

AIS_InteractiveObject::SetAspect() - globalChange argument has been removed.

Undocumented test methods V3d::DrawSphere(), ::SetPlane(), ::PickGrid() have been removed.
2016-06-23 18:14:58 +03:00
kgv
a47d34efa9 0027622: Data Exchange - STL file having less than 4 triangles cannot be read
Drop minimum file size check from RWStl::ReadBinary().

Test case for issue #27622
2016-06-23 18:14:53 +03:00
san
284c923864 0027624: ViewerTest - vdrawtext command ignores text display options
vdrawtext command was corrected to set the specified text display type
regardless of other options.
2016-06-23 18:14:49 +03:00
ika
5bbe7380bd 0027532: Errors on reading stp-file
The cause of errors is a non alphabetical order of complex entity, which do not affect export.
Move messages to debug mode.
Replace fail by warning.

Correction of test case bugs/vis/bug23153 according to the new behavior
2016-06-23 18:14:45 +03:00
abv
9bf3ef8355 0024553: Deleting obsolete/unused ".gxx" files from "GCPnts"
Extension of files GXX is changed to "pxx" to avoid them to be copied to inc folder.
Code of inline functions contained in LXX files is merged to HXX files, LXX files are removed.
2016-06-23 18:14:40 +03:00
ika
e4ff2bbb05 0026786: Segmentation violation exception raised if a shape to be fixed is null
Add check for null shape.
2016-06-23 18:14:36 +03:00
kgv
f767cea690 0027608: Tests - drop useless performance comparison from perf/fclasses/handle
Correction of test case perf/fclasses/handle according to the current behavior
2016-06-23 18:14:31 +03:00
Timo Roth
3672371654 0027568: Exception is thrown when a degenerated edge is added to a wire
Test cases for issue CR27568

Other methods of BRep_Tool corrected to ensure that output arguments are always initialized
2016-06-23 18:14:27 +03:00
oan
dfb3bdd43a 0027239: Meshing algorithm creates wrong Triangulation
Do not insert consequent duplicating nodes in PolygonOnTriangulation.

Small correction of test case bugs/mesh/bug27239
2016-06-23 18:14:23 +03:00
vpa
29627b4cdb 0027612: Visualization, AIS_InteractiveContext - handle SelectMgr_EntityOwner::IsForcedHilight() flag in neutral point
- the check for IsForcedHilight was added to interactive context
2016-06-23 18:14:19 +03:00
kgv
7ccf8676cf 0027606: Visualization - view is blocking when MSAA has been overridden in graphics driver settings
OpenGl_View::blitBuffers() - try disabling MSAA on glBlitFramebuffer() failure
2016-06-23 18:14:14 +03:00
kgv
a13f2dc486 0027566: Configuration - define Handle_ as non-template class for compatibility with C++/CLI
For MSVC compiler (version 12 and above), Handle_Class types are defined as true classes (inheriting corresponding opencascade::handle<Class>) to allow using them in "public" statement of C++/CLI language, to make these classes recognizable by other C++/CLI libraries.

Code to test operations with Handle_ class is added to QAHandleOps test command
2016-06-23 18:14:10 +03:00
vpa
21a8e27535 0027611: Visualization - provide an interface to access selection frustum center points from SelectBasics level
- getters for rectangular frustum center points were added to SelectBasics_SelectingVolumeManager
2016-06-23 18:14:05 +03:00
ysn
d7b1999736 0027542: Documentation - minor corrections in upgrade guide
Remarks implemented.
Checked new entries in the document.
2016-06-23 18:14:01 +03:00
vpa
45d5cbf836 0027523: Visualization - selection owner contains obsolete shape
- remove check for selection activation in SelectMgr_SelectionManager::RecomputeSelection;
- given selection mode is now handled properly and single selection mode can be recomputed;
- test case for issue #27523.

Small correction of test case for issue CR27523
2016-06-23 18:13:57 +03:00
bugmaster
913295d5dd 0027631: license.md duplicated in the current master HEAD 2016-06-23 17:45:15 +03:00
ifv
9c1519c4c5 0027108: GCPnt_TangentialDeflection does not respect linear deflection
Modification of algorithm in order to prevent violation of angular and curvature deflection condition for smooth intervals of curve.
Modification of algorithm for calculation of maximal deflection in command crvtpoints, crvpoints (CR25649)
Elementary bug fixing in algorithm GCPnts_UniformDeflection.gxx
Modification of test cases in order to set new reference parameters of shape triangulations
Some tests:
  bugs modalg_2 bug397
  mesh standard_incmesh C7, V3
  mesh standard_incmesh_parallel C7, V3
  mesh standard_mesh C7, V3
  mesh standard_shading V3
were modified by TODO with reference bug 27226, because some problems in meshing algorithm (package BRepMesh) were discovered when tessellation of edges was changed. These problems cannot be solved by modification of GCPnts_TangentialDeflection algorithm. New issue #27226 was created, see bugtracker for details.

Correction of test data

Test case for issue #27108

Modification of algorithm for improving performance

Correction of test cases
2016-06-16 14:58:40 +03:00
Martin Siggel
6f21399c0d 0027447: Add support for long IGES entity names
Adding support for long IGES names.
The method IGESCAFControl_Writer::WriteNames is now extended
to also write IGES 406 / 15 name entities containing the full label name.

Test case for issue #27447
2016-06-16 14:58:35 +03:00
apl
9d1bf7ae05 0027601: TKV3d, AIS_RubberBand - polygonal selection mode invokes an exception with convex fill area
Corrected allocation of primitive array for triangles.
2016-06-16 14:58:30 +03:00
kgv
1b9f5d9504 0027596: Visualization, StdPrs_WFShape - pack isolines into single group of primitives
StdPrs_ShadedShape, computeFaceBoundaries() now does not create additional temporary buffer for edges.
StdPrs_Isolines::AddOnTriangulation() now reconstacts polylines from segments projected onto triangulation.

StdPrs_WFShape::Add() now packs isolines into single group in presentation (instead of per-face group).
Even more - StdPrs_WFShape now groups lines with the same aspects.

Prs3d_Drawer::UIsoAspect(), ::VIsoAspect(), ::VIsoAspect() - default width
has been changed from 0.5 to 1.0.
2016-06-16 14:58:24 +03:00
apl
907fb7a5e0 0027591: TKViewerTest, ViewerTest_CmdParser regression - methods ArgVec3f, ArgVec3d return inccorect values
Fix regression in methods ViewerTest_CmdParser::ArgVec3f, ::ArgVec3d, ::ArgVec, ::ArgPnt.
2016-06-16 14:58:18 +03:00
isn
9d671cd1b0 0027391: BRepLib::EnsureNormalConsistency() raises exception in case of asynchronious PolygonOnTriangulation problem
additional check have been added to BRepLib::EnsureNormalConsistency() func.
Any edges with two adjacent faces will be skipped (while updating of their normals) if the number of discretization points (nodes) will be different for each of this faces on this edge.

test case
2016-06-16 12:21:02 +03:00
abv
bd80ecfa61 0027602: gp_TrsfForm.hxx - wrong comment to enum
Comment is corrected
2016-06-16 12:18:56 +03:00
abv
747db83cdd 0027599: Test "demo samples snowflake" does not clear internal data after execution
Useless save command is removed
2016-06-16 12:17:16 +03:00
aml
6728599615 0027569: [Regression in 6.9.0] Projecting a curve hangs
Parameterization speed is taken into account to avoid ProjLib projector usage in case of bad input data.
Test case is added.
Test cases correction.
2016-06-16 12:15:22 +03:00
ika
f117cc5a81 0027329: Export to STEP failure
Do ProcessShape for non-manifold too,
Add binding of already written shared faces to STEP entity for non-manifold.

Minor correction of test case bugs/step/bug27329
2016-06-16 12:11:40 +03:00
apl
67e26cc101 0027592: TKV3d, AIS_RubberBand - SWIG error for method void virtual ComputeSelection
Commit modifies "AIS_RubberBand.hxx" header file.
- Adds declaration of handle.
- Puts virtual & void modifiers of ComputeSelection method in common order.
2016-06-16 12:08:07 +03:00
nbv
77a6c8313f 0027581: Logical error in Bnd_Box(2d)::SquareExtent() method.
Code in method SquareExtent has been corrected.
2016-06-09 15:34:40 +03:00
isk
473cddc1d9 0027579: Visualization, TKOpenGl - skip FSAA flag within Path Tracing 2016-06-09 12:39:50 +03:00
jgv
854e0d4a27 0027557: Unstable HLR tests
The following modifications were done for stability:
- Precision::PConfusion() was set as parameter of Classifier instead of 0.0
- Coinciding vertices of outlines are united to exclude neighborhood of common vertex from curve-curve intersection
- Draw command "hlrin3d" was modified to prevent exception

Minor corrections

Corrections of test cases for issue CR27557
2016-06-09 12:38:15 +03:00
aml
f84bf635f0 0027565: [Regression to OCCT 7.0.0] Number of Intersections Is Wrong
Incorrect tolerance management is fixed.
Test case is added.
2016-06-09 12:35:55 +03:00
ski
1ec75a485b 0027513: Configuration, CMake - Option INSTALL_TBB does not install tbbmalloc.dll
Installation of tbbmalloc.dll was corrected.
2016-06-09 12:33:26 +03:00
nbv
c1609fbea6 0026747: Some constructors of gp_Parab2d class contain redundant parameters
1. Useless constructors have been deleted.
2. Value returned by gp_Parab2d::Directrix() method has been corrected to exclude reversing the directrix.
3. Documentation of gp_Parab2d class has been updated (in hxx-file).
4. Upgrade Guide has been updated according to corrections made in this issue.

Creation of test cases for this issue.
2016-06-09 12:31:14 +03:00
aba
91d9637224 0027536: Visualization - incorrect behavior of zoom persisted objects
1) Zoom persistence mode now fixes object in pixel coordinates and  is independent on view size

2) Used gp_GTrsf instead of gp_Trsf SelectMgr_ViewerSelector to store  Graphic3d_Mat4d

3) Zoom persisted objects changed behavior (become bigger) therefore test cases were updated according to new state.

4) Corrected scale for rectangular frustum

Updated test for manipulator
2016-06-09 12:29:09 +03:00
kgv
be5c360207 0027562: Coding - avoid exporting of inline methods 2016-06-09 12:21:58 +03:00
kgv
83b0f13a58 0027555: Visualization, AIS_Shape - own deviation coefficient change is not considered by Wireframe presentation mode 2016-06-09 12:18:49 +03:00
aml
52db475165 0027015: Sewing returns invalid shape if some faces are nearly plane cones
Interpolation state check is fixed to mark as valid only ordered sequences of poles.
Refactoring of Approx_SameParameter.cxx.
Test case is added.
Test cases are updated to the new behavior.
Update of testing cases
2016-06-03 10:47:08 +03:00
aml
93dc7934db 0027544: problem compiling OCCT with gcc version 4.8.2 gives error 'array subscript is above array bounds'
Possible out of borders problem is fixed.
2016-06-02 14:23:54 +03:00
Benjamin Bihler
34e4e9f26e 0027491: GeomAdaptor_Curve Is Not Thread-Safe (Anymore?)
Added hint about BSpline cache and missing thread-safety to adaptor classes.
2016-06-02 14:23:50 +03:00
ski
a3d2cb2425 0027344: Configuration, CMake: bugs with detecting third-party products
Information messages for TCL/TK search are corrected.

Compile definitions were added to OpenCASCADEConfig.cmake file
2016-06-02 14:23:45 +03:00
azv
4b445d1848 0027481: [Regression to OCCT 6.6.0] Modeling Algorithms - incorrect CUT on two solids
* Test case has been added
* Adjust mesh characteristics in test cases according to changes in issue #27537
2016-06-02 14:23:40 +03:00
azv
b819ae67ce 0027537: GCPnts_TangentialDeflection produces incorrect number of sample points for circular edge
* Round up number of sample points to satisfy deflection.
* Test case added
2016-06-02 14:23:36 +03:00
kgv
c574faecb9 0027549: Visualization, OpenGl_View - drop confusing misnamed methods Width() and Height() 2016-06-02 14:23:31 +03:00
emv
b0fbc5796a 0027540: Run-to-run differences in the 3D Offset algorithm
Calculating the offset vertices by the superposition of intersection vertices
between pairs of edges (BRepOffset_Inter2d::FuseVertices()).

To obtain stable result when calculating the superposition of vertices
they are sorted (BOPTools_AlgoTools::MakeVertex()).

The support of vertices has been added in nexplode command.

Small correction of tests cases for issue CR27540
2016-06-02 14:23:27 +03:00
apl
625e195819 0027038: Visualization - add new presentation for object manipulation
AIS_Manipulator class has been created to provide interactive services for manipulating with mouse local transformations of other interactive objects.

The class features three kinds of transformation modes for attached objects:
- translation of through axis
- scaling within axis
- rotation around axis

For more details please have a look at description of the class in reference manual or in header file.

The patch includes DRAW test workbench for evaluating the AIS_Manipulator features.

Clang warning (override)
2016-06-02 14:23:22 +03:00
kgv
402cfabc21 0027522: Foundation Classes, FSD_BinaryFile - incorrect size check in a stream
FSD_BinaryFile::ReadExtendedString() now compares read bytes, not symbols.
2016-06-02 14:23:17 +03:00
kgv
1e7ac41bf8 0027545: Coding - remove unused field in V3d_View::myCamera 2016-06-02 14:23:13 +03:00
msv
77887d30d8 0027492: Change error messages highlighting to make them readable in HTML report 2016-05-30 14:20:10 +03:00
gka
b94d48585b 0027520: Operation "splitshape" in the Test Harness give invalid result on the attached case.
The new method has been added in the class BRepFeat_SplitShape for addition of the sequence of the splitting edges or wires for the whole initial shape without specification of the edge->face, edge->edge mapping.
The procedure of collecting wires has been corrected so as not to take into account the distance in 2D space between adjacent edges having a common vertex.
New category of tests "bugs/splitshape" has been added to non-regression data base.

Test cases for issue CR27520

Remove compilation warnings.

Add dependence of TKFeat on TKShHealing in EXTERNLIB in order to build with genproj.
2016-05-27 15:35:51 +03:00
duv
50d06d8fcf 0027374: Visualization - optimize management of the scene bounding box
OpenGl_View now caches bounding boxes per Z-layer (instead of bounding box of entire scene in Graphic3d_CView).
Redundant invalidation of cached scene bounding box is now avoided in case
when new presentation attributes are assigned to the graphic structure.

Add a new methods ConsiderZoomPersistenceObjects() and considerZoomPersistenceObjects() in the Graphic3d_CView, OpenGl_View and OpenGl_Layer classes.
Call ConsiderZoomPersistenceObjects() in the V3d_View::FitMinMax method.

std::numeric_limits<T>::lowest() fix
2016-05-27 11:57:55 +03:00
aml
5ae6e53dec 0027341: Incorrect exact HLR results
- removal of excess interferences in case of simple hiding face
- correct processing of boundary edges coinciding with outlines
- change of API for testing Draw Command
- correction of Draw command "build3d"
- test cases are added.

Linux reference data is changed.

Partially fixed 0027340: Insufficient exact HLR speed

Number of samples in PolyPoly intersection algorithm tuned in each instance of generic class.
Default number of the samples in Geom2dAdaptor is changed according to the Adaptor2d_Curve2d class.
Minimal number of points in case of B-Spline is changed.
Minimal number of samples support is added in intersection algorithms.
2016-05-27 11:57:50 +03:00
vpa
41e08b4df8 0027317: Some visualisation tests failed because of exceptions generated by FP signals.
- missing implementation of CenterOfGeometry method was added in MeshVS_CommonSensitiveEntity;
- a check to prevent float overflow was added to OpenGl_BVHClipPrimitiveSet::Center.
2016-05-27 11:57:44 +03:00
msv
a002d297f7 0027541: ShapeFix_ComposeShell allows usage of uninitialized value of the field myInvertEdgeStatus
Initialize all fields of the class in the constructor.
2016-05-27 11:57:41 +03:00
mgn
f2b6318110 0027538: Visualization, AIS_InteractiveContext::Display() - do not erase previous display mode.
AIS_InteractiveContext::Display() does not erases old presentation modes of interactive object anymore giving us performance benefit AIS_InteractiveContext::Display() is used. Instead, the method marks them hidden in the same way as AIS_InteractiveContext::SetDisplayMode() and ::UnsetDisplayMode().
2016-05-27 11:57:38 +03:00
vpa
7d46a9ed8b 0027477: Visualization - Select3D_SensitiveCircle always return infinite depth value in boundary mode
- unnecessary re-initialization of pick result was removed from Select3D_SensitiveCircle;
- test case for issue #27477
2016-05-27 11:57:35 +03:00
ski
88d533be65 0026512: Build fails with VTK 6.2 and OpenGL2 Rendering Backend
Support of VTK with OpenGL2 Rendering Backend was added.
2016-05-27 11:57:31 +03:00
aml
6b52f1253e 0025623: Some tests become worse after 22598 fix
Tolerance of line / line analytical intersection is fixed.
Test cases are updated to the new behavior.

Update of test case according to the current behavior
2016-05-27 11:57:26 +03:00
msv
38c2acd423 0027521: Standard_ConstructionError when trying to use unifySameDom into a shape
Correct the algorithm in the function MergeEdges in ShapeUpgrade_UnifySameDomain.cxx so as to take into account the orientation of the next edge added to the chain.

Test cases for issue CR27521
2016-05-26 12:19:26 +03:00
kgv
55fb31dae4 0027458: Configuration, genproj.tcl - add -rpath-link option to linker in Code::Blocks project 2016-05-19 15:09:52 +03:00
aml
882e1d11aa 0026938: Boolean operations fail between two ellipsoids
Treatment for single singular point is added.
Test cases are updated to the new behavior.
New test cases are added,
Message of "bad" state is corrected.
2016-05-19 15:07:44 +03:00
aml
871776ea38 0027194: Possible division by zero in IntPatch_WLineTool
Correct handling for division by zero is added. This prevents exception when FPE is enabled
2016-05-19 15:04:28 +03:00
kgv
09eca2b5b3 0027499: Configuration, CMake - add option INSTALL_NAME_DIR on OS X 2016-05-19 15:02:13 +03:00
kgv
5501f9a946 0027510: Visualization, OpenGl_Window - do not ignore backing store resize on OS X 2016-05-19 14:01:30 +03:00
aml
e64622331f 0027493: [Regression relative to OCCT 7.0.0] Extrema_ExtCC does not set flag "IsParallel" equal to true for the overlapped curves
Check for infinite solutions now starts from two solutions.
Test case is added.
2016-05-19 13:23:34 +03:00
kgv
264abd72f2 0027505: Visualization, Font_FontMgr - do not look for fonts.dir on OS X
Font_FontMgr::InitFontDataBase() now uses the same approach on OS X as on Android
ignoring fonts.dir files which are non used on these systems.
2016-05-19 13:21:25 +03:00
msv
e5260e1dfa 0027466: The algorithm Extrema_GenLocateExtPS gives incorrect result
Euclidean distance criteria is added for local point / surface extrema.
Classes representing objective criteria are renamed to be consistent.
Local extrema usage is updated according to new behavior.
Test case is added.

Misprint correction.
2016-05-19 13:17:18 +03:00
msv
e1c1b6b9f4 0027490: BRepMesh: Reduce number of memory allocations
1) Reduce the number of calls to malloc by grouping requests to larger blocks. To achieve this goal, the following ways are used:

- Containers of types sequence, list and map are initialized with an instance of NCollection_IncAllocator, at this taking care of the time of life of allocated objects, so that not to occupy huge amount of memory.

- Allocation of several arrays having the same and short life time is changed so that to allocate a buffer array of necessary size and to place arrays in this buffer.

2) In BRepMesh_FastDiscretFace, optimize the function filterParameters so that to avoid excess memory allocations.

3) In NCollection_CellFilter, change declaration of the method Reset to accept array by reference rather than by value.

4) Add Allocator() method in map, sequence and vector collection classes by analogy with list collection.

5) Correct the size of block for IncAllocator for x64 platform. In order free-ed block to be returned to the system its size should be at least 1024K on x64 and 512K on x86. This allows to retain free virtual space almost to the state before algorithm run.

6) Decrease amount of memory zeroed by calloc. For that, reduce theIncrement parameter of the embedded vectors of the classes NCollection_UBTreeFiller and BRepMesh_VertexInspector to default value 256.

7) Avoid computing bounding box when not necessary (if no relative deflection is used)

8) Cycles by wires of face using TopExp_Explorer are converted to use TopoDS_Iterator instead.

9) BRepMesh_FastDiscret::Add optimized to avoid storing sequences of faces and edges

10) The tests "mesh standard_* W7" are corrected to accept the new behavior. Earlier the following error took place:
Not connected mesh inside face 9
{12 13}
Now this error was replaced with another one:
free nodes (in pairs: face / node):
{9 12}
Actually it is not a regression, rather improvement, if we look at the snapshot.

11) Change other test cases to their actual state.
2016-05-13 19:04:34 +03:00
bugmaster
f02e43eb35 Adjusting testing cases for current state of OCCT 2016-05-13 12:37:53 +03:00
gka
0911d065ff 0027169: Suspitious behavior of importing names during STEP import
In order to avoid using empty strings in the names of the assemblies in the XCAF document after reading step file for cases when description or name is defined by only 1 space character method TCollection_AsciiString::Length()
was replaced on the method TCollection_AsciiString::UsefullLength().

Test case for issue CR27169

Eliminating warning
2016-05-12 18:12:22 +03:00
abv
3d370858dd 0027432: Null Handle Access When Creating AIS_Trihedron
Debug-only "RaiseIf" is replaced by simple "if" to have exceptional situation handled correctly in Release mode.

Mention mandatory variable CSF_ShadersDirectory in porting notes for OCCT 6.9.0

Test cases for issue CR27432

Deleting test cases for issue CR27432
2016-05-12 12:08:24 +03:00
ssv
3e6a4cd02a 0027463: BRepTools_ReShape ends up with empty shapes
Add check on empty topological containers.

Add empty shapes to the replacement map.

Add Draw command for Re-Shape.

Add a test grid for reshape with a single use case for starters.
2016-05-12 12:02:49 +03:00
anv
38f24151f6 0027476: Code alignment for ShapeFix_ComposeShell 2016-05-12 11:59:35 +03:00
anv
4613a51fd4 0027331: Not valid result on translating the file
Added processing of a short segments of a seam edge.

Test case added.
2016-05-12 11:59:31 +03:00
aml
aa1b48c7dd 0027475: Incomplete direction for Powell method in math_GlobOptMin
Directions are changed to be valid orthogonal set.
2016-05-12 11:52:05 +03:00
msv
18151f1aa1 0027454: Application hangs while opening a non-OCAF XML file
1) Add protection against accessing null pointer in PCDM_ReadWriter::FileFormat.

2) In LDOM_XmlReader::ReadRecord, take into account that the character '>' can have no special meaning (e.g., in a text), and we must read the data behind this character to complete the current tag reading. This treatment concerns the mode of work when myTagPerStep is true.

3) Create a test case of reading of XML file not related to OCAF document.

Test case was added.
2016-05-12 11:09:15 +03:00
aml
15a954deb5 0027467: Modeling Algorithms - class Extrema_ExtCC2d does not find extremum between two intersecting lines
Line / line analytic treatment is added for 2d case.
Test case is added.
2016-05-12 10:53:29 +03:00
kgv
8d0b864941 0027460: Data Exchange - restore method XSControl_WorkSession::MapReader() 2016-05-12 10:49:53 +03:00
apn
c9de149dec 0027463: Checkprops can not be used with several properties
Added possibility to use several properties in one checkprops command

Modified test cases according to changes in checkprops command
2016-05-12 10:46:21 +03:00
Benjamin Bihler
a1530ab1b8 0027433: Opening/Saving OCAF Documents With Own Document Format Does Not Work
Modified Load(...) method of Resource_Manager.cxx to print file names correctly.

Removed appending (empty) file name to directory name, since this is not
necessary and leads to a Standard_OutOfRange failure in TCollection_AsciiString.

Appending file name is done, but only if the name is not empty.

Added test case
2016-05-12 10:37:11 +03:00
jgv
c59fcd1186 0027468: Incorrect processing of some cases by HLR algorithm
Incorrect work of HLR algorithm caused by usage of wrong tolerances, wrong sampling of 2d curve and some other bugs are fixed.

Test cases for issue CR27341
2016-05-12 10:33:35 +03:00
ika
b7b2f85ac1 0027455: Implementation of connection points
Add Import/Export connection points.
Make some improvements in STEP reading in collections shapes, to which dimension is attached.
Update tests.
2016-05-12 10:30:09 +03:00
oan
8e509b0ba1 0027442: Rotation sweep can't be rendered in 3D
Do not insert internal nodes for Cylinder in case if it is less than DefFace value or in case of long cylinder with small radius due to protection against overflow during casting to integer.

Small correction of shape name in test case for issue CR27442
2016-05-12 10:17:38 +03:00
kgv
a9b51f4977 0027424: Configuration, genconf.tcl - add missing option to enable TKD3DHost in configurator 2016-05-11 17:11:07 +03:00
kgv
5951a08873 0026846: Configuration, genproj.tcl - create hardlinks instead for header redirection
Build guides updated accordingly

Update genconf screenshot for Linux
2016-05-11 17:11:02 +03:00
Benjamin Bihler
5950d7816e 0027478: Configuration - avoid inclusion of Xlib.h within Graphic3d_GraphicDriver.hxx
Replace Aspect_DisplayConnection.hxx inclusion by forward declaration.
2016-05-10 20:59:55 +03:00
oan
7856b126b0 0027384: BRepMesh_IncrementalMesh does not take angular deflection into account for spun/elementary surfaces
Check deviation of normals at vertices of triangles for complex surface types different from Bezier and BSpline.
Modified test cased according to changes in BRepMesh.
Do not remove more intermediate parameters than N - 3 in order to have at least one parameter related to surface internals.
Check angle for angular deflection before removement of intermediate parameters.
Unify computation of internal vertices for complex surfaces.
Discretization points of edges are taken into account during computation of step of mesh grid.
Remove parameters only if they fit the constrains along the whole surface.
Do not add random internal parameters in case if their number is just 2.
Force freezing parameters both for U and V in case of significant control point.

Modified test cases

Warnings elimination in vc14.
2016-04-29 11:48:33 +03:00
dbp
3a507ddb47 0027368: Finding objects in vicinity of a ray
In frames of this issue, radix sort functionality from BVH_LinearBuilder was generalized and implemented as separate classes in BVH package. The basic API of sorting class is given in BVH_Sorter class, while BVH_QuickSorter and BVH_RadixSorter provide quck sroting and radix sorting algorithms respectivly.
2016-04-28 17:44:36 +03:00
nbv
79997052f1 0027310: Huge tolerance obtained in the result of intersection of two cylindrical faces
Sometimes start point of the intersection line is in the surface boundary strictly. I.e. the parameter of this point in the surface can be equal to both 0 or 2*PI equivalently. It is important to chose correct parameter value.

The algorithm of prediction is based on monotonicity property (see CylCylMonotonicity(...) function in IntPatch_ImpImpIntersection_4.gxx). Now, this function is used wrongly. The fix improves this situation.

Small optimization in the code.
Creation of test cases .

The logic of returning value by the method BoundariesComputing() has been corrected.
2016-04-28 17:04:58 +03:00
nbv
b55bd02353 0027269: Intersection algorithm produces null-length curve
Restriction line can correspond to a degenerated edge. In this case we shall return null-curve (instead of Null-length curve).
2016-04-28 14:21:40 +03:00
aml
246c7a7554 0027371: Regression: BRepExtrema works too much slower in 691 (from 670)
I
Lipschitz constant tuning.
Shubert estimation for minimal value is added.

II
Math_GlobOptMin Refactoring.

III
Test case is added.

class NCollection_CellFilter_Inspector moved into math_GlobOptMin class.
2016-04-28 14:03:59 +03:00
ski
4b5857d330 0027435: Compilation error on Linux platfrom in Debug mode with enabled OCCT_DEBUG definition
Error was fixed.
2016-04-27 13:31:29 +03:00
ski
04cd0c6dda 0027195: Configuration, CMake - data and samples/tcl folders are installed with DRAW executable only
Installation of data and samples/tcl folders was binded with DRAWEXE
2016-04-27 13:23:36 +03:00
ski
e13e5f39c5 0027212: Make cmake configurator flexible concerning option BUILD_WITH_DEBUG
Added flexible behaviour for option BUILD_WITH_DEBUG.
2016-04-27 13:21:14 +03:00
Benjamin Bihler
a139a35380 0027417: Coose a Better Default Release Optimization Parameter for MinGW-w64
Forcing CMAKE_CXX_FLAGS_RELEASE to -O2 -DNDEBUG, if the compiler is MinGW-w64.

Switched to replacing optimization parameter instead of overwriting
CMAKE_CXX_FLAGS_RELEASE string
2016-04-27 13:11:44 +03:00
Benjamin Bihler
eaffb01e7e 0027402: Fix Compilation with MinGw and Additional Libraries
Setting CSF_GL2PS in occt_csf.cmake in the same way as CSF_FREETYPE is set.

Added MinGw library suffix to a in 3rdparty_macro.cmake, freetype.cmake and tbb.cmake.

Removed redundant CSF_GL2PS definition for non-Win32 configurations
2016-04-27 13:09:09 +03:00
anv
3e64931da5 0027427: Exception on loading a DE package to Draw 2016-04-25 15:31:58 +03:00
emv
92788bf4bb 0027425: Unable to build AIS package with OCCT_DEBUG enabled in current master
The usage of the removed field mySelName of the AIS_LocalContext class has also been removed.
2016-04-25 08:56:22 +03:00
bugmaster
360f800be8 Update of testing cases for current state of OCCT 2016-04-22 15:22:16 +03:00
anv
7f56eba8cd 0027349: XtControl_Reader is not thread-safe
Support of profiles for norms is removed
Getting rid of thread-unsafe static variables.
Sequence is not thread-safe. Replacing it with Vector.
Updating samples due to previous changes.
Resolving conflict with system environment.
2016-04-22 15:22:10 +03:00
duv
299e0ab98f 0026809: Visualization, TKOpenGl - handle point arrays with per-vertex color within built-in GLSL programs
Shader rendering of point sprites with per-vertex colors and shading have been fixed.

Material state was removed from OpenGl_ShaderManager.
Material properties now should be modified trough OpenGl_Context::SetShadingMaterial().
2016-04-22 15:22:03 +03:00
nbv
b8f67cc236 0027302: Invalid curves number in intersection result
1. In frame of the fix for #27282 issue, we have obtained several prolonged curves, which have common point(s). Fix for this issue joins these curves if it is possible.

2. ElCLib::InPeriod(...) method has been improved. Now it has become more faster (in general cases) and more reliable (in frame of  FLT_OVERFLOW and DIVISION_BY_ZERO cases processing).

Creation of test case for issue #27302
Test case tests\bugs\modalg_6\bug27282_2 has been adjusted in accordance with its new behavior.
2016-04-22 15:21:57 +03:00
kgv
8b9a309b48 0027202: Visualization - add sensitivity Select3D_SensitivePrimitiveArray for Graphic3d_Buffer
New class Select3D_SensitivePrimitiveArray can be initialized directly from
presentation data structures Graphic3d_Buffer defining triangulation or point set.

This class also can combine several elements into patches
to reduce BVH initialization time in at the expense of slower detection time.

AIS_PointCloud::ComputeSelection() - selection is now computed on point set using Select3D_SensitivePrimitiveArray by default.
PrsMgr_PresentableObject::Compute() - redundant default argument value has been dropped.
BVH - store BVH_Set size in local variable to simplify debugging.
2016-04-22 15:21:51 +03:00
aba
3f1eb0abf9 0027359: Visualization - add support of flipping for textured text
Added option for OpenGl_Text to use previous model-view state.
Added interface to enable this option in Prs3d_Text
Added option to enable flipping in AIS_NameLabel

Eliminated warning
2016-04-22 15:21:45 +03:00
mpa
016e595986 0026886: Visualization, TKV3d - eliminate global variables
- AIS_InteractiveContext - create new dummy class field to have an empty TopoDS_Shape object.
- AIS_Point, PrsMgr_PresentableObject - rename static variables to local function variables.
- AIS_Shape, SelectMgr_SelectableObject - remove unused static variables.
- Graphic3d_MaterialAspect, V3d_Viewer - make global static variables as constant.
- V3d_View - move global variable zRotation to class field.
- Move a variable theCurrentSelection as a field of AIS_InteractiveContext and AIS_LocalContext classes. Multiple selection is not used now, so each Context have an own selection.
- Move myStructGenId from Graphic3d_StructureManager to Graphic3d_GraphicDriver for identifying the structures in the driver.
- Move default variable (no shading light) from static value to the class field of OpenGL_View.
Porting note:
- Static methods of AIS_Selection is not used now. Methods of
  AIS_InteractiveContext::InitSelected(),::MoreSelected(),::NextSelected()
  should be used instead of static methods of AIS_Selection.
2016-04-22 15:21:39 +03:00
isk
83da37b115 0026434: Visualization - Textured objects should have priority over the environment mapping.
Add handle on environment texture in OpenGl_Workspace.
Add a new parameter UseEnvironmentTexture to the Graphic3d_ZLayerSettings.
OSD layers don't use environment texture by default.
zbuffertrihedron doesn't use environment texture.
vzlayer can enable/disable environment texture mappping.
Delete unnecessary files Graphic3d_TypeOfSurfaceDetail.hxx and V3d_TypeOfSurface.hxx.
Delete functions SurfaceDetailType and SetSurfaceDetailType functions from Graphic3d_CView.
Delete functions SurfaceDetailState and UpdateSurfaceDetailStateTo from OpenGl_ShaderManager.
Delete class OpenGl_SurfaceDetailState.
Delete functions SurfaceDetailType and SetSurfaceDetailType from OpenGl_View.
Delete functions SetSurfaceDetail and SurfaceDetail() from V3d_View.
Delete functions SetDefaultSurfaceDetail and DefaultSurfaceDetail from V3d_Viewer.
Delete draw command VSetTextureMode.
Add description in dox.
2016-04-22 15:21:32 +03:00
aml
6143f12f36 0027275: Unused formal parameter in BSplCLib::EvalBsplineBasis
Unused formal parameter is deleted.
2016-04-22 15:21:24 +03:00
abv
9a9a3edfd8 0027234: Code duplication: Convert_CompBezierCurvesToBSplineCurve* in ShapeConstruct
Classes from ShapeConstruct duplicating the ones from Convert package are removed.
Protection against joining segments when degree is 1 is introduced in Convert classes.
Optimization previously made in Convert_CompBezierCurvesToBSplineCurve class (within #25256) is applied to 2d equivalent.

Data for automatic upgrade procedure are extended to replace removed classes by their duplicates from Convert.

// cout disabled unless OCCT_DEBUG is defined
2016-04-22 15:21:19 +03:00
ika
02fd709bbb 0026930: ShapeConstruct_ProjectCurveOnSurface returns a B-Spline instead of line (again)
Upgrade check of closeness of 2dcurve to line during projection:
  For C1 and more surfaces check distance to normal, not to surface, for C0 surfaces update tolerance formula.
  Add check for possible period jump in some inner point.
Update some test cases.

Add cache saving for lines,
update fixPeriodicTroubles() function, using parameters from cashe.

Small correction of test cases for issue #26930

fix processing of points from cache.

Update of test cases according to the new behavior

Fix behavior of fixPeriodicityTroubles() on different isolines,
fix copy/paste mistake.
Update test cases:
iges_2 C4 - return to master values
step_3 E6 - improvement.
2016-04-21 11:37:32 +03:00
abv
4680293609 0027385: assertion in static initializer in a Windows GUI application
Useless global pointer to cerr is removed from OSD_Error, along with methods supporting its customization (Windows-only).
Global accessors to environment variables are replaced by locals in UnitsAPI.cxx.
2016-04-15 16:07:57 +03:00
gka
a0bb29e79e 0027272: FixMissingSeam function creates G1 seam curves
Method BRepLib::EncodeRegularity() is improved to set regularity GeomAbs_CN for edges lying on the same-domain surfaces (where derivatives on both surfaces are equal in all points).

DRAW command getedgeregularity is added to query regularity of the edge on specified faces.
DRAW command edgeregul is removed (this functionality is provided by command encoderegularity).

Added tests: bugs modalg_6 bug27272, bug27383_1, bug27383_2

Correction of shape name in test case for issue CR27272
2016-04-15 10:59:52 +03:00
ski
46bd680a25 0027351: Custom OCCT DLL name suffixes
Added generation of libraries with postfix.
2016-04-14 13:13:05 +03:00
ski
3321f6847d 0027380: cmake should not try to link against 3rd-party libs when configuring a static OCCT build
Linking against 3rd-party libs when configuring a static OCCT build is eliminated.

math library is not linked if build is static

also: an info message is expanded by several words describing using of only header files of 3rdparties

Removed unnecessary for static build CMake gui variables
2016-04-14 12:57:53 +03:00
apn
f7ac9097ee 0027369: Assistance building Parasolid importer
OpenCASCADE${OCCT_MODULE}Targets are generated for all dependent toolkits.
2016-04-14 12:55:20 +03:00
jgv
601b1c8d56 0027280: HLR algorithms taking seam edges into account
Interface of HLRAppli_ReflectLines has been modified.
New Draw command "hlrin3d" has been added.
2016-04-14 12:45:56 +03:00
nbv
309bad284d 0026918: GeomLib_CheckCurveOnSurface cannot compute distance if 3D-curve is periodic
Creation of test case for this issue.
2016-04-14 12:43:02 +03:00
nbv
79981d14cc 0027124: Invalid curve on surface in the result of General Fuse operation
Creation of test cases for issues #27124 and #27129.
2016-04-14 12:32:40 +03:00
ika
f0bf70e8cc 0027372: Import/Export dimension text position
Modify Import/Export STEP.
Add Draw commands to set and get orientation and position of dimension text.
Add Draw commands to set and get presentation.
Add test.
2016-04-14 11:53:06 +03:00
ifv
8f8398f6e4 0027322: geom/revolution_00/A1: Incorrect pcurve creation
ProjLib_Cone.cxx - correction wrong calculation of projection line on cone
GeomInt_IntSS_1.cxx - modification of method BuildPCurves(...) - adjusting first or last knots of 2d Curve
ProjLib_ComputeApprox.cxx - modification of method Function_SetUVBounds(...) for case projecting line on cone.
Modification of tests - removing first TODO

Test case for issue #27322
2016-04-14 11:50:33 +03:00
emv
94074ec660 0027379: Unable to build TKXDESTEP using WOK (wgenproj command) in current master
The dependency on TKShHealing has been added.
2016-04-13 10:31:59 +03:00
ibs
9d034c3730 0027321: Configuration, CMake - check for doxygen during the first configuration and turn on overview building if doxygen is found 2016-04-11 10:46:18 +03:00
bugmaster
c62927c662 Adjusting test cases for current state of OCCT 2016-04-08 11:51:03 +03:00
jgv
f0144633d9 0027271: Unifysamedomain invalid result
Prevent merging of faces along periodic direction.

Test case "bugs heal bug27000_1" has been corrected to actual state of the algorithm.
2016-04-08 11:50:58 +03:00
ika
7644c7f4a1 0027304: Implemetation of descriptions for Dimensions
- Add poles with array of descriptions and description names to DimensionObject,
- Modify Import/Export STEP,
- Add Draw commands for descriptions,
- Create test,
- Reorganize end script for test/gdt/dimensions.
2016-04-08 11:50:53 +03:00
bugmaster
6d4bf6d9b1 Incrementation of OCCT version up to 7.0.1 2016-04-08 11:50:48 +03:00
aml
5333268def 0027299: Incorrect result of the normal projection algorithm
Curve splitting is added to handle seam passing by initial curve.
test cases are added.

Minor corrections.
2016-04-08 11:50:43 +03:00
isn
58e14d59e7 0027117: BRepClass3d_SolidClassifier doesn't take into account vertex/edge/face tolerances
Various improvements in point-solid classifier:

1) Refactoring.
2) BndBoxTree is extracted into separate class.
3) UB-tree calculation is cashed to improve point-solid classification speed.
4) Ray / curve intersection improved by trimmed parameters and correct order.
5) Fixes in logic.
6) Calculation caching at the classifier level.

3D-claasifier now takes into the account the vertex/edges tolerances. If the given point lays inside the tolerance area of vertex or edge of the solid it's classified as TopAbs_ON.
The behavior of IntCurvesFace_Intersector::Perform was changed. Now it may use optional null-tolerance to classify 2d-point relatively to the given face.
UBTreeFiller is used to speedup intersection process between edges/vertices and the point.
The test case 'boolean gdml_private ZH2' extensively uses the SolidClassifier. After this fix it returns the correct classification statuses, which leads to incorrect result shape (reported by checkshape). Yet the result shape without this fix also seems to be incorrect (one of the isolines goes out of boundary of the face). Thats why it's marked with 'TODO'.

Corrections in test cases.

Test case is added.
2016-04-08 11:50:38 +03:00
ika
d658f27576 0027336: Update STEP entities, according to AP242
Add header  and parameter for AP242.

Update entities:
product_definition_relationship
styled_item

Update select types:
security_classification_item
person_and_organization_item
organization_item
group_item
external_identification_item
document_reference_item
date_item
approval_item
external_identification_item
draughting_callout_element
value_qualifier
invisibility_context

update gdt tests.

fix compilation warnings.
2016-04-08 11:42:59 +03:00
msv
f98965d2bc 0027315: UnifySameDomain leaves unmerged edges
Adapt the internal function MergeEdges to the case when on input it takes a set of edges constituting several connected chains.
2016-04-08 11:42:53 +03:00
emv
476d6b14a6 0027332: Duplicate output from Draw Interpreter in cout in the debug function Draw_Eval 2016-04-08 11:42:47 +03:00
nbv
243505b81b 0027300: Boolean operation produces invalid shape in terms of "bopargcheck" command
1. Check, if value found by math_PSO algorithm cannot be precised by math_NewtonMinimum algorithm. In this case, we call math_PSO algorithm repeatedly, however, with other parameters.

2. Some margin of edge tolerance value has been provided in IntTools_Tools class.

3. Interface of math_NewtonMinimum class has been changed (method GetStatus() has been added).

Correction of some test cases according to their new behavior.
2016-04-08 11:42:42 +03:00
msv
cb120537bf 0027309: Result of UnifySameDomain has InvalidMultiConnexity error
The update of the set of boundary edges has been added for the case when faces containing milti-connected edges are excluded from merging.

Update test cases for unifysamedom to generate snapshots.
2016-04-08 11:42:37 +03:00
ika
b0cef6061a 0027235: Export GDT: Annotation plane and Presentation.
Implement Null_Style STEP type.
Implement export of annotation planes and presentation as tessellated geometry.
Add tests.
2016-04-08 11:42:32 +03:00
msv
fe1a6e4e54 0027082: UnifySameDomain must add internal edges where appropriate to resolve self-intersections
The new option AllowInternalEdges has been added in the class ShapeUpgrade_UnifySameDomain. It determines how the algorithm treats the situation when two faces can be merged together but they have connection with another face via the common edge.

With this option turned on, merging of such faces is not stopped, but the multiconnected edges are added to the merged face as INTERNAL edges.

By default it is false. In this mode such merging is forbidden, so the result shape will not contain any new INTERNAL edges.

The behavior of the algorithm has been changed so that it does not merge faces from different shells.
2016-04-08 11:42:26 +03:00
aml
6220ba10a3 0027184: BRepExtrema_DistShapeShape returns wrong result.
Local optimization default algorithm is changed to "distance" based.
Test case added.
2016-04-08 11:42:21 +03:00
vro
965681c56a 0026832: TFunction_Iterator won't work if ExecutionStatus is Standard_False.
The method TFunction_Iterator::More() is corrected().
2016-04-08 11:42:16 +03:00
gka
aee24cb547 0027151: Exception is raised during performing command "splitshape" in the Test Harness
Added protection for cases of the overlapped edges.
Returning value for methods in the LocOpe_SplitShape::AddOpenWire(), LocOpe_SplitShape::AddClosedWire() are modified from void to boolean in order to avoid raising exceptions.
To avoid regression for test case modalg_5 bug25243 tolerance of vertices of the degenerated edges are increased to value of tolerance of the splitting vertex for case when splitting vertex was projected on  the degenerated edge.
2016-04-08 11:42:11 +03:00
vro
e9947e12bc 0027192: Improvement of storage of Ocaf document in XML file format
Improvement of code in XmlMDataStd_ExtStringArrayDriver.cxx

Corrected test-script
2016-04-08 11:42:05 +03:00
ski
863f782a42 0027146: Create command checkplatform
Command checkplatform was created.
All test cases were updated.

Global variable os_type was eliminated.
New option -osx (MacOS) for procedure checkplatform was added.
2016-04-08 11:42:00 +03:00
oan
0a2a7b466d 0026321: Crash in BRepMesh_FastDiscret::Add
BRepMesh_FaceAttribute: distinguish constructor and parameters initialization.
2016-04-08 11:41:55 +03:00
aml
eb5c2ff415 0027229: Extema documentation is out of date.
Extrema documentation updated to be up to date.
2016-04-08 11:41:50 +03:00
duv
df45f8db5f 0027354: Visualization: TKOpenGl - OpenGl_TextureBufferArb API should be extended
All variants of Init function of OpenGl_VertexBuffer are now also supported by OpenGl_TextureBufferArb.
Missing texture formats added to OpenGl_GlFunctions.hxx.
2016-04-08 11:41:45 +03:00
ibs
1d505bb0f8 0027365: Configuration, CMake - file writing error appears if 3RDPARTY_DIR is empty
3RDPARTY_DIR and INSTALL_DIR are quoted in a file TO_CMAKE_PATH command to avoid error when variable is empty
2016-04-08 06:23:13 +03:00
abv
84258256c0 0027355: Configuration, CMake: install path on Windows is incorrectly processed
Avoid resetting CMAKE_INSTALL_PREFIX if defined.
Back slashes are converted to straight slashes in INSTALL_DIR and 3RDPARTY_DIR variables.
2016-04-05 16:28:16 +03:00
ski
ada9ef40c2 0027301: CMake: export targets for OCCT
Enabled creation of CMake target files (one per module) for OCCT at install time.
Variables enumerating available OCCT toolkits by module are added in CMake configuration file.
Added check of availability of OCCT modules specified by OpenCASCADE_FIND_COMPONENTS variable.
Location of CMake configuration and target files in Windows layout is changed to $INSTALL_DIR/cmake (thus common for all configurations), to be found by standard search logic of CMake find_package() function.
2016-04-05 15:52:28 +03:00
bugmaster
65ebcbd01a Incrementation of OCCT version up to 7.0.0 2016-04-04 16:47:35 +03:00
duv
d9e72440ee 0027337: [Regression vs. 6.9.1] Selection highlight is poor in ray traced mode with FSAA
For FSAA mode we now store the depth values from first sample in myRaytraceFBO1 and do not modify it while collecting the rest of samples.
When all samples are gathered we fetch color from myRaytraceFBO2 and depth from myRaytraceFBO1 and display it to the current FBO.

Test bugs vis bug27337 added.
2016-04-04 16:47:09 +03:00
abv
63fad07eb4 0027338: Minor corrections in Tcl samples and documentation
In samples:
- Fixed syntax error in DataExchangeDemo.tcl
- MSAA is enabled in some tests to provide better presentation
- Option to build isolines on triangulation is used in some samples to avoid artifacts in selection highlight
- Colors are corrected in cpu.tcl

In documentation:
- Reference to automake tools is removed
- Standard_OVERRIDE is expanded to "override"
2016-04-04 16:46:09 +03:00
nbv
6ca1c7466b 0027325: [Regression to 6.9.1] geom/revolution_00/A1: BOPTools_AlgoTools2D::AttachExistingPCurve doesn't work
1. Check, if edge is same-range, is now made with some tolerance (not strictly) in GeomLib_CheckCurveOnSurface class. Default value of this tolerance is Precision::PConfusion(). However, this value can be changed with corresponding interface.

2. DRAW-command "attachpcurve" has been added to BOPTest_UtilityCommands.cxx file. This command creates p-curve of given edge on given face. It can assign 2D-curve of one of the edge already included in the face or (if it is not possible) rebuilds new 2D-curve.

Creation of test case for this issue.
Adjusting test case boolean volumemaker A8 according to its new behavior on Windows.
2016-04-04 16:45:39 +03:00
vpa
4c0d97ac42 0027318: Memory is not released in Select3D_SensitiveSet when destroying AIS_InteractiveContext without removing objects
- destructor was added to SelectMgr_SelectableObject to clean up selections;
- test case for issue #27318

Warnings elimination
2016-04-04 14:29:29 +03:00
ski
16b40363d3 0027209: CMake - warnings on configuration step for VTK when using vc14 target
Added check for existence of VTK library target.

Removal of hard-coded path to Direct 3D import library is generalized and amended for VTK built with VC12 and VC14.
2016-04-04 14:25:30 +03:00
ski
2e48c1cbbc 0027290: CMake configuration files for OCCT
CMake scripts are improved to install CMake configuration files for OpenCASCADE product.
2016-03-31 11:44:23 +03:00
msv
9fc376b286 0027051: BRepBuilderAPI_GTransform produces invalid result
Test case for the bug.

Small correction of vprops reference value.
2016-03-31 11:33:56 +03:00
apn
fd0add651a 0027167: Boolean operations produce an invalid shape
Added test case bugs/modalg_6/bug27167.
Modified shape name in bugs/modalg_6/bug27190.
2016-03-30 12:40:45 +03:00
msv
afb2781582 0026929: Extrema_ECC hang/crash
Comparator functor corrected to return false in the case of equal elements.
Test case added.
2016-03-29 15:52:43 +03:00
nbv
bf714c8477 0027305: Using undefined variables, which causes devide by zero
Initialization of the boundaries of the function "FuncPreciseSeam" in IntPatch_ImpPrmIntersection.cxx.
2016-03-29 15:52:38 +03:00
jgv
f6fd8f0bcf 0025813: regression in Hidden Line Removal
Regressions that appeared in OCCT 6.6.0 are fixed.

Correction of test cases for issue #25813

Reference data update for test case bugs/mnodalg_6 /bug25908
2016-03-29 15:52:33 +03:00
ski
a722bd5548 0027291: Command File->New crashes Import Export Qt sample on Linux
Crash on Qt 4.8.6 was fixed.
2016-03-29 15:52:28 +03:00
aml
2a11138ffe 0027306: Incorrect documentation for BRepOffsetAPI_NormalProjection class
Incorrect sentence is deleted to avoid misunderstanding.
2016-03-29 15:52:23 +03:00
nbv
eee615ad2a 0027282: [Regression to 6.9.1] smesh/bugs_00/A6: Cut produces an empty shape
1. The reason of the regression is not-closed intersection result. This problem has been solved (in this fix) by adding joint point to the both neighbors intersection lines (lines were extended to the this intersection point). It is made in IntPatch_WLineTool::ExtendTwoWlinesToEachOther(...) method.

2. Interface of IntPatch_PointLine and inherited classes has been changed. Methods ChangeVertex(...) and RemoveVertex(...) have been added.

Test cases for this issue have been created.

Small correction in the code.
2016-03-29 15:52:18 +03:00
nbv
93e38faa3b 0027179: The algorithm of sharing edges in Boolean operation should be improved
1. New sharing algorithm has been implemented. If intermediate point of some edge is included in the tube with center taken in another edge and radius equaled to maximal vertex-tolerance of both edges then these two edges are considered to be shared. This know-how touches edges only, which have common blocks with interfered faces. If they do not have any common-blocks the algorithm will work as before.

2. Interface of BOPAlgo_PaveFiller::IsExistingPaveBlock(...) method has been changed.

Creation of test case for issues #27128 and #27179

Adjusting some test cases according to their new behavior, because they are IMPROVEMENTS really (TODOs have been deleted).
2016-03-29 15:52:13 +03:00
msv
0d42485334 0027283: Regression vs 6.9.1: smesh/bugs_11/L9: invalid result of General Fuse
Get rid of hard-coded tolerance 0.0001 for intersection with a conical surface.

Small correction of test case for issue CR27283

Adjusting test cases
2016-03-29 15:52:07 +03:00
ifv
fe3e01db81 0027273: The computation of linear properties on shared shapes is not correct
New flag is inserted in parameters of static methods LinearProperties(...), surfaceProperties(...), volumeProperties(...). This flag defines to skip or not to skip second and next appearance shared topology entities (edges, faces, shells) in properties calculation.
Corresponding Draw commands is modified to take in account new parameter.

Test case for issue CR27273

Add option -skip into checkprops command
2016-03-28 17:31:20 +03:00
nbv
1fbf69bb21 0027175: Intersection algorithm with increased tolerance works incorrect with some shapes
1. Algorithm of coincidence check between Walking and Restriction line has been improved in IntPatch_ImpPrmIntersection.
2. Creation of test case for this issue.
2016-03-28 17:31:15 +03:00
aml
0d1536ad4e 0027133: Incorrect result of the normal projection algorithm
Topological tolerances changed to geometric tolerances.
Protection from the usage of invalid result is added to restore good projection.
Test cases are updated.
Test case added.

Correction of test case for issue CR27133
2016-03-28 17:31:09 +03:00
kgv
f68acbf47a 0027286: Visualization, TKOpenGl - avoid using light index within built-in GLSL programs for simplest configuration
OpenGl_ShaderManager::stdComputeLighting() - handle single directional light specifically
for compatibility with broken OpenGL ES drivers.

Added test cases using built-in GLSL shading programs.
2016-03-28 17:31:04 +03:00
apn
259a8d04eb 0026293: Error opening the document
Added test cases bugs/caf/bug26293_1 bug26293_2

Unnecessary catch were deleted.
2016-03-28 17:30:58 +03:00
emv
5be33fb667 0027274: Regression vs 6.9.1: Wrong result of General Fuse operation on two cylinders
When reducing the tolerance values of the vertices put on section curves take into
account all section curves, not only those for which the tolerance have been reduced
(method void BOPAlgo_PaveFiller::CorrectToleranceOfSE()).
The new protection has been added to avoid reducing of tolerance values of vertices
to the values less than the tolerance values of edges containing these vertices.

Adjusting of test case bugs/modalg_5/bug25232_9
2016-03-24 12:49:28 +03:00
msv
66d914e8ea 0027293: Add debug function to save a list of shapes into a compound 2016-03-21 19:25:48 +03:00
apv
73e5a645f3 Adjusting test case after changes of issue 27270 2016-03-21 14:56:33 +03:00
Benjamin Bihler
37782ec21f 0027281: Some classes in GCPnts are not const-correct
const keyword has been added to the method parameters
2016-03-18 16:40:26 +03:00
vpa
7411850ad7 0027285: Visualization - selection of AIS_MultipleConnectedInteractive is broken
- method SelectMgr_SelectableObject::HasSelection became virtual, unnecessary variable was removed;
- redefined HasSelection method for multiple connected interactives;
- AIS_InteractiveContext::AddOrRemoveSelected was corrected to use global selection owner;
- test case for issue #27285
2016-03-18 16:26:52 +03:00
emv
1511c7e90f 0027270: Boolean operations: incorrect assembling of sub-shapes in container shapes (wires, shells, compsolids)
The map to protect the result of Boolean operation from duplicating parts in containers has been removed (method void BOPAlgo_BOP::BuildShape()).
The results of Boolean operations on containers will be the following:
1. For the arguments of collection type (WIRE, SHELL, COMPSOLID) containing overlapping parts the overlapping parts
passed into result will be repeated for each container from the input shapes containing such parts.
2. The result of the operation Fuse for the arguments of collection type (WIRE, SHELL, COMPSOLID) will contain
the same number of containers as the arguments. The overlapping parts (EDGES/FACES/SOLIDS) will be shared among them.
For example, the result of Fuse operation between two wires will be two wires sharing coinciding edges if any.
3. The result of the operation Common for the arguments of collection type (WIRE, SHELL, COMPSOLID) will consist
of the containers containing the same overlapping parts. For example, the result of Common operation between two
fully/partially overlapping wires will be two wires containing the same edges.

Style correction.

Added test case bugs/modalg_1/bug13538
Modified boolean test cases according to new begavior
2016-03-18 16:24:16 +03:00
aml
447c7e54f0 0027261: Incorrect bounding boxes computed for the b-spline faces
Protection from the out of bounds parameters is added.
Test cases are added.
2016-03-18 11:22:20 +03:00
ski
4b3541c68b 0027176: Configuration, CMake - INSTALL_DIR is a common prefix for all other install variables
Possibility to customize layout of installation of OCCT is introduced by:
- variable INSTALL_DIR_LAYOUT - select one of the two predefined layouts: either Windows (classic OCCT layout) or Unix (Linux standard)
- variables INSTALL_DIR_* (BIN, LIB, INCLUDE, RESOURCE, DOC, TESTS, SCRIPT, SAMPLES, DATA) - specify locations of relevant components
- variable INSTALL_DIR_WITH_VERSION (bool) - specifies whether full version of OCCT should be used in paths in Unix layout

Files LICENSE_LGPL_21.txt and OCCT_LGPL_EXCEPTION.txt are always installed.

Environment is extended to support non-default layouts.
For that, environment variables "CSF_OCCT*Path" are defined, corresponding to CMake variables INSTALL_DIR_* described above.
Visual Studio environment, DRAW, tests, samples are amended to use these variables instead of (or as alternative to) CASROOT.

Settings of Products-specific vars are removed from environment scripts.

File genconf.bat was corrected to avoid error message for the case when path to TCL contains spaces.

Product name in rc files changed to "Open CASCADE Technology".
2016-03-18 09:44:11 +03:00
msv
cb492860f1 0027253: Boolean cut produces invalid result shape
Add test case for this bug.
2016-03-18 07:15:52 +03:00
nbv
16423f20d8 0027263: Regression vs 6.9.1: Exception is raised during intersection of two faces
1. Protection against getting access to null-handle has been entered.

2. Function AreSamePoints() has been substituted by appropriate method IntSurf_PntOn2S::IsSame(...)

Test cases for issues #27262 and #27263 have been created.
2016-03-18 07:14:33 +03:00
nbv
a09c8f3aa5 0027190: IntPatch_ImpPrmIntersection algorithm does not split intersection curve by the seam-edge of the quadric
1. Processing when IntPatch_WLine/IntPatch_RLine goes through the seam edge has been improved in DecomposeResult(...) function (see IntPatch_ImpPrmIntersection.cxx).
2. Incorrect initialization of last point of IntPatch_WLine/IntPatch_RLine has been eliminated. Earlier it was the reason of exception.

Creation of test case for this issue.

Adjusting some test cases according to their new behavior. Namely:

1) tests\bugs\modalg_4\bug825 (bug825_2)
Details are described in issue #25915. In short, new intersection algorithm works better than old (WLine without "jumping"). However, Boolean operation loses degenerated edges of the sphere. Consequently, we get the result with Not-closed face.

2) tests\bugs\modalg_6\bug26684_2
TolReached of intersection curve has become smaller. Consequently, intersection algorithm works better than earlier.
2016-03-18 07:11:00 +03:00
nbv
716037dd9c 0027267: [Regression to 6.9.1] geom/boolean_operations_06/G3: Cut produces invalid shape
Calling IntPatch_WLineTool::ComputePurgedWLine() algorithm is forbidden if Walking-line is obtained from analytic line.

Creation of test case for this issue.
2016-03-18 07:09:27 +03:00
abv
12b86472db 0027277: geom/extruded_00/A0: OCAF document is not opened correctly
Reading of attribute TDataStd_ExtStringList from CSFDB format is corrected for null strings: empty value is used.

Test bugs caf bug27277 added.
2016-03-17 15:08:03 +03:00
kgv
185a35a7ae 0027266: Coding, TKOpenGl - drop unused files OpenGl_telem_util.hxx and OpenGl_tgl_funcs.hxx 2016-03-16 18:55:13 +03:00
myn
45d8465ea2 0027241: Create a complete test case to verify reading of all attribute types from MDTV-Standard document
Added test case that works in one of two modes:
1) create synthetic document (in old version of OCCT) containing all possible attributes.
2) open the document and compare all attributes with expected values.

Fixed reading of TDataStd_NamedData, TDataXtd_PatternStd, and PColStd_HArray2OfReal.
Point and curve representations are created even from NULL geometry handles.
The code is simplified by abandoning usage of templates from StdObjMgt_ContentTypes class for persistent data elements.

Fixed SetAsciiString Draw command failed when the target label contained NamedData attribute.
2016-03-16 18:52:44 +03:00
abv
944d808cd0 0027237: genproj file does not take into account any arguments
Arguments of genproj tool are revised:
* -path option eliminated (current directory is always used);
* IDE should be always indicated by first argument (instead of -target=<ide> option);
* second argument can be used to specify non-default platform (wnt, mac, lin, ios, qnx);
* option -h, -help, --help can be used to get help
* option -static can be used to build static libs with XCode

README.txt and docs on building are updated.
codeblocks.bat is corrected to be able to detect 32-bit installation of Code::Blocks on 64-bit Windows.
Remains of support of OpenCL (obsolete) are commented out in genconf.tcl
genproj.tcl will not copy env.bat if it already exists.
2016-03-15 12:23:35 +03:00
kgv
978ca537d5 0027242: Configuration - add missing Standard_EXPORT to OpenGl_TextBuilder class constructor 2016-03-12 09:18:12 +03:00
abv
04c2daa466 0027231: Obsolete OCCT features still mentioned in the documentation
A few remaining places mentioning .cdl files are corrected to mention only .hxx
Obsolete description of storage in old format is revised in OCAF User's Guide.
2016-03-12 09:18:11 +03:00
abv
e91fd0250d 0027247: Eliminate remaining compiler warnings in MFC samples and with OCCT_DEBUG
Unsafe and useless casts of handles are eliminated
2016-03-12 09:18:11 +03:00
kgv
d8d342451d 0027250: Samples - define proper file header for pathtrace.tcl
Sample "Path tracing" is corrected to be shown in Visualization section, and to explain what it does during execution
2016-03-12 09:18:10 +03:00
Roman Lygin
60a6678eee 0027254: [Regression] 7.0 types initialization mechanism is not thread-safe on VS2013
The code in Standard_Type::type_instance<T>::get() distinguishes between compilers supporting and not supporting N2660. VS2013 was incorrectly considered as supporting, although the comment stated the opposite.

The fix makes VS2013 treated as not supporting N2660.
2016-03-12 09:17:55 +03:00
kgv
41c012f076 0027233: Configuration - do not include version in SONAME for Android target 2016-03-05 16:51:26 +03:00
kgv
ab2335aeae 0027232: Configuration - fix mblen missing building issue on Android
Assume UTF-8 as the only locale supported on Android.
2016-03-05 15:46:42 +03:00
abv
d3013f55a0 0027206: Inconsistent and obsolete information in persistence documentation and Release Notes
Technical docs are reviewed to:
* update references to page with third-party products
* update description of persistence, handles, and RTTI according to changes in OCCT 7.0
* remove references to CDL, WOK, and WOK-generated stuff
* update the list of environment variables
2016-03-04 15:03:05 +03:00
bugmaster
71b471d7b8 Incrementation OCCT version up to 7.0.0 rc 2016-03-04 15:02:14 +03:00
ysn
1454243292 0027218: Add information about porting from earlier versions in update guide
Added:
- porting notes for earlier versions starting with 6.5;
- section about zoom persistent selection
2016-03-04 14:44:23 +03:00
abv
72c3745808 0027193: Describe building OCCT with genproj tool
Description of building OCCT with WOK and automake scripts is removed from documentation.
Use of genproj utility is described in pages on building with MSVC, Code::Blocks, and XCode projects.

New script genconf allows starting configuration GUI explicitly; dialog is slightly revised.
Script genproj.sh is renamed to genproj; permissions for scripts are corrected for Linux.

Script env.bat does not set anymore environment required for Products.
2016-03-04 14:44:22 +03:00
myn
ff205346c9 0026961: Recover possibility to read files in old persistence format
Possibility to read shapes and OCAF documents from old persistence format (Std and StdL schema) is restored.

Test cases used old persistent files on input are restored with suffix "_std"

Removing toolkit from OS package
2016-03-04 07:31:08 +03:00
duv
1d8656890c 0026571: Visualization, TKOpenGl - write depth values within RayTracing program
View-projection matrix was added to raytrace shaders (as uniform) in order to compute correct depth values for OpenGL.
For path tracing the additional depth buffer sampler was added to Display.fs program. It allows propagation of depth values from internal FBO to resulting FBO.
The old approach of mixing of OpenGL and ray-tracing graphics was kept in order to keep correct blending of transparent ray-traced objects with non-transparent OpenGL objects.
2016-03-04 07:31:07 +03:00
ysn
251a79847b 0027216: Review the documentation before the final release.
Some pre-release updates, reviewing and implementation of some adequate remarks from JMA:
- redundant chapters in IGES and STEP guides
- proofreading of recent insertions in Draw, and tests guides
- mathjax information
- data, version, addresses, system requirements in overview.md

Corrections
2016-03-04 07:31:06 +03:00
kgv
7c65581dd3 0027197: Configuration - fix compilation issues when using mingw
AIS_ColorScale, AIS_Dimension - the protected method DrawText()
has been renamed to drawText() to avoid name collisions with macros.

_MSC_VER/_WIN32 misuse has been fixed in several places.
Header <malloc.h> is now included where alloca() is used.
Draw_Window - dllimport flag has been dropped from inline methods.

TKernel - mandatory dependencies Winspool.lib and Psapi.lib
are now linked explicitly (instead of msvc-specific pragma syntax).

CMake scripts - the option -std=c++0x has been replaced by -std=gnu++0x
for mingw to allow extensions (like _wfopen() and others).
The minimum Windows version has been set to _WIN32_WINNT=0x0501.
Invalid options "-z defs" and "-lm" have been dropped for mingw.
Flag --export-all-symbols has been added to CMAKE_SHARED_LINKER_FLAGS
to workaround missing vtable symbols when using mingw.
FreeType is now linked explicitly on Windows.

Draw::Load() - "lib" suffix is now prepended on mingw as well.

Drop redundant declaration of _TINT from OSD_WNT_1.hxx.
NCollection_UtfString::FromLocale() - platform-specific code has been moved to .cxx file.
Draw_BasicCommands - fixed incorrect mingw64 version macros.

genproj, cbp - added workaround for process argument list limits on Windows.
TKSTEP linkage is failing on this platform due to too long list of files.
The list of object files to link is now stored in dedicated file which is passed to gcc.

Option "-z defs" removed from CMake linker options to avoid problems when building with different configurations of VTK on Linux

Some MinGW-specific compiler warnings (potentially uninitialized vars, use of NULL, parentheses in conditional expressions) are fixed (speculatively)
2016-03-04 07:31:05 +03:00
kgv
8582eb08cc 0027198: OSD_Environment - use wide characters API on Windows 2016-03-04 07:31:04 +03:00
gka
5df609e75d 0026827: Position and orientation for GD&T frames
Implementation of graphical annotations of the PMI read from STEP
2016-03-04 07:30:38 +03:00
abv
cb72870231 0027196: CMake - avoid setting option -EHa for compilers other than MSVC
Option -EHa is now added only if MSVC is defined.

Descriptions of option -fp:precise in CMake and method OSD::SetSignal() in header file are updated.
2016-03-03 14:17:22 +03:00
vpa
114b7bf18f 0027180: Visualization - improve selection logic of MeshVS_Mesh
MeshVS_Mesh selection logic in MeshVS_SMF_Mesh mode (entire mesh) has been optimized.
MeshVS_Mesh::ComputeSelection() now creates single sensitive entity
MeshVS_CommonSensitiveEntity (new class) instead of small sensitive entity on each element.
MeshVS_SensitiveQuad (new class) and Select3D_SensitiveTriangle are used instead of Select3D_SensitiveFace for local selection to reduce memory consumption when possible.
2016-03-03 14:17:17 +03:00
jgv
bd5160a5fa 0027207: New universal method for extracting of results of work of HLRBRep_Algo algorithm
New method HLRBRep_HLRToShape::CompoundOfEdges with options:
- type of resulting edge
- visibility
- 3d/2d
has been added.

Minor correction of comments
2016-03-03 14:17:11 +03:00
kgv
4a535d3fd6 0026969: Visualization - support custom vertex attributes in GLSL program
Graphic3d_TypeOfData - added Graphic3d_TOD_FLOAT for passing single-float vertex attributes.
Graphic3d_TOA_CUSTOM - changed value to increase the range for custom vertex attributes locations (to fit into hardware limits).
Graphic3d_ShaderProgram::SetVertexAttributes() - introduced API for defining custom vertex attributes.

For compatibility with automated wrappers:
- Graphic3d_Buffer::Init() - added prototype taking NCollection_Array1<Graphic3d_Attribute> instead of C array
- Graphic3d_IndexBuffer::InitInt32() - added typed initialization method.
- Graphic3d_ShaderProgram::PushVariableVec3() and others - added typed methods to push uniform varibales.
2016-03-03 14:17:06 +03:00
Benjamin Bihler
9d55d9b0be 0027208: Show method in Message_ProgressIndicator::NewScope should not be commented out
Undone commenting out of Show method
2016-03-03 14:17:02 +03:00
abv
b508cbc59f 0026338: STL export (especially binary) needs a lot of time if selected export path is not local
Method StlAPI_Writer::Write() is reimplemented to write triangulation directly, without conversion to StlMesh_Mesh.

New DRAW command "tessellate" is added to generate rapidly triangulation of prescribed size (on surface).

Command "tricheck" is protected to deal correctly with triangulation without UV data.

New tests added: perf de bug26338_1 and _2; bugs stlvrml bug26338

Correction of testing environment
2016-03-03 14:16:57 +03:00
bugmaster
6396eacb4f 0024665: A sample for advanced function mechanism
Update for Linux platform
2016-02-25 17:08:20 +03:00
bugmaster
c19f09e973 Correction misprinting 2016-02-21 08:39:14 +03:00
aml
db2a696d96 0027135: Incorrect result of the normal projection algorithm
New check for possible local traps was added to build correct projection cache.
2016-02-20 19:13:11 +03:00
apn
c2c9890c68 0027152: Undefined symbols in library TKernel.so using clang compiler
Added ldl dependency for TKernel only (other toolkits were checked, no undefined symbols)
Added  option "-z defs" for linking on Linux
Added lm dependency for all toolkits
2016-02-20 18:43:49 +03:00
oan
aff123698b 0024594: Missing surfaces from STL output (second example)
Added test case
Small corrections of test case
2016-02-20 18:43:48 +03:00
jgv
0285a40010 0027159: Section between two faces is lost
Minor correction of test case

Another small correction of test case

One more correction of test case
2016-02-20 18:43:47 +03:00
ysn
dcb359e0ad 0027177: Review of recent additions in tests.md
Document corrected, warnings fixed.
2016-02-20 18:43:46 +03:00
oan
746f1ceb10 0025045: STEP Import fails to find all surfaces
Added test case
Small corrections in test case
2016-02-20 18:43:45 +03:00
oan
183acc2f10 0024593: Missing surfaces from STL output
Added test cases
Small corrections of test cases
2016-02-20 18:43:44 +03:00
jgv
3bfd1ba8f2 0026985: Wrong section between two faces: it has a gap 2016-02-20 13:04:34 +03:00
ibs
c1425a3f51 0027138: Configuration, Cmake - incorrect binaries installation path for single generators
specify a path for toolkit shared library
2016-02-20 13:04:33 +03:00
nbv
3906794761 0027035: General fuse algorithm loses face
The main reason of the bug is incorrect check, if the edge is seam-edge or not.
In the fix it is determined with new methods in GeomLib class.

The bug is fixed.

Creation of test case for this fix

Small correction in the code
2016-02-20 13:04:32 +03:00
vro
aff5997de8 0024665: A sample for advanced function mechanism
PRO file is added + a description of how to generate the Visual Studio projects and compile.
In addition, the sample folder is renamed to FuncDemo.

Adding 64 bit configuration to VC projects
2016-02-20 13:04:31 +03:00
vpa
a7d4dd9489 0026231: Visualization - Update description of selection algorithm in the user's guide
- updated description of selection mechanism in sections occt_visu_2_2, occt_visu_3_2_4 and occt_visu_3_6;
- unnecessary images were removed.

New Selection section  reviewed.

Semantic corrections
2016-02-20 13:04:30 +03:00
abv
a9dde4a31b 0027104: DownCast() cannot return null for mismatched handle
Method DownCast() is made template, to be available only when argument is actually a pointer or handle to a base class.

For compatibility with existing code, method DownCast() that can be used for the same type, derived, or unrelated class (i.e. where there is no actual down casting) is still available, its use shall cause "deprecated" compiler warning.

OCCT code is updated to remove meaningless DownCast()s; a few places where DownCast() was used with argument of unrelated type are corrected.

DRAW command QAHandleCast is removed (it was useful only during redesign of handles).
2016-02-20 10:10:15 +03:00
abv
5d351a0822 0026549: Provide move constructors and operators for basic classes
Move constructor and operator added for opencascade::handle<>
2016-02-20 10:10:13 +03:00
abv
4796758e8d 0027111: Add generalized copy constructor in handle class for old compilers
Copy constructor and assignment operator from handle of derived type is added in handle class.
They are enabled only if macro OCC_HANDLE_NOCASTS is defined, and operators of cast of handle to reference to handle to base type are disabled in that case.

Useless type casts to handle to base type are removed in GC and GCE2d classes.
Code returning reference to handle from function is corrected to return it either by value or as reference to handle of actual type.
2016-02-20 10:10:12 +03:00
abv
aa00364da7 0026377: Passing Handle objects as arguments to functions as non-const reference to base type is dangerous
Operator of cast to non-const reference is declared deprecated to produce compiler warning if used (usually implicitly).

OCCT code is updated to avoid that cast, occurring when function accepting non-const reference to handle is called with handle to derived type.
For that, local variable of argument type is passed instead, and down-cast is used to get it to desired type after the call.
A few occurrences of use of uninitialized variable are corrected.
2016-02-20 10:10:11 +03:00
kgv
fe9b8ff2f2 0027118: Configuration - do not suppress deprecation warnings when using msvc
Patch removes option -wd4996 from VS project settings (which suppresses old deprecation warnings).
Instead, macros _CRT_SECURE_NO_WARNINGS (suppresses 444 warnings) and _CRT_NONSTDC_NO_DEPRECATE (suppresses 17 warnings) have been added.

Deprecation warning on GetVersionEx() has been suppressed locally in OSD_Host.cxx.
In STEPConstruct_AP203Context.cxx, OSD_Host is used instead of low-level system functions.
This eliminates dependency of TKSTEP on winsock32.lib on Windows.
2016-02-20 10:10:10 +03:00
kgv
8ddd25b887 0027113: Coding - add macros Standard_DEPRECATED for marking deprecated functionality
Macro Standard_DEPRECATED("message") can be used in declarations to mark a method deprecated and generate compiler warning when it is used.
If OCCT_NO_DEPRECATED is defined, Standard_DEPRECATED is disabled (defined empty).
2016-02-20 10:10:09 +03:00
abv
84eca96b9d 0027107: ShapeAnalysis_Surface should use GeomAdaptor_Surface for surface evaluation
ShapeAnalysis_Surface is improved to use adaptor for evaluation of points on a surface.
Useless field myExtSur is removed.
DE tests are amended according to induced changes (number of edges varied).
2016-02-20 10:10:07 +03:00
oan
99c008e90f 0026384: Add explicit check for null magnitude instead of catching of exception in BRepMesh_FastDiscretFace::control()
Check normal for null magnitude using gp::Resolution ()
2016-02-20 10:10:06 +03:00
aml
1907fb9a74 0027131: [Regression to 6.7] DistShapeShape performance loss
Lipchitz constant approximation and fixes in global optimization algorithm added to improve performance.
Test case added.

Possibility to freeze Lipchitz constant is added to improve performance.
2016-02-20 10:10:05 +03:00
abv
290f0085d4 0027156: Doxygen warnings on overview docs
Documentation corrected to avoid Doxygen warnings
2016-02-20 10:10:04 +03:00
aml
92a206a3dd 0027162: Draw command "(2d)extrema" incorrectly represent underlying algorithm results
Correct handling of infinity solutions added for Curve / Curve case.
Unused code deleted.
Test cases updated to the new behavior.
2016-02-20 10:10:03 +03:00
kgv
6273fa4b6c 0027172: Visualization - avoid signed integer overflow within Graphic3d_ArrayOfPrimitives 2016-02-20 10:10:02 +03:00
apn
85b47ba49b 0023202: BRepMesh of face fails
Added test case bugs/mesh/bug23202
2016-02-20 10:10:01 +03:00
oan
660b601edd 0026692: BRepMesh hangs on the attached shape due to tessellation points produced out of surface range
BRepMesh_EdgeTessellator: do not use points out of face range and edge tolerance.

Test cases for issue CR26692
2016-02-20 10:10:00 +03:00
abv
451c4a3a57 0026941: Building on Windows with VC14 - debug info is generated for Release build
Generation of debug info is explicitly disabled on link step in templates of Visual Studio 10+ project files used by genproj, to avoid relying on default settings of Visual Studio.
2016-02-20 10:09:59 +03:00
kgv
c10c6ccdbf 0027086: Samples, jniviewer - avoid duplicating viewer redraws 2016-02-20 10:09:57 +03:00
kgv
2674244cde 0026939: Configuration, NCollection_UBTreeFiller - do not use _REENTRANT in a header file
Use std::mt19937 random number generator instead of rand() in NCollection_UBTreeFiller.

boolean gdml_private ZI7 ZJ7 - TODO "bopcheck failed" is only for Linux now, checkshape faulty is unstable (issue #27052)
boolean volumemaker B6 - Added TODO (bopcheck and checkshape faulties)
boolean volumemaker C9 - Added TODO (checkprops and checkshape faulties)
boolean volumemaker D2 - Added TODO (checkshape faulty)
boolean volumemaker H4 - Added TODO (checkprops and checkshape faulties Linux only)
boolean volumemaker D5 - IMVPROVEMENT, TODOs were deleted (bopcheck and checkshape faulties)
bugs modalg_1 buc60462_2 - modified TODOs according to new behavior
boolean gdml_private ZI7 ZJ7 - unstable case, added check for surface area and TODO

samples/tcl/ANC101.tcl - amended due to changed order of edges in BOP result
2016-02-20 10:09:42 +03:00
abv
9baa853415 Revert "0026314: Method SetShape working not correctly."
This reverts commit e2df45413e.
2016-02-17 12:33:27 +03:00
bugmaster
43da5ab603 Merge between correction test case in issue 27119 and 26939 2016-02-12 11:33:08 +03:00
abv
100592c117 0027053: Compilation fails with "fatal error RC1103: invalid option, /fp:precise"
CMake script is corrected to add compiler options (except macro definitions) to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS variables directly, instead of using add_definitions() command.
This eliminates failure of build by NMake due to incorrect options passed to RC compiler.
2016-02-12 00:06:43 +03:00
ssv
ba3d7cdfbb 0026260: Tcl scripts for MBB Gehause Rohteil and ANC101 to be added to Samples
Two new sample scripts added, modeling classic shapes from used for comparing modeling systems in 1979 and again in 1983 by Computer Aided Manufacturing International (CAM-I).
2016-02-12 00:06:04 +03:00
kgv
770fa4d4cf 0027137: Visualization - handle shadow structures within V3d_View::Gravity()
OpenGl_StructureShadow - copy bounding box from parent structure.
Prs3d_PresentationShadow::CalculateBoundBox() - do nothing.

V3d_View::Gravity() - skip presentations with transformation persistence flags.
Use cached presentation bounding box.
2016-02-12 00:04:31 +03:00
oan
66dce5e76b 0027119: Regression: Draw command "incmesh" hangs on the attacheced face.
BRepMesh_CircleTool: extend radius of circle by quite small value in order to classify points forming inscribed triangle as lying on it. Do not use PConfusion due to false positive result leading algorithm to hanging.

Small correction in test cases bugs/mesh/bug27119

Update of test cases according to the new behavior:
bugs/moddata_1/bug22759
mesh/data/standard/M4
2016-02-12 00:04:31 +03:00
apn
32757c6e15 0012042: Problem with standard Qt-based Import/Export sample application
Front and right views in OCCT CSharp/mfc/qt samples were swapped.
2016-02-12 00:04:30 +03:00
ski
cd718a73c7 0027145: Remove redundant usage of GetPercent procedure
Usage of GetPercent procedure was replaced by checkreal procedure.
2016-02-12 00:04:29 +03:00
jgv
cc9f459173 0027134: Offset algorithm produces an invalid shape from a cone
Correction of test case for issue CR27134
2016-02-12 00:04:28 +03:00
jgv
5e9548e77b 0027065: BRepOffsetAPI_MakePipe misses definition of virtual method Generated()
Virtual method Generated() inherited from BRepPrimAPI_MakeSweep is overridden in class BRepOffsetAPI_MakePipe, providing information on shapes generated from the profile.
2016-02-12 00:04:04 +03:00
ski
3c1379f824 0026333: Regression of BRepOffsetAPI_MakeOffset regarding to 6.7.0: it fails on a shape with BSpline boundaries
Added test case

Small corrections for issue CR26333
2016-02-11 13:05:05 +03:00
kgv
4f7e90e0db 0027136: Visualization - skip void bounding box within SelectMgr_SelectableObjectTrsfPersSet::BVH() 2016-02-11 13:00:34 +03:00
nbv
714c3bfccc 0026980: Intersection algorithm spends much system time and system memory
1. Step of Walking-line has been increased as possible and now computes by iteratively adaptive algorithm (every iteration checks if current step is too big/small and decreases/increases one).

2. Interface of IntWalk_PWalking class has been changed
2.1. Method MaxStep() has been added in order to know about maximal distance between 2D-points.
2.2. Method ComputePasInit(...) has been added in order to initial step value computation.
2.3. Fields myTolTang (tolerance for intersection algorithm) and myStepMin (minimal step value) have been added.

Correction of some test cases.
Creation test case for this issue.
Changes to eliminate compiler warnings.
2016-02-11 12:58:53 +03:00
abv
6e448ab081 0026415: <TFunction_GraphNode> XML should not break line in the middle of text.
Line break between "previous" and "next" ids is replaced by additional spaces (these facilitate visual separation of the two sub-lists).
2016-02-11 12:56:34 +03:00
aml
fa6d1712fd 0027114: [Regression to 6.7] DistShapeShape does not find a solution edge-face
Extrema Curve / Surface algorithm changed to perform more accurate search.

test case bug25232_8 - improvement, one additional intersection point is detected now.
test case bug23830 - normal behavior, position of extrema is changed.

test case for original issue added.
2016-02-05 11:14:45 +03:00
ski
5d7a048985 0027126: Create command checktrinfo to verify meshes
Command checktrinfo was created.
Test cases were updated to use command checktrinfo.
2016-02-05 11:14:44 +03:00
apn
728ae8f9be 0027120: Documentation for check commands
Added documentation fot checkprops, checkdump and checklength commands.

Corrected line break in generated documentation.
2016-02-05 11:14:42 +03:00
ski
78934a4f8d 0027095: Configuration, CMake - configuration process finds tcl folder with incorrect bitness for 32bit case
New pattern for seeking of 3rdparty products was added.
2016-02-05 11:14:41 +03:00
ifv
a4ed7309ff 0027063: BRepGProps raises exception on edge with no curves
Method BRepGProp::LinearProperties() is corrected to treat not geometric edges (their length is zero). To avoid wrong working of command nexplode global properties are calculated as point properties of vertexes. Small value Epsilon(1.) is used as density of points. This prevents exception on shapes that contain such edges, e.g. copy of a wire containing degenerated edge.

Method BRep_Tool::IsGeometric() is optimized to avoid nested iteration for check of 3D curve for Null.
Small bug is fixed in GProp_PGProps.cxx
2016-02-05 11:14:40 +03:00
ski
5747059b21 0026833: Create command checkview containing all viewer types
Created command checkview for displaying shapes.
2016-02-05 11:14:37 +03:00
abv
917cae00ca 0025574: gp_YawPitchRoll Euler Angle computation gives wrong results - warnings
Eliminate VC14 compiler warnings
2016-02-05 11:14:03 +03:00
ski
f1d057b7a4 0027121: Configuration, CMake - build process does not use patched header files
Corrected collecting of all headers to <binary dir>/inc folder

Small correction of documentation about CMake configuration process
2016-02-04 13:41:37 +03:00
kgv
b872ca56de 0027123: Visualization, TKOpenGl - fix environment texture GLSL program
OpenGl_ShaderManager::prepareStdProgramFlat() - properly initialize vec4.
2016-02-04 13:39:50 +03:00
ifv
e2ca538ae6 0027110: Regression: Draw command "parameters" can not compute parameter on the line.
Useless variable MAXTOLERANCEGEOM is removed in order to allow to place point at any distance from curve/surface.
Algorithm is simplified: particular calculations for analytical geometry are removed, only using of Extrema_... is kept.

Test case for issue #27110
2016-02-04 13:29:29 +03:00
isk
671b6fe0cc 0026726: Draw Harness, ViewerTest - AIS_InteractiveContext::EraseSelected() lacks test case
Update draw command ViewerTest::Erase().
2016-02-04 13:20:38 +03:00
apn
6cc6fc047c 0027094: Create command checkdump for parsing dumps (geometry test group)
checkdump - procedure to parse output dump and compare it with reference values;
checklength - procedure to compute length of input shape.
Added procedures and modified test group geometry.
2016-01-28 13:20:17 +03:00
apn
3ad6d001d1 0027109: Modifiy test cases using procedure checklength
Modify cases
2016-01-28 13:11:33 +03:00
vpa
f55ba97f90 0027083: Visualization, Ray Tracing - shape with visible face boundaries disappears after turning the ray-tracing on
- default state of aspects is now restored to prevent backface culling which is not supported by ray-tracing yet;
- added test case for issue #27083
2016-01-28 13:09:00 +03:00
azv
f3a1c0cb60 0027048: BSpline cache is always wrong outside of surface
1. Disable recalculation of B-spline cache when the parameter is out of surface boundary but near the cached span.
2. Rebuild cache each time a curve/surface is loaded into adaptor (B-spline knots may be re-parametrized outside adaptor without changing base curve)
3. Test cases.
2016-01-28 13:05:10 +03:00
akz
4f5ad41656 0025574: gp_YawPitchRoll Euler Angle computation gives wrong results
Conversion of gp_Quaternion to and from intrinsic Tait-Bryan angles (including gp_YawPitchRoll) is fixed.

Before that fix the sequence of rotation axes was opposite to intended; e.g. gp_YawPitchRoll (equivalent to gp_Intrinsic_ZYX) actually was defining intrinsic rotations around X, then Y, then Z.
Now this is fixed, and rotations are made in correct order.

Comments to gp_EulerSequence enumeration are restored (lost due to CDL extraction).

Test bugs fclasses bug25574 is added to check correctness of Euler sequences, including cases from #25574 and #25946.
2016-01-28 13:02:25 +03:00
ibs
5fce160515 0027077: OCAF: Implementation of streaming save/load (OCC26229) is incomplete/incorrect
XmlOcaf reading is non-seekable

// 1. Read method of XmlLDrivers_DocumentRetrievalDriver extended to read complete document (with "document" tag) in compatible mode (when reading is performed from file)
// 2. the empty statement removed
// 3. the description of LDOMPARSER::parse method extended
2016-01-28 12:59:51 +03:00
ysn
3f8122493a 0026187: Implement m-dashes in the documentation
- m-dashes added.
- some other cases of incorrect dash use fixed
- unicode dashes were removed throughout the documentation.
- other comments taken into account.
2016-01-28 12:46:59 +03:00
bugmaster
d94fa32ef9 0024677: Control of license statements and non-ascii characters in integrated code
Update of license statements and non-ascii characters
2016-01-28 12:36:35 +03:00
abv
68858c7dd6 0027097: GCC and CLang compiler warnings and errors with -Wpedantic
Useless semicolons are removed after closing braces of namespaces and macros in code dependent on FreeImage and VTK.
Comments added at the closing braces of namespaces to help comprehension.
In OSD_File.cxx and OSD_Disk.cxx, unnecessary declarations of system functions are removed
2016-01-22 11:42:51 +03:00
Jacob Abel
a3f6f591fc 0027105: Make code ISO-compliant [-Wpedantic fixes]
Remove extra semicolons and correct function prototypes for GCC -pedantic ISO compliance option
2016-01-22 11:29:24 +03:00
Benjamin Bihler
d3b7582d2f 0027088: Documentation of add method of GeomConvert_CompCurveToBSplineCurve lacks speed hint
Improved documentation
2016-01-21 15:50:30 +03:00
nbv
6dc83e21b2 0026132: Invalid result of boolean operation
1. The procedures for check of coincidence between Edge-Edge and Edge-Face have been added. These methods are used instead of searching interferences between corresponding sub-shapes. In most cases (including case for this issue), new methods are more reliable and faster than intersections. However, its use should be avoided in case when the edge is not coincide with edge/face of another argument evidently (e.g. if edge vertices are not in another edge/face).

2. Interface of both IntTools_EdgeFace and IntTools_EdgeEdge has been changed (adding/deleted some field and methods).

Some test cases have been corrected in accordance with their new behavior.
Test case for issue CR26132.
2016-01-21 15:50:29 +03:00
isn
26ca3bd549 0027085: ShapeUpgrade_UnifySameDomain very large performance difference for seemingly similar shapes
Performance of the algorithm ShapeUpgrade_UnifySameDomain has been improved by avoiding of multiple calls of ShapeBuild_ReShape::Apply() method.

New test cases have been added.
2016-01-21 15:50:28 +03:00
ika
b846d1e002 0027078: Exception in ShapeFixIntersectionTool::UnionVertexes()
Add checks to avoid exceptions.
Remove check for small 3D curve, now pcurve will be built for all small edges, which have not been removed by FixSmall.
2016-01-21 15:50:26 +03:00
kgv
163d7e8d46 0027092: Coding - src/BRep/BRep_Tool.hxx extra semicolon triggers annoying warnings on Clang 2016-01-21 15:50:25 +03:00
kgv
5ef127d0f1 0027080: Coding - eliminate CLang compiler warning on OS X: unused parameter (in .mm files) 2016-01-21 15:50:24 +03:00
ski
db81f678bc 0021875: Section of face by plane produces invalid result
Test case was added.
2016-01-21 15:50:23 +03:00
abv
4db4247a0b 0024836: Stack overflow when raising exception in low memory condition
Standard_OutOfMemory exception is refactored so as to avoid memory allocations (which will likely fail) when it is raised:

- method NewInstance() returns static instance (singleton)
- method Raise() raises copy of that singleton, resetting its message string
- message string is stored as field, not allocated dynamically (thus maximum message length is limited by buffer size)

Class Standard_Failure slightly revised: method Destroy() is merged to destructor, methods Get/SetMessageString() are made virtual.

Add test case for the bug
2016-01-21 15:49:51 +03:00
ski
e085d8a60e 0026942: Training material are not built on OCCT installed after building by cmake procedure
Environment variable QT_DIR was renamed to QTDIR.
2016-01-15 11:58:18 +03:00
isn
8c31bd38a1 0027045: firsthole & holend commands work incorrectly
firsthole / holend / hole commands have been corrected.
Now they work correctly on the planar faces
Also some commented code have been deleted
Temporary update for backward compatibility with WOK
2016-01-15 11:13:23 +03:00
isn
99ac7b2e40 0027066: BRepFeat_MakeCylindricalHole::Perform() hides overloaded virtual function
Moving to protected section
2016-01-14 15:14:08 +03:00
ika
52849da68c 0026989: [Regression in 6.9.0] Export of a reversed face leads to wrong data in 6.9.0
Add range for degenerated edges to mirrored pcurves during exporting of reversed faces.
2016-01-14 13:13:18 +03:00
ysn
bfa7a6857a 0026804: The level of most VIS Viewer commands is incorrect
Added highlighting of links with blue color.

Fixed incorrect tags.
2016-01-14 11:44:41 +03:00
abv
5ca413ce63 0026511: Build fails with VTK 6.3rc1
Obsolete typedef "vtkFloatingPointType" is replaced by "double" in VIS and DRAW
2016-01-14 08:36:58 +03:00
aml
c5a10cf717 0027059: Point->Curve Projection/Extrema fails [OCCT 7 only]
Add check to run extrema search when necessary condition of extrema is true (small value of first derivative of objective function).
Test case added.
2016-01-13 15:56:19 +03:00
abv
d868695fc0 0026514: OSD_Path can not work with French symbols in file name.
Restriction on path to contain only basic ASCII symbols is removed in OSD_Path, to allow paths to contain any symbols (defined in UTF-8 encoding).
2016-01-13 15:52:50 +03:00
msv
05cf4d98b0 0027032: [Regression to 6.9.1] Result of bcut has the same volume as the object
- Avoid reducing tolerance of the original edges in BOPAlgo_PaveFiller::CorrectToleranceOfSE
- If a boundary edge is considered coincident with a section curve then increase its tolerance more carefully, using real distance instead of extended reached tolerance.
- New test case bugs/modalg_6/bug27032
- Test cases boolean/gdml_private/E4-F3 have been amended to check area of the result.

- Puts TODO in test cases boolean gdml_private ZI5,ZI7,ZJ7.
2016-01-13 15:49:03 +03:00
kgv
7d83504007 0027060: Visualization issue with TopoDS_Vertex after call of AIS_Shape::SetColor()
AIS_Shape::setColor() - define Aspect_TOM_PLUS point aspect
in sync with Prs3d_Drawer::PointAspect() when Prs3d_Drawer has no Link.
2016-01-13 15:32:58 +03:00
ika
369a38aac2 0026931: [Regression in 6.9.0] Exporting a face throws an exception
Writing periodic BSpline surfaces to IGES:
Replace segmentation of surface to setting new origin.
Fix face bounds if its length (in U or V) is more than period.

Segmentation of BSpline curve/surface:
Throw exception if segment length more than period.

Fix test case bugs moddata_1 bug14782:
bounds of segmentation must be the same as curve bounds, according to issue description.

Changes in classes Geom2d_BSplineCurve, Geom_BSplineCurve, Geom_BSplineSurface:
- Replace *Raise_if macros with unconditional exceptions where it does not affect on performance.
- Update comments in .hxx files in regard of raised exceptions.
2016-01-13 15:22:59 +03:00
ski
83bb023e8d 0026684: Big tolerance values of the intersection curves
Added test cases for issue #26684
2016-01-13 15:19:06 +03:00
anv
be7d4aa2f9 0026769: Chinese letters are not translated
Added a condition to omit empty symbols
2016-01-13 15:10:08 +03:00
emv
d71fcc9089 27002: Test cases for Set-42 2016-01-13 15:06:57 +03:00
kgv
69adb9ce17 0027039: Draw Harness, ViewerTest - Fix rubber-band blinking
ViewerTest - eliminate redundant redraw calls.
Configure AIS_RubberBand to use filled style.

AIS_RubberBand - define vertex normals to workaround transparency issue in TKOpenGl.
2016-01-13 15:04:11 +03:00
apv
80dcde2ef3 0026513: Offset API not returning result (seems to be "hanging")
Test case for issue #26513

Update of test case for issue #26513
2016-01-13 14:55:23 +03:00
apv
d0fdf9893d 0021670: BOP section produces bad result
Test case for issue #21670
2016-01-13 14:51:35 +03:00
pdn
8447359f09 0027021: TopExp::Vertices performance optimization
TopExp::Vertices optimized for sequential calls. BRep_Tool::Curve performance regression fixed. Update for fetching point done.

Casts modified to pointers

Test case for issue CR27021

gcc warnings elimination
2016-01-13 14:41:49 +03:00
apv
57736dfc91 0026923: Operation CUT leads to faulty shape
Test case for issue #26923
2016-01-13 14:37:17 +03:00
ibs
fa684e47d6 0027040: IVtk does not compile after configuring with CMake
hardcoded C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x64/d3d9.lib is removed from any vtk toolkit
2016-01-12 01:55:36 +03:00
abv
e071e03825 0026990: Compiler warnings in LDOM_OSStream.hxx
Signature of methods xsputn() and overflow() of the class LDOM_SBuffer is corrected to correspond to signature of overriden virtual methods of std::streambuf.
2016-01-12 01:55:34 +03:00
abv
180f89a29e 0027058: AIS_ColorScale defines methods SetColor and SetWidth hiding inherited methods
Interface of AIS_ColorScale is revised to make it more consistent:

- Methods SetBgColor()/GetBGColor(), and corresponding field, are removed. It was used to select white or black color for the color bar frame (by contrast). That color can now be set explicitly by inherited method SetColor().
- Own methods Get/SetColor() are renamed to Get/SetIntervalColor(), to avoid confusion with inherited method SetColor()
- Methods Get/SetWidth() are renamed to Get/SetBreadth(), to avoid confusion with inherited method SetWidth()
- Method Get/Set for labels and colors, and DRAW command vcolorscale, now all accept index starting at 1
- Comments added to explain indexation rules
2016-01-12 01:55:33 +03:00
abv
e0280ce92e 0027068: Coding - eliminate VC++ 14 compiler warnings in MFC samples
Code is corrected to avoid compiler warnings
2016-01-12 01:55:32 +03:00
kgv
e31a8e52bb 0027056: Configuration, genproj.tcl - fix generation of project files for Products
Script genproj.bat is improved to be usable for building OCC products depending on OCCT.

Search of VTK is corrected (broken in master)
2016-01-12 01:55:31 +03:00
kgv
ea991a6ef3 0027055: Configuration, genconf.tcl - reduce window height to fit into smaller screens 2016-01-12 01:55:29 +03:00
ski
b502ddc1ab 0026589: Testgrid command - Add option to execute only tests failed on previous run
New option for command testgrid was added.
Updated documentation.
2016-01-12 01:55:28 +03:00
Martin Siggel
fd5a9eacf0 0027062: Fixed misspelling of resources install path 2016-01-12 01:55:27 +03:00
Martin Siggel
39fb68ad20 0027061: Fixed compilation issue due to BOM
The byte order mark (BOM) in src/OpenGl/OpenGl_BVHClipPrimitiveTrsfPersSet.cxx
prevented compilation on some gcc compilers. I removed the BOM, which
fixes compilation.
2016-01-12 01:55:26 +03:00
abv
201c22081b 0025076: Hidden overloaded virtual functions
Implementation of virtual functions is made more consistent in places where warning was issued:

- Missing implementation of virtual method Closed() added in classes inheriting Intf_Polygon2d
- Empty implementation of virtual method Read() accepting stream is moved from PCDM_RetrievalDriver to StdLDrivers_DocumentRetrievalDriver
- Method BRepFill::Delete() is renamed to DeleteProfile() to avoid confusion with method Delete() inherited from MMgt_TShared
- Virtual method AIS_Dimenaion::ComputePlane() is removed from base class; each dimension defines and uses its own method with the same name (but different arguments)
- Inherited virtual method Dump() with single argument in class XCAFDoc_ShapeTool is now defined as short-cut to own method Dump(), also calling parent's one
- Inherited virtual method BoundingBox(void) is made visible in AIS_Shape
- Inherited virtual method Box(void) is made visible in classes inheriting BVH_PrimitiveSet
2016-01-12 01:55:10 +03:00
abv
e6f550da99 0027067: Avoid use of virtual methods for implementation of destructors in legacy classes
Redundant methods Delete() and Desroy(), created in CDL as a hack to define destructor for the class, are removed; their definitions are converted to definition of destructors. In a couple of places methods Destroy() are preserved (bug made non-virtual) because they are called explicitly.
2016-01-08 20:04:44 +03:00
abv
18f7c9a5c2 0027047: STEP -- eliminate useless polymorhic methods Init()
Methods Init() in STEP data classes are made non-virtual, redundant variants just calling the same method of the base class are removed.
A few places where removed method have been called are corrected.
2016-01-03 15:17:07 +03:00
abv
17470159fd 0027057: Wrong license statements in some files
Missing license statements added, wrong ones corrected
2016-01-03 15:17:06 +03:00
abv
8bb8064e8f Fix of compiler warnings on OCCT 7.0.0.beta (CLang and VC++ 14) 2016-01-03 15:17:05 +03:00
abv
13c7b7a395 0027041: CMake - CLang 3.6.2 fails to link DRAWEXE on Ubuntu 15.10
"stdc++" is added to CSF_ThreadLibs in CMake script to make DRAWEXE built well.

In addition, TKVCAF added in CMake script for OCAF MFC sample, and Yacc and Lex files added in src/StepFile/FILES to make it consistent with actual contents of the package.
2016-01-03 15:17:04 +03:00
abv
155408bf59 0027054: Upgrade procedure corrupts files with DOS line endings
Treatment of files in DOS encoding corrected to avoid duplication of CR symbols
2016-01-01 18:43:48 +03:00
ibs
d573adcf38 INSTALL_DIR is synced with CMAKE_INSTALL_PREFIX . Change of any of these vars resets the structure of the install folder 2015-12-25 10:57:44 +03:00
ibs
096ef695e1 0026916: Configuration, CMake - configure variables to customize installation path separately for executables, libraries and resources
change the structure of binaries for unix
OCCT_RESOURCE_PATH env variable is used
2015-12-25 10:29:12 +03:00
bugmaster
3554ea68da Final updates before release
- Update of mfc samples
- Adjustment of test cases
- Update of CSharp sample (lost button added)
- Corrected paths to data files in 07_Triangulation mfc sample
- Update of overview (Requirements section)
- Update of upgrade guide (changes in modeling algorithms)
2015-12-25 10:29:11 +03:00
myn
7ed7467da3 0026961: Recover possibility to read files in old persistence format -- preparation
Added basic support for possibility to read filed in old persistent format.
Toolkits TKStd, TKStdL, TKShape added to provide necessary tools (to be done).
Obsolete interfaces are removed from classes in PCDM and Storage.
2015-12-25 10:28:46 +03:00
apv
ede9746c21 0026354: Invalid result of General Fuse on wire and face
Test case for issue #26354
2015-12-25 10:21:33 +03:00
apv
a2b5448a0f 0026580: BRepProj_Projection does not provide any results
Test cases for issue #26580
2015-12-25 10:21:31 +03:00
apv
17abefd113 0026535: Boolean Cut does not work on shell and solids
Test case for issue #26535
2015-12-25 10:21:30 +03:00
nbv
9a7b15dc60 0027029: Possible regression in test de iges_1 L6 because of fix for issue 26837
In BRepLib::SameRange, allow exceeding curve range for periodic curves.

Test cases returned to the state before fix for issue #26837.
2015-12-24 17:30:46 +03:00
mkv
86e810711f 0026837: SameParameter algorithm throws an exception
Correction of test cases for issue CR26837
2015-12-23 20:45:41 +03:00
bugmaster
a1613f0a65 Incrementing OCCT version up to 7.0.0 beta 2015-12-23 13:40:41 +03:00
abv
ad121848e3 0027026: Modeling -- Improve AppCont_LeastSquare::AppCont_LeastSquare::FixSingleBorderPoint()
Update of test-cases according to the new behavior
2015-12-23 12:22:16 +03:00
vpa
5396886c90 0026960: Visualization, TKOpenGl - update transformation of dynamically highlighted presentation
- added method UpdateHighlightTrsf for immediate update of highlight presentation's transformation;
- interfaces for immediate transformation update of corresponding presentations were added to entity owner classes;
- test case for issue #26960
2015-12-23 11:36:44 +03:00
msv
3510db6201 0026619: Tolerances of operands are modified using bop
0026796: The result of General Fuse operation is self-intersecting shape

The fix forces creation of new sub-shapes (vertex, edge) when the tolerance of some sub-shape of an argument is to be increased.

This new behavior is turned off by default. It can be turned on using two ways:
1) Setting 'locking' flag of the arguments.
2) Calling the method SetNonDestructive(Standard_True) of the API classes.

Various bug fixes in the algorithm:
- Compute correct tolerance values for intersections of type Line/Line, Line/Plane, Plane/Plane.
- In case of Line/Plane intersection check if line's vertices lie on the plane.
- Do not allow decreasing of the tolerance value of the Line/Line intersection vertex.
- In IntTools_EdgeEdge, call the method FindParameters with proper 3D tolerance of the curve.
- Force making copy of a degenerated edge if its vertex is touched but no 2D intersection with other curves is found.
- Remove pave blocks both ends of which became referring to the same vertex after vertices substitution.
- Avoid exception in IntTools_Context::IsVertexOnLine if Extrema is not done.
- Reduce tolerance of vertex/edge using actual distances to interfered shapes if it was increased due to line/line, line/plane, or plane/plane small intersection angle.
- Update tolerance of edges to reach all representations in a common block.
- In V-E intersections, check if a vertex hits beyond shrunk range, in such case create V-V interference.
- Do not put a section edge to the result if it becomes to be a micro edge after updating its vertex.
- Correctly make vertices same-domain during the work of MakeBlocks.
- Decrease shrunk range at least on a Precision::Confusion() in addition to vertex tolerance.
- Add Confusion to bounding boxes of new shapes in DS
- Add tolerance Precision::Confusion() to compare distances of touching cases to fix regressions.

TODO marks have been removed from (or modified in) the following test cases (Improvements):
boolean bsection M3 N2 R2
boolean gdml_private B6 C2 C6 G7 I6 F6 J1 J4 M7 N1 N8 N9 O3 O4 O6 O8 O9 P1 P2 P5 Q1 Q3 Q5 S9 T2 U4 U5 U9 ZB5 ZB6 ZC1 ZC5 ZD3 ZD6 ZD7 ZH2 ZH5 ZI2 ZI5 ZI7 ZI9 ZJ3 ZJ4 ZJ7 F8 I6 G1
boolean volumemaker A5 A6 B3 B4 B7 B9 D3 D4 D7 F1
boolean bopcut_2d D5
bugs modalg_5 bug25043
bugs modalg_2 bug472_1 bug472_2 bug472_3

Test cases updated because they are still bad but can be accepted as non-regression:
boolean volumemaker C4 A3 A7 E6
bugs modalg_1 bug10232
boolean bsection N2

Put new TODO in the scripts:
bugs modalg_5 bug25232_9
bugs modalg_6 bug26619
bugs modalg_1 buc60462_2
bugs modalg_4 bug772

For the following tests the result in fix became better, so take fix result as the reference:
bugs modalg_5 bug24628
bugs modalg_6 bug26954_3
boolean volumemaker A4 B5 B6 C3 C8 D2 D5 F2
bugs modalg_2 bug472_2
bugs modalg_1 buc60776_1

- Add the method SetNonDestructive to API classes of user level
2015-12-23 10:33:43 +03:00
kgv
6435b9c7fa 0027031: Samples - fix compilation issues in java/jniviewer sample
Add -std=c++11 compiler flag to Android.mk.
OcctJni_Viewer - drop removed arguments within V3d_View::SetWindow() usage.
OcctJni_Window - add missing NativeFBConfig() method declared in the interface.
2015-12-22 18:12:36 +03:00
ifv
54f91e0332 0026837: SameParameter algorithm throws an exception
Test case for issue CR26837
2015-12-22 18:04:39 +03:00
duv
d2dfbc4d7d 0026433: AIS_Dimension may attempt to modify the state of default Drawer shading aspect
- Added checks to allow modification of only own aspects in AIS_Dimension::DrawText()
2015-12-22 16:10:05 +03:00
abv
dcc0a33ebd 0024514: Unclear guidelines to report issues in Mantis
Contribution workflow document is revised and extended to eliminate inconsistencies and describe the process in more details:

- Meaning of issue fields in Mantis (Category, Severity, Profile, Project and Target Version, etc.) is described in more details
- Additional rules are defined and examples given for defining Summary and Description, and writing commit messages
- Requirements for testing, creation of test case, update of user documentation, etc. when resolving an issue, are described
- Additional elements of the workflow (patch sumbission, rebasing branches, use of feedback status, issue relationships) are described

Some refinement in other guides; OCC logo updated for better quality.
2015-12-22 15:24:15 +03:00
abv
d1c596cfe1 0027023: Documentation -- cross-references are hardly noticeable in PDF
Doxygen option PDF_HYPERLINKS is set to NO to enforce generation of cross-references as explicit page numbers in PDF manuals
2015-12-22 15:24:11 +03:00
ysn
a3305c6e4e 0027020: Documentation -- proof-read upgrade guide
Developer guide update.md thoroughly checked and formatted.
2015-12-22 15:24:07 +03:00
ysn
f9e256b388 0026425: Update of OCCT contribution workflow
Requirements to the release documentation described in more details.
Added some suggestions concerning the workflow.
Workflow rewritten according to the remarks.
2015-12-22 15:24:03 +03:00
ysn
67d7f07f51 0026992: Use Doxygen tag @ref for cross-references in documentation
href have been replaced by @ref tags except for the links to web-pages and other documents where @ref tags do not work either.
2015-12-22 15:23:59 +03:00
ysn
27245ff9c0 0026964: Merge OCAF white-papers into OCAF user's guide
The text of white papers has been rearranged as follows:

OCAF white paper:
  Purpose of OCAF
  Overview of the architecture
  A look inside OCAF
- merged with the Introduction chapter

  Getting Started
  An example of OCAF usage
- added in Samples chapter

  The Data Framework
- merged with Data Framework Services chapter

  Persistent Data Storage
- added as a separate chapter

OCAF function mechanism white paper:
- added as a separate Example of Function Mechanism Usage chapter

Distribution of data through OCAF tree white paper:
- added as "The choice between standard and custom attributes" paragraph in Standard Attributes chapter.
2015-12-22 15:23:54 +03:00
akz
75c15b4392 0027000: Invalid result of ShapeUpgrade_UnifySameDomain
Add two test scripts to bugs/heal grid with involved in bug shapes
2015-12-22 14:59:37 +03:00
ibs
8f1f5a45cb 0027025: Configuration, CMake - do not get properties from non-VTK targets 2015-12-22 14:57:36 +03:00
ibs
109aa56ebe 0027022: Configuration, CMake - rename ungrouped variables to include them to the existing groups
APPLY_OCCT_PATCH_DIR renamed with BUILD_PATCH
OCCT_ALGO_EXTENDED_OUTPUT renamed with BUILD_WITH_DEBUG
REBUILD_PLATFORM_DEPENDENT_CODE renamed with BUILD_YACCLEX

3RDPARTY_DOXYGEN_DOT_EXECUTABLE renamed with 3RDPARTY_DOT_EXECUTABLE
2015-12-22 14:57:19 +03:00
ibs
a687470889 0026993: Configuration, CMake - use the abstraction level of VTK instead CSF_VTK for their libraries
CSF_VTK removed from CMake meta-projects (this variable is left in EXTERNLIB because it is used by genproj.tcl)
USE_VTK shown if toolkits using VTK involved in the solution
VTK_DIR removed from the advanced variables

Warning messages 'Warning. .../a.hxx~ is not involved into .../FILES' renamed with 'Warning: File .../a.hxx~ is not listed in .../FILES'
2015-12-22 14:57:15 +03:00
ibs
dfadf64138 0026878: CMake - encode properly version of OCCT in Windows binaries
.rc file has been added to each toolkit project for msvc
2015-12-22 14:47:10 +03:00
ifv
f85e7ddb9f 0027010: Wrong classification of the point relatively the solid
Algorithm of curve-face intersection was improved in order to take in account edge tolerance zones for more precise classification of state of intersection point.

Test case for issue CR27010
2015-12-22 14:36:51 +03:00
abv
59e4f50bf1 0026762: Static parameter "read.scale.unit" is not used
Parameter "read.scale.unit" is removed from sources and docs
2015-12-22 14:25:47 +03:00
aba
b12e1c7ba2 0025338: MFC standard samples: 3D selection rectangle blinking
- Added new interactive object AIS_RubberBand to draw rubber rectangle or polygon
- Added using of AIS_RubberBand in DRAW view for rectangular selection
- Added using of AIS_RubberBand in MFC samples for rectangular selection
2015-12-22 14:18:23 +03:00
abv
d9e9090564 0027016: Restore global type descriptors for old compilers
Global type descriptors are restored for VC++ 10 - 12 and GCC before 4.3.

Checks of compiler support of C++ features are corrected for GCC, ICC, and CLang in Standard_Handle.hxx
2015-12-22 14:15:01 +03:00
gka
727b5ad9fb 0026947: Data exchange can not be compiled without visualization anyomre
Dependence between STEP translator and visualization occurred due to addition class STEPConstruct_GDTProperty using enumeration from package XCAFDimTolObject.
In order to avoid this dependence class STEPConstruct_GDTProperty was moved in package STEPCAFControl and was renamed to STEPCAFControl_GDTProperty.
2015-12-22 14:12:07 +03:00
abv
59336f5c9d 0026951: Incorrect conversion of miles into millimeters during export to STEP
Coefficient for conversion of miles to mm is corrected in UnitsMethods::GetLengthFactorValue() to be 1609344.

In UnitsAPI/Units.dat, value of inch is corrected to be exactly 25.4 mm (it was 25.40001969); definition of nautical mile corrected to be exactly 1852 m.
Test bugs fclasses bug26951 is added to check definition of mm and miles.

DRAW command "unit" is corrected to put its output to Tcl instead of cout.
2015-12-22 14:08:52 +03:00
bugmaster
2f77210497 Adding checks in test cases 2015-12-20 14:49:14 +03:00
bugmaster
6ca259e871 Correction of test case 2015-12-18 11:31:05 +03:00
abv
d677b21418 Eliminate compiler warnings on VC++ 14 and CLang.
Remove unused stuff from OSD_WNT.cxx.
2015-12-18 10:35:16 +03:00
isk
20aeeb7be3 0026908: Visualization, TKOpenGl - eliminate -Wunused-parameter compiler warnings for Android target
Support TBO on OpenGL ES 3.2+
2015-12-17 18:59:36 +03:00
vpa
e9312c0fc2 0026973: Visualization - selection of entities hidden by clipping planes is broken
- misprint in distance calculation in SelectMgr_RectangularFrustum::IsClipped is corrected;
- selecting volume manager in clipping check in SelectMgr_ViewerSelector::checkOverlap was replaced ;
- added view-defined clipping planes check to SelectMgr_RectangularFrustum;
- test case for issue #26973.
2015-12-17 18:07:57 +03:00
ibs
4ff92abe44 0026229: Add the possibility in OCAF to open/save a document from/to a stream object
TDocStd_Application class extended to open/save a document of XmlOcaf and BinOcaf format
from/to standard SEEKABLE stream object which should support SEEK functionality.

Open and SaveAs DRAW commands got new additional argument "-stream" to turn on using of stream functionality.

The main changes for BinOcaf format applied in:
FSD_BinaryFile class (static method using standard stream added)
BinLDrivers_DocumentRetrievalDriver and BinLDrivers_DocumentStorageDriver classes use standard stream object as an argument

The main changes for XmlOcaf format applied in:
LDOMParser and LDOM_XmlWriter classes  use standard stream object as an argument

Unused class FSD_Archive and its siblings removed from MFC samples.
2015-12-17 18:03:34 +03:00
nbv
77dbd1f155 0026576: Wrong result obtained by intersection algorithm.
1. Algorithm of Restriction line decomposition has been created.
2. Algorithm of check of coincidences between Walking and Restriction line has been improved in new function IsCoincide(...) (which replaces IsIn2DBox(...)).
3. Some useful methods have been added in IntPatch_PointLine (and inherited) classes.

Test cases for this issue have been created.
2015-12-17 18:01:56 +03:00
gka
4f99f761b1 0024595: STEP import missing surfaces
Modification to create natural bounds for face based on the spherical and Bspline surface and having only one bound represented by Vertex loop was made.
 According to the specification of ISO-10303 part 42:
    "If the face has only one bound and this is of type vertex_loop, then the interior of the face is the domain of the face_surface.face_geometry. In such a case the underlying surface shall be closed (e.g. a spherical_surface.)"
    - natural bounds are applied only in case if VertexLoop is only the one
      defined face bound.

Update of test-cases according to the new behavior

Test-case for issue #24595
2015-12-17 17:55:47 +03:00
ski
4d6554d142 0026888: Crash in Java ImportExport sample on shape deleting
Corrected behaviour of 3d viewer after shape deleting in qt samples.
Corrected behaviour of toolbar buttons after shape deleting in csharp samples.
2015-12-17 17:47:03 +03:00
ski
f4264b5adb 0016472: Improve environment scripts for samples
Output directory for binaries of CSharp samples was corrected.
Common run.bat was created for CSharp samples.
Behaviour of run.bat file from mfc samples was extended.

Recovered separate run_*.bat files for each sample in CSharp sample.
2015-12-17 17:38:42 +03:00
ysn
9d99d3c16d 0026212: There are some problems with location of text and images on pages
Fixes to improve layout of  images and formula in generated PDF documentation.
2015-12-17 17:31:54 +03:00
vpa
3667907665 0026959: Visualization - cannot select edge of the shape
- polygonal representation of the edge is used for sensitive entity computation regardless of requested deflection;
- test case for issue #26959

Adjusting test case
2015-12-17 17:17:44 +03:00
nbv
47e3009da9 0026841: Boolean operation "bsection" produce invalid result on the attached cases
1. Intersection curve was not bounded by faces domain. It was the reason of big edge tolerance. This problem has been fixed.
2. Interface bopcurves DRAW-command has been changed in order to make possible to reproduce intersection problem.

Creation of test case for this issue.
2015-12-17 17:12:04 +03:00
gka
c9e1d810ab 0026708: Fix shape did not fix attached shape. Seam edge was not added to the attached periodic face.
Added taking into account crossing seam edge during collection of the wires in the ShapeFix_ComposeShell.cxx
Test script for bug 0026708.
2015-12-17 16:59:46 +03:00
kgv
905db76982 0026995: Visualization, TKXCAF - do not reset custom material within XCAFPrs_AISObject::Compute()
Assign default material in class constructor instead.
2015-12-17 16:49:28 +03:00
vro
1ff072271f 0023465: Weird InsertBefore, InsertAfter and Remove methods in TDataStd lists 2015-12-17 16:47:40 +03:00
abv
c785481848 0026988: Fresh compiler warnings (VC++ 14, GCC 5.2.1, CLang 3.6.2)
Compiler warnings eliminated:

- VC++: potential use of uninitialized variable
- GCC: potential use of uninitialized variable [-Wmaybe-uninitialized], redundant const on return value [-Wignored-qualifiers]
- CLang: missing override specifier on overloaded virtual function [-Winconsistent-missing-override], function call within typeid() [-Wpotentially-evaluated-expression]
2015-12-17 16:41:34 +03:00
abv
795be040eb 0026551: Optimization of initialization of OCCT RTTI
Global instances of type descriptors are eliminated as unnecessary
2015-12-17 16:41:29 +03:00
Roman Lygin
a0218ba1c5 0026913: Vulnerable mechanism in Standard_Type leads to assert 2015-12-17 16:41:24 +03:00
vpa
325e442bce 0026945: Visualization - selection does not work after closing one of local contexts in stack
- added method to restore selection of local context;
- activated standard modes are added to local status now;
- test case for issue #26945
2015-12-17 16:39:11 +03:00
isk
16420da1d4 0026984: Draw Harness, ViewerTest - preserve local transformation of presentation within vtexture command 2015-12-17 16:35:58 +03:00
msv
a2ff7810d8 0026967: BRepFill_OffsetWire should not copy plane if Alt == 0.0
In the class BRepFill_OffsetWire the base plane is not copied anymore if altitude parameter is equal to zero.
2015-12-17 16:34:11 +03:00
mkv
64b470617f 0023666: Wrong section curve between attached faces
Test case for issue CR23666

Small correction of test case in accordance with changes of issue 25945
2015-12-17 16:30:58 +03:00
mkv
5b70cbe8c1 0026523: Wrong result of section algorithm
Small correction of test case in accordance with changes of issue 25945
2015-12-17 16:15:03 +03:00
isk
74fb257d6c 0026892: Visualization, TKOpenGl - support 3D textures within OpenGl_Texture
Add a new arbTexFloat extension in OpenGl_Context.
Add a new prototype glTexImage in OpenGl_GlFunctions.
Push error message if glTexImage3D is unavailable.
2015-12-17 15:58:58 +03:00
isk
ad2a55b2f3 0026975: Visualization, TKOpenGl - handle triangle strips correctly within Ray-Tracing core 2015-12-17 15:52:06 +03:00
mkv
702ef49f22 0025342: [Regression] BRepAlgoAPI_Section returns wrong number of edges
Test case for issue CR25342
2015-12-17 15:48:38 +03:00
mkv
3da62e0ec3 0026334: BRepOffsetAPI_MakePipeShell returns the wrong shape 2015-12-17 15:41:31 +03:00
mkv
e1312bce25 0026188: Incorrect PCurve creation
Test case for issue CR26188
2015-12-17 15:34:21 +03:00
mkv
6b13d5288e 0026327: Performance degradation from version 6.8.0 on Boolean operations
Test case for issue CR26327
2015-12-17 15:26:15 +03:00
nbv
c8f62d27b0 0026896: Wrong result of bsection algorithm
Creation test cases for this issue

Small correction of test cases
2015-12-17 15:18:02 +03:00
nbv
ed9ce6777f 0026848: Result of BO depends on arguments order
Correction test case for this issue

Test cases for CR26848
2015-12-17 15:04:11 +03:00
mkv
8d27a37d80 0026427: Draft angle algorithm produces wrong shape
Test case for issue CR26427
2015-12-17 14:52:19 +03:00
ski
2f9dedc5fe Modification of test cases in accordance with changes of issue 25945 2015-12-11 11:35:18 +03:00
msv
6e2cb64d8f 0026970: Update MSVC visualizers to support 7.0 handles and something more
Changes:
- make shorter visualization of handles: change word 'count' to 'cnt'
- add visualization of hex value of entity in handles
- add visualization of classes:
opencascade::handle<*>
NCollection_Sequence<*>
TColStd_Array1OfInteger
TColStd_Array1OfReal
TColStd_Array2OfInteger
TColStd_ListOfInteger
TColStd_ListOfReal
BRep_ListOfCurveRepresentation
TopoDS_Shape
TopoDS_TShape
BOPDS_Pave
BOPDS_PaveBlock
2015-12-10 17:28:09 +03:00
ysn
d376db7a1e 0026926: Small mistake in the exceptions part of Foundation Classes User's Guide
A minor clarification
2015-12-10 17:24:34 +03:00
ski
58cf74e0c0 0025945: Make stable checking of shape global properties in tests
- Added function checkprops, set default tolerance parameter to 1.0e-4
- Using "area" instead of "square".
- Options "-equal\notequal" isn't used together with "-s" in blend and offset test cases.
- Correct regressions/differences/improvements and CPU problem (set props tolerance to 0.1)
- Corrected test cases to use checkprops proc.
- Correct image difference
- Updated TODOs in test cases.
- Updated test cases to get correct images of result shape
2015-12-10 16:56:03 +03:00
nbv
5fb5b5c432 0024417: BRepAlgoAPI_Section fails on attached shapes
Creation test case for this issue
2015-12-10 16:46:04 +03:00
emv
acb81c8314 0026955: Invalid result of General Fuse operation
Running Solid Classifier algorithm with correct tolerance for point.
2015-12-10 15:59:59 +03:00
szy
f47afe531d 0026290: It is neccessary to separate visualization part from TKCAF
- Package TPrsStd is moved into new toolkit TKVCAF. This is the only toolkit in OCAF that depends on visualization libraries.

- All persistent data stored in TPrsStd_AISPresentation attribute are moved to new attribute TDataXtd_Presentation, which is maintained automatically on the same label as TPrsStd_AISPresentation.
All parameters used by TPrsStd_AISPresentation are stored in corresponding TDataXtd_Presentation attribute.

- TPrsStd_AISPresentation is not stored in file any more; when OCAF document is loaded from a file, these attributes are created at all labels where TDataXtd_Presentation attribute is located, by TPrsStd_AISViewer::New().

- File src/StdResources/MigrationSheet.txt necessary for reading files written by previous versions of OCCT (lost in one of previous integrations) is restored and updated as necessary to handle this change (defines replacement of TPrsStd_AISPresentation by TDataXtd_Presentation). Environment variable CSF_MIGRATION_TYPES should be defined, pointing to this file.

- Packages BinMPrsStd and XmlMPrsStd are removed; their drivers are moved into BinMDataXtd and XmlMDataXtd respectively.

- Version numbers of BinOCAF and XmlOCAF formats are increased, new files cannot be read by previous versions of OCCT

- New tests added

- Adding new TKVCAF toolkit in sample projects

- Restore IsDisplayed(false) in TPrsStd_AISPresentation::Erase()
2015-12-10 15:55:00 +03:00
emv
d0fc16452d 0026971: Test cases for Set-45 2015-12-10 15:48:39 +03:00
emv
593f18f8ec 0026954: Test cases for Set-44
The cases for the customer's set Set-44.
2015-12-10 15:48:37 +03:00
emv
f1eca450db 0026952: Test cases for Set-41
The cases for the customer's set Set-41.
2015-12-10 15:48:36 +03:00
emv
a84c3447ad 0026953: Test cases for Set-43
The cases for the customer's set Set-43.
2015-12-10 15:48:35 +03:00
Istvan Csanady
3b25c0e867 0026949: Geom(2d)Adaptor_Curve/Surface should not do down casts in evaluation
Prevent downcasting in curve evaluation in GeomAdaptor classes
2015-12-10 15:48:33 +03:00
abv
92efcf78a6 0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
Automatic restore of IMPLEMENT_STANDARD_RTTIEXT macro (upgrade -rtti)
2015-12-04 14:15:06 +03:00
abv
f5f4ebd07b 0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- manual
Restored possibility to have out-of-line implementation of DynamicCast() and STANDART_TYPE():
- Macro STANDARD_TYPE() now resolves to function get_type_descriptor() of the class
- Macro DEFINE_STANDARD_RTTI is replaced by two variants:
  - DEFINE_STANDARD_RTTI_INLINE works as before, defining DynamicCast() and get_type_descriptor() as inline functions
  - DEFINE_STANDARD_RTTIEXT declares DynamicCast() and get_type_descriptor() as exported
- Macro IMPLEMENT_STANDARD_RTTIEXT provides definition of DynamicCast() and get_type_descriptor() for a class

Upgrade script amended to replace DEFINE_STANDARD_RTTI by pair of DEFINE_STANDARD_RTTIEXT / IMPLEMENT_STANDARD_RTTIEXT if source file with the same name as header is found in the same folder, and by DEFINE_STANDARD_RTTI_INLINE if either source is not found or class is defined in the source (i.e. not in header)

Upgrade tool improved to recognize include statements with path prefix, like #include <occt/gp_Pnt.hxx>
Code corrected to eliminate warnings reported by upgrade tool.
Template of CXX file for testing upgrade tool added.

Documentation of upgrade procedure updated.
2015-12-04 13:57:58 +03:00
ika
6595eee796 0026859: Export of GDT from XCAF to STEP
Export/Import:
Add export of dimensions, geometric tolerances and datums, according to AP242.
Add missing STEP entities.
Corrections.

XCAF:
Add new attributes to Datum object: DatumTargetNumber.
Supplement enum XCAFDimTolObjects_GeomToleranceZoneModif.
Corrections.

Test cases:
gdt export A1
gdt export A2
gdt export A3
gdt export A4
gdt export A5
2015-12-04 13:16:58 +03:00
nbv
4e14c88f77 0026431: Can't cut a sphere from a cylinder
This branch contains fixes for 26675 and 26431 bugs.

1. Normalization has been eliminated.
2. Interfaces of AppDef_Compute::Parametrization(...) and BRepAlgo_BooleanOperations::SetApproxParameters() methods have been changed.
3. Overloaded methods for ApproxInt_Approx::SetParameters(...), TopOpeBRepTool_GeomTool::GetTolerances(...) and TopOpeBRepTool_GeomTool::SetTolerances(...) have been removed (because some fields of these classes are not used more).
4. Comments for some methods have been changed in BRepApprox_TheMultiLineOfApprox.hxx and GeomInt_TheMultiLineOfWLApprox.hxx files.
5. Some fields have been deleted from ApproxInt_MultiLine class. Kept members have become constant.
6. Interface of ksection DRAW-command has been changed.
7. Now, 2dintersect DRAW-command prints information about found segments.
8. Some code fragments have been rewritten to make them easier.
9. Algorithm of splitting WLine, which goes through pole of sphere has been improved.
10. Improve approximation algorithm in order to it will compute correct 2D- and 3D-tangent at the end of bezier constraints (including case when curve goes through or finishes on singular points).
11. Interface of IntPatch_WLine::Dump(...) method has been corrected.
12. Some methods for working with Walking-line are made more universal (available for both GeomInt and IntTools packages).
13. Problem in BRepLib::SameParameter(...) method has been fixed (see corresponding comment).
14. Small correction in Draft package.
15. Any outputs in IntPatch_Intersection::Dump(...) method have become disabled because they are useless. If anybody need in this outputs he/she will correct this method himself/herself.

Adjusting some test cases according to their new behavior.
Creation of new test cases.

----------------------------------------------------------------------------------------------------------------------------

Some explanation of new behavior of some test cases:

 1. Regressions:

a) blend simple X4
The problem is described in the issue #0026740. According to this description,  the result on the current MASTER seems to be wrong indeed.

b) boolean bcommon_complex C7 and boolean bcut_complex Q1
These test case use same shapes with different Boolean operation (COMMON and CUT). They are already BAD (on the MASTER). Now, some sub-shapes have become not-shared, simply. In my opinion, we shall apply new behavior of these tests.

c) boolean bsection M3
The problem described in the issue #0026777 exists even on the current MASTER.

d) boolean bsection M9
The problem is described in the message http://tracker.dev.opencascade.org/view.php?id=26815#c47546. Here, we have really regression in the picture.

e) boolean bsection N2

The problem is described in issue #0026814.

f) boolean volumemaker G1

The problem is described in issue #26020.

g) bugs modalg_1 bug1255 (and bug1255_1)

The problem is described in issue #26815.

h) bugs modalg_2 bug5805_18, bugs modalg_2 bug5805_42, bugs modalg_2 bug5805_46

The problem is described in issue #25925.

i) bugs modalg_3 bug602

The problem is describes in issue #602.

j) bugs modalg_5 bug24915

The problem is described in the message http://tracker.dev.opencascade.org/view.php?id=25929#c48565. It is not fixed by this issue.

k) bugs modalg_5 bug25838

The main reason is described in issue #0026816.

----------------------------------------------------------------------------
2. Improvements:

a) boolean volumemaker F9
b) bugs modalg_1 bug10160_3
c) bugs modalg_2 bug22557
d) bugs modalg_5 bug25319_1 (_2)
e) draft angle G2
f) offset shape A1
g) offset with_intersect_80 N7
2015-12-04 13:15:04 +03:00
aml
f44aa19760 0025929: Make Approx_ComputeLine algorithm adaptive
Adaptive partition algorithm of WLine is implemented and used in ApproxInt_Approx.gxx file.
Refactoring of ApproxInt_Approx class.
Test cases are updated to the new behaviour.

Filtering algorithm improved.
2015-12-04 13:12:09 +03:00
abv
600f8c7f47 CSF_TBB added for toolkits that need to link to TBB 2015-12-04 13:03:51 +03:00
ski
0e617b05e7 0026902: Configuration, CMake - tests is not installed after definition INSTALL_OCCT_TEST_CASES option
Variables responsible for installation of tests and samples were renamed
2015-12-04 13:03:47 +03:00
mgn
586db386eb 0026922: Huge performance issue writing data to the output stream
Test case for issue CR26922

Correction of literal (char to string)
2015-12-04 13:03:41 +03:00
kgv
cc6852f3e9 0026940: Visualization, TKOpenGl - capping plane should be applied to connected structures
OpenGl_Structure::Render(), OpenGl_CappingAlgo::RenderCapping() - render
groups of instanced and this structure in the same manner
using ::renderGeometry() and ::renderClosedGeometry() instead of ::DrawGroups().
Skip capping algo for structures without groups of closed primitives.
2015-12-04 13:03:28 +03:00
azv
d660a72aca 0026838: Using GeomEvaluators for calculation of values of curves
1. Implemented evaluators for 2D and 3D offset curves
2. Removed obsolete namespace CSLib_Offset

Update of UDLIST (adding no-cdl-pack Geom2dEvaluator)

Update TKG2d/CMakeLists.txt after rebase

Correction compilation in debug mode
2015-11-27 11:49:40 +03:00
apl
badc9305ae 0026658: Unexpected selection in the context using a selection filter.
Method AIS_LocalContext::ClearOutdatedSelection() fixed. Now it chooses "mylastindex" value from list of filtered detected owners. The topmost detected owner will be highlighted if the current detected owner was cleared as outdated.

BUC26658 command to check the bug fix in DRAW.

append a test script to automatically check the bug in DRAW.

warnings correction.
2015-11-27 10:20:34 +03:00
apl
97f937cc55 0026792: Visualization, Graphic3d - Z-fit support for transform persistence is missing after removing Visual3d_View
Add missing code for z-fit support for zoom, rotate persistent object.
Fixed wrong statement that should enable frustum culling optimization for zoom, rotate persistent object.
Fixed BVH_LinearBuilder.lxx to correctly control number of items in leaf node for a case of items with equal bounding boxes.
Added non-regression test case for z-clipping of transform persistent objects.
2015-11-27 10:18:12 +03:00
azv
c8b5b3d89e 0023620: Follow up of 0022939 - make Bezier curve/surface evaluation thread-safe
1. Remove cache from Geom_BezierCurve, Geom2d_BezierCurve and Geom_BezierSurface
2. Add cache for Bezier curves into GeomAdaptor_Curve, Geom2dAdaptor_Curve and GeomAdaptor_Surface
3. Update comments in corresponding cache classes
4. Avoid frequent down-casting to B-splines in adaptors
2015-11-27 10:08:50 +03:00
azv
525ec87c53 0026914: [Regression 7.0alpha] Hang in surface approximation
Change a constructor of evaluator for offset surfaces

Test-case for issue #26914
2015-11-27 10:08:45 +03:00
ika
5371131494 0026451: Crash importing STeP file
Add check for NULL.
2015-11-27 10:08:40 +03:00
kgv
b128c89231 0026915: Visualization - return Handle from Graphic3d_CView::FBOCreate() instead of a pointer
OpenGl_View::FBO() - use copy Handle constructor for compatibility.
2015-11-27 10:08:35 +03:00
osa
6bd94e0de9 0026348: Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix
Graphic3d_CStructure::Transformation - use Graphic3d_Mat4 instead of plain arrays.
Drop duplicating field OpenGl_Structure::myTransformation (copy of Graphic3d_CStructure::Transformation).
Drop unused property Graphic3d_CStructure::Composition and Graphic3d_Structure::Composition().
2015-11-27 10:08:30 +03:00
vro
f486f64d86 0026005: Problem with transient TFunction_Logbook 2015-11-27 10:08:24 +03:00
azv
8156ddddc7 0026897: BRepBuilderAPI_Copy does not copy polygons
1. Implemented copying for 3D polygons and polygons on surfaces
2. Added test case bugs/modalg_6/bug26897
2015-11-27 10:08:18 +03:00
isk
fbef84f9eb 0026891: Visualization, TKOpenGl - define more texture types within OpenGl_TextureFormatSelector 2015-11-27 10:08:13 +03:00
vpa
95081657f1 0026905: Visualization - cosmetic fixes in selection methods of AIS_InteractiveContext
- selection mode in AIS_InteractiveContext::AddOrRemoveSelected is corrected;
- AIS_InteractiveContext::IsSelected returns object's state instead of global status.
2015-11-27 10:08:08 +03:00
azv
6a2ee09493 0026871: [Regression in 6.9.0] Projecting a curve hangs inside Approx_FitAndDivide2d
Fix checking of B-spline parametrization speed

Test case for issue CR26871
2015-11-27 10:08:03 +03:00
nbv
ce48b00930 0026884: Cylinder/Cylinder intersection algorithm throws an exception
Check, if cylinder axes are parallel is made more carefully.
This check is brought to conformity with check if axes are parallel (see constructor AxeOperator::AxeOperator(...) in IntAna_QuadQuadGeo.cxx file)

Test case for issue CR26884
2015-11-26 12:05:36 +03:00
rkv
c16915c713 0026625: Possible wrong use of vtkSmartPointer<T> in IVtkVTK_ShapeData.cxx
Use vtkSmartPointer<XXX>::New() instead of XXX::New() when initializing fields of vtkSmartPointer<XXX> types.
2015-11-26 12:02:09 +03:00
aba
4d147bf2a7 0025549: Visualization - do not crash on attempt to display the Angle dimension between two parallel lines
- Handle cases of 0 and Pi angle depending on lines in edges and end points

Draw arcs in accordance with input normal for minimum angle, check correctness of input circle parameters
2015-11-26 11:59:30 +03:00
bugmaster
bd485d9691 Redirection of generation reference documentation from source files 2015-11-24 16:36:34 +03:00
bugmaster
31dfc19fcb Copy env.bat file from adm/templates 2015-11-24 16:11:22 +03:00
abv
79104795a1 0026912: CLang 3.6.2 compiler warning [-Winconsistent-missing-override] 2015-11-23 14:58:23 +03:00
ibs
4d8eca1dce 0026911: Configuration, CMake - strips symbol information from the binary in release configuration if the compiler is a variant of gcc
add strip flag when the compiler is a variant of gcc
2015-11-23 14:48:20 +03:00
ibs
a082e7d07b 0026861: Configuration, CMake - enable -Wall warnings when using CLang
-Wall warning option added for CLang compiler
2015-11-23 13:40:49 +03:00
ibs
e713baee32 0026903: Configuration, CMake - 3rdparty search algorithms should have the same logic
the search algorithms fitted with one logic.

3rdparty_dir is not specified by-default
3rdparty_<name>_dir has higher priority than 3rdparty_dir

frameworks are considered on Mac OS;

CMake - continue method (cmake version >= 3.2) removed

vtk installation disabled

Mac OS X - link /usr/X11/lib if X11 library is linked

FILES parsing optimized

search X11 package for every time when it used on MAC

CSF_XwLibs used by a toolkit using Tk

break a package processing if all the files from FILES file have been processed
2015-11-23 13:40:43 +03:00
ibs
d94d80e529 0026865: Configuration, CMake - ensure consistency between FILES and actual content of inc and src folders
headers from inc folder are being checked for using in further building process
parse FILES file to collect header files for inc folder

during cleaning inc folder, do not remove the headers with name not containing their package name

FILES is parsed not only for headers files

Warning is emitted when a file in folder is not involved to corresponding FILES file
lex and yacc file added StepFile/FILES file

Small correction
2015-11-23 13:39:52 +03:00
ibs
fb3267c7b8 0026880: Configuration, CMake - platform dependent code is not generated
several misprints fixed (upper case, sorting of empty list, empty parent directory)

CMake should consider CSF_ variables from EXTERNLIB file for each toolkit

CSF_ variables are defined in occt_csf for each OS
redundant CSF removed

Conflicts:
src/TKG3d/CMakeLists.txt
2015-11-23 13:39:47 +03:00
ibs
d3ff0ff227 0026858: Configuration - cmake wrong detected TK folder
regex template for 3rdparty folder changed
the sensitive case of comparison of two folders fixed
2015-11-20 13:29:03 +03:00
abv
8fcb8c0700 0000670: Problem with the Print method.
Test for issue #670 corrected to avoid unpredictable behavior
2015-11-19 15:31:21 +03:00
rkv
95e05159d6 0026179: Coding rules - eliminate -Wdeprecated-declarations CLang warnings on tmpnam() usage
Make a temporary file using BuildTemporary() in "/tmp" folder on Linux or using "TEMP" environment variable on Windows.
Use the new OSD_File::Capture() method for standard output redirection.
2015-11-19 15:31:17 +03:00
emv
9b7f3f83c0 0025926: 3D offset in mode "Complete" with Join type "Intersection"
Extension for colliding cases (Limited to work on planar cases only).

Test cases for issue CR25926

Update of test-cases according to the new behavior
2015-11-19 15:27:42 +03:00
isk
b40693b0c2 0026890: Foundation Classes, TKernel - define OSD_OpenStream for std::ifstream 2015-11-19 15:25:19 +03:00
pdn
e71669c6e5 0026664: Triangulating a very small polygon fails
Parameter for adaptive computation of minimal 2D meshing precision added in BRepMesh_IncrementalMesh API.
Corresponding option -adaptive added in DRAW command

All meshing parameters are collected in structure, BRepMesh_FastDiscret::Parameters, which is now used to define and manipulate parameters of the algorithm.
2015-11-19 15:21:10 +03:00
azv
6b84c3f7db 0026252: GeomAdaptor_Surface should use inner adaptor to calculate values of complex surfaces
* Implement GeomEvaluator package
* Inject evaluators to GeomAdaptor_Surface to calculate values of complex surfaces
* Inject evaluators to Geom_Surface classes to calculate values for offset surfaces, surfaces of revolution and surfaces of extrusion
* Move Adaptor3d_SurfaceOfLinearExtrusion and Adaptor3d_SurfaceOfRevolution to GeomAdaptor and unify calculation of their values and derivatives
* Code optimizations
* Update test cases

Update of test-cases according to the new behavior
2015-11-19 14:50:54 +03:00
ibs
6e4dfbecee 0026869: Documentation - simplify "Building with CMake and ADT on Android" article
ADT using removed. GNU make using added

Small corrections of title and image in documentation.
2015-11-19 14:46:54 +03:00
ski
41ec04dbbd 0026247: Too huge binaries are produced for Android platform using MinGW
Parameter "-s" was added to CMAKE_CXX_FLAGS_RELEASE and CMAKE_C_FLAGS_RELEASE to optimize size of binaries
2015-11-19 14:37:46 +03:00
abv
4525373bf3 0026872: Coding - pointless instantiations of local variables in BinTools
Instantiations of local stringstream variables used in error handling moved from upper function scope to places where they are actually needed
2015-11-19 14:33:29 +03:00
vpa
eece3af2e2 0026870: Visualization - deactivated selections are not updated after object's re-computation
- update status in SelectMgr_SelectionManager::RecomputeSelection:
  1) is set to full for all selections;
  2) is switched to none only if selection was actually recomputed;
- test case for issue #26870
2015-11-19 14:31:48 +03:00
isk
75c262a97a 0026790: Visualization, TKOpenGl - apply view resolution to the line width in OpenGl_Context::SetLineWidth()
Add ResolutionRatio() method in the Graphic3d_RenderingParams.
Add SetResolutionRatio() method in the OpenGl_Context.
2015-11-19 14:29:31 +03:00
ibs
ad77956498 0026867: Configuration - update any comparison including __cplusplus macro to remove one
__cplusplus >= 201103L replaced with __QNX__ macro
2015-11-19 14:27:06 +03:00
jgv
420f79f8bc 0026681: BRepPrimAPI_MakeRevol creates faulty shape
Correction according to remarks

More precise processing of non-SameParameter edges

Correction of mistake

Test cases for issue CR26681
2015-11-19 14:22:54 +03:00
kgv
d2eddacc8f 0026862: Configuration - avoid usage of 3rd-party headers within OpenGl_View and D3DHost_View
Move Font_FTFont::Rect structure into dedicated header Font_FTFont.
D3DHost_View, OpenGl_Font, Font_TextFormatter - use forward declarations.

Fix regressions after #0024776

OpenGl_View::IsInvalidated() - fix misprint.
D3DHost_View::Redraw() - assign myFBO before rendering.
D3DHost_FrameBuffer::Init() - fix always zero viewport.
2015-11-19 14:18:00 +03:00
ifv
2651bfde07 0024890: Result of uniform scaling is invalid
Test case for issue CR24890
2015-11-19 14:15:15 +03:00
nbv
ec7ed71c18 Current MASTER is not built if OCCT_DEBUG macros is enabled 2015-11-13 14:49:25 +03:00
bugmaster
d5f0e4adb9 Cosmetic correction 2015-11-12 14:43:38 +03:00
aba
1c078d3b39 0026056: AIS_LengthDimension can not build dimension for face-edge or edge-face
- Correct AIS_LengthDimension::InitEdgeFaceLength() method to support face-edge and edge-face cases
- Correct test command to support face-edge and edge-face input geomerty without custom plane
2015-11-12 13:03:13 +03:00
ifv
a144d7770f 0026857: Documentation for methods Geom_BSplineSurface::SetU(V)NotPeriodic is wrong 2015-11-12 11:26:52 +03:00
emv
b1682e23b2 0026855: Draw commands to debug Boolean Operations Algorithm
The commands to debug BOA.
These commands should serve only debug purposes and should not be used in tests.

Removing old implementation of the duplicated bopnews command.
2015-11-12 11:23:31 +03:00
isk
832ae82d0a 0026821: Visualization - define default Rendering Parameters for Interactive Context
Define default Rendering Parameters within V3d_Viewer.
New instances of V3d_View use default Rendering Parameters.
2015-11-12 11:18:05 +03:00
emv
338434c75a 0026798: Boolean operations: keep desired cells and boundaries in the result
The algorithm is based on the General Fuse algorithm (GFA). The result of
GFA is all split parts of the Arguments.

The purpose of this algorithm is to provide the result with the content of:
1. Cells (parts) defined by the user;
2. Internal boundaries defined by the user.

In other words the algorithm should provide the possibility for the user
to add or remove any part to (from) result and remove any internal boundaries
between parts.

Requirements for the Data:
All the requirements of GFA for the DATA are inherited in this algorithm.
Plus all the arguments should have the same dimension.

Results:
The result of the algorithm is compound containing selected parts of
the basic type (VERTEX, EDGE, FACE or SOLID). The default result
is empty compound. It is possible to add any split part to the result
by using the methods AddToRessult() and AddAllToResult().
It is also possible to remove any part from the result by using methods
RemoveFromResult() and RemoveAllFromResult().
The method RemoveAllFromResult() is also suitable for clearing the result.

To remove Internal boundaries it is necessary to set the same material to the
parts between which the boundaries should be removed and call the method
RemoveInternalBoundaries(). The material should not be equal to 0, as this is
default material value. The boundaries between parts with this value
will not be removed.
One part cannot be added with the different materials.
It is also possible to remove the boundaries during combining the result.
To do this it is necessary to set the material for parts (not equal to 0)
and set the flag bUpdate to TRUE.
BUT for the arguments of the types FACE or EDGE it is recommended
to remove the boundaries in the end when the result is completely built.
It will help to avoid self-intersections in the result.

It is possible to create typed Containers from the parts added to result by using
method MakeContainers(). The type of the containers will depend on the type of
the arguments: WIRES for EEDGE, SHELLS for FACES and COMPSOLIDS for SOLIDS.
The result will be compound containing containers.
Adding of the parts to such result will not update containers. The result
compound will contain the containers and new added parts (of basic type).
Removing of the parts from such result may affect some containers if the
the parts that should be removed is in container. In this case this container
will be rebuilt without that part.

History:
The algorithm supports history information. This information available through
the methods IsDeleted() and Modified(). In DRAW Test Harness it is available
through the same commands as for Boolean Operations (bmodified and bisdeleted).

Examples:
1. API
BOPAlgo_CellsBuilder aCBuilder;
BOPCol_ListOfShape aLS = ...; // arguments
/* parallel or single mode (the default value is FALSE)*/
Standard_Boolean bRunParallel = Standard_False;
/* fuzzy option (default value is 0)*/
Standard_Real aTol = 0.0;
//
aCBuilder.SetArguments(aLS);
aCBuilder.SetRunParallel(bRunParallel);
aCBuilder.SetFuzzyValue(aTol);
//
aCBuilder.Perform();
if (aCBuilder.ErrorStatus()) { // check error status
  return;
}
/* empty compound, as nothing has been added yet */
const TopoDS_Shape& aRes = aCBuilder.Shape();
/* all split parts */
const TopoDS_Shape& aRes = aCBuilder.GetAllParts();
//
BOPCol_ListOfShape aLSToTake = ...; // parts of these arguments will be taken into result
BOPCol_ListOfShape aLSToAvoid = ...; // parts of these arguments will not be taken into result
//
/* defines the material common for the cells, i.e.
   the boundaries between cells with the same material
   will be removed.
   By default it is set to 0. Thus, to remove some boundary
   the value of this variable should not be equal to 0 */
Standard_Integer iMaterial = ...;
/* defines whether to update the result right now or not */
Standard_Boolean bUpdate = ...;
// adding to result
aCBuilder.AddToResult(aLSToTake, aLSToAvoid, iMaterial, bUpdate);
aR = aCBuilder.Shape(); // the result
// removing of the boundaries
aCBuilder.RemoveInternalBoundaries();

// removing from result
aCBuilder.AddAllToResult();
aCBuilder.RemoveFromResult(aLSToTake, aLSToAvoid);
aR = aCBuilder.Shape(); // the result

2. DRAW Test Harness
psphere s1 15
psphere s2 15
psphere s3 15
ttranslate s1 0 0 10
ttranslate s2 20 0 10
ttranslate s3 10 0 0

bclearobjects; bcleartools
baddobjects s1 s2 s3
bfillds
# rx will contain all split parts
bcbuild rx
# add to result the part that is common for all three spheres
bcadd res s1 1 s2 1 s3 1 -m 1
# add to result the part that is common only for first and third shperes
bcadd res s1 1 s2 0 s3 1 -m 1
# remove internal boundaries
bcremoveint res

Added history support for Generated shapes (created in ShapeUpgrade_UnifySameDomain).

Methods AddToResult and RemoveFromResult have been documented in more details to clarify the procedure of adding and removing parts.

Adding external library to use ShapeUpgrade_UnifySameDomain.

Test-cases for issue #26798
2015-11-12 11:15:39 +03:00
azv
5201d3e66c 0026255: Adaptor3d_OffsetCurve is misleading
1. Rename Adaptor3d_OffsetCurve to Adaptor2d_OffsetCurve and relative classes
2. Remove redundant class Geom2dGcc_CurveToolGeo
2015-11-12 10:45:14 +03:00
afv
de6273a31f 0026603: Problem with maximization and normalization document windows in Qt samples with Qt 5.x 2015-11-12 10:13:17 +03:00
abv
f2139a7f0f 0026780: Coding rules - eliminate warnings on Linux and Mac
Fixed a few remaining warnings found by GCC, CLang, and VC++ 14 (recent changes)
2015-11-11 09:43:26 +03:00
abv
7dc2c1656a 0026854: Use -Wextra with GCC
Added option -Wextra for GCC compilation
2015-11-09 15:04:56 +03:00
abv
6fab2d4f64 0025078: Coding rules - eliminate GCC warning -Wclobbered
GCC warning -Wclobbered suppressed in Standard_ErrorHandler.hxx when OCC_CONVERT_SIGNALS or NO_CXX_EXCEPTIONS are used
2015-11-09 15:04:55 +03:00
abv
04e9307054 0026852: Coding - compiler warnings issued by GCC 5.2.1
Compiler warnings eliminated:
- BRepAlgo_DSAccess: avoid copying of local list
- IntPatch, IntTools: initialize "possibly used uninitialized" variables by zeros
- Intf: slight refactoring
- OSD_signal: suppress unused argument
- OpenGL: add missing initializers in structures
- STEPConstruct_GDTProperty: correct function signature to pass output parameters by reference
2015-11-09 15:04:54 +03:00
rkv
3d18f1e038 0026783: Coding rules - eliminate GCC warning -Wunused-but-set-parameter
TestTopOpeDraw_Displayer::GetTol(), GetPar() - pass assigned parameters by reference.
TopOpeBRep_vprdeg.cxx, TopOpeBRep_FacesFiller::ProcessVPondgE() - remove commented code, comment inactive code.
2015-11-09 15:04:53 +03:00
abv
5d88fd549c 0026850: Replace nested instantiations of TCollection generic classes by NCollection templates
Remaining instantiations of NCollection generics are converted to NCollection templates; unused and duplicates removed
2015-11-09 15:04:07 +03:00
abv
487bf1ceaa 0024567: Coding rules - eliminate GCC warning -Wignored-qualifiers
Redundant const qualifiers of return types of functions returning values are removed
2015-11-07 21:40:52 +03:00
abv
cda9a0d4c2 0026843: New warning during compilation OCCT on MacOS
Remove unused (and not implemented) methods in OSD package: IsDivisible(), GetExponent(), GetMantissa(), AvailableMemory()
2015-11-07 21:40:18 +03:00
rkv
d48df25df1 0026780: Coding rules - eliminate warnings on Linux and Mac
Avoid warnings by means of ifdef/ifndef or removing unused code.
2015-11-07 21:37:19 +03:00
abv
c9246067a1 0026178: Coding rules - eliminate -Wtautological-pointer-compare CLang warnings in Standard_ErrorHandler
Tautological comparisons removed; buffer initialized by zeros; LXX files merged to HXX; descriptions added
2015-11-06 07:54:57 +03:00
kgv
8265e5deb8 0026844: Visualization, OpenGl_Flipper - fix issues within Core Profile and OpenGL ES
Remove outdated code lines.
2015-11-05 14:27:51 +03:00
abv
a5916aa20b 0022325: Patch to fix a build failure on GNU/kFreeBSD 2015-11-05 12:16:48 +03:00
jgv
f33f393a11 0026757: Wrong history of a fillet
Small correction

Test case for issue CR26757
2015-11-05 12:14:03 +03:00
apn
a8686c759c 0026744: Boolean Cut builds incorrect result
Added test case bugs/modalg_6/bug26744
2015-11-05 12:10:47 +03:00
ibs
d8d01f6ed6 0026823: Configuration - use EGL on another platform without GLX 2015-11-05 12:04:05 +03:00
rkv
c85385c0e2 0026784: Coding rules - eliminate GCC warning -Wunused-parameter
OSD_Thread - use pthread_timedjoin_np() instead of pthread_join() when available (glibc extension).
Suppress unused parameter warning in OSD_Signal, NCollection_WinHeapAllocator, OpenGl_Text, OpenGl_View, V3d_View and ViewerTest.
2015-11-05 12:01:07 +03:00
ink
1c9d32256d 0026689: Necessary to improve STEPCAFControl_Reader to read GD&T data from STEP model(AP242).
Small corrections
added tests, corrected remarks
corrected remarks
Fix compilation errors.
Update test case (direction can be exist only for Oriented dimension).
fix compilation warning
2015-11-05 11:52:35 +03:00
ski
82f443b628 0026763: CMake configuration process does not allow setup paths for TK library if it separated from TCL
It is possible now to use standalone TCL and TK.
Behavior of 3RDPARTY_TK_DIR specifying extended
TCL/TK searching works correctly with installed ActiveTcl
TCL/TK searching works correctly with latest versions of CMake
Macro COMPLIANCE_PRODUCT_CONSISTENCY was created.

Small update of compilation for android
2015-11-03 14:51:53 +03:00
ibs
0123185ed1 0026831: Configuration - define HashCode for pthread_t on Android
explicit cast Standard_ThreadId to Standard_Size
2015-11-02 18:11:45 +03:00
ibs
2e26cf7664 0026834: Visualization, OpenGl_FrameBuffer - use GL_DEPTH_COMPONENT instead of GL_DEPTH for texture initialization
getDepthDataFormat method uses correct enumeration for GL_DEPTH_COMPONENT texture now
2015-11-02 18:09:14 +03:00
ibs
13e3622ca7 0026830: TKernel should not be linked with pthread and rt
pthread and rt are not linked on android and qnx
2015-11-02 14:41:08 +03:00
kgv
3b523c4cb2 0026822: Visualization, OpenGl_Texture - fix compilation issue on Android due to usage of undefined macros GL_DEBUG_TYPE_ERROR
Drop _ARB prefix from GL_DEBUG_ enumeration.
2015-10-30 10:26:57 +03:00
kgv
959a265a68 0026810: Visualization, TKOpenGl - line is shown without stipple aspect with FFP turned off on OpenGL before 3.2
OpenGl_ShaderManager::prepareStdProgramFlat() enable stipple line GLSL program
within OpenGL 3.0+, OpenGL ES 3.0+ and OpenGL 2.0+ with GL_EXT_gpu_shader4 extension.
2015-10-29 15:10:45 +03:00
kgv
15478b1b87 0026808: Visualization, TKOpenGl - specify GLSL 120 for point sprites program 2015-10-29 15:06:53 +03:00
rkv
9816003815 0026781: Coding rules - eliminate GCC warning -Wunused-result
Check return code of fgets() and system() within FSD_BinaryFile::ReadChar(),
IFSelect_SessionFile::ReadFile(), IFSelect_SessionPilot::ReadScript(),
OSD_File::Print(), OSD_Process::Spawn(), RWStl::ReadAscii(), iges_lire().
2015-10-29 15:04:43 +03:00
nbv
71958f7db2 0026699: Wrong section curves
1. Algorithm of Restriction line processing has been improved in IntTools_FaceFace.cxx file.
2. Algorithm of checking, if Restriction line and Walking line are coincided has been improved in IntPatch_ImpPrmIntersection.cxx file.
3. Algorithm of extending check if starting point of Walking line is a tangent point has been added.

Small correction of some test cases.
Creation of test case for issue #0026699.

Small correction of test case for issue CR26699
2015-10-29 14:02:13 +03:00
aml
5344638378 0024658: fixshape changes source shape
Context usage extended in method ShapeFix_Wire::FixSelfIntersection() to avoid modification of original shape by shape healing.
Added check for subshape modification in XSAlgo/XSAlgo_AlgoContainer::MergeTransferInfo().
Test cases are updated to the new behaviour.

Test case for issue CR24658
2015-10-29 13:57:11 +03:00
ifv
345d30560e 0026426: Draft angle algorithm modifies input argument + the result of the operation have very large tolerance values
Test-case for issue #26426
2015-10-29 13:36:17 +03:00
rkv
e438ef2550 0026811: Coding rules - drop unused Draw Harness command deboucle 2015-10-29 13:32:54 +03:00
kgv
6146a808f3 0026805: Visualization, Graphic3d_GraphicDriver - drop outdated unsupported methods for debugging
Drop methods PrintBoolean(), PrintCLight(), PrintCStructure(), PrintCView(), PrintFunction(), PrintInteger(),
PrintIResult(), PrintShortReal(), PrintMatrix(), PrintString(), SetTrace(), Trace().
2015-10-29 13:30:49 +03:00
kgv
3c4b62a436 0026711: Visualization, TKOpenGl - support creation of multisampling off-screen FBOs
OpenGl_Texture::Init2DMultisample() - new method to initialize multisampled texture.
Graphic3d_RenderingParams::NbMsaaSamples - add option defining MSAA samples number.

RayTracing will keep using FBO without MSAA, however it is possible to combine
MSAA for rasterization and FSAA for RayTracing.

OpenGl_FrameBuffer constructor has been changed to do not take arguments.
OpenGl_FrameBuffer::Init() method has been extended with mandatory parameters
defining Color and Depth attachment formats
and optional parameter defining number of MSAA parameters.

Draw Harness, add option -msaa to vrenderparams.
2015-10-29 13:28:11 +03:00
abv
9535c4be46 0026799: NCollection_Array2's RowLength and ColLength return wrong value.
Comments to methods RowLength() and ColLength() improved to avoid possible misinterpretation
2015-10-29 13:20:49 +03:00
rkv
b8c673b4e6 26785: Coding rules - eliminate GCC warning -Wempty-body in LDOM_DeclareSequence.hxx 2015-10-29 12:22:43 +03:00
apn
0e04b6822c 0021107: The computed section is incomplete
Added test case bugs/modalg_6/bug21107
2015-10-29 12:13:15 +03:00
kgv
d3839d748a 0026807: Documentation - describe dropping of Visual3d and UserDraw within porting notes 2015-10-29 12:06:34 +03:00
ski
50fe2dab24 0026787: Do not declare redundant macros WNT, LIN, WIN32, WIN64 within samples project files
Redundant macros were removed.

Defines _WIN32, __linux__ and LININTEL were removed from qt samples *.pro files
2015-10-29 11:03:26 +03:00
abv
f1a70360a7 0026561: Porting CSharp wrapper to OCCT 7.0.0
Added missing Standard_EXPORT for public methods; declaration of unimplemented method removed.

Restoring some changes made for #26788 but omitted in its commit.

OpenGl_View::ReadDepths() - drop obsolete and broken method; V3d_View::ToPixMap() should be used instead
2015-10-26 17:05:23 +03:00
ifv
df573a26ed 0026470: BRepFill_Evolved: exception and invalid result
Test-cases for issue #26470
2015-10-22 15:43:33 +03:00
aml
98a4340017 0026620: Shape healing unreasonably downgrades tolerance of a face
Added face support in SameParameter in classes ShapeAnalysis_Edge, ShapeFix_Edge.

Test case for issue CR26620

Minor correction.
2015-10-22 14:59:43 +03:00
abv
7636352267 0026788: Compiler warnings when OCCT_DEBUG is enabled
Clean-up in code causing warnings when OCCT_DEBUG is enabled

Minor corrections:
- new compiler warnings on VC++ 14
- rename of "PPC" variables that are said to caused conflicts on PowerPC
- removal of unused header TopOpeBRep/TopOpeBRep_tools.hxx
2015-10-22 14:40:17 +03:00
ink
5f07d05d0e 0026216: New functionality. Converting the compound to assembly.
Added new functionality for converting the compound to assembly.
Added new drw command XExpand.
Changed DumpShape and DumpAssembly
Added test.

test changed
2015-10-22 14:34:14 +03:00
aml
d33a8cde96 0026775: Bad result of section algorithm
Walking line method extraction into separate class IntTools_WLineTool.
New purging method of walking line had been added. Now point which are out of bounds are deleted.

Minor corrections.

Test case for issue CR26775
2015-10-22 11:09:56 +03:00
apl
bf02aa7d7d 0026617: Visualization, Ray Tracing - adopt progressive rendering Path Tracing for rendering stereoscopic pair
- Use two different FBOs for accumulating frames for left/right eye projection.
- Added equality checks to camera modification methods to avoid camera updates when performing identity operations.
2015-10-22 11:00:08 +03:00
vpa
23963a92d2 0026779: Draw Harness, ViewerTest - vstate output is incorrect for sub-shapes selection without opening local context
- vstate output was corrected to handle parts selection without opened local context;
- test case for issue #26779
2015-10-22 10:52:12 +03:00
kgv
fe30607a18 0024875: Coding rules - eliminate GCC warning -Wstrict-aliasing in TKOpenGl 2015-10-22 10:43:27 +03:00
azv
1aec33207e 0026254: Inject GeomAbs_OffsetCurve into GeomAbs_CurveType enumeration 2015-10-22 10:36:57 +03:00
kgv
79f4f03618 0026122: Visualization, TKOpenGl - clipping and capping is broken when ffp is disabled on Linux
OpenGl_Clipping - do not setup clipping planes using FFP when it is disabled.

OpenGl_ShaderManager - apply 2d texture coordinates transformation in GLSL programs.
OpenGl_Context::SetTextureMatrix() - move texture matrix assignment from OpenGl_Workspace::setTextureParams() to OpenGl_Context.

Add test case demo/samples/dimensionsglsl with FFP turned OFF.
Add test case v3d/glsl/texture_trsf applying texture transformation.

Small correction of test case for issue CR26122
2015-10-22 10:28:59 +03:00
ysn
3a398392b4 0023645: Modeling Algorithms User's Guide contains wrong statement about GeomFill_ConstrainedFilling
Wrong statement removed.

Statement corrected.
2015-10-22 10:09:30 +03:00
Benjamin Bihler
02f5c89da0 0026774: Documentation - deviation angle default value as stated in AIS_InteractiveContext.hxx is wrong
Correct wrong deviation angle default value in class documentation.
2015-10-22 10:02:53 +03:00
apn
f60111dc04 0026542: Visualization - Finalize support of D3D
D3DHost_View - fix compilation issues on old msvc compilers.
CMake - add TKD3DHost.

Cosmetic correction
2015-10-21 17:49:02 +03:00
ski
050c18ac17 0023741: Research and remove CSFDB support from OCCT if it is necessary
redundant CSFDB definition removed from compiler command line
Remove *.csfbd files and CSFDB definition in the sample project
2015-10-16 11:08:04 +03:00
aml
c1a487e468 0026443: Offset surface hangs up
D0 computation of offset surface simplification.

Update of test-case according to the new behavior
Test-cases for issue #26443
2015-10-15 14:16:14 +03:00
Benjamin Bihler
e19792fafc 0026773: Visualization - deviation angle cannot be set by AIS_InteractiveContext::SetDeviationAngle() due to misprint
Modified deviation angle setter to set the angle.
2015-10-15 14:10:56 +03:00
rkv
36b9ff756a 0026595: Lost some comments in OCCT-code after cdl elimination
Recovered comments for instance classes from CDL generic classes.
2015-10-15 14:04:43 +03:00
kgv
10dbdf3496 0026768: Visualization, Graphic3d_Camera::ZFitAll() - define method estimating ZRange without assigning it
Declare methods V3d_View::Redraw() and V3d_View::RedrawImmediate() as virtual to allow customization.
2015-10-15 13:22:24 +03:00
nbv
0b4abfb9e2 0026746: Method gp_Torus::Coefficients(...) returns incorrect value.
Bug has been fixed.
Test case for this issue has been created (with corresponding DRAW-command).
2015-10-15 12:48:28 +03:00
aba
046a1c9dd9 0026754: Visualization - provide API to display AIS_Trihedron presentation without axes labels:
- added ToDrawLabels option to Prs3d_DatumAspect, by default it is set to true
- AIS_Trihedron (uses DsgPrs_DatumPrs) and AIS_Axis: labels are drawn if ToDrawLabels option in the datum aspect is enabled
2015-10-15 12:31:49 +03:00
vpa
7479f6433c 0026719: Visualization - cannot pick zoom persistent object
- trsf matrix scale factor is now taken into account in depth and distance calculation in selection;
- fixed trsf matrix application error in frustum cache in SelectMgr_ViewerSelector;
- fixed multiple errors in vstate output;
- test cases for issue #26719.
2015-10-15 12:25:24 +03:00
isz
24a886979e 0022632: Visualization - provide logarithmic scale for Aspect_ColorScale class
Option "-logarithmic" is provided for draw command vcolorscale.
It changes color scale's labels to logarithmic values due to the min and max range and the number of intervals of the color scale.
New test case added. Fixed error when command vcolorscale was called without arguments.
2015-10-15 12:15:06 +03:00
jgv
4676724742 0026736: Errors in BRepOffsetAPI_MakeOffset: overlapping arcs are processed incorrect in mode GeomAbs_Intersection
Test cases for issue CR26736
2015-10-15 12:08:15 +03:00
ifv
94520b2483 0026526: BRepTools_WireExplorer can't explore all edges of a closed wire. 2015-10-15 12:00:11 +03:00
abv
6d3685029f 0026622: Tests - Avoid using dlog and decho commands in test scripts
Added possibility to define patterns that must be present in the test log, so that test is considered OK only if all these patterns are found.
New REQUIRED statement is introduced for that, documented in dox/dev_guides/tests/tests.md.

Removed all uses of decho and dlog commands, added REQUIRED where necessary.
Command xdistcs is modified to output to Tcl instead of cout, and extended to report errors and warnings if distances are greater than tolerance (directly, instead of complex post-processing on Tcl level).

DEBUG mode for TODOs was removed (we should have no deviations in Debug mode).

Corrected indentation in DrawResources/TestCommands.tcl

HTML log will now highlight TODO statement causing IMPROVEMENT status, or REQUIRED statement causing FAIL, by corresponding color.
2015-10-15 11:43:54 +03:00
rkv
ee9e67edc7 0026668: Eliminate compile warnings obtained by building occt with vc14: conversion requires a narrowing conversion
Warnings "conversion requires a narrowing conversion" were eliminated: IVtk_IdType is defined via vtkIdType from now.

Check of bitness of VTK libraries is added, to ensure that OCCT and VTK use the same bitness.

HashCode() function for long long int added in Standard_Integer.hxx to handle 64-bit integers
2015-10-15 11:27:46 +03:00
rkv
839b8d3cdf 0026669: Eliminate compile warnings obtained by building occt with vc14: 'type cast': conversion from 'BOOL' to 'WNDPROC' of greater size
Signature of the command window callback has been fixed to avoid unnecessary type casting. It is used when Draw_IsConsoleSubsystem = Standard_False
 i.e. in non-console mode (see _main_() in Draw_Main.cxx).
2015-10-15 11:27:20 +03:00
rkv
5a9487c4ce 0026581: Eliminate compile warnings obtained by building occt with vc14: 'type cast' conversion 2015-10-15 11:26:55 +03:00
abv
682993040a 0026585: Eliminate compile warnings obtained by building occt with vc14: 'type cast' pointer truncation and 'type cast' truncation
- Class OSD_EnvironmentIterator is removed (not used, and would definitely fail under Windows if tried)
- Methods UserId() and GroupId() removed from OSD_FileNode (cannot be made portable, as there is no integer IDs of user and group on Windows)
- Draw_ProgressIndicator corrected to properly pass address via Tcl
- OSD_File.cxx: local function is refactored to avoid senseless encoding / decoding of results
- OSD_Process::UserId() method removed, as it cannot be made cross-platform (no integer IDs on Windows)
- OSD_Thread: use WinAPI conversion functions to avoid warnings
- OSD_WNT.cxx: recursion counter passed via function argument instead of TLS
- TDF_LabelMapHasher revised to use correct hasher function for an address
2015-10-15 11:26:30 +03:00
rkv
2f220b97b7 0026720: Coding, STEP - non-conformant names of class fields
Names of class fields and method parameters are fixed according to coding standard.
2015-10-15 11:26:05 +03:00
ski
980d161f03 0026739: Problem with generate Qt samples
Generation of project files was fixed.
2015-10-15 10:59:26 +03:00
kgv
7aa74f3028 0026734: Visualization, D3DHost_View - drop outdated UserDraw interfaces
Correction of test case for issue CR26765
2015-10-15 10:59:11 +03:00
kgv
6ce0df1e78 0026765: Visualization - drop TKVoxel toolkit 2015-10-15 10:58:58 +03:00
ski
06562706d2 0026741: Problem with building samples and demo
Scripts and project files were changed to use corrent environment.
2015-10-15 10:54:26 +03:00
apv
c82b2ad7b8 Adjusting test cases after integration for issue 26560 2015-10-09 15:20:19 +03:00
abv
53dda4e944 0026755: Use of reference to destroyed temporary object in Adaptor3d_SurfaceOfRevolution
Code corrected to make a copy of temporary object for its further use
2015-10-08 13:32:25 +03:00
ifv
a0258acdd2 0026609: Wrong result obtained by solid classifier algorithm.
Test case for issue CR26609

Correction of test cases for issue CR26609
2015-10-08 13:29:04 +03:00
isz
b4b2ecca89 0026312: ColorScale doesn't work as expected.
Now 'vcolorscale' command works correctly with the active view. Changed types of some variables from Standard_Real to Standard_Integer. Added options to set the width or the height of color scale explicitly. Test case is added.
2015-10-08 13:20:39 +03:00
ski
a4eba92071 0026742: Update test cases for using checknbshapes procedure instead of global variables
Test cases were updated.
2015-10-08 10:54:30 +03:00
isn
8cc2a23a8e 0026396: Taper API result differs run-to-run for identical inputs
- all data maps where shape used as a key have been replaced with indexed data maps. Now index used for iteration through this map instead of shape-key.
- new test have been added. This test allows to test stability of DraftAngle-algo.
- alignment corrections...

Removing warnings
2015-10-08 10:35:08 +03:00
jgv
6fa29cbf06 0026717: Error in IntPatch_PrmPrmIntersection: change of local resolution leads to break of walking line
Test case for issue CR26717

Correction of test cases for issue CR26717

Test case for issue CR26717
2015-10-08 10:24:07 +03:00
nbv
d0fcf95a09 0026750: Method IsNormal(...) for gp_Vec2d returns FALSE if the angle between two vectors is equal to -90 degree (-M_PI/2 radian)
The bug has been fixed.
Test case for this issue has been created.

Correct alignment.
2015-10-08 10:17:03 +03:00
vpa
b400611710 0026721: Visualization - selection highlight of selected face is broken
- fixed misprint in changing owner higlight status AIS_InteractiveContext::SetSelected;
- duplicatied code for unhighlighting seleced owners was moved in a separate function;
- test case for issue #26721
2015-10-08 10:10:04 +03:00
aml
bcd1975693 0026560: BRepBndLib build too large bounding box in Z direction for planar spline edge.
Poles bounding box for curve added for bezier and bspline curves.
Method Poles() for Bezier curve added.

Test case for issue CR26560

Function to compute subshape max tolerance has been added.
Fixed bounding box expanding at Face/Face step of boolean operation.
Test cases are updated to the new behavior.
2015-10-08 10:07:27 +03:00
kgv
a521d90d5a 0026734: Visualization, TKOpenGl - drop outdated UserDraw interfaces
Update ViewerTest and VoxelDemo to not use UserDraw callbacks.

OpenGl_View::blitBuffers() - set 0 GLSL program after blit
to avoid side effects on code that does not use shaders.

Drop interfaces Aspect_GraphicCallbackProc, Graphic3d_CUserDraw,
Graphic3d_Group::UserDraw(), OpenGl_GraphicDriver::UserDrawCallback().

V3d_View::SetWindow() - remove optional arguments initializing redraw callback.
OpenGl_View, declare following methods as virtual for inheritance:
redraw(), redrawImmediate(), render(), renderScene(), drawBackground(), renderStructs().

VocelClient_VisDrawer - do not include removed header
2015-10-08 09:36:01 +03:00
mkv
4d4b43db21 Update test cases after integration fix for 26607 2015-10-02 14:53:55 +03:00
emv
9526aa6a8a 0026565: Compsolid after cut becomes compound of solids
Changed the rules for the types of the arguments for different operations:
1. FUSE:   All arguments and tools should have the same dimension;
2. CUT:    The MAXIMAL dimension of the ARGUMENTS should be less
           or equal to the MINIMAL dimension of the TOOLS;
3. CUT21:  The MINIMAL dimension of ARGUMENTS should be grater
           or equal to the MAXIMAL dimension of the TOOLS;
4. COMMON: The arguments and tools could have any dimensions.

For the arguments of collection type (WIRE, SHELL, COMPSOLID)
the type will be passed into the result of the operation.

The documentation should be updated according to new behavior.

Documentation has been updated.

Implemented suggestions by MSV and some grammar changes.

Test cases for issue CR26565

Correction of test cases for issue CR26565

Correction of test cases for issue CR26565
2015-10-01 14:49:29 +03:00
kgv
b6bf4ec174 0026732: Visualization, TKOpenGl - add option to request Core profile 3.2+ using GLX
Aspect_Window::NativeFBConfig() - extend interface with new method.
Xw_Window - add Aspect_FBConfig option to constructors,
use glXChooseFBConfig() instead of glXChooseVisual() on GLX1.3+.

OpenGl_Window - create context using glXCreateContextAttribsARB()
when GLXFBConfig is provided by Aspect_Window.
This procedure now handles Core Profile and Debug Context options on Linux.

OpenGl_Window - drop code implicitly creating child window
when window XVisual is incomplete for OpenGL context.
This should eliminate event-handling issues at application side,
but would require window to be properly created by application.
2015-10-01 14:03:36 +03:00
ika
a7197ef3c7 0026715: Problems in reading STEP short names in complex entities
Add function to find next part of complex entity by name or short name.
Add missing short names.

Test cases for issue CR26715
2015-10-01 14:02:03 +03:00
emv
521e1c6191 0026718: Big tolerance value of the edge in the result of General Fuse operation
class BOPTools_AlgoTools2D
method
  Standard_Integer BOPTools_AlgoTools2D::AttachExistingPCurve
  (const TopoDS_Edge& aE2, // old
   const TopoDS_Edge& aE1, // new
   const TopoDS_Face& aF,
   const Handle(IntTools_Context)& aCtx)

To prevent huge tolerance increasing check the distances between 2d and 3d
curves (through surface) before attaching 2d curve to the edge.

Test case for issue CR26718

Correction of test cases for issue CR26718
2015-10-01 13:58:59 +03:00
isk
4b1c8733e8 0026298: Visualization, OpenGl_Text - make font resolution configurable.
Add THE_DEFAULT_RESOLUTION static const parameter to Graphic3d_RenderingParams.
Add resolution to Graphic3d_RenderingParams.
Drop redundant variables from OpenGl_Workspace.
Add a new parameter to Graphic3d_GraphicDriver::TextSize method (and to OpenGl_GraphicDriver).
Add a new parameter to OpenGl_Text::Render() and to OpenGl_Text::render() methods.
OpenGl_Text::FontKey() considers a resolution (PPI) now.
Add a new argument '-resolution' (sets a pixel density) in the 'VRenderParams' draw-command.
2015-10-01 13:54:22 +03:00
ifv
5b0f2540d7 0026607: Wrong value of area.
Test case for issue CR26607

Fix regressions

Correction of test cases for issue CR26607
2015-10-01 13:49:24 +03:00
akz
0e14656b30 0026042: OCCT won't work with the latest Xcode
Dereferenced null pointers was eliminated for PLib, BSplCLib and BSplSLib. All affected code was changed accordingly.
2015-10-01 13:44:10 +03:00
akz
42a9dcfc64 0026360: Useless global functions IsSimilar() in Standard
Remove IsSimilar() global function for Standard types. Replace usege of IsSimilar() by IsEqual().
2015-10-01 13:39:24 +03:00
abv
c50591ee21 0026648: Configuration - set default path for start of DRAWEXE under Visual Studio debugger
Default path for starting executable from Visual Studio debugger set to be $CASROOT in project files generated by genproj

Default path for starting DRAWEXE executable from Visual Studio debugger set to be CMake binary directory in project files generated by CMake
2015-10-01 13:31:12 +03:00
akz
4485f3d0f0 0026381: OSD_File - close file on destruction
Add destructor for OSD_File, that unlocks and close file.

Remove senseless checks from status functions in code for Linux.

Destructor of OSD_FileNode is made protected to avoid possibility of deleting descendants by pointer to base class
2015-10-01 13:29:58 +03:00
gka
90c8c7f32b 0026723: Qt IE sample can not import STEP and IGES files with names containing not ascii symbols
Added conversion of the names of the imported files in the  Utf8 coding
2015-10-01 13:15:29 +03:00
apv
fbd689a48e Adjusting test cases for current state of occt 2015-09-28 12:53:22 +03:00
akz
bd6c46193d 0022972: Eliminate macro definitions that has compiler-provided analogs (WNT and so on)
Replace removed from occt WNT preprocessor flag with _WIN32
2015-09-25 12:36:36 +03:00
aml
ed5ca017c7 0026656: ShapeFix_Face introduces extremely high vertex tolerance in the input shape
Added set of methods CopyVertex in BRepTools_ReShape. Usage of this non-modifying methods added in ShapeFix_Wire, ShapeFix_Edge.
Test case for issue 26656.
Test cases updated to the new behavior.

Correction of test cases for issue CR26656

Changed access by value to access by reference in method CopyVertex.
2015-09-24 15:03:05 +03:00
rkv
10a4116e31 0024537: GCC compiler warnings in byte order reversion code
Eliminate warnings in byte order inversion functionality by using unions.
Add test case simulating conversion to big endian.
2015-09-24 14:17:41 +03:00
aml
81b47143f1 0026525: Wrong result obtained by curve / surface intersection algorithm.
Added protection from double overflow caused by untrimmed parameters space.
Obsolete code deleted.

Draw command OCC26525 added.

Test cases for issue CR26525
2015-09-24 14:14:57 +03:00
nbv
657ccd95ab 0026632: HLR sample doesn't work with Algo mode
The main reason of the problem is Walking-line contains two equal Walking-points (the segment has null-length both in 3D and 2D).
2015-09-24 14:14:52 +03:00
isn
2078dfc73c 0026701: BOPAlgo_Builder::Perform crash.
(data race)

Add comments and make minor cosmetic changes.

Test case for issue CR26701

Correction of test case for issue CR26701
2015-09-24 14:14:47 +03:00
abv
95a3946860 0026671: Infinite loop in ShapeFix_Wire::FixSelfIntersection()
Avoid possible infinite loops in ShapeFix_Wire::FixSelfIntersection() -- when needed, fix is repeated once instead of going back in the loop
2015-09-24 14:14:42 +03:00
azn
9533a86648 0025617: Avoid classes with a copy constructor and the default destructor or assignment operator
Removed useless user-defined copy constructors and assignment operators in BOPCol_NCVector, NCollection_Mat4, NCollection_Vec*

User-defined assignment operator matching copy constructor added in NCollection_StdAllocator.

Class VrmlData_DataMapOfShapeAppearance redefined as simple typedef to NCollection_DataMap<>.
2015-09-24 14:14:38 +03:00
azn
4dff6a1bcb 0025618: Avoid classes with an assignment operator and not implementing both a destructor and a copy constructor
User-defined assignment operator is removed in the classes IntPolyh_StartPoint and Quantity_Color, as default assignment will be OK
2015-09-24 14:14:32 +03:00
abv
6928e35131 0025571: Avoid base Classes without virtual Destructors
Destructors of collection classes from NCollection and math_Function are made virtual to allow safe destruction by pointer to base class.

Destructors of classes HatchGen_IntersectionPoint, IntCurveSurface_Intersection, Intf_Interference, IntRes2d_Intersection are made protected to avoid possibility of destructing by pointer to corresponding base class.
2015-09-24 14:14:22 +03:00
ysn
e2ba9cb12a 0026707: Remove references to "opencascade.org" in documentation
Links to OCC web sites in documentation are updated in accordance with the new site design.
2015-09-24 14:14:12 +03:00
kgv
fca1d27c4c 0026710: Coding rules - eliminate GCC warning -Wunused-result in Voxel_Reader.cxx 2015-09-24 14:14:03 +03:00
szy
ddd926fedb 26428: TNaming_Selector::Solve crash for empty named shape.
Test case for issue CR26428
2015-09-24 14:13:47 +03:00
vpa
673cf4e376 0026680: Visualization - Changed behavior of mesh visualization and selection in OMF sample
- handling of global selection mode was added to MeshVS_Mesh;
- corrected unhighlight of interactives with auto-highlight disabled;
- test case for issue 0026680.
2015-09-24 14:13:32 +03:00
aba
71c6e1e52d 0026705: Visualization - OpenGl_Workspace aspect setters are not exported 2015-09-24 14:13:25 +03:00
agv
7d73d13f6e 0026683: VRML 2.0: ImageTexture node not written 2015-09-24 14:13:21 +03:00
akz
57c28b6122 0022972: Eliminate macro definitions that has compiler-provided analogs (WNT and so on)
1) Macro definition WNT replaced by _WIN32 and _MSC_VER for platform and compiler detection accordingly.
2) Macro definition LIN replaced by __linux__ macro.
3) Macro definition DEB replaced by OCCT_DEBUG macro.
2015-09-24 14:13:06 +03:00
ika
28a73c1fe7 0026371: Implementation of new entities for GD&T
Implement entities:
- DatumReferenceCompartment,
- DatumReferenceElement,
- DatumReferenceModifierWithValue,
- DatumSystem,
- GeneralDatumReference,

- ValueFormatTypeQualifier,

- NonUniformZoneDefinition,
- ProjectedZoneDefinition,
- RunoutZoneDefinition,
- RunoutZoneOrientation,
- ToleranceZone,
- ToleranceZoneDefinition,
- ToleranceZoneForm,
- ToleranceZoneTarget,

- GeometricToleranceWithDefinedAreaUnit,
- GeometricToleranceWithDefinedUnit,
- GeometricToleranceWithMaximumTolerance,
- GeometricToleranceWithModifiers,
- UnequallyDisposedGeometricTolerance,

- GeometricItemSpecificUsage,
- IdAttribute,
- IdAttributeSelect,
- ItemIdentifiedRepresentationUsage,
- ItemIdentifiedRepresentationUsageDefinition,

- Apex,
- CentreOfSymmetry,
- GeometricAlignment,
- ParallelOffset,
- PerpendicularTo,
- Tangent,

- AllAroundShapeAspect,
- BetweenShapeAspect,
- CompositeGroupShapeAspect,
- ContinuosShapeAspect,

- ReprItemAndLengthMeasureWithUnitAndQRI,
- ReprItemAndPlaneAngleMeasureWithUnitAndQRI,
- ReprItemAndPlaneAngleMeasureWithUnit,

- CompGroupShAspAndCompShAspAndDatumFeatAndShAsp,
- CompShAspAndDatumFeatAndShAsp,

- GeoTolAndGeoTolWthDatRef,
- GeoTolAndGeoTolWthDatRefAndGeoTolWthMod,
- GeoTolAndGeoTolWthMod,
- GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol,

- IntegerRepresentationItem,
- ValueRepresentationItem.

Modify entities:
- GeometricTolerance,
- GeometricToleranceWithDatumReference,
- ShapeDimensionRepresentation.

fix compilation error

fix compilation warning
2015-09-24 14:10:26 +03:00
bugmaster
a576c3e54d Updating service files of Voxel demo 2015-09-24 14:10:19 +03:00
apl
b0dc79bc7d 0026676: Visualization, Ray Tracing - correct rendering if stereo pair
- Fixed interpolation of ray direction vector for asymmetric frustum (stereo left/right eye). Unnecessary normalization of direction vector affecting the frustum's geometry was removed.
- Fixed usage of projection type argument passed when rendering immediate graphics with stereo projection.
2015-09-22 11:52:48 +03:00
apl
c357e42610 0024776: Visualization - inherit OpenGl_View from Graphic3d_CView
Expose interface of OpenGl_View (OpenGL graphics rendering methods) to client code
and collecting all high-level API methods of application views in V3d_View class.

1) Exposing interface of OpenGl_View:

The OpenGl_View inherits from new class Graphic3d_CView.
Graphic3d_CView is an interface class that declares abstract methods for managing displayed structures,
display properties and a base layer code that implements computation
and management of HLR (or more broadly speaking view-depended) structures.

In new implementation it takes place of eliminated Visual3d_View.
As before the instance of Graphic3d_CView is still completely managed by V3d_View classes.
It can be accessed through V3d_View interface but normally this should not be required as all its methods are completely wrapped.

In more details, a concrete specialization of Graphic3d_CView is created and returned by graphical driver on request.
Right after creation the views is directly used for setting rendering properties and adding graphical structures to be displayed.

The rendering of graphics is possible after mapping a window and activating the view.
The direct setting of properties makes obsolete usage of intermediate structures with display parameter
like Visual3d_ContextView and etc (the whole package of Visual3d become redundant).

2) Collecting all high-level API methods of application views in V3d package:

The patch includes elimination of Visual3d layer.
All of its methods that could be previously used by application are now exposed and should be accessed on the level of V3d entities.
- Introduced new class Graphic3d_CView.
  This is a base class for render views.
  Made possible to specialize concrete instances of the class by graphical driver.
- Moved all methods managing rendering views into interface of Graphic3d_CView.
  The corresponding methods were removed from interface of graphical driver.

3) Eliminated Visual3d package:

- Logic of managing display of structures was put from Visual3d_ViewManager into Graphic3d_StructureManager.
- Removed Visual3d_View class. Logic of managing computed structures was put into base layer of Graphi3d_CView.
- Removed all intermediate structures for storing view parameters e.g. Visual3d_ContextView.
  All settings are kept by instances of Graphic3d_CView
- Removed Visual3d_Light intermediate class.
  All light properties are still stored in Graphic3d_CLight structure.
  The structure is directly access by instance of V3d_Light classes.
- Moved all needed enumerations into Graphic3d package.

4) Update package D3DHost to new changes.

5) Update code of OCCT samples to new changes.
2015-09-22 11:49:33 +03:00
33764 changed files with 1235793 additions and 1204855 deletions

40
.clang-format Normal file
View File

@@ -0,0 +1,40 @@
# clang-format configuration file trying to apply OCCT coding style
#
# Clang formatting rules: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# The clang-format npm package (https://github.com/angular/clang-format) uses
# a pre-built clang-format.exe from http://llvm.org/builds/
#
# We use defaults from the Microsoft style
BasedOnStyle: Microsoft
#
# Style options
AllowAllParametersOfDeclarationOnNextLine: false
AllowAllArgumentsOnNextLine: false
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveDeclarations: Consecutive
AlignTrailingComments: true
AllowShortFunctionsOnASingleLine: Inline
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
ColumnLimit: 100
ContinuationIndentWidth: 2
IndentCaseLabels: true
IndentPPDirectives: BeforeHash
IndentWidth: 2
IndentWrappedFunctionNames: true
PackConstructorInitializers: Never
PointerAlignment: Left
ReferenceAlignment: Left
SeparateDefinitionBlocks: Always
SortIncludes: true
UseTab: Never
#
# OCCT specific settings
StatementMacros:
- Standard_FALLTHROUGH
TypenameMacros:
- Handle

8
.gitattributes vendored
View File

@@ -1,6 +1,8 @@
.gitattributes eol=lf
.gitignore eol=lf
*.txt eol=lf
*.htm eol=lf
*.html eol=lf
*.h eol=lf
*.c eol=lf
*.inl eol=lf
@@ -18,6 +20,7 @@
*.yacc eol=lf
*.lex eol=lf
*.mm eol=lf
*.i eol=lf
*.el eol=lf
*.sh eol=lf
*.csh eol=lf
@@ -28,6 +31,7 @@
*.xib eol=lf
*.plist eol=lf
*.java eol=lf
*.js eol=lf
*.igs eol=lf
*.iges eol=lf
*.stp eol=lf
@@ -37,9 +41,13 @@
*.vrml eol=lf
*.md eol=lf
*.natvis eol=lf
*.fs eol=lf
*.vs eol=lf
*.glsl eol=lf
FILES eol=lf
PACKAGES eol=lf
EXTERNLIB eol=lf
EXTERNLIB_STATIC eol=lf
UDLIST eol=lf
tests/* eol=lf
tests/*/* eol=lf

59
.github/CLA.md vendored Normal file
View File

@@ -0,0 +1,59 @@
# Contributor License Agreement - OPEN CASCADE TECHNOLOGY
Thank You for Your interest in Open CASCADE Technology.
In order to clarify the intellectual property rights and the license granted to OPEN CASCADE SAS with contributions from You, any person or entity, OPEN CASCADE SAS must have this Contributor License Agreement (hereinafter referred to as "CLA") signed by You, indicating Your acceptance and consent to the license terms below. This license is for Your protection as a contributor as well as for the protection of OPEN CASCADE SAS and its users; it does not change Your rights to use Your own contributions for any other purpose.
This CLA applies to any contribution that You make to the product "Open CASCADE Technology" (hereinafter referred to as "OCCT", "the Product") developed by OPEN CASCADE SAS, including all contributions You made prior to signing this CLA and all of Your future contributions submitted to OPEN CASCADE SAS as long as You agree to this CLA, and sets out the intellectual property rights You grant to OPEN CASCADE SAS in the contributed materials. The term "us" shall also mean OPEN CASCADE SAS.
The term "You" shall mean the person or entity identified below, representing the copyright owner or legal entity authorized by the copyright owner that is making this agreement with OPEN CASCADE SAS. For legal entities, the entity making a contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single contributor. For the purposes of this definition, "control" means (i) the power, either direct or indirect, to exert influence on the direction or management of such entity, whether by contract or otherwise, or (ii) the ownership of fifty percent (50%) or more of the outstanding shares, or (iii) the beneficial ownership of such entity.
Read this CLA carefully before signing and keep a copy for Your records. This CLA, its terms and conditions, constitute a binding legal agreement.
If You agree to be bound by the terms of this CLA, please complete and sign this CLA where indicated below, then scan and submit the scanned copy as a PDF file to OPEN CASCADE SAS via Your user account section on the Web portal. Alternatively, You may send the signed CLA to OPEN CASCADE SAS by facsimile or in hard copy to the attention of DANIEL BRUNIER-COULIN at OPEN CASCADE SAS headquarters using the contact information provided in the "Contact Us" section.
1. The term "contribution" or "contributed materials" means any source code, object code, patch, tool, sample, graphic, specification, manual, documentation, any original work of authorship, including any modifications or additions to an existing work or any other material intentionally posted or submitted by You to us. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to OPEN CASCADE SAS or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, OPEN CASCADE SAS for the purpose of, but not limited to, discussing and improving a work or possible integration to future certified releases of OCCT, but excluding communication that is conspicuously marked or otherwise designated in writing by You or OPEN CASCADE SAS as "Not A Contribution" or "NAC".
2. With respect to any worldwide copyrights, or copyright applications and registrations, in Your contribution:
a) You hereby assign to OPEN CASCADE SAS joint ownership, and to the extent that such assignment is or becomes invalid, ineffective or unenforceable, You hereby grant to OPEN CASCADE SAS a perpetual, irrevocable, non-exclusive, worldwide, no-charge, royalty-free, unrestricted license to exercise all rights under the intellectual property law and rules in force or under the copyright if chosen by OPEN CASCADE SAS. This includes, at the option of OPEN CASCADE SAS, the right to sublicense these same rights to third parties through multiple levels of sub-licensees or other licensing arrangements;
b) You agree that OPEN CASCADE SAS can do all things in relation to Your contribution as if OPEN CASCADE SAS were its sole owner, and if OPEN CASCADE SAS makes a derivative work of Your contribution, OPEN CASCADE SAS will be the sole owner of that derivative work;
c) You agree that You will not assert any moral rights in Your contribution against OPEN CASCADE SAS, our licensees or transferees;
d) You agree that OPEN CASCADE SAS may register a copyright or any other intellectual property law in force in Your contribution and exercise all ownership rights associated with it; and
e) You agree that OPEN CASCADE SAS has no duty to consult with, obtain the consent of, pay or render an accounting to You or any third parties for any use or distribution of Your contribution.
3. With respect to any patents You own, or that You can license without payment to any third party, You hereby grant to OPEN CASCADE SAS a perpetual, irrevocable, non-exclusive, worldwide, no-charge, royalty-free, unrestricted license to:
a) make, have made, use, sell, offer to sell, import, and otherwise transfer Your contribution in whole or in part, alone or in combination with or included in any product, work or materials arising out of the Product which Your contribution was submitted for;
b) sublicense these same rights to third parties through multiple levels of sub-licensees or other licensing arrangements; and
c) reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your contributions and such derivative works.
4. Except as set out above, You keep all right, title, and interest in Your contribution. The rights that You grant to OPEN CASCADE SAS under these terms are effective on the date You first submitted a contribution to OPEN CASCADE SAS, even if Your submission took place before the date You sign these terms. Any contribution OPEN CASCADE SAS makes available under any license will also be made available under the Open Cascade Technology Public License (OCCTPL) or a suitable FSF (Free Software Foundation) or OSI (Open Source Initiative) approved license, if adopted by OPEN CASCADE SAS.
5. You covenant, represent and warrant that:
a) each contribution that You submit is and shall be an original work of authorship and that You can legally grant the rights set out in this CLA; and
b) each contribution will not violate any third party's copyrights, trademarks, patents, or other intellectual property rights; and
c) if any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your contribution, or the work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this CLA for that contribution or work shall terminate as of the date such litigation is filed; and
d) You have received permission to make contributions on behalf of the employer, that Your employer has waived such rights for Your contributions to OPEN CASCADE SAS, or that Your employer (that has rights to intellectual property that You create that includes Your contributions) has executed a separate corporate CLA with OPEN CASCADE SAS.
6. Should You wish to submit work that is not Your original creation, You may submit it to OPEN CASCADE SAS separately from any contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements), and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".
7. You agree to notify OPEN CASCADE SAS if You become aware of any circumstance which would make any of the foregoing representations inaccurate in any respect. OPEN CASCADE SAS may publicly disclose Your contribution to the Product and the fact that You have signed this CLA.
8. You are not expected to provide support for Your contributions, except to the extent You desire to provide support.
9. This CLA is governed by the laws of France or an applicable law at the sole written choice of OPEN CASCADE SAS.
10. You may stop being bound by the terms of this CLA at any time, for any reason, by asking OPEN CASCADE through the Contact Us form. Even after its termination, this CLA still applies to all contributions You made prior to terminating the CLA. On the other hand, if You want to contribute again, You'll need to sign a new CLA.
[Contributor_License_Agreement.pdf](https://dev.opencascade.org/sites/default/files/Contributor_License_Agreement.pdf)

39
.github/CLA_SIGNING.md vendored Normal file
View File

@@ -0,0 +1,39 @@
# Signing the Contributor License Agreement
## In order to contribute code to OCCT, you (or the legal entity you represent) must sign the Contributor License Agreement (CLA).
### What is the Contributor License Agreement and why is it necessary to sign it?
The Contributor License Agreement is needed to clarify the terms of usage of contributions by OPEN CASCADE SAS and the entire open source community.
The Contributor License Agreement clarifies the intellectual property rights applicable to contributions. It confirms that the contributor retains ownership of his contributions (the OPEN CASCADE company does not require exclusive copyright transfer for these contributions) and gives all rights to OPEN CASCADE to use the contribution. In turn, OPEN CASCADE guarantees the open source availability of all integrated contributions.
### How to sign the Contributor License Agreement
Accepting and signing the Contributor License Agreement is a prerequisite for contributing code. To sign the CLA, please register yourself first, and then follow the steps below:
1. Select the "Get Involved" menu
2. Download the Contribution License Agreement pdf file and print it
3. Read the agreement and sign it
4. Scan the signed CLA to a pdf file
5. If not yet done, log on to this website
6. In the CLA sending form, press the "Browse" button
7. Select your signed CLA file
8. Press "Send"
We will need some time to approve the CLA that you have submitted. You will be notified by e-mail when your CLA is approved and you are assigned the Contributor role.
### Q&A on the Contribution Agreement
**I want to contribute code that I developed as part of my job. Can I contribute this code?**
Yes, but as (under applicable legislation) your employer typically will own all intellectual property that you create as part of your employment, it is important that your employer has consented to your participation and contributions in the OCCT Project. That provides clarity to all parties involved.
**Can we sign a CLA to enable contributions from several employees in our company?**
Yes, if your company has several employees ready to contribute, a person representing your company can sign the CLA whereby your employer can specify and manage who is able to contribute from your company.
**I want to notify the OCCT Project of a bug I found. Can I report this bug?**
Yes, you simply need to register (you then become a Member) for entering a bug. The bug can be entered using our bug tracker from the Get Involved page. But please note that as a Member of this project, you have accepted the Terms and Conditions of this website, so the materials you provide must conform to these Terms.
**Can I terminate my Contributor License Agreement?**
Yes, you may terminate your Contributor License Agreement by sending a written notice through the contact form of this portal. The termination of your CLA will become effective not later than 5 days from the notice date. Please note, however, that all contributions you might have made to the OCCT Project before your CLA termination remain covered by that CLA.

41
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,41 @@
# Contributing to OCCT
## Contribute Code
In order to contribute code to OCCT, you must register on this [portal](https://dev.opencascade.org/) and sign the Contributor License Agreement (CLA).
- [Introduction: What is CLA and Why It Is Needed?](CLA_SIGNING.md)
- [Contribution License Agreement](CLA.md)
- [CLA Submission Form](https://dev.opencascade.org/get_involed/cla_submission_form)
### Steps to Submit Your Contribution
1. **Clone OCCT Git Repository**: See [Guide to installing and using Git for OCCT development](https://dev.opencascade.org/doc/overview/html/occt_contribution__git_guide.html) if you are not familiar with Git.
2. **Develop Your Change**: Ensure it complies with [OCCT Coding Rules](https://dev.opencascade.org/doc/overview/html/occt_contribution__coding_rules.html).
3. **Build and Verify**: Build the modified version of OCCT and verify it works as expected. Consider creating a test case.
4. **Register an Issue**: Register an issue in the [Mantis bug tracker](https://tracker.dev.opencascade.org/login_select_proj_page.php?ref=bug_report_page.php) or [GitHub issues](https://github.com/Open-Cascade-SAS/OCCT/issues) describing your change.
5. **Push Your Change**: Push your change to the Git repository in a branch with a name starting with "CR" followed by the issue ID, then switch the issue to Resolved.
The contribution then passes code review and testing; if everything is OK, it will be integrated into the master branch in about one week.
See [Contribution Workflow](https://dev.opencascade.org/doc/overview/html/occt_contribution__contribution_workflow.html) for other possibilities and details on how contributions are processed.
For more details on integration into GitHub, see the [GitHub Discussions Guide](https://github.com/Open-Cascade-SAS/OCCT/discussions/36).
## Contribute Ideas
Every big thing starts with an idea. We appreciate your vision on how to enhance Open CASCADE technology. Share your thoughts on the [OCCT product development forum](https://dev.opencascade.org/forums) or submit your meaningful ideas and bug reports via [Mantis tracker](https://tracker.dev.opencascade.org) or [GitHub issues](https://github.com/Open-Cascade-SAS/OCCT/issues).
- **Forum**: [OCCT product development forum](https://dev.opencascade.org/forums)
- **Reporting Issues**: [Mantis tracker](https://tracker.dev.opencascade.org) or [GitHub issues](https://github.com/Open-Cascade-SAS/OCCT/issues)
## Contribute Knowledge
Know a lot about OCCT? You can help educate other OCCT users by writing OCCT-related articles or blog posts, creating samples, examples, or tutorials, and even by writing a book about OCCT! If you would like us to share your content via official OCCT resources, please [contact us](https://dev.opencascade.org/webform/contact_us).
## Contribute Documentation and Tutorials
Do you have an idea on how to make OCCT Documentation easier for new users or even more exhaustive for professionals? Or want to help with proofreading and technical writing? Translating OCCT Documentation and materials into your native language is also very much appreciated. You are always welcome to submit your documentation improvement suggestions via [Mantis tracker](https://tracker.dev.opencascade.org) or [GitHub issues](https://github.com/Open-Cascade-SAS/OCCT/issues)..
## Contribute to the Community
At any community interaction points, we value your support in starting forum topics or replying to other users posts, joining Open CASCADE social networks, participating in GitHub or Stack Overflow projects, and just spreading the word about OCCT! Welcome to our community!

92
.github/ISSUE_TEMPLATE/Bug Report.yaml vendored Normal file
View File

@@ -0,0 +1,92 @@
name: "Bug Report"
description: "Report a bug related to the OCCT"
labels: ["2. Bug", "0. New"]
body:
- type: markdown
attributes:
value: |
**Please provide the following information:**
- type: textarea
id: description
attributes:
label: Description
description: "A detailed description of the bug"
validations:
required: true
- type: textarea
id: expected_behavior
attributes:
label: Expected Behavior
description: "What you expected to happen"
validations:
required: true
- type: textarea
id: actual_behavior
attributes:
label: Actual Behavior
description: "What actually happened"
validations:
required: true
- type: textarea
id: sample_code
attributes:
label: Sample Code or DRAW Tcl Script
description: "Provide a C++ sample or DRAW Tcl script to reproduce the issue"
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating System
description: "Select the operating system"
options:
- Linux
- Windows
- macOS
default: 0
validations:
required: true
- type: dropdown
id: compiler
attributes:
label: Compiler
description: "Select the compiler"
options:
- GCC
- Clang
- MSVC
default: 0
validations:
required: true
- type: dropdown
id: bitness
attributes:
label: Bitness
description: "Select the bitness"
options:
- 32-bit
- 64-bit
default: 1
validations:
required: true
- type: dropdown
id: occt_version
attributes:
label: OCCT Version
description: "Select the OCCT version where the issue was detected"
options:
- 7.4
- 7.5
- 7.6
- 7.7
- 7.8
- 7.9
- latest
default: 6
validations:
required: true
- type: textarea
id: additional_files
attributes:
label: Additional Files
description: "Attach any additional files that may help in reproducing the issue"

View File

@@ -0,0 +1,34 @@
name: "Feature Request"
description: "Request a new feature or enhancement for the OCCT"
labels: ["2. Enhancement", "0. New"]
body:
- type: markdown
attributes:
value: |
**Please provide the following information:**
- type: textarea
id: description
attributes:
label: Description
description: "A detailed description of the feature request"
validations:
required: true
- type: textarea
id: use_case
attributes:
label: Use Case
description: "Describe the use case for the feature"
validations:
required: true
- type: textarea
id: benefits
attributes:
label: Benefits
description: "Explain the benefits of the feature"
validations:
required: true
- type: textarea
id: additional_context
attributes:
label: Additional Context
description: "Any additional context or information"

14
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Collaborative development portal
url: https://dev.opencascade.org/forums
about: You can also use the collaborative development portal to ask questions and discuss the problem you are seeing
- name: GitHub discussions
url: https://github.com/Open-Cascade-SAS/OCCT/discussions
about: You can also use GitHub discussions to ask questions and discuss the problem you are seeing
- name: Mantis bug tracker
url: https://tracker.dev.opencascade.org/
about: You can also use the Mantis bug tracker to report bugs and issues
- name: Contact US form
url: https://dev.opencascade.org/webform/contact_us
about: You can also use the Contact US form to ask questions and discuss the problem you are seeing

View File

@@ -0,0 +1,18 @@
name: 'Setup Xvfb and Mesa'
description: 'Installs and configures Xvfb and Mesa for graphical testing on Linux'
runs:
using: composite
steps:
- name: Install Xvfb and Mesa
run: |
sudo apt-get update
sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri
shell: bash
- name: Start Xvfb
run: |
Xvfb :99 -screen 0 1920x1080x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV
shell: bash

View File

@@ -0,0 +1,32 @@
set exclude_list [list \
"bugs caf bug31075" \
"bugs caf bug31546" \
"bugs fclasses bug6143" \
"bugs fclasses bug25574" \
"bugs fclasses bug29064" \
"bugs fclasses bug7287_3" \
"bugs fclasses bug7287_5" \
"bugs moddata_2 bug712_2" \
"bugs moddata_1 bug20627" \
"collections n arrayMove" \
"lowalgos intss bug565" \
"lowalgos intss bug567_1" \
"lowalgos intss bug23972" \
"lowalgos intss bug29910_2" \
"opengl background bug27836" \
"opengl text C4" \
"opengles3 background bug27836" \
"opengles3 general msaa" \
"opengles3 geom interior1" \
"opengles3 geom interior2" \
"opengles3 raytrace msaa" \
"opengles3 text C4" \
"opengles3 textures alpha_mask" \
"boolean bopfuse_simple ZP6" \
"boolean gdml_private B5" \
"bugs modalg_1 bug19071" \
"bugs modalg_5 bug25199"
]
set exclude_str [join $exclude_list ,]
testgrid -exclude {*}$exclude_str -outdir results/linux-clang-x64

View File

@@ -0,0 +1,28 @@
set exclude_list [list \
"bugs caf bug31075" \
"bugs caf bug31546" \
"bugs fclasses bug6143" \
"bugs moddata_2 bug712_2" \
"bugs moddata_1 bug20627" \
"bugs modalg_6 bug27884" \
"lowalgos intss bug565" \
"lowalgos intss bug567_1" \
"lowalgos intss bug23972" \
"lowalgos intss bug29910_2" \
"opengl background bug27836" \
"opengl text C4" \
"opengles3 background bug27836" \
"opengles3 general msaa" \
"opengles3 geom interior1" \
"opengles3 geom interior2" \
"opengles3 raytrace msaa" \
"opengles3 text C4" \
"opengles3 textures alpha_mask" \
"boolean bopfuse_simple ZP6" \
"boolean gdml_private B5" \
"bugs modalg_1 bug19071" \
"bugs modalg_5 bug25199"
]
set exclude_str [join $exclude_list ,]
testgrid -exclude {*}$exclude_str -outdir results/linux-gcc-x64

View File

@@ -0,0 +1 @@
testgrid -outdir results/macos-x64 caf basic

View File

@@ -0,0 +1 @@
testgrid -outdir results/macos-gcc-x64 caf basic

View File

@@ -0,0 +1,24 @@
set exclude_list [list \
"bugs fclasses bug6143" \
"bugs modalg_5 bug24639" \
"bugs modalg_7 bug83" \
"bugs caf bug31918_1" \
"chamfer dist_angle_sequence A5" \
"opengl background bug27836" \
"opengl drivers d3dhost" \
"opengl background srgb" \
"opengl text C4" \
"opengles2 text C4" \
"opengles3 text C4" \
"boolean gdml_private B5" \
"chamfer dist_angle A3" \
"chamfer dist_angle E5" \
"chamfer dist_angle_complex A1" \
"chamfer dist_angle_complex A4" \
"chamfer dist_angle_complex A5" \
"chamfer dist_angle_sequence A1" \
"chamfer dist_angle_sequence A4"
]
set exclude_str [join $exclude_list ,]
testgrid -exclude {*}$exclude_str -outdir results/windows-x64

View File

@@ -0,0 +1,25 @@
set exclude_list [list \
"bugs caf bug31918_1" \
"bugs fclasses bug6143" \
"bugs fclasses bug25574" \
"bugs fclasses bug29064" \
"chamfer dist_angle_sequence A5" \
"collections n arrayMove" \
"opengl background bug27836" \
"opengl drivers d3dhost" \
"opengl background srgb" \
"opengl text C4" \
"opengles2 text C4" \
"opengles3 text C4" \
"boolean gdml_private B5" \
"chamfer dist_angle A3" \
"chamfer dist_angle E5" \
"chamfer dist_angle_complex A1" \
"chamfer dist_angle_complex A4" \
"chamfer dist_angle_complex A5" \
"chamfer dist_angle_sequence A1" \
"chamfer dist_angle_sequence A4"
]
set exclude_str [join $exclude_list ,]
testgrid -exclude {*}$exclude_str -outdir results/windows-clang-x64

File diff suppressed because it is too large Load Diff

59
.github/workflows/build-docs.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
# 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

@@ -0,0 +1,216 @@
# This workflow validates the build on Windows using MinGW and MSYS2.
# It is triggered on pushes to the master branch.
# The workflow includes steps to install dependencies, configure, build, and clean up the project.
name: MinGW build validation
on:
push:
branches:
- 'master'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
main_job:
name: Windows MinGW validation
runs-on: windows-2022
strategy:
matrix:
config:
- {
name: "GCC",
cc: "x86_64-w64-mingw32-gcc",
cxx: "x86_64-w64-mingw32-g++",
package: "mingw-w64-x86_64-toolchain",
thirdparty_dir: "/mingw64",
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"
}
- {
name: "Clang",
cc: "clang",
cxx: "clang++",
package: "mingw-w64-clang-x86_64-toolchain",
thirdparty_dir: "/clang64",
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"
}
- {
name: "UCRT",
cc: "x86_64-w64-mingw32-gcc",
cxx: "x86_64-w64-mingw32-g++",
package: "mingw-w64-ucrt-x86_64-toolchain",
thirdparty_dir: "/ucrt64",
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"
}
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.config.name == 'Clang' && 'CLANG64' || matrix.config.name == 'UCRT' && 'UCRT64' || 'MINGW64' }}
update: true
install: ${{ matrix.config.package }} ${{ matrix.config.dependencies }}
- name: Setup environment
shell: msys2 {0}
run: |
echo "Checking compiler version:"
${{ matrix.config.cc }} --version
echo "Checking CMake version:"
cmake --version
echo "Setting up environment variables..."
echo "$MSYSTEM_PREFIX/bin" >> $GITHUB_PATH
echo "CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX" >> $GITHUB_ENV
- name: Configure basic
shell: msys2 {0}
run: |
mkdir -p build
cd build
cmake -G "Ninja" \
-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" ..
- name: Build basic
shell: msys2 {0}
run: |
cd build
cmake --build . -- -j 4
- name: Clear up after build
shell: pwsh
run: |
Remove-Item -Recurse -Force build
- name: Configure full shared
shell: msys2 {0}
run: |
mkdir -p build
cd build
cmake -G "Ninja" \
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
-D BUILD_USE_PCH=OFF \
-D BUILD_INCLUDE_SYMLINK=ON \
-D BUILD_OPT_PROFILE=Production \
-D BUILD_LIBRARY_TYPE=Shared \
-D USE_TK=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D USE_MMGR_TYPE=JEMALLOC \
-D INSTALL_DIR="${{ github.workspace }}/install" \
-D USE_FREETYPE=ON \
-D USE_DRACO=ON \
-D USE_FFMPEG=OFF \
-D USE_FREEIMAGE=ON \
-D USE_GLES2=ON \
-D USE_OPENVR=ON \
-D USE_VTK=OFF \
-D USE_TBB=OFF \
-D USE_RAPIDJSON=ON \
-D USE_OPENGL=ON \
-D CMAKE_CXX_FLAGS="-Wall -Wextra" \
-D CMAKE_C_FLAGS="-Wall -Wextra" ..
- name: Build full shared
shell: msys2 {0}
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
- name: Clear up after build
shell: pwsh
run: |
Remove-Item -Recurse -Force build
Remove-Item -Recurse -Force ${{ github.workspace }}/install
- name: Configure full static
shell: msys2 {0}
run: |
mkdir -p build
cd build
cmake -G "Ninja" \
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
-D BUILD_USE_PCH=OFF \
-D BUILD_INCLUDE_SYMLINK=ON \
-D BUILD_OPT_PROFILE=Production \
-D BUILD_LIBRARY_TYPE=Static \
-D USE_TK=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D USE_MMGR_TYPE=JEMALLOC \
-D INSTALL_DIR="${{ github.workspace }}/install" \
-D USE_FREETYPE=ON \
-D USE_DRACO=ON \
-D USE_FFMPEG=OFF \
-D USE_FREEIMAGE=ON \
-D USE_GLES2=ON \
-D USE_OPENVR=ON \
-D USE_VTK=OFF \
-D USE_TBB=OFF \
-D USE_RAPIDJSON=ON \
-D USE_OPENGL=ON \
-D CMAKE_CXX_FLAGS="-Wall -Wextra" \
-D CMAKE_C_FLAGS="-Wall -Wextra" ..
- name: Build full static
shell: msys2 {0}
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
- name: Clear up after build
shell: pwsh
run: |
Remove-Item -Recurse -Force build
Remove-Item -Recurse -Force ${{ github.workspace }}/install
- name: Configure full with DEBUG define
shell: msys2 {0}
run: |
mkdir -p build
cd build
cmake -G "Ninja" \
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
-D BUILD_WITH_DEBUG=ON \
-D BUILD_USE_PCH=OFF \
-D BUILD_INCLUDE_SYMLINK=ON \
-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 USE_FREETYPE=ON \
-D USE_DRACO=ON \
-D USE_FFMPEG=OFF \
-D USE_FREEIMAGE=ON \
-D USE_GLES2=ON \
-D USE_OPENVR=ON \
-D USE_VTK=OFF \
-D USE_TBB=OFF \
-D USE_RAPIDJSON=ON \
-D USE_OPENGL=ON ..
- name: Build full with DEBUG define
shell: msys2 {0}
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
- name: Clear up after build
shell: pwsh
run: |
Remove-Item -Recurse -Force build
Remove-Item -Recurse -Force ${{ github.workspace }}/install

View File

@@ -0,0 +1,213 @@
# This workflow validates the build on Windows using MSVC and Clang compilers.
# It is triggered on pushes to the master branch.
# The workflow includes steps to install dependencies, configure, build, and clean up the project for different configurations.
name: MSVC build validation
on:
push:
branches:
- 'master'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
main_job:
name: Windows MSVC/Clang validation
runs-on: windows-2022
strategy:
matrix:
config:
- {
name: "MSVC",
cc: "cl",
cxx: "cl",
generator: "Visual Studio 17 2022",
toolset: "host=x64",
c_flags: "/W4 /WX",
cxx_flags: "/W4 /WX"
}
- {
name: "Clang",
cc: "clang",
cxx: "clang++",
generator: "Ninja",
toolset: "",
c_flags: "-Werror -Wall -Wextra -Wno-unknown-warning-option",
cxx_flags: "-Werror -Wall -Wextra -Wno-unknown-warning-option"
}
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: x64
- 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
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
shell: pwsh
- name: Download and extract Mesa3D
run: |
curl -L -o mesa3d.7z https://github.com/pal1000/mesa-dist-win/releases/download/24.3.2/mesa3d-24.3.2-release-mingw.7z
7z x mesa3d.7z -omesa3d
- name: Run system-wide deployment
run: |
cd mesa3d
.\systemwidedeploy.cmd 1
.\systemwidedeploy.cmd 5
shell: cmd
- name: Configure basic
run: |
mkdir build
cd build
cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
-D CMAKE_CXX_FLAGS="${{ matrix.config.cxx_flags }}" `
-D CMAKE_C_FLAGS="${{ matrix.config.c_flags }}" ..
shell: pwsh
- name: Build basic
run: |
cd build
cmake --build . --config Release
shell: pwsh
- name: Clear up after build
run: |
Remove-Item -Recurse -Force build
shell: pwsh
- name: Configure full shared
run: |
mkdir build
cd build
cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
-D BUILD_USE_PCH=OFF `
-D BUILD_INCLUDE_SYMLINK=ON `
-D BUILD_OPT_PROFILE=Production `
-D BUILD_LIBRARY_TYPE=Shared `
-D CMAKE_BUILD_TYPE=Debug `
-D INSTALL_DIR=${{ github.workspace }}/install `
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
-D USE_MMGR_TYPE=JEMALLOC `
-D USE_FREETYPE=ON `
-D USE_DRACO=ON `
-D USE_FFMPEG=ON `
-D USE_FREEIMAGE=ON `
-D USE_GLES2=ON `
-D USE_OPENVR=ON `
-D USE_VTK=${{ matrix.config.name == 'MSVC' && 'ON' || 'OFF' }} `
-D USE_TBB=ON `
-D USE_RAPIDJSON=ON `
-D USE_OPENGL=ON `
-D CMAKE_CXX_FLAGS="${{ matrix.config.cxx_flags }}" `
-D CMAKE_C_FLAGS="${{ matrix.config.c_flags }}" ..
shell: pwsh
- name: Build full shared
run: |
cd build
cmake --build . --target install --config Debug
shell: pwsh
- name: Clear up after build
run: |
Remove-Item -Recurse -Force build
Remove-Item -Recurse -Force ${{ github.workspace }}/install
shell: pwsh
- name: Configure full static
run: |
mkdir build
cd build
cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
-D BUILD_USE_PCH=OFF `
-D BUILD_INCLUDE_SYMLINK=ON `
-D BUILD_OPT_PROFILE=Production `
-D BUILD_LIBRARY_TYPE=Static `
-D CMAKE_BUILD_TYPE=Debug `
-D INSTALL_DIR=${{ github.workspace }}/install `
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
-D USE_MMGR_TYPE=JEMALLOC `
-D USE_FREETYPE=ON `
-D USE_DRACO=ON `
-D USE_FFMPEG=ON `
-D USE_FREEIMAGE=ON `
-D USE_GLES2=ON `
-D USE_OPENVR=ON `
-D USE_VTK=OFF `
-D USE_TBB=ON `
-D USE_RAPIDJSON=ON `
-D USE_OPENGL=ON `
-D CMAKE_CXX_FLAGS="${{ matrix.config.cxx_flags }}" `
-D CMAKE_C_FLAGS="${{ matrix.config.c_flags }}" ..
shell: pwsh
- name: Build full static
run: |
cd build
cmake --build . --target install --config Debug
shell: pwsh
- name: Clear up after build
run: |
Remove-Item -Recurse -Force build
Remove-Item -Recurse -Force ${{ github.workspace }}/install
shell: pwsh
- name: Configure full with DEBUG define
run: |
mkdir build
cd build
cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
-D BUILD_WITH_DEBUG=ON `
-D BUILD_USE_PCH=OFF `
-D BUILD_INCLUDE_SYMLINK=ON `
-D BUILD_OPT_PROFILE=Production `
-D BUILD_LIBRARY_TYPE=Shared `
-D CMAKE_BUILD_TYPE=Debug `
-D INSTALL_DIR=${{ github.workspace }}/install `
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
-D USE_FREETYPE=ON `
-D USE_DRACO=ON `
-D USE_FFMPEG=ON `
-D USE_FREEIMAGE=ON `
-D USE_GLES2=ON `
-D USE_OPENVR=ON `
-D USE_VTK=${{ matrix.config.name == 'MSVC' && 'ON' || 'OFF' }} `
-D USE_TBB=ON `
-D USE_RAPIDJSON=ON `
-D USE_OPENGL=ON ` ..
shell: pwsh
- name: Build full with DEBUG define
run: |
cd build
cmake --build . --target install --config Debug
shell: pwsh
- name: Clear up after build
run: |
Remove-Item -Recurse -Force build
Remove-Item -Recurse -Force ${{ github.workspace }}/install
shell: pwsh

View File

@@ -0,0 +1,179 @@
# This workflow validates the build on the latest Ubuntu version (24.04) using multiple configurations.
# It is triggered on pushes to the master branch.
# The workflow includes steps to install dependencies, configure, build, and clean up the project for different configurations.
name: Ubuntu build validation
on:
push:
branches:
- 'master'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
main_job:
name: Latest ubuntu validation
runs-on: ubuntu-24.04
strategy:
matrix:
config:
- {
name: "GCC",
cc: "gcc",
cxx: "g++"
}
- {
name: "Clang",
cc: "clang",
cxx: "clang++"
}
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y ninja-build tcl-dev tk-dev cmake clang 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 libjemalloc-dev
- name: Install rapidjson
run: |
wget https://github.com/Tencent/rapidjson/archive/858451e5b7d1c56cf8f6d58f88cf958351837e53.zip -O rapidjson.zip
unzip rapidjson.zip
- name: Configure basic
run: |
mkdir -p build
cd build
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" ..
- name: Build basic
run: |
cd build
cmake --build . -- -j 4
- name: Clear up after build
run: |
rm -rf build
- name: Configure full shared
run: |
mkdir -p build
cd build
cmake -G "Ninja" \
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-D BUILD_USE_PCH=OFF \
-D BUILD_INCLUDE_SYMLINK=ON \
-D BUILD_OPT_PROFILE=Production \
-D BUILD_LIBRARY_TYPE=Shared \
-D USE_TK=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D USE_MMGR_TYPE=JEMALLOC \
-D INSTALL_DIR=${{ github.workspace }}/install \
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
-D USE_FREETYPE=ON \
-D USE_DRACO=ON \
-D USE_FFMPEG=OFF \
-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="-Werror -Wall -Wextra" \
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra" ..
- name: Build full shared
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
- name: Clear up after build
run: |
rm -rf build
rm -rf ${{ github.workspace }}/install
- name: Configure full static
run: |
mkdir -p build
cd build
cmake -G "Ninja" \
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-D BUILD_USE_PCH=OFF \
-D BUILD_INCLUDE_SYMLINK=ON \
-D BUILD_OPT_PROFILE=Production \
-D BUILD_LIBRARY_TYPE=Static \
-D USE_TK=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D USE_MMGR_TYPE=JEMALLOC \
-D INSTALL_DIR=${{ github.workspace }}/install \
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
-D USE_FREETYPE=ON \
-D USE_DRACO=ON \
-D USE_FFMPEG=OFF \
-D USE_FREEIMAGE=ON \
-D USE_GLES2=ON \
-D USE_OPENVR=ON \
-D USE_VTK=OFF \
-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" ..
- name: Build full static
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
- name: Clear up after build
run: |
rm -rf build
rm -rf ${{ github.workspace }}/install
- name: Configure full with DEBUG define
run: |
mkdir -p build
cd build
cmake -G "Ninja" \
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-D BUILD_WITH_DEBUG=ON \
-D BUILD_USE_PCH=OFF \
-D BUILD_INCLUDE_SYMLINK=ON \
-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 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
-D USE_FREETYPE=ON \
-D USE_DRACO=ON \
-D USE_FFMPEG=OFF \
-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 ..
- name: Build full with DEBUG define
run: |
cd build
cmake --build . --target install --config Debug -- -j 4
- name: Clear up after build
run: |
rm -rf build
rm -rf ${{ github.workspace }}/install

View File

@@ -0,0 +1,169 @@
# This workflow builds OCCT using vcpkg on multiple platforms (Windows, macOS, Linux).
# It builds in both Debug and Release modes.
# All dependencies except the compiler are installed using vcpkg.
# The workflow includes steps to clone vcpkg, install dependencies, configure and build.
name: Build OCCT with vcpkg
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"
jobs:
build:
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]
build_type: [Debug, Release]
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- name: Install required packages (Linux)
if: runner.os == 'Linux'
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: Install required packages (macOS)
if: runner.os == 'macOS'
run: |
brew update || true
brew install cmake ninja nasm autoconf mono || true
# temporary workaround for missing tcl-tk
brew install tcl-tk || true
# Force link any conflicting packages
brew link --overwrite python@3.12 || true
brew link --overwrite python@3.13 || true
- name: Install required packages (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: x64
- name: Set up vcpkg (Unix)
if: runner.os != 'Windows'
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
shell: bash
- name: Set up vcpkg (Windows)
if: runner.os == 'Windows'
run: |
git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
shell: cmd
- name: Add NuGet sources
if: runner.os == 'Windows'
run: |
.$(${{ env.VCPKG_EXE }} fetch nuget) `
sources add `
-Source "${{ env.FEED_URL }}" `
-StorePasswordInClearText `
-Name GitHubPackages `
-UserName "${{ env.USERNAME }}" `
-Password "${{ secrets.GITHUB_TOKEN }}"
.$(${{ env.VCPKG_EXE }} fetch nuget) `
setapikey "${{ secrets.GITHUB_TOKEN }}" `
-Source "${{ env.FEED_URL }}"
shell: pwsh
- name: Add NuGet sources
if: runner.os != 'Windows'
run: |
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
sources add \
-Source "${{ env.FEED_URL }}" \
-StorePasswordInClearText \
-Name GitHubPackages \
-UserName "${{ env.USERNAME }}" \
-Password "${{ secrets.GITHUB_TOKEN }}"
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-Source "${{ env.FEED_URL }}"
shell: bash
- name: Configure OCCT ${{ matrix.build_type }} (Unix)
if: runner.os != 'Windows'
run: |
mkdir build-${{ matrix.build_type }}
cd build-${{ matrix.build_type }}
cmake -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_USE_VCPKG=ON \
-DUSE_MMGR_TYPE=NATIVE \
-DUSE_FREETYPE=ON \
-DUSE_TK=OFF \
-DBUILD_USE_PCH=ON \
-DBUILD_INCLUDE_SYMLINK=ON \
-DINSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
-DUSE_DRACO=ON \
-DUSE_FFMPEG=ON \
-DUSE_FREEIMAGE=ON \
-DUSE_GLES2=OFF \
-DUSE_VTK=ON \
-DUSE_TBB=ON \
-DUSE_RAPIDJSON=ON \
-DUSE_OPENGL=ON \
-DBUILD_MODULE_Draw=OFF \
-DVCPKG_INSTALL_OPTIONS=--clean-buildtrees-after-build \
${{ runner.os != 'macOS' && '-DUSE_OPENVR=ON' || '' }} ..
shell: bash
- name: Configure OCCT ${{ matrix.build_type }} (Windows)
if: runner.os == 'Windows'
run: |
mkdir build-${{ matrix.build_type }}
cd build-${{ matrix.build_type }}
cmake -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake ^
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ^
-DBUILD_USE_VCPKG=ON ^
-DUSE_MMGR_TYPE=JEMALLOC ^
-DUSE_FREETYPE=ON ^
-DUSE_TK=OFF ^
-DBUILD_USE_PCH=ON ^
-DBUILD_INCLUDE_SYMLINK=ON ^
-DINSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} ^
-DUSE_DRACO=ON ^
-DUSE_FFMPEG=OFF ^
-DUSE_FREEIMAGE=ON ^
-DUSE_GLES2=ON ^
-DUSE_OPENVR=ON ^
-DUSE_VTK=ON ^
-DUSE_TBB=ON ^
-DUSE_RAPIDJSON=ON ^
-DVCPKG_INSTALL_OPTIONS=--clean-buildtrees-after-build ^
-DUSE_OPENGL=ON ..
shell: cmd
- name: Build OCCT ${{ matrix.build_type }} (Unix)
if: runner.os != 'Windows'
run: |
cd build-${{ matrix.build_type }}
cmake --build . --target install --config ${{ matrix.build_type }}
shell: bash
- name: Build OCCT ${{ matrix.build_type }} (Windows)
if: runner.os == 'Windows'
run: |
cd build-${{ matrix.build_type }}
cmake --build . --target install --config ${{ matrix.build_type }}
shell: cmd

97
.github/workflows/code-analysis.yml vendored Normal file
View File

@@ -0,0 +1,97 @@
# This workflow performs code analysis using both CodeQL and Microsoft C++ Code Analysis.
# It is triggered on pushes to the 'master' branch and publishes warnings into the security GitHub tab.
# The workflow includes two jobs: one for CodeQL analysis on Ubuntu and another for MSVC Code Analysis on Windows.
name: Code Analysis
on:
push:
branches:
- 'master'
permissions:
contents: read
security-events: write
packages: read
env:
# Path to the CMake build directory.
build: '${{ github.workspace }}/build'
config: 'Debug'
jobs:
codeql-analyze:
name: CodeQL Analyze (C/C++)
runs-on: ubuntu-latest
steps:
# Step: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4.1.7
# Step: Install necessary dependencies for building the project
- name: Install dependencies
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
# Step: Initialize CodeQL for scanning
- name: Initialize CodeQL
uses: github/codeql-action/init@v3.26.5
with:
languages: c-cpp
build-mode: manual
# Step: Build the project using CMake and Make
- name: Build project
shell: bash
run: |
mkdir -p build
cd build
cmake -G "Unix Makefiles" \
-D CMAKE_C_COMPILER=gcc \
-D CMAKE_CXX_COMPILER=g++ \
-D USE_FREETYPE=OFF \
-D CMAKE_BUILD_TYPE=Release ..
make -j$(nproc)
# Step: Perform CodeQL Analysis
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3.26.5
with:
category: "/language:c-cpp"
msvc-analyze:
name: Microsoft C++ Code Analysis
runs-on: windows-latest
steps:
# Step: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4.1.7
# Step: Install necessary dependencies using Chocolatey
- name: Install dependencies
run: |
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
choco install magicsplat-tcl-tk -y
# Step: Configure the project using CMake
- name: Configure CMake
run: |
mkdir build
cd build
cmake -D USE_FREETYPE=OFF -DCMAKE_BUILD_TYPE=${{ env.config }} ..
# Step: Run MSVC Code Analysis
- name: Run MSVC Code Analysis
uses: microsoft/msvc-code-analysis-action@v0.1.1
id: run-analysis
with:
cmakeBuildDirectory: ${{ env.build }}
buildConfiguration: ${{ env.config }}
ruleset: NativeRecommendedRules.ruleset
# Step: Upload SARIF file to GitHub Code Scanning Alerts
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@v3.26.5
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}

17
.gitignore vendored
View File

@@ -1,14 +1,12 @@
# standard directories for derived files in CASROOT
/.adm
/sun
/.cache
/.vscode
/lin
/mac
/ao1
/sil
/wnt
/doc
/drv
/inc
/work
@@ -16,12 +14,6 @@
win32
win64
# standard names of directories for objects and binaries for samples
bin
obj
Debug
Release
# project files and artifacts
/adm/msvc
/adm/wnt
@@ -35,6 +27,8 @@ Release
*.suo
*.sdf
*.opensdf
*.VC.db
*.VC.opendb
*.ipch
*.aps
@@ -49,6 +43,7 @@ Release
/*.m4
/*.ac
/*.sh
/codeblocks.bat
/custom.bat
/autom4te.cache
/build_configure
@@ -58,5 +53,5 @@ Release
/Makefile
/libtool
/stamp*
/build
/build*
/install

3
.tgitconfig Normal file
View File

@@ -0,0 +1,3 @@
[bugtraq]
url = https://tracker.dev.opencascade.org/view.php?id=%BUGID%
logregex = "(\\s)(00|#)\\d+(?!\\w)\n(\\d+)"

File diff suppressed because it is too large Load Diff

0
LICENSE_LGPL_21.txt Executable file → Normal file
View File

64
README.md Normal file
View File

@@ -0,0 +1,64 @@
# Open CASCADE Technology
Open CASCADE Technology (OCCT) is a software development platform providing services for 3D surface and solid modeling, CAD data exchange, and visualization. Most of OCCT functionality is available in the form of C++ libraries. OCCT is ideal for developing software dealing with 3D modeling (CAD), manufacturing/measuring (CAM), or numerical simulation (CAE).
## License
Open CASCADE Technology 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 a special exception defined in the file `OCCT_LGPL_EXCEPTION.txt`. Consult the file `LICENSE_LGPL_21.txt` included in the OCCT distribution for the complete text of the license.
Alternatively, Open CASCADE Technology may be used under the terms of the Open CASCADE commercial license or a contractual agreement.
**Note:** Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and materials is on you. See the license text for a formal disclaimer.
## Packaging
You can receive certified versions of OCCT code in different packages:
- **Snapshot of Git repository:** Contains C++ header and source files of OCCT, documentation sources, build scripts, and CMake project files.
- **Complete source archive:** Contains all sources of OCCT, generated HTML and PDF documentation, and ready-to-use projects for building on all officially supported platforms.
- **Binary package (platform-specific):** In addition to the complete source archive, it includes binaries of OCCT and third-party libraries built on one platform. This package allows using OCCT immediately after installation.
Certified versions of OCCT can be downloaded from:
- [Open CASCADE Releases](https://dev.opencascade.org/release)
- [GitHub Releases](https://github.com/Open-Cascade-SAS/OCCT/releases)
You can also find OCCT pre-installed on your system or install it from packages provided by a third party. Note that packaging and functionality of such versions can be different from certified releases. Please consult the documentation accompanying your version for details.
## Documentation
Documentation is available at the following links:
- [Latest version](https://dev.opencascade.org/doc/overview)
- [Version 7.8](https://dev.opencascade.org/doc/occt-7.8.0/overview)
Documentation can be part of the package. To preview documentation as part of the package, open the file `doc/html/index.html` to browse HTML documentation.
If HTML documentation is not available in your package, you can:
- **Generate it from sources:** You need to have Tcl and Doxygen 1.8.4 (or above) installed on your system and accessible in your environment (check the environment variable PATH). Use the batch file `adm/gendoc.bat` on Windows or the Bash script `adm/gendoc` on Linux or OS X to (re)generate documentation.
- **Generate together with sources:** You need to have CMake and 1.8.4 (or above) installed on your system. Enable `BUILD_DOC_Overview` CMake parameter and set the path to Doxygen `3RDPARTY_DOXYGEN_EXECUTABLE`. Then build ALL or only `Overview`.
- **Read documentation in source plain text (Markdown) format** found in the subfolder `dox` or [GitHub Wiki](https://github.com/Open-Cascade-SAS/OCCT/wiki).
See `dox/dev_guides/documentation/documentation.md` or [Building Documentation](https://dev.opencascade.org/doc/occt-7.8.0/overview/html/build_upgrade__building_documentation.html) for details.
## Building
In most cases, you need to rebuild OCCT on your platform (OS, compiler) before using it in your project to ensure binary compatibility.
Consult the file `dox/dev_guides/building/building.md` or [Building OCCT](https://dev.opencascade.org/doc/overview/html/build_upgrade__building_occt.html) or [Building OCCT Wiki](https://github.com/Open-Cascade-SAS/OCCT/wiki/build_upgrade) for instructions on building OCCT from sources on supported platforms.
## Version
The current version of OCCT can be found in the file `src/Standard/Standard_Version.hxx`.
## Development
### Bug Tracker
- [GitHub Issues](https://github.com/Open-Cascade-SAS/OCCT/issues)
- [OCCT Tracker](https://tracker.dev.opencascade.org/)
For information regarding OCCT code development, please consult the official OCCT Collaborative Development Portal:
- [OCCT Development Portal](http://dev.opencascade.org)
### Forum and Discussions
- [OCCT Forums](https://dev.opencascade.org/forums)
- [GitHub Discussions](https://github.com/Open-Cascade-SAS/OCCT/discussions)

View File

@@ -1,90 +0,0 @@
Open CASCADE Technology
=======================
This directory contains sources of Open CASCADE Technology (OCCT), a software
development platform providing services for 3D surface and solid modeling, CAD
data exchange, and visualization. Most of OCCT functionality is available in
the form of C++ libraries. OCCT can be best applied in development of software
dealing with 3D modeling (CAD), manufacturing / measuring (CAM) or numerical
simulation (CAE).
License
-------
Open CASCADE Technology is free software; you can redistribute it and / or
modify it under the terms of the GNU Lesser General Public 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.
Alternatively, Open CASCADE Technology may be used under the terms of Open
CASCADE commercial license or contractual agreement.
Note that Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT
WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and
materials is on you. See the license text for formal disclaimer.
Packaging
---------
You can receive certified version of OCCT code in different packages.
- Snapshot of Git repository: contains only bare sources of OCCT; many C++
files, HTML documentation, and project files / makefiles for building OCCT
need to be generated.
- Complete source archive: contains all sources of OCCT, including C++ files
generated by WOK, HTML and PDF documentation, and projects / makefiles for
building on all officially supported platforms.
- Binary package (platform-specific): in addition to complete source archive,
it includes binaries of OCCT and third-party libraries built on one platform.
This package allows using OCCT immediately after installation.
Certified versions of OCCT can be downloaded from http://www.opencascade.org
You can also find OCCT pre-installed on your system, or install it from
packages provided by a third party. Note that packaging and functionality
of such versions can be different from certified releases. Please consult
documentation accompanyog your version for details.
Documentation
-------------
Open file doc/html/index.html to browse HTML documentation.
If HTML documentation is not available in your package, you can:
- Generate it from sources.
You need to have Tcl and Doxygen 1.8.4 (or above) installed on your system.
and accessible in your environment (check environment variable PATH).
Run batch file *gendoc.bat* on Windows or Bash scriot *gendoc.sh* on Linux
or Mac OS X to (re)generate documentation.
- Read documentation in source plain text (MarkDown) format found in
subfolder *dox*
See *dox/dev_guides/documentation/documentation.md* for details.
Building
--------
In most cases you need to rebuild OCCT on your platform (OS, compiler) before
using it in your project, to ensure binary compatibility.
Consult the file *dox/dev_guides/building/building.md* for instructions on
building OCCT from sources on supported platforms.
Version
-------
The current version of OCCT can be consulted in the file
*src/Standard/Standard_Version.hxx*
Development
-----------
For information regarding OCCT code development please consult the official
OCCT Collaborative Development Portal:
http://dev.opencascade.org

View File

@@ -1,18 +0,0 @@
wnt WOKSteps_exec_link DRAWEXE #WOKStep_EXELink(exec.tks)
lin WOKSteps_exec_link DRAWEXE #WOKStep_EXELink(exec.tks)
wnt cmplrs_cxx f -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_cxx b -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_cxx Aspect (wnt cmplrs_cxx b) -D_AFXDLL
wnt cmplrs_cxx WNT (wnt cmplrs_cxx b) -D_AFXDLL -D_AFXDLL
wnt cmplrs_c f -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_c b -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_c NIS (wnt cmplrs_c b) -DSILGL -DSILGL_VRS=50
lin cmplrs_cxx f -DLIN -DLININTEL -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
lin cmplrs_cxx b -DLIN -DLININTEL -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
lin cmplrs_c f -DLIN -DLININTEL -D_GNU_SOURCE=1 -fexceptions
lin cmplrs_c b -DLIN -DLININTEL -D_GNU_SOURCE=1 -fexceptions

View File

@@ -1,7 +1,8 @@
FoundationClasses TKernel TKMath
ModelingData TKG2d TKG3d TKGeomBase TKBRep
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
Visualization TKService TKV3d TKOpenGl TKMeshVS TKVoxel TKIVtk
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml FWOSPlugin TKTObj TKBinTObj TKXmlTObj
DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
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

@@ -3,9 +3,10 @@ StdResource
SHMessage
Textures
Shaders
XRResources
XSMessage
XSTEPResource
XmlOcafResource
UnitsAPI/Lexi_Expr.dat
UnitsAPI/Units.dat
TObj/TObj.msg
TObj/TObj.msg
BOPAlgo/BOPAlgo.msg

1
adm/SAMPLES Normal file
View File

@@ -0,0 +1 @@
qt AndroidQt FuncDemo IESample Tutorial OCCTOverview

3
adm/SAMPLES_RESOURCES Normal file
View File

@@ -0,0 +1,3 @@
qt/Common/res/
qt/Tutorial/res/
qt/OCCTOverview/res/

4
adm/TOOLS Normal file
View File

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

View File

@@ -5,14 +5,12 @@ n Bnd
n BVH
n CSLib
n Convert
n Dico
n ElCLib
n ElSLib
n Expr
n ExprIntrp
n FSD
n GeomAbs
n MMgt
n Message
n OSD
n PLib
@@ -34,6 +32,7 @@ n UnitsAPI
n gp
n math
r OS
n FlexLexer
t TKMath
t TKernel
n Adaptor2d
@@ -67,6 +66,7 @@ n GeomLProp
n GeomLib
n GeomProjLib
n GeomTools
n GeomEvaluator
n Hermit
n IntAna
n IntAna2d
@@ -105,8 +105,10 @@ n BRepIntCurveSurface
n BRepLib
n BRepMAT2d
n BRepMesh
n BRepMeshData
n BRepOffset
n BRepOffsetAPI
n BRepPreviewAPI
n BRepPrim
n BRepPrimAPI
n BRepProj
@@ -141,6 +143,8 @@ n HLRTopoBRep
n HLRAppli
n Hatch
n HatchGen
n IMeshData
n IMeshTools
n IntCurve
n IntCurveSurface
n IntCurvesFace
@@ -194,14 +198,16 @@ t TKPrim
t TKShHealing
t TKTopAlgo
t TKXMesh
n InterfaceGraphic
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
@@ -210,21 +216,20 @@ n SelectBasics
n SelectMgr
n StdPrs
n StdSelect
n TColQuantity
n V3d
n Visual3d
n Voxel
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
t TKVoxel
n BinTObjDrivers
n LDOM
n TObj
@@ -239,13 +244,19 @@ n BinMDataXtd
n BinMDocStd
n BinMFunction
n BinMNaming
n BinMPrsStd
n BinObjMgt
n BinTools
n CDF
n CDM
n FWOSDriver
n PCDM
n StdLDrivers
n StdLPersistent
n StdObjMgt
n StdDrivers
n StdObject
n StdPersistent
n StdStorage
n ShapePersistent
n TDF
n TDataStd
n TDataXtd
@@ -262,11 +273,9 @@ n XmlMDataXtd
n XmlMDocStd
n XmlMFunction
n XmlMNaming
n XmlMPrsStd
n XmlObjMgt
r StdResource
r XmlOcafResource
t FWOSPlugin
t TKBin
t TKBinL
@@ -275,6 +284,8 @@ t TKCAF
t TKCDF
t TKLCAF
t TKStdL
t TKStd
t TKTObj
t TKXml
t TKXmlL
@@ -312,11 +323,13 @@ 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
@@ -329,12 +342,14 @@ 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
@@ -342,8 +357,6 @@ n StepToGeom
n StepToTopoDS
n StepVisual
n StlAPI
n StlMesh
n StlTransfer
n TopoDSToStep
n Transfer
n TransferBRep
@@ -364,16 +377,13 @@ r SHMessage
r XSMessage
r XSTEPResource
t TKBinXCAF
t TKIGES
t TKSTEP
t TKSTEP209
t TKSTEPAttr
t TKSTEPBase
t TKSTL
t TKVRML
t TKDESTL
t TKDEVRML
t TKXCAF
t TKXDEIGES
t TKXDESTEP
t TKDE
t TKDECascade
t TKDEIGES
t TKDESTEP
t TKXSBase
t TKXmlXCAF
n BOPTest
@@ -382,6 +392,9 @@ n DBRep
n DDF
n DDataStd
n DDocStd
n DE
n DEXCAFCascade
n DEBRepCascade
n DNaming
n DPrsStd
n Draw
@@ -394,23 +407,39 @@ n HLRTest
n MeshTest
n SWDRAW
n TObjDRAW
n TestTopOpe
n TestTopOpeDraw
n TestTopOpeTools
n OpenGlTest
n OpenGlesTest
n D3DHostTest
n ViewerTest
n XDEDRAW
n XSDRAW
n XSDRAWIGES
n XSDRAWSTEP
n XSDRAWSTLVRML
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
@@ -431,3 +460,38 @@ 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

@@ -1,113 +1,110 @@
#
##
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
if(3RDPARTY_MACRO_ALREADY_INCLUDED)
return()
endif()
set(3RDPARTY_MACRO_ALREADY_INCLUDED 1)
macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEBUG)
# define 3RDPARTY_${PRODUCT_NAME}_DIR variable is it isn't defined
macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME_DEBUG_SUFFIX)
if (NOT DEFINED INSTALL_${PRODUCT_NAME} AND BUILD_SHARED_LIBS)
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "${INSTALL_${PRODUCT_NAME}_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DIR)
set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}")
endif()
# search for product directory inside 3RDPARTY_DIR directory
if (NOT 3RDPARTY_${PRODUCT_NAME}_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" "${PRODUCT_NAME}" ${PRODUCT_NAME}_DIR_NAME)
if (${PRODUCT_NAME}_DIR_NAME)
message (STATUS "Info: ${PRODUCT_NAME}: ${${PRODUCT_NAME}_DIR_NAME} folder is used")
set (3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_DIR}/${${PRODUCT_NAME}_DIR_NAME}" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify product folder in connection with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_${PRODUCT_NAME}_DIR PATH "The directory containing ${PRODUCT_NAME}")
if (NOT 3RDPARTY_${PRODUCT_NAME}_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" ${PRODUCT_NAME} ${PRODUCT_NAME}_DIR_NAME)
if (${PRODUCT_NAME}_DIR_NAME)
set (3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_DIR}/${${PRODUCT_NAME}_DIR_NAME}" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
endif()
endif()
else()
#set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
endif()
if (NOT DEFINED INSTALL_${PRODUCT_NAME})
message (STATUS "${INSTALL_${PRODUCT_NAME}_DESCR}")
if (NOT "${INSTALL_${PRODUCT_NAME}_DESCR}" STREQUAL "")
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "${INSTALL_${PRODUCT_NAME}_DESCR}")
else()
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "Is ${PRODUCT_NAME} required to be copied into install directory")
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE PATH "the path of ${HEADER_NAME}")
endif()
# search for include directory
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing the headers of the ${PRODUCT_NAME}" FORCE)
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME} PATHS
"${3RDPARTY_${PRODUCT_NAME}_DIR}/include"
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_HEADER}
NO_DEFAULT_PATH)
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME})
endif()
separate_arguments (${LIBRARY_CSF_NAME})
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME "${LIBRARY_NAME}")
if (BUILD_SHARED_LIBS)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} OR NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
endif()
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing the headers of the ${PRODUCT_NAME}" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME})
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"")
endif()
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
elseif (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
get_filename_component(3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_TMP "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
if (NOT "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" STREQUAL "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_TMP}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} OR NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} "" CACHE FILEPATH "${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
endif()
endif()
# search for library
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME} PATHS
"${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}"
"${3RDPARTY_${PRODUCT_NAME}_DIR}/lib"
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_LIB}
NO_DEFAULT_PATH)
# second search if previous one do not find anything
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME})
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} library" FORCE)
endif()
# library path
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} library" FORCE)
endif()
# search for shared library (just for win case)
if (WIN32)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
elseif (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
get_filename_component(3RDPARTY_${PRODUCT_NAME}_DLL_DIR_TMP "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
if (NOT "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" STREQUAL "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_TMP}")
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
if (WIN32)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME})
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
endif()
endif()
endif()
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
set (3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR PATH "the path to ${PRODUCT_NAME}")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} FILEPATH "the path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"")
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}" PATHS
"${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}"
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bin"
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_DLL}
NO_DEFAULT_PATH)
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"")
endif()
# second search if previous one do not find anything
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}")
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} FILEPATH "the path to ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
endif()
endif()
endif()
endif()
endforeach()
# header
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
endif()
# set 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to ${HEADER_NAME}" FORCE)
# shared library path
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
PATHS ${3RDPARTY_${PRODUCT_NAME}_DIR}
PATH_SUFFIXES include inc headers
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
string(TOLOWER ${PRODUCT_NAME} LOW_CASE_PRODUCT_NAME)
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
PATH_SUFFIXES include inc headers ${LOW_CASE_PRODUCT_NAME}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
@@ -115,80 +112,255 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE FILEPATH "The path to ${HEADER_NAME}" FORCE)
endif()
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
endif()
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
# if (BUILD_SHARED_LIBS)
# library
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll.a .lib .so .dylib .a)
if (WIN32)
if (3RDPARTY_${PRODUCT_NAME}_DLL OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
endif()
endif()
set (${PRODUCT_NAME}_PATH_SUFFIXES lib)
if (WIN32)
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} win${COMPILER_BITNESS}/${COMPILER}/lib)
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} lib/win${COMPILER_BITNESS})
endif()
if (ANDROID)
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} libs/${ANDROID_ABI})
endif()
if(UNIX AND NOT APPLE AND NOT ANDROID)
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} lib/linux${COMPILER_BITNESS})
endif()
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "")
# set 3RDPARTY_${PRODUCT_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_LIBRARY
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
if (INSTALL_${PRODUCT_NAME})
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if ((3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}") OR (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}"))
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
if ("${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}-NOTFOUND")
# find directory recursive
FIND_SUBDIRECTORY (${3RDPARTY_${PRODUCT_NAME}_DIR} "${${PRODUCT_NAME}_PATH_SUFFIXES}" SUBDIR_NAME)
if (NOT "${SUBDIR_NAME}" STREQUAL "")
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME_SUFFIX}
PATHS "${SUBDIR_NAME}"
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
endif()
endif()
else()
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (WIN32)
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
else()
get_filename_component(ABS_PATH ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} REALPATH)
if ("${PRODUCT_NAME}" STREQUAL "FREEIMAGE")
get_filename_component(FREEIMLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
install (FILES "${ABS_PATH}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${FREEIMLIB}.3)
install (FILES "${ABS_PATH}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${FREEIMLIB}.3)
install (FILES "${ABS_PATH}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${FREEIMLIB}.3)
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
else()
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
endif()
endif()
if("${PRODUCT_NAME}" STREQUAL "GL2PS")
get_filename_component(GL2PSLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
install (FILES "${ABS_PATH}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${GL2PSLIB}.1)
install (FILES "${ABS_PATH}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${GL2PSLIB}.1)
install (FILES "${ABS_PATH}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${GL2PSLIB}.1)
endif()
endif()
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
else()
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
endif()
endif()
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX})
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} "" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
endif()
# shared library
if (WIN32)
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
# set 3RDPARTY_${PRODUCT_NAME}_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_DLL
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
if ((3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}") OR (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}"))
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
PATH_SUFFIXES bin win${COMPILER_BITNESS}/${COMPILER}/bin bin/win${COMPILER_BITNESS}
NO_DEFAULT_PATH)
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} STREQUAL "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND")
# find directory recursive
FIND_SUBDIRECTORY (${3RDPARTY_${PRODUCT_NAME}_DIR} bin SUBDIR_NAME)
if (NOT "${SUBDIR_NAME}" STREQUAL "")
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME_SUFFIX}
PATHS "${SUBDIR_NAME}"
PATH_SUFFIXES bin
NO_DEFAULT_PATH)
endif()
endif()
else()
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME} PATH_SUFFIXES bin)
endif()
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
else()
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} "" CACHE FILEPATH "${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
endif()
endif()
if (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX})
endif()
endif()
if (WIN32)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIRS "")
else()
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "")
endif()
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
if (WIN32)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}};${3RDPARTY_${PRODUCT_NAME}_DLL_DIRS}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
else()
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}:${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS}")
endif()
endforeach()
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "")
if (INSTALL_${PRODUCT_NAME})
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "")
if (WIN32)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}" DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(ABS_PATH ${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}} REALPATH)
if ("${PRODUCT_NAME}" STREQUAL "FREEIMAGE")
get_filename_component(FREEIMLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}} NAME)
if (SINGLE_GENERATOR)
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR_LIB}" RENAME ${FREEIMLIB}.3)
else()
install (FILES "${ABS_PATH}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}"
RENAME ${FREEIMLIB}.3)
install (FILES "${ABS_PATH}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i"
RENAME ${FREEIMLIB}.3)
install (FILES "${ABS_PATH}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d"
RENAME ${FREEIMLIB}.3)
endif()
endif()
endif()
else()
# the library directory for using by the executable
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
if (WIN32)
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}};${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}")
else()
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}:${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}")
endif()
endforeach()
if (WIN32)
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR ${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}})
endif()
endif()
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX})
# endif()
endforeach()
endmacro()
macro (COMPLIANCE_PRODUCT_CONSISTENCY LIBNAME)
if (3RDPARTY_${LIBNAME}_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DIR}")
# include dir
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
endif()
if (BUILD_SHARED_LIBS)
# library dir
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
endif()
# shared library dir
if (WIN32)
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL_DIR}")
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
endif()
endif()
endif()
endif()
if (BUILD_SHARED_LIBS)
# check library
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY}")
endif()
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
endif()
# check shared library
if (WIN32)
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
if (3RDPARTY_${LIBNAME}_DLL AND EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DLL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL}")
endif()
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
endif()
endif()
endif()
endmacro()

View File

@@ -2,19 +2,24 @@
# execute FindBISON script by "find_package (Bison)" is required to define BISON_TARGET macro
if (NOT DEFINED 3RDPARTY_BISON_EXECUTABLE)
set (3RDPARTY_BISON_EXECUTABLE "" CACHE FILEPATH "The path to the bison command")
# delete obsolete 3RDPARTY_BISON_EXECUTABLE cache variable (not used anymore)
unset (3RDPARTY_BISON_EXECUTABLE CACHE)
# delete BISON_EXECUTABLE cache variable if it is empty, otherwise find_package will fail
# without reasonable diagnostic
if (NOT BISON_EXECUTABLE OR NOT EXISTS "${BISON_EXECUTABLE}")
unset (BISON_EXECUTABLE CACHE)
endif()
# BISON_EXECUTABLE is required by BISON_TARGET macro and should be defined
set (BISON_EXECUTABLE "${3RDPARTY_BISON_EXECUTABLE}" CACHE FILEPATH "path to the bison executable" FORCE)
find_package (Bison)
if (BISON_FOUND)
set (3RDPARTY_BISON_EXECUTABLE "${BISON_EXECUTABLE}" CACHE FILEPATH "The Path to the bison command" FORCE)
# Add paths to 3rdparty subfolders containing name "bison" to CMAKE_PROGRAM_PATH variable to make
# these paths searched by find_package
if (3RDPARTY_DIR)
file (GLOB BISON_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*bison*/")
foreach (candidate_path ${BISON_PATHS})
if (IS_DIRECTORY ${candidate_path})
list (APPEND CMAKE_PROGRAM_PATH ${candidate_path})
endif()
endforeach()
endif()
if (NOT 3RDPARTY_BISON_EXECUTABLE OR NOT EXISTS "${3RDPARTY_BISON_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_BISON_EXECUTABLE)
endif()
find_package (BISON 3.7.4)

View File

@@ -1,42 +1,58 @@
# doxygen
set (DOXYGEN_MINIMUM_VERSION 1.8.4)
if (NOT DEFINED 3RDPARTY_DOXYGEN_EXECUTABLE)
set (3RDPARTY_DOXYGEN_EXECUTABLE "" CACHE FILEPATH "The Path to the doxygen command")
endif()
if (DO_ONLY_CHECK_FOR_DOXYGEN)
message (STATUS "Info. Detecting doxygen")
set (DOXYGEN_SKIP_DOT ON)
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
if (NOT DEFINED 3RDPARTY_DOXYGEN_DOT_EXECUTABLE)
set (3RDPARTY_DOXYGEN_DOT_EXECUTABLE "" CACHE FILEPATH "The path to the dot program used by doxygen")
endif()
if (NOT DEFINED 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE)
set (3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE OFF CACHE BOOL "Skip trying to find Dot")
endif()
if (3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE)
OCCT_CHECK_AND_UNSET (3RDPARTY_DOXYGEN_DOT_EXECUTABLE)
endif()
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOXYGEN_DOT_EXECUTABLE))
set (DOXYGEN_SKIP_DOT ${3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE})
find_package (Doxygen)
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE AND DOXYGEN_EXECUTABLE)
set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "The Path to the doxygen command" FORCE)
set (CAN_DOXYGEN_BE_USED OFF)
if (DOXYGEN_EXECUTABLE)
set (CAN_DOXYGEN_BE_USED ON)
message (STATUS "Info. Doxygen is found and can be used")
endif()
if (NOT 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOXYGEN_DOT_EXECUTABLE AND DOXYGEN_DOT_EXECUTABLE)
set (3RDPARTY_DOXYGEN_DOT_EXECUTABLE "${DOXYGEN_DOT_EXECUTABLE}" CACHE FILEPATH "The path to the dot program used by doxygen" FORCE)
else()
set (3RDPARTY_DOT_EXECUTABLE_DESCR "The path to the 'dot' tool producing layered drawings of directed graphs.\nThis tool used by doxygen")
set (3RDPARTY_DOXYGEN_EXECUTABLE_DESCR "The path to the doxygen command")
if (NOT DEFINED 3RDPARTY_DOXYGEN_EXECUTABLE)
set (3RDPARTY_DOXYGEN_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}")
endif()
endif()
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOXYGEN_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOXYGEN_EXECUTABLE)
endif()
if (NOT DEFINED 3RDPARTY_DOT_EXECUTABLE)
set (3RDPARTY_DOT_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}")
endif()
if (NOT 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE)
if (NOT 3RDPARTY_DOXYGEN_DOT_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOXYGEN_DOT_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOXYGEN_DOT_EXECUTABLE)
if (NOT DEFINED 3RDPARTY_SKIP_DOT_EXECUTABLE)
set (3RDPARTY_SKIP_DOT_EXECUTABLE ON CACHE BOOL "Skip trying to find Dot")
endif()
if (3RDPARTY_SKIP_DOT_EXECUTABLE)
OCCT_CHECK_AND_UNSET (3RDPARTY_DOT_EXECUTABLE)
endif()
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE))
set (DOXYGEN_SKIP_DOT ${3RDPARTY_SKIP_DOT_EXECUTABLE})
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE AND DOXYGEN_EXECUTABLE)
set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}" FORCE)
endif()
if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE AND DOXYGEN_DOT_EXECUTABLE)
set (3RDPARTY_DOT_EXECUTABLE "${DOXYGEN_DOT_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}" FORCE)
endif()
endif()
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOXYGEN_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOXYGEN_EXECUTABLE)
endif()
if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE)
if (NOT 3RDPARTY_DOT_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOT_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOT_EXECUTABLE)
endif()
endif()
endif()

113
adm/cmake/draco.cmake Normal file
View File

@@ -0,0 +1,113 @@
# Draco - a library for a lossy vertex data compression, used as extension to glTF format.
# https://github.com/google/draco
macro (SEARCH_DRACO_LIB)
if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
if (NOT 3RDPARTY_DRACO_LIBRARY OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .a)
set (3RDPARTY_DRACO_LIBRARY "3RDPARTY_DRACO_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to Draco library" FORCE)
find_library (3RDPARTY_DRACO_LIBRARY NAMES ${CSF_Draco}
PATHS "${3RDPARTY_DRACO_DIR}"
PATH_SUFFIXES lib
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
if (3RDPARTY_DRACO_LIBRARY AND EXISTS "${3RDPARTY_DRACO_LIBRARY}")
get_filename_component (3RDPARTY_DRACO_LIBRARY_DIR "${3RDPARTY_DRACO_LIBRARY}" PATH)
set (3RDPARTY_DRACO_LIBRARY_DIR "${3RDPARTY_DRACO_LIBRARY_DIR}" CACHE FILEPATH "The directory containing Draco library" FORCE)
endif()
endif()
if (WIN32 AND (NOT 3RDPARTY_DRACO_LIBRARY_DEBUG OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY_DEBUG}"))
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .a)
set (3RDPARTY_DRACO_LIBRARY_DEBUG "3RDPARTY_DRACO_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "The path to debug Draco library" FORCE)
find_library (3RDPARTY_DRACO_LIBRARY_DEBUG NAMES ${CSF_Draco}
PATHS "${3RDPARTY_DRACO_DIR}"
PATH_SUFFIXES libd debug/lib
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
if (3RDPARTY_DRACO_LIBRARY_DEBUG AND EXISTS "${3RDPARTY_DRACO_LIBRARY_DEBUG}")
get_filename_component (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "${3RDPARTY_DRACO_LIBRARY_DEBUG}" PATH)
set (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "${3RDPARTY_DRACO_LIBRARY_DIR_DEBUG}" CACHE FILEPATH "The directory containing debug Draco library" FORCE)
endif()
endif()
endif()
endmacro()
# vcpkg processing
if (BUILD_USE_VCPKG)
find_package (draco CONFIG REQUIRED)
set (3RDPARTY_DRACO_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}")
SEARCH_DRACO_LIB()
list (APPEND 3RDPARTY_INCLUDE_DIRS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/draco")
return()
endif()
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
if (NOT DEFINED 3RDPARTY_DRACO_DIR)
set (3RDPARTY_DRACO_DIR "" CACHE PATH "The directory containing Draco")
endif()
if (NOT DEFINED 3RDPARTY_DRACO_INCLUDE_DIR)
set (3RDPARTY_DRACO_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the Draco")
endif()
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY)
set (3RDPARTY_DRACO_LIBRARY "" CACHE FILEPATH "Draco library")
endif()
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DIR)
set (3RDPARTY_DRACO_LIBRARY_DIR "" CACHE PATH "The directory containing Draco library")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DEBUG)
set (3RDPARTY_DRACO_LIBRARY_DEBUG "" CACHE FILEPATH "Draco debug library")
endif()
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DIR_DEBUG)
set (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "" CACHE PATH "The directory containing Draco debug library")
endif()
endif()
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_DRACO_DIR OR NOT EXISTS "${3RDPARTY_DRACO_DIR}")
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" draco DRACO_DIR_NAME)
if (DRACO_DIR_NAME)
set (3RDPARTY_DRACO_DIR "${3RDPARTY_DIR}/${DRACO_DIR_NAME}" CACHE PATH "The directory containing Draco" FORCE)
endif()
endif()
endif()
# header
if (NOT 3RDPARTY_DRACO_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_DRACO_INCLUDE_DIR}")
set (HEADER_NAMES draco)
# set 3RDPARTY_DRACO_INCLUDE_DIR as notfound, otherwise find_path can't assign a new value to 3RDPARTY_DRACO_INCLUDE_DIR
set (3RDPARTY_DRACO_INCLUDE_DIR "3RDPARTY_DRACO_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing headers of the Draco" FORCE)
if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
find_path (3RDPARTY_DRACO_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_DRACO_DIR}
PATH_SUFFIXES "include"
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_DRACO_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_DRACO_DIR}
PATH_SUFFIXES "include"
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_DRACO_INCLUDE_DIR AND EXISTS "${3RDPARTY_DRACO_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_DRACO_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DRACO_INCLUDE_DIR)
endif()
SEARCH_DRACO_LIB()

3
adm/cmake/egl.cmake Normal file
View File

@@ -0,0 +1,3 @@
# EGL
THIRDPARTY_PRODUCT("EGL" "EGL/egl.h" "CSF_OpenGlesLibs" "")

87
adm/cmake/eigen.cmake Normal file
View File

@@ -0,0 +1,87 @@
# eigen
if (NOT DEFINED INSTALL_EIGEN)
set (INSTALL_EIGEN OFF CACHE BOOL "${INSTALL_EIGEN_DESCR}")
endif()
# eigen directory
if (NOT DEFINED 3RDPARTY_EIGEN_DIR)
set (3RDPARTY_EIGEN_DIR "" CACHE PATH "The directory containing eigen")
endif()
# search for eigen in user defined directory
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_EIGEN_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_DIR}")
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" Eigen EIGEN_DIR_NAME)
if (EIGEN_DIR_NAME)
set (3RDPARTY_EIGEN_DIR "${3RDPARTY_DIR}/${EIGEN_DIR_NAME}" CACHE PATH "The directory containing eigen" FORCE)
endif()
endif()
endif()
if (NOT DEFINED 3RDPARTY_EIGEN_INCLUDE_DIR)
set (3RDPARTY_EIGEN_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the EIGEN")
endif()
if (NOT 3RDPARTY_EIGEN_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
set (HEADER_NAMES Eigen)
set (3RDPARTY_EIGEN_INCLUDE_DIR "3RDPARTY_EIGEN_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to Eigen header file" FORCE)
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
find_path (3RDPARTY_EIGEN_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_EIGEN_DIR}
PATH_SUFFIXES include eigen3 include/eigen3
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_EIGEN_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATH_SUFFIXES include eigen3 include/eigen3
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
# use default (CMake) EIGEN search
if (NOT 3RDPARTY_EIGEN_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
# use 3RDPARTY_EIGEN_DIR if it is specified for eigen search
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
set (CACHED_EIGEN_DIR $ENV{Eigen3_DIR})
set (ENV{Eigen3_DIR} "${3RDPARTY_EIGEN_DIR}")
endif()
find_package(Eigen3 QUIET)
# restore ENV{Eigen3_DIR}
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
set (ENV{Eigen3_DIR} ${CACHED_EIGEN_DIR})
endif()
if (${EIGEN3_FOUND})
set (3RDPARTY_EIGEN_INCLUDE_DIR "${EIGEN3_INCLUDE_DIR}" CACHE PATH "the path to Eigen header file" FORCE)
set (3RDPARTY_EIGEN_DIR "${EIGEN3_ROOT_DIR}" CACHE PATH "The directory containing eigen" FORCE)
endif()
endif()
endif()
if (3RDPARTY_EIGEN_INCLUDE_DIR AND EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
# Install header files
if (INSTALL_EIGEN)
file(GLOB EIGEN_SUBDIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}/*")
foreach(SUBDIR ${EIGEN_SUBDIRS})
if(IS_DIRECTORY "${SUBDIR}")
install (DIRECTORY "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
else()
install (FILES "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
endif()
endforeach()
endif()
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_EIGEN_INCLUDE_DIR)
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)

253
adm/cmake/ffmpeg.cmake Normal file
View File

@@ -0,0 +1,253 @@
# vcpkg processing
if (BUILD_USE_VCPKG)
find_package(FFMPEG REQUIRED)
set(CSF_FFmpeg ${FFMPEG_LIBRARIES})
if (WIN32)
set (USED_3RDPARTY_FREEIMAGE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin")
else()
set (USED_3RDPARTY_FREEIMAGE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib")
endif()
list (APPEND 3RDPARTY_INCLUDE_DIRS "${FFMPEG_INCLUDE_DIRS}")
return()
endif()
if (NOT DEFINED INSTALL_FFMPEG)
set (INSTALL_FFMPEG OFF CACHE BOOL "${INSTALL_FFMPEG_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_DIR)
set (3RDPARTY_FFMPEG_DIR "" CACHE PATH "The directory containing FFmpeg")
endif()
# include occt macros. compiler_bitness, os_with_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify FFMPEG folder in connection with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_FFMPEG_DIR OR NOT EXISTS "${3RDPARTY_FFMPEG_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" FFMPEG FFMPEG_DIR_NAME)
if (FFMPEG_DIR_NAME)
set (3RDPARTY_FFMPEG_DIR "${3RDPARTY_DIR}/${FFMPEG_DIR_NAME}" CACHE PATH "The directory containing FFmpeg" FORCE)
endif()
endif()
else()
endif()
# define required FFMPEG variables
if (NOT DEFINED 3RDPARTY_FFMPEG_INCLUDE_DIR)
set (3RDPARTY_FFMPEG_INCLUDE_DIR "" CACHE PATH "the path of headers directory")
endif()
separate_arguments (CSF_FFmpeg)
foreach (LIBRARY_NAME ${CSF_FFmpeg})
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} OR NOT 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "FFmpeg framework (${LIBRARY_NAME})" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg framework (${LIBRARY_NAME})")
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_DIR)
set (3RDPARTY_FFMPEG_LIBRARY_DIR "" CACHE PATH "The directory containing FFmpeg libraries")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} OR NOT 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "" CACHE FILEPATH "FFmpeg shared libraries (${LIBRARY_NAME})" FORCE)
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg shared libraries (${LIBRARY_NAME})")
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_DIR)
set (3RDPARTY_FFMPEG_DLL_DIR "" CACHE PATH "The directory containing FFmpeg shared libraries")
endif()
endif()
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_INCLUDE_DIR PATH "the path to FFmpeg")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} FILEPATH "the path to FFmpeg framework (${LIBRARY_NAME})")
if (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_LIBRARY_DIR "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg libraries" FORCE)
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} PATH "The directory containing FFmpeg library (${LIBRARY_NAME})")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} FILEPATH "the path to FFmpeg shared library (${LIBRARY_NAME})")
if (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_DLL_DIR "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg shared libraries" FORCE)
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})")
endif()
endif()
endif()
endforeach()
# header
if (NOT 3RDPARTY_FFMPEG_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_FFMPEG_INCLUDE_DIR}")
set (HEADER_NAMES avutil.h libavutil/avutil.h)
# set 3RDPARTY_FFMPEG_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FFMPEG_INCLUDE_DIR
set (3RDPARTY_FFMPEG_INCLUDE_DIR "3RDPARTY_FFMPEG_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to header directory" FORCE)
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
find_path (3RDPARTY_FFMPEG_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_FFMPEG_DIR}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_FFMPEG_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_FFMPEG_INCLUDE_DIR AND EXISTS "${3RDPARTY_FFMPEG_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FFMPEG_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FFMPEG_INCLUDE_DIR)
set (3RDPARTY_FFMPEG_INCLUDE_DIR "" CACHE FILEPATH "the path to avutil.h" FORCE)
endif()
# libraries
foreach (LIBRARY_NAME ${CSF_FFmpeg})
if (NOT 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
set (FFMPEG_PATH_SUFFIXES lib)
if (ANDROID)
set (FFMPEG_PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES} libs/${ANDROID_ABI})
elseif(APPLE)
set (FFMPEG_PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES} Frameworks)
endif()
# set 3RDPARTY_FFMPEG_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FFMPEG_LIBRARY
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}-NOTFOUND" CACHE FILEPATH "The path to FFmpeg library (${LIBRARY_NAME})" FORCE)
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
find_library (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" "${3RDPARTY_FFMPEG_DIR}"
PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} NAMES ${LIBRARY_NAME}
PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
else()
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
endif()
endif()
if (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "The path to FFmpeg library (${LIBRARY_NAME})" FORCE)
endif()
# shared library
if (WIN32)
if (NOT 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}-NOTFOUND" CACHE FILEPATH "The path to FFmpeg shared library (${LIBRARY_NAME})" FORCE)
# find FFmpeg shared library
file (GLOB 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DIR}/bin/${LIBRARY_NAME}[-][0-9]*")
if (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" CACHE FILEPATH "FFmpeg shared library (${LIBRARY_NAME})" FORCE)
get_filename_component (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
else()
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})" FORCE)
endif()
endif()
if (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} OR EXISTS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME})
endif()
endif()
# install instructions
if (INSTALL_FFMPEG)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
if (DEFINED INSTALL_BIN_DIR)
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" DESTINATION "${INSTALL_BIN_DIR}")
else()
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/${INSTALL_DIR_BIN}")
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/${INSTALL_DIR_BIN}i")
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_FFMPEG_LIBRARY_ABS ${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}} REALPATH)
get_filename_component(3RDPARTY_FFMPEG_LIBRARY_NAME ${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}} NAME)
if (DEFINED INSTALL_LIB_DIR)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
DESTINATION "${INSTALL_LIB_DIR}"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
else()
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
endif()
endif()
set (USED_3RDPARTY_FFMPEG_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_FFMPEG_DIR ${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}})
else()
set (USED_3RDPARTY_FFMPEG_DIR ${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}})
endif()
endif()
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)

View File

@@ -2,19 +2,42 @@
# execute FindFLEX script by "find_package (Flex)" is required to define FLEX_TARGET macro
if (NOT DEFINED 3RDPARTY_FLEX_EXECUTABLE)
set (3RDPARTY_FLEX_EXECUTABLE "" CACHE FILEPATH "The Path to the flex command")
# delete obsolete 3RDPARTY_FLEX_EXECUTABLE cache variable (not used anymore)
unset (3RDPARTY_FLEX_EXECUTABLE CACHE)
# delete FLEX_EXECUTABLE cache variable if it is empty, otherwise find_package will fail
# without reasonable diagnostic
if (NOT FLEX_EXECUTABLE OR NOT EXISTS "${FLEX_EXECUTABLE}")
unset (FLEX_EXECUTABLE CACHE)
endif()
if (NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}")
unset (FLEX_INCLUDE_DIR CACHE)
endif()
# FLEX_EXECUTABLE is required by FLEX_TARGET macro and should be defined
set (FLEX_EXECUTABLE "${3RDPARTY_FLEX_EXECUTABLE}" CACHE FILEPATH "path to the flex executable" FORCE)
# Add paths to 3rdparty subfolders containing name "flex" to CMAKE_PROGRAM_PATH and
# CMAKE_INCLUDE_PATH variables to make these paths searched by find_package
if (3RDPARTY_DIR)
file (GLOB FLEX_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*flex*")
foreach (candidate_path ${FLEX_PATHS})
if (IS_DIRECTORY ${candidate_path})
list (APPEND CMAKE_PROGRAM_PATH ${candidate_path})
list (APPEND CMAKE_INCLUDE_PATH ${candidate_path})
endif()
endforeach()
endif()
find_package (FLEX 2.6.4)
find_package (FLEX)
if (FLEX_FOUND)
set (3RDPARTY_FLEX_EXECUTABLE "${FLEX_EXECUTABLE}" CACHE FILEPATH "The Path to the flex command" FORCE)
if (NOT FLEX_FOUND OR NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h")
list (APPEND 3RDPARTY_NOT_INCLUDED FLEX_INCLUDE_DIR)
endif()
if (NOT 3RDPARTY_FLEX_EXECUTABLE OR NOT EXISTS "${3RDPARTY_FLEX_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FLEX_EXECUTABLE)
endif()
# remove old general version of FlexLexer
if (EXISTS ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h)
message (STATUS "Info: remove old FLEX header file: ${CMAKE_SOURCE_DIR}/src/FlexLexer/FlexLexer.h")
file(REMOVE ${CMAKE_SOURCE_DIR}/src/FlexLexer/FlexLexer.h)
endif()
# install copy of FlexLexer.h locally to allow further building without flex
if (FLEX_INCLUDE_DIR AND EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h")
configure_file("${FLEX_INCLUDE_DIR}/FlexLexer.h" "${CMAKE_SOURCE_DIR}/src/FlexLexer/FlexLexer.h" @ONLY NEWLINE_STYLE LF)
endif()

View File

@@ -1,3 +1,16 @@
#freeimage
THIRDPARTY_PRODUCT("FREEIMAGE" "FreeImage.h" "freeimage" "freeimaged")
# vcpkg processing
if (BUILD_USE_VCPKG)
find_package(freeimage CONFIG REQUIRED)
set(CSF_FreeImagePlus freeimage::FreeImagePlus)
if (WIN32)
set (USED_3RDPARTY_FREEIMAGE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin")
else()
set (USED_3RDPARTY_FREEIMAGE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib")
endif()
list (APPEND 3RDPARTY_INCLUDE_DIRS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/")
return()
endif()
THIRDPARTY_PRODUCT("FREEIMAGE" "FreeImage.h" "CSF_FreeImagePlus" "d")

View File

@@ -1,9 +0,0 @@
#freeimageplus
if (WIN32)
if (3RDPARTY_FREEIMAGE_DIR AND NOT 3RDPARTY_FREEIMAGEPLUS_DIR)
set (3RDPARTY_FREEIMAGEPLUS_DIR "${3RDPARTY_FREEIMAGE_DIR}" CACHE PATH "The directory containing freeimageplus" FORCE)
endif()
THIRDPARTY_PRODUCT("FREEIMAGEPLUS" "FreeImagePlus.h" "freeimageplus" "freeimageplusd")
endif()

View File

@@ -1,6 +1,19 @@
# freetype
if (NOT DEFINED INSTALL_FREETYPE)
# vcpkg processing
if (BUILD_USE_VCPKG)
find_package (Freetype MODULE REQUIRED)
set (CSF_FREETYPE Freetype::Freetype)
if (WIN32)
set (USED_3RDPARTY_FREETYPE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin")
else()
set (USED_3RDPARTY_FREETYPE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib")
endif()
list (APPEND 3RDPARTY_INCLUDE_DIRS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")
return()
endif()
if (NOT DEFINED INSTALL_FREETYPE AND BUILD_SHARED_LIBS)
set (INSTALL_FREETYPE OFF CACHE BOOL "${INSTALL_FREETYPE_DESCR}")
endif()
@@ -8,29 +21,27 @@ if (NOT DEFINED 3RDPARTY_FREETYPE_DIR)
set (3RDPARTY_FREETYPE_DIR "" CACHE PATH "The directory containing freetype")
endif()
# store ENV{FREETYPE_DIR}
SET (CACHED_FREETYPE_DIR $ENV{FREETYPE_DIR})
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_COMPILER_BITNESS()
if (NOT ENV{FREETYPE_DIR})
# search for freetype in user defined directory
if (NOT 3RDPARTY_FREETYPE_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" FREETYPE FREETYPE_DIR_NAME)
# specify freetype folder in connection with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_FREETYPE_DIR PATH "The directory containing freetype")
if (NOT 3RDPARTY_FREETYPE_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" FREETYPE FREETYPE_DIR_NAME)
if (FREETYPE_DIR_NAME)
set (3RDPARTY_FREETYPE_DIR "${3RDPARTY_DIR}/${FREETYPE_DIR_NAME}" CACHE PATH "The directory containing freetype" FORCE)
endif()
endif()
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
endif()
else()
#set (3RDPARTY_FREETYPE_DIR "" CACHE PATH "The directory containing freetype" FORCE)
endif()
# define required freetype variables
if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "" CACHE FILEPATH "the path of ft2build.h")
endif()
@@ -39,217 +50,356 @@ if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "" CACHE FILEPATH "the path of freetype2")
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY OR NOT 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library")
endif()
if (BUILD_SHARED_LIBS)
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY OR NOT 3RDPARTY_FREETYPE_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE FILEPATH "The directory containing freetype library")
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL OR NOT 3RDPARTY_FREETYPE_DLL_DIR)
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library")
if (WIN32)
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL OR NOT 3RDPARTY_FREETYPE_DLL_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL_DIR)
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library")
endif()
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL_DIR)
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE FILEPATH "The directory containing freetype shared library")
endif()
endif()
# check 3RDPARTY_FREETYPE_ paths for consistency with specified 3RDPARTY_FREETYPE_DIR
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build FILEPATH "The directory containing ft2build.h header")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "The directory containing ftheader.h header")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY FILEPATH "the path to freetype library")
find_package(Freetype)
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY_DIR PATH "The directory containing freetype library")
endif()
# ft2build header
if (FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${FREETYPE_INCLUDE_DIR_ft2build}")
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "${FREETYPE_INCLUDE_DIR_ft2build}" CACHE FILEPATH "the path of ft2build.h" FORCE)
endif()
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_DLL FILEPATH "the path to freetype shared library")
if (NOT FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
# cmake (version is < 3.0) doesn't find ftheader.h of freetype (version is >= 2.5.1)
# do search taking into account freetype structure of 2.5.1 version
find_path (FREETYPE_INCLUDE_DIR_freetype2 NAMES
freetype/config/ftheader.h
config/ftheader.h
HINTS
ENV FREETYPE_DIR
PATHS
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
PATH_SUFFIXES include/freetype2 include freetype2
NO_DEFAULT_PATH)
find_path (FREETYPE_INCLUDE_DIR_freetype2 NAMES freetype/config/ftheader.h config/ftheader.h)
elseif (FREETYPE_INCLUDE_DIR_freetype2 OR EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
get_filename_component (3RDPARTY_FREETYPE_DIR_ABS "${3RDPARTY_FREETYPE_DIR}" ABSOLUTE)
get_filename_component (FREETYPE_INCLUDE_DIR_freetype2_ABS "${FREETYPE_INCLUDE_DIR_freetype2}" ABSOLUTE)
string (REGEX MATCH "${3RDPARTY_FREETYPE_DIR_ABS}" DOES_PATH_CONTAIN "${FREETYPE_INCLUDE_DIR_freetype2_ABS}")
if (NOT DOES_PATH_CONTAIN) # if cmake found freetype2 at different place from 3RDPARTY_FREETYPE_DIR
# search for freetype2 in 3RDPARTY_FREETYPE_DIR and if it will be found - replace freetyp2 path by new one
set (TMP_FREETYPE2 "TMP_FREETYPE2-NOTFOUND" CACHE FILEPATH "" FORCE)
find_path (TMP_FREETYPE2 NAMES freetype/config/ftheader.h config/ftheader.h
PATHS "${3RDPARTY_FREETYPE_DIR}"
PATH_SUFFIXES include/freetype2 include freetype2
NO_DEFAULT_PATH)
if (TMP_FREETYPE2 OR NOT EXISTS "${TMP_FREETYPE2}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${TMP_FREETYPE2}" CACHE FILEPATH "the path of freetype2" FORCE)
# hide and remove TMP_FREETYPE2
mark_as_advanced (TMP_FREETYPE2)
unset (TMP_FREETYPE2)
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE PATH "The directory containing freetype shared library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_DLL_DIR PATH "The directory containing freetype shared library")
endif()
endif()
endif()
endif()
# return ENV{FREETYPE_DIR}
SET (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR})
# the FIRST step in search for freetype library and header folders (built-in search engine)
# freetype2 header
if (FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${FREETYPE_INCLUDE_DIR_freetype2}" CACHE FILEPATH "the path of freetype2" FORCE)
endif()
# execute built-in search engine to seek freetype
set (IS_BUILTIN_SEARCH_REQUIRED OFF)
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
elseif (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
elseif (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
#elseif (WIN32)
#if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
# set (IS_BUILTIN_SEARCH_REQUIRED ON)
#endif()
endif()
if (NOT 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
elseif (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_DIR_TMP "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
if (NOT "${3RDPARTY_FREETYPE_LIBRARY_DIR}" STREQUAL "${3RDPARTY_FREETYPE_LIBRARY_DIR_TMP}")
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
endif()
endif()
if (IS_BUILTIN_SEARCH_REQUIRED)
if (WIN32)
if (NOT 3RDPARTY_FREETYPE_DLL_DIR)
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
elseif (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component(3RDPARTY_FREETYPE_DLL_DIR_TMP "${3RDPARTY_FREETYPE_DLL}" PATH)
if (NOT "${3RDPARTY_FREETYPE_DLL_DIR}" STREQUAL "${3RDPARTY_FREETYPE_DLL_DIR_TMP}")
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
# use 3RDPARTY_FREETYPE_DIR if it is specified for freetype search
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
set (CACHED_FREETYPE_DIR $ENV{FREETYPE_DIR})
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
endif()
unset (FREETYPE_LIBRARY_RELEASE)
find_package(Freetype)
# Only for UNIX (not APPLE)
if ((NOT WIN32) AND (NOT APPLE))
# To avoid linker error on Ubuntu 18.04 and others linux distributives we should
# link with freetype library, compiled as Position Independent Code (PIC),
# for example, with shared object.
if ((DEFINED FREETYPE_LIBRARY_RELEASE) AND (NOT "${FREETYPE_LIBRARY_RELEASE}" STREQUAL "") AND (EXISTS "${FREETYPE_LIBRARY_RELEASE}"))
string (REPLACE "\.a" "\.so" FREETYPE_LIBRARY_RELEASE "${FREETYPE_LIBRARY_RELEASE}")
endif()
endif()
# restore ENV{FREETYPE_DIR}
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
set (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR})
endif()
# check the found paths for consistency with specified 3RDPARTY_FREETYPE_DIR
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_ft2build FILEPATH "The directory containing ft2build.h header")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "The directory containing ftheader.h header")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_LIBRARY_RELEASE FILEPATH "freetype library")
endif()
endif()
# assign the found paths to corresponding 3RDPARTY_FREETYPE_ variables
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
if (FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${FREETYPE_INCLUDE_DIR_ft2build}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "${FREETYPE_INCLUDE_DIR_ft2build}" CACHE FILEPATH "The directory containing ft2build.h header" FORCE)
endif()
endif()
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
if (FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${FREETYPE_INCLUDE_DIR_freetype2}" CACHE FILEPATH "The directory containing ftheader.h header" FORCE)
endif()
endif()
if (BUILD_SHARED_LIBS)
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
if (FREETYPE_LIBRARY_RELEASE AND EXISTS "${FREETYPE_LIBRARY_RELEASE}")
set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY_RELEASE}" CACHE FILEPATH "The path to freetype library" FORCE)
endif()
endif()
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library" FORCE)
endif()
endif()
# In case of MinGW some libraries can have .dll.a extension, so we should check it and use instead of .a
if (MINGW AND 3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
string (REPLACE ".a" ".dll.a" 3RDPARTY_FREETYPE_LIBRARY_TEST "${3RDPARTY_FREETYPE_LIBRARY}")
if (EXISTS "${3RDPARTY_FREETYPE_LIBRARY_TEST}")
set (3RDPARTY_FREETYPE_LIBRARY "${3RDPARTY_FREETYPE_LIBRARY_TEST}" CACHE FILEPATH "The path to freetype library" FORCE)
endif()
endif()
endif()
# freetype library
if (FREETYPE_LIBRARY AND EXISTS "${FREETYPE_LIBRARY}")
if (NOT 3RDPARTY_FREETYPE_LIBRARY)
set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY}" CACHE FILEPATH "freetype library" FORCE)
endif()
# the SECOND step in search for freetype library and header folders (additional search algorithms)
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE FILEPATH "The directory containing freetype library" FORCE)
endif()
# ft2build.h
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
set (FT2BUILD_NAMES ft2build.h config/ft2build.h freetype/config/ft2build.h)
if (WIN32)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
# set 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build-NOTFOUND" CACHE FILEPATH "The directory containing ft2build.h header" FORCE)
if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (FREETYPE_LIBRARY_PARENT_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" PATH) # parent of the library directory
set (3RDPARTY_FREETYPE_DLL "3RDPARTY_FREETYPE_DLL-NOTFOUND" CACHE FILEPATH "freetype shared library" FORCE)
find_library (3RDPARTY_FREETYPE_DLL freetype PATHS "${FREETYPE_LIBRARY_PARENT_DIR}/bin" NO_DEFAULT_PATH)
endif()
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE FILEPATH "The directory containing freetype shared library" FORCE)
endif()
# cmake (version < 3.0) doesn't find ft2build.h of freetype (version is >= 2.5.1)
# do search taking into account freetype structure of 2.5.1 version
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build NAMES ${FT2BUILD_NAMES}
PATHS ${3RDPARTY_FREETYPE_DIR}
PATH_SUFFIXES include freetype2 include/freetype2
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build NAMES ${FT2BUILD_NAMES}
PATHS /usr/X11R6 /usr/local/X11R6 /usr/local/X11 /usr/freeware
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (NOT 3RDPARTY_FREETYPE_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE FILEPATH "The directory containing freetype library" FORCE)
endif()
if (WIN32)
if (NOT 3RDPARTY_FREETYPE_DLL_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE FILEPATH "The directory containing shared freetype library" FORCE)
endif()
endif()
# include found paths to common variables
if (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
if (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "" CACHE FILEPATH "The directory containing ft2build.h header" FORCE)
endif()
if (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
# ftheader.h
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
set (FTHEADER_NAMES ftheader.h config/ftheader.h freetype/config/ftheader.h)
# set 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2-NOTFOUND" CACHE FILEPATH "The directory containing ftheader.h header" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 NAMES ${FTHEADER_NAMES}
HINTS ${3RDPARTY_FREETYPE_DIR}
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 NAMES ${FTHEADER_NAMES}
PATHS /usr/X11R6 /usr/local/X11R6 /usr/local/X11 /usr/freeware
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "" CACHE FILEPATH "The directory containing ftheader.h header" FORCE)
endif()
if (3RDPARTY_FREETYPE_LIBRARY)
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_LIBRARY_DIR)
endif()
# freetype library
#if (BUILD_SHARED_LIBS)
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
if (WIN32)
if (3RDPARTY_FREETYPE_DLL OR EXISTS "${3RDPARTY_FREETYPE_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FREETYPE_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_DLL_DIR)
set (FREETYPE_PATH_SUFFIXES lib)
if (ANDROID)
set (FREETYPE_PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES} libs/${ANDROID_ABI})
endif()
# set 3RDPARTY_FREETYPE_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_LIBRARY
set (3RDPARTY_FREETYPE_LIBRARY "3RDPARTY_FREETYPE_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to freetype library" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_library (3RDPARTY_FREETYPE_LIBRARY ${CSF_FREETYPE}
PATHS "${3RDPARTY_FREETYPE_LIBRARY_DIR}" "${3RDPARTY_FREETYPE_DIR}"
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FREETYPE_LIBRARY ${CSF_FREETYPE}
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
# Only for UNIX (not APPLE)
if ((NOT WIN32) AND (NOT APPLE))
# To avoid linker error on Ubuntu 18.04 and some others linux distributives we should
# link with freetype library, compiled as Position Independent Code (PIC),
# for example, with shared object.
if ((DEFINED 3RDPARTY_FREETYPE_LIBRARY) AND (NOT "${3RDPARTY_FREETYPE_LIBRARY}" STREQUAL "") AND (EXISTS "${3RDPARTY_FREETYPE_LIBRARY}"))
string (REPLACE "\.a" "\.so" 3RDPARTY_FREETYPE_LIBRARY "${3RDPARTY_FREETYPE_LIBRARY}")
endif()
endif()
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library" FORCE)
endif()
endif()
endif()
if (INSTALL_FREETYPE)
if (3RDPARTY_FREETYPE_LIBRARY_DIR AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_FREETYPE_LIBRARY_DIR)
OCCT_MAKE_OS_WITH_BITNESS()
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "The path to freetype library" FORCE)
endif()
# freetype shared library
if (WIN32)
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
else()
get_filename_component(ABS_PATH ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
get_filename_component(FREETYPELIB ${3RDPARTY_FREETYPE_LIBRARY} NAME)
if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
install (FILES "${ABS_PATH}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${FREETYPELIB}.6)
install (FILES "${ABS_PATH}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${FREETYPELIB}.6)
install (FILES "${ABS_PATH}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${FREETYPELIB}.6)
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
# set 3RDPARTY_FREETYPE_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_DLL
set (3RDPARTY_FREETYPE_DLL "3RDPARTY_FREETYPE_DLL-NOTFOUND" CACHE FILEPATH "The path to freetype shared library" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_library (3RDPARTY_FREETYPE_DLL ${CSF_FREETYPE}
PATHS "${3RDPARTY_FREETYPE_DIR}"
PATH_SUFFIXES bin
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FREETYPE_DLL ${CSF_FREETYPE}
PATH_SUFFIXES bin)
endif()
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library" FORCE)
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
endif()
endif()
if (3RDPARTY_FREETYPE_DLL_DIR OR EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FREETYPE_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_FREETYPE_DLL_DIR)
endif()
endif()
set (USED_3RDPARTY_FREETYPE_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_DLL_DIR})
# install instructions
if (INSTALL_FREETYPE)
OCCT_MAKE_OS_WITH_BITNESS()
if (WIN32)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_ABS ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_NAME ${3RDPARTY_FREETYPE_LIBRARY} NAME)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
DESTINATION "${INSTALL_DIR_LIB}"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
else()
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
endif()
endif()
set (USED_3RDPARTY_FREETYPE_DIR "")
else()
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_LIBRARY_DIR})
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_DLL_DIR})
else()
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_LIBRARY_DIR})
endif()
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)
OCCT_CHECK_AND_UNSET(FREETYPE_LIBRARY_RELEASE)
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
if (BUILD_SHARED_LIBS)
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
else()
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_DLL)
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_DLL_DIR)
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_LIBRARY)
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_LIBRARY_DIR)
OCCT_CHECK_AND_UNSET(INSTALL_FREETYPE)
endif()

View File

@@ -1,3 +0,0 @@
#GL2PS
THIRDPARTY_PRODUCT("GL2PS" "gl2ps.h" "gl2ps" "gl2psd")

3
adm/cmake/gles2.cmake Normal file
View File

@@ -0,0 +1,3 @@
# OpenGL ES 2.0
THIRDPARTY_PRODUCT("GLES2" "GLES2/gl2.h" "CSF_OpenGlesLibs" "")

View File

@@ -1,3 +1,4 @@
# glx
THIRDPARTY_PRODUCT("GLX" "GL/glx.h" "GL" "GLd")
separate_arguments (CSF_OpenGlLibs)
THIRDPARTY_PRODUCT("GLX" "GL/glx.h" "CSF_OpenGlLibs" "d")

170
adm/cmake/jemalloc.cmake Normal file
View File

@@ -0,0 +1,170 @@
# JeMalloc
function (JEMALLOC_LIB_SEARCH MMGR_LIB PREFIX)
if (NOT 3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB})
set (JEMALLOC_PATH_SUFFIXES "lib" "bin")
set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}-NOTFOUND")
if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}")
find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB}
PATHS "${3RDPARTY_JEMALLOC_LIBRARY_DIR}" "${3RDPARTY_JEMALLOC_DIR}"
PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB}
PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB})
get_filename_component (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}}" PATH)
set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}")
else()
set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "")
endif()
endif()
if (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB})
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}" PARENT_SCOPE)
set (3RDPARTY_JEMALLOC_LIBRARY_DIR "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}" CACHE PATH "The directory containing JEMALLOC libraries" FORCE)
elseif("${PREFIX}" STREQUAL "SHARED")
return()
else()
message(STATUS "Cannot find ${MMGR_LIB} library in jemalloc 3rdparty")
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} PARENT_SCOPE)
set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "" PARENT_SCOPE)
endif()
set(JEMALLOC_IS_STATIC_LIB FALSE)
if ("${PREFIX}" STREQUAL "STATIC")
set(JEMALLOC_IS_STATIC_LIB TRUE)
endif()
if (${JEMALLOC_IS_STATIC_LIB})
set (OLD_CSF_MMGR ${CSF_MMGR})
list (APPEND OLD_CSF_MMGR "${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}}")
set (CSF_MMGR "${OLD_CSF_MMGR}" PARENT_SCOPE)
endif()
# install instructions
if (INSTALL_JEMALLOC AND NOT JEMALLOC_IS_STATIC_LIB)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
get_filename_component(3RDPARTY_JEMALLOC_LIBRARY ${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} REALPATH)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
else()
install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
CONFIGURATIONS Debug
DESTINATION "${JEMALLOC_INSTALL_DESTINATION}d")
install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
CONFIGURATIONS Release
DESTINATION "${JEMALLOC_INSTALL_DESTINATION}")
install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${JEMALLOC_INSTALL_DESTINATION}i")
endif()
set (USED_3RDPARTY_JEMALLOC_DIR "" PARENT_SCOPE)
elseif(NOT JEMALLOC_IS_STATIC_LIB)
# the library directory for using by the executable
set (USED_3RDPARTY_JEMALLOC_DIR ${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}} PARENT_SCOPE)
endif()
unset(3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} CACHE)
unset(3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} CACHE)
endfunction()
macro (SEARCH_JEMALLOC)
# find static jemalloc lib
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".lib" ".a")
if (WIN32)
JEMALLOC_LIB_SEARCH ("jemalloc" "STATIC")
elseif(NOT WIN32)
JEMALLOC_LIB_SEARCH ("jemalloc_pic" "STATIC")
SET(CMAKE_FIND_LIBRARY_SUFFIXES "" "so")
JEMALLOC_LIB_SEARCH ("jemalloc.so.2" "SHARED")
endif()
# find shared jemalloc lib
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".so")
JEMALLOC_LIB_SEARCH ("jemalloc" "SHARED")
endmacro()
# Reset CSF variable
set (CSF_MMGR "")
# vcpkg processing
if (BUILD_USE_VCPKG)
set (3RDPARTY_JEMALLOC_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}")
OCCT_CHECK_AND_UNSET_GROUP (3RDPARTY_JEMALLOC_LIBRARY_SHARED)
OCCT_CHECK_AND_UNSET_GROUP (3RDPARTY_JEMALLOC_LIBRARY_STATIC)
SEARCH_JEMALLOC()
list (APPEND 3RDPARTY_INCLUDE_DIRS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/jemalloc")
return()
endif()
if (NOT DEFINED INSTALL_JEMALLOC)
set (INSTALL_JEMALLOC OFF CACHE BOOL "${INSTALL_INSTALL_JEMALLOC_DESCR}")
endif()
# include occt macros. compiler_bitness, os_with_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify JEMALLOC folder in connection with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_JEMALLOC_DIR OR NOT EXISTS "${3RDPARTY_JEMALLOC_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" jemalloc JEMALLOC_DIR_NAME)
if (JEMALLOC_DIR_NAME)
set (3RDPARTY_JEMALLOC_DIR "${3RDPARTY_DIR}/${JEMALLOC_DIR_NAME}" CACHE PATH "The directory containing JEMALLOC" FORCE)
set (3RDPARTY_JEMALLOC_DIR "${3RDPARTY_DIR}/${JEMALLOC_DIR_NAME}")
message(STATUS "Info: JEMALLOC detected in ${3RDPARTY_JEMALLOC_DIR}")
endif()
endif()
else()
endif()
# define required JEMALLOC variables
if (NOT DEFINED 3RDPARTY_JEMALLOC_INCLUDE_DIR)
set (3RDPARTY_JEMALLOC_INCLUDE_DIR "" CACHE PATH "the path of headers directory")
endif()
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_JEMALLOC_DIR 3RDPARTY_JEMALLOC_INCLUDE_DIR PATH "the path to JEMALLOC")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_JEMALLOC_DIR 3RDPARTY_JEMALLOC_LIBRARY_DIR FILEPATH "The directory containing JEMALLOC libraries")
endif()
# header
if (NOT 3RDPARTY_JEMALLOC_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}")
set (HEADER_NAMES jemalloc.h)
# set 3RDPARTY_JEMALLOC_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_JEMALLOC_INCLUDE_DIR
set (3RDPARTY_JEMALLOC_INCLUDE_DIR "3RDPARTY_JEMALLOC_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to header directory" FORCE)
if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}")
find_path (3RDPARTY_JEMALLOC_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_JEMALLOC_DIR}
PATH_SUFFIXES include/jemalloc
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_JEMALLOC_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_JEMALLOC_DIR}
PATH_SUFFIXES include/jemalloc
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_JEMALLOC_INCLUDE_DIR AND EXISTS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_JEMALLOC_INCLUDE_DIR)
set (3RDPARTY_JEMALLOC_INCLUDE_DIR "" CACHE FILEPATH "the path to jemalloc.h" FORCE)
endif()
# Installing destination path
if (WIN32)
set (JEMALLOC_INSTALL_DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
else()
set (JEMALLOC_INSTALL_DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
endif()
# find static jemalloc lib
SEARCH_JEMALLOC()

150
adm/cmake/occt_csf.cmake Normal file
View File

@@ -0,0 +1,150 @@
# CSF variables definition
if(CSFS_ALREADY_INCLUDED)
return()
endif()
set(CSFS_ALREADY_INCLUDED 1)
if (NOT DEFINED USE_TCL)
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
endif()
# TBB
if (USE_TBB)
set (CSF_TBB "tbb tbbmalloc")
else()
set (CSF_TBB)
endif()
# FREETYPE
if (USE_FREETYPE)
set (CSF_FREETYPE "freetype")
else()
set (CSF_FREETYPE)
endif()
# FFmpeg
if (USE_FFMPEG)
set (CSF_FFmpeg "avcodec avformat swscale avutil")
else()
set (CSF_FFmpeg)
endif()
# FREEIMAGE
if (USE_FREEIMAGE)
set (CSF_FreeImagePlus "freeimage")
else()
if (WIN32)
set (CSF_FreeImagePlus "windowscodecs")
else()
set (CSF_FreeImagePlus)
endif()
endif()
# OpenVR
if (USE_OPENVR)
set (CSF_OpenVR "openvr_api")
else()
set (CSF_OpenVR)
endif()
# TCL
if (USE_TCL)
if (WIN32)
set (CSF_TclLibs "tcl86")
else()
if(APPLE)
set (CSF_TclLibs Tcl)
elseif(UNIX)
set (CSF_TclLibs "tcl8.6")
endif()
endif()
endif()
# TK
if (USE_TK)
if (WIN32)
set (CSF_TclTkLibs "tk86")
else()
if(APPLE)
set (CSF_TclTkLibs Tk)
elseif(UNIX)
set (CSF_TclTkLibs "tk8.6")
endif()
endif()
endif()
# Draco
if (USE_DRACO)
set (CSF_Draco "draco")
else()
set (CSF_Draco)
endif()
if (WIN32)
set (CSF_advapi32 "advapi32.lib")
set (CSF_gdi32 "gdi32.lib")
set (CSF_user32 "user32.lib")
set (CSF_shell32 "shell32.lib")
set (CSF_wsock32 "wsock32.lib")
set (CSF_psapi "psapi.lib")
set (CSF_winmm "winmm.lib")
set (CSF_d3d9 "D3D9.lib")
set (CSF_OpenGlLibs "opengl32.lib")
set (CSF_OpenGlesLibs "libEGL libGLESv2")
else()
if (APPLE)
set (CSF_objc "objc")
# frameworks
if (IOS)
find_library (Appkit_LIB NAMES UIKit)
set (CSF_Appkit ${Appkit_LIB})
else()
find_library (Appkit_LIB NAMES AppKit)
set (CSF_Appkit ${Appkit_LIB})
endif()
OCCT_CHECK_AND_UNSET (Appkit_LIB)
find_library (IOKit_LIB NAMES IOKit)
set (CSF_IOKit ${IOKit_LIB})
OCCT_CHECK_AND_UNSET (IOKit_LIB)
if (IOS)
find_library (OpenGlesLibs_LIB NAMES OpenGLES)
set (CSF_OpenGlesLibs ${OpenGlesLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlesLibs_LIB)
elseif (USE_XLIB)
set (CSF_OpenGlLibs "GL")
set (CSF_XwLibs "X11")
else()
find_library (OpenGlLibs_LIB NAMES OpenGL)
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
endif()
elseif (EMSCRIPTEN)
set (CSF_ThreadLibs "pthread rt stdc++")
set (CSF_OpenGlesLibs "EGL GLESv2")
set (CSF_dl "dl")
elseif (ANDROID)
set (CSF_ThreadLibs "c")
set (CSF_OpenGlesLibs "EGL GLESv2")
set (CSF_androidlog "log")
elseif (UNIX)
set (CSF_ThreadLibs "pthread rt stdc++")
if (USE_XLIB)
set (CSF_OpenGlLibs "GL")
set (CSF_XwLibs "X11")
else()
set (CSF_OpenGlLibs "GL EGL")
endif()
set (CSF_OpenGlesLibs "EGL GLESv2")
set (CSF_dl "dl")
if (USE_FREETYPE)
set (CSF_fontconfig "fontconfig")
endif()
endif()
endif()

View File

@@ -1,70 +1,208 @@
##
if(FLAGS_ALREADY_INCLUDED)
return()
endif()
set(FLAGS_ALREADY_INCLUDED 1)
# force option /fp:precise for Visual Studio projects.
#
# Note that while this option is default for MSVC compiler, Visual Studio
# project can be switched later to use Intel Compiler (ICC).
# Enforcing -fp:precise ensures that in such case ICC will use correct
# option instead of its default -fp:fast which is harmful for OCCT.
if (MSVC)
add_definitions(/fp:precise)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:precise")
endif()
# set compiler short name and choose SSE2 option for appropriate MSVC compilers
# ONLY for 32-bit
# add SSE2 option for old MSVC compilers (VS 2005 - 2010, 32 bit only)
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
if (MSVC80 OR MSVC90 OR MSVC10)
add_definitions(/arch:SSE2)
if (MSVC AND ((MSVC_VERSION EQUAL 1400) OR (MSVC_VERSION EQUAL 1500) OR (MSVC_VERSION EQUAL 1600)))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE2")
endif()
endif()
add_definitions (-DCSFDB)
if (WIN32)
add_definitions (/DWNT -wd4996)
elseif (APPLE)
add_definitions (-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H)
if (MSVC)
# suppress C26812 on VS2019/C++20 (prefer 'enum class' over 'enum')
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise /wd\"26812\"")
# 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()
add_definitions (-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H -DLIN)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions")
if (NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
else()
add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
endif()
if (APPLE)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
endif()
add_definitions(-DOCC_CONVERT_SIGNALS)
endif()
# enable structured exceptions for MSVC
string (REGEX MATCH "EHsc" ISFLAG "${CMAKE_CXX_FLAGS}")
if (ISFLAG)
string (REGEX REPLACE "EHsc" "EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
elseif (WIN32)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -EHa")
elseif (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa")
endif()
if (MSVC)
if ("${BUILD_OPT_PROFILE}" STREQUAL "Production")
# string pooling (GF), function-level linking (Gy)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GF /Gy")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GF /Gy")
# Favor fast code (Ot), Omit frame pointers (Oy)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ot /Oy")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Ot /Oy")
# Whole Program Optimisation (GL), Enable intrinsic functions (Oi)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL /Oi")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GL /Oi")
# Link-Time Code Generation(LTCG) is requared for Whole Program Optimisation(GL)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG")
endif()
if (BUILD_FORCE_RelWithDebInfo)
# generate debug info (Zi), inline expansion level (Ob1)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi /Ob1")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zi /Ob1")
# generate debug info (debug), OptimizeReferences=true (OPT:REF), EnableCOMDATFolding=true (OPT:ICF)
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /debug /OPT:REF /OPT:ICF")
endif()
endif()
# remove _WINDOWS flag if it exists
string (REGEX MATCH "/D_WINDOWS" IS_WINDOWSFLAG "${CMAKE_CXX_FLAGS}")
if (IS_WINDOWSFLAG)
message (STATUS "Info: /D_WINDOWS has been removed from CMAKE_CXX_FLAGS")
string (REGEX REPLACE "/D_WINDOWS" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
# remove WIN32 flag if it exists
string (REGEX MATCH "/DWIN32" IS_WIN32FLAG "${CMAKE_CXX_FLAGS}")
if (IS_WIN32FLAG)
message (STATUS "Info: /DWIN32 has been removed from CMAKE_CXX_FLAGS")
string (REGEX REPLACE "/DWIN32" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
# remove _WINDOWS flag if it exists
string (REGEX MATCH "/D_WINDOWS" IS_WINDOWSFLAG "${CMAKE_C_FLAGS}")
if (IS_WINDOWSFLAG)
message (STATUS "Info: /D_WINDOWS has been removed from CMAKE_C_FLAGS")
string (REGEX REPLACE "/D_WINDOWS" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif()
# remove WIN32 flag if it exists
string (REGEX MATCH "/DWIN32" IS_WIN32FLAG "${CMAKE_C_FLAGS}")
if (IS_WIN32FLAG)
message (STATUS "Info: /DWIN32 has been removed from CMAKE_C_FLAGS")
string (REGEX REPLACE "/DWIN32" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif()
# remove DEBUG flag if it exists
string (REGEX MATCH "-DDEBUG" IS_DEBUG_CXX "${CMAKE_CXX_FLAGS_DEBUG}")
if (IS_DEBUG_CXX)
message (STATUS "-DDEBUG has been removed from CMAKE_CXX_FLAGS_DEBUG")
message (STATUS "Info: -DDEBUG has been removed from CMAKE_CXX_FLAGS_DEBUG")
string (REGEX REPLACE "-DDEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
endif()
string (REGEX MATCH "-DDEBUG" IS_DEBUG_C "${CMAKE_C_FLAGS_DEBUG}")
if (IS_DEBUG_C)
message (STATUS "-DDEBUG has been removed from CMAKE_C_FLAGS_DEBUG")
message (STATUS "Info: -DDEBUG has been removed from CMAKE_C_FLAGS_DEBUG")
string (REGEX REPLACE "-DDEBUG" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
endif()
# enable parallel compilation on MSVC 9 and above
if (MSVC AND NOT MSVC70 AND NOT MSVC80)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -MP")
if (MSVC AND (MSVC_VERSION GREATER 1400))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
# generate a single response file which enlist all of the object files
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
# increase compiler warnings level (-W4 for MSVC, -Wall for GCC)
if (NOT DEFINED CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS)
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
endif()
if (NOT DEFINED CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS)
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
endif()
# increase compiler warnings level (-W4 for MSVC, -Wextra for GCC)
if (MSVC)
if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string (REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
if ("${BUILD_OPT_PROFILE}" STREQUAL "Production")
# /Ot (favor speed over size) is similar to -O2 or -O3 in GCC/Clang.
# /Oy (omit frame pointers) is similar to -fomit-frame-pointer in GCC/Clang.
# /GL (whole program optimization) is similar to -flto (Link Time Optimization) in GCC/Clang.
# /GF (eliminate duplicate strings) doesn't have a direct equivalent in GCC/Clang, but the compilers do string pooling automatically.
# /Gy (enable function-level linking) is similar to -ffunction-sections in GCC/Clang.
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -fomit-frame-pointer -flto -ffunction-sections")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -fomit-frame-pointer -flto -ffunction-sections")
# Link-Time Code Generation(LTCG) is requared for Whole Program Optimisation(GL)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -flto")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -flto")
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} -flto")
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -flto")
if (NOT WIN32)
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -Wl,--gc-sections")
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} -Wl,--gc-sections")
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -Wl,--gc-sections")
endif()
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32")
endif()
if (BUILD_SHARED_LIBS)
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}")
endif()
endif()
endif()
if (DEFINED CMAKE_COMPILER_IS_GNUCXX OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
if (APPLE)
# CLang can be used with both libstdc++ and libc++, however on OS X libstdc++ is outdated.
set (CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
endif()
if (NOT WIN32)
# Optimize size of binaries
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
endif()
endif()
if(MINGW)
add_definitions(-D_WIN32_WINNT=0x0601)
# _WIN32_WINNT=0x0601 (use Windows 7 SDK)
#set (CMAKE_SYSTEM_VERSION "6.1")
# workaround bugs in mingw with vtable export
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wattributes")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wattributes")
endif()
if (CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
# Optimize size of binaries
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
endif()
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEB")
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEB")
if (BUILD_RELEASE_DISABLE_EXCEPTIONS)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
endif()

View File

@@ -1,24 +1,58 @@
#
##
if(OCCT_MACROS_ALREADY_INCLUDED)
return()
endif()
set(OCCT_MACROS_ALREADY_INCLUDED 1)
macro (OCCT_CHECK_AND_UNSET VARNAME)
if (DEFINED ${VARNAME})
unset (${VARNAME} CACHE)
endif()
endmacro()
macro (OCCT_CHECK_AND_UNSET_GROUP VARNAME)
OCCT_CHECK_AND_UNSET ("${VARNAME}_DIR")
OCCT_CHECK_AND_UNSET ("${VARNAME}_INCLUDE_DIR")
OCCT_CHECK_AND_UNSET ("${VARNAME}_LIBRARY")
OCCT_CHECK_AND_UNSET ("${VARNAME}_LIBRARY_DIR")
if (WIN32)
OCCT_CHECK_AND_UNSET ("${VARNAME}_DLL")
OCCT_CHECK_AND_UNSET ("${VARNAME}_DLL_DIR")
endif()
macro (OCCT_CHECK_AND_UNSET_GROUP GROUPNAME)
get_cmake_property(VARS VARIABLES)
string (REGEX MATCHALL "(^|;)${GROUPNAME}[A-Za-z0-9_]*" GROUPNAME_VARS "${VARS}")
foreach(GROUPNAME_VAR ${GROUPNAME_VARS})
OCCT_CHECK_AND_UNSET(${GROUPNAME_VAR})
endforeach()
endmacro()
macro (OCCT_CHECK_AND_UNSET_INSTALL_DIR_SUBDIRS)
OCCT_CHECK_AND_UNSET (INSTALL_DIR_BIN)
OCCT_CHECK_AND_UNSET (INSTALL_DIR_SCRIPT)
OCCT_CHECK_AND_UNSET (INSTALL_DIR_LIB)
OCCT_CHECK_AND_UNSET (INSTALL_DIR_INCLUDE)
OCCT_CHECK_AND_UNSET (INSTALL_DIR_RESOURCE)
OCCT_CHECK_AND_UNSET (INSTALL_DIR_DATA)
OCCT_CHECK_AND_UNSET (INSTALL_DIR_SAMPLES)
OCCT_CHECK_AND_UNSET (INSTALL_DIR_TESTS)
OCCT_CHECK_AND_UNSET (INSTALL_DIR_DOC)
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}")
file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
endif()
set (${FILE_CONTENT} ${LOCAL_FILE_CONTENT} PARENT_SCOPE)
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}")
set (${RESULT_PATH} "${CMAKE_SOURCE_DIR}/${FILE_OR_FOLDER_NAME}" PARENT_SCOPE)
else()
set (${RESULT_PATH} "" PARENT_SCOPE)
endif()
endfunction()
# COMPILER_BITNESS variable
macro (OCCT_MAKE_COMPILER_BITNESS)
math (EXPR COMPILER_BITNESS "32 + 32*(${CMAKE_SIZEOF_VOID_P}/8)")
@@ -41,28 +75,35 @@ endmacro()
# COMPILER variable
macro (OCCT_MAKE_COMPILER_SHORT_NAME)
if (MSVC)
if (MSVC70)
if ((MSVC_VERSION EQUAL 1300) OR (MSVC_VERSION EQUAL 1310))
set (COMPILER vc7)
elseif (MSVC80)
elseif (MSVC_VERSION EQUAL 1400)
set (COMPILER vc8)
elseif (MSVC90)
elseif (MSVC_VERSION EQUAL 1500)
set (COMPILER vc9)
elseif (MSVC10)
elseif (MSVC_VERSION EQUAL 1600)
set (COMPILER vc10)
elseif (MSVC11)
elseif (MSVC_VERSION EQUAL 1700)
set (COMPILER vc11)
elseif (MSVC12)
elseif (MSVC_VERSION EQUAL 1800)
set (COMPILER vc12)
elseif (MSVC14)
elseif (MSVC_VERSION EQUAL 1900)
set (COMPILER vc14)
elseif ((MSVC_VERSION GREATER 1900) AND (MSVC_VERSION LESS 2000))
# Since Visual Studio 15 (2017), its version diverged from version of
# compiler which is 14.1; as that compiler uses the same run-time as 14.0,
# we keep its id as "vc14" to be compatibille
set (COMPILER vc14)
else()
message (FATAL_ERROR "Unrecognized MSVC_VERSION")
endif()
elseif (DEFINED CMAKE_COMPILER_IS_GNUCC)
set (COMPILER gcc)
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
set (COMPILER gxx)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
set (COMPILER clang)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Ii][Nn][Tt][Ee][Ll]")
set (COMPILER icc)
else()
set (COMPILER ${CMAKE_GENERATOR})
@@ -82,40 +123,84 @@ function (SUBDIRECTORY_NAMES MAIN_DIRECTORY RESULT)
set (${RESULT} ${LOCAL_RESULT} PARENT_SCOPE)
endfunction()
function (FIND_SUBDIRECTORY ROOT_DIRECTORY DIRECTORY_SUFFIX SUBDIRECTORY_NAME)
#message("Trying to find directory with suffix ${DIRECTORY_SUFFIX} in ${ROOT_DIRECTORY}")
SUBDIRECTORY_NAMES ("${ROOT_DIRECTORY}" SUBDIR_NAME_LIST)
#message("Subdirectories: ${SUBDIR_NAME_LIST}")
#set(${SUBDIRECTORY_NAME} "${SUBDIR_NAME_LIST}" PARENT_SCOPE)
foreach (SUBDIR_NAME ${SUBDIR_NAME_LIST})
#message("Subdir: ${SUBDIR_NAME}, ${DIRECTORY_SUFFIX}")
# REGEX failed if the directory name contains '++' combination, so we replace it
string(REPLACE "+" "\\+" SUBDIR_NAME_ESCAPED ${SUBDIR_NAME})
string (REGEX MATCH "${SUBDIR_NAME_ESCAPED}" DOES_PATH_CONTAIN "${DIRECTORY_SUFFIX}")
if (DOES_PATH_CONTAIN)
set(${SUBDIRECTORY_NAME} "${ROOT_DIRECTORY}/${SUBDIR_NAME}" PARENT_SCOPE)
#message("Subdirectory is found: ${SUBDIRECTORY_NAME}")
BREAK()
else()
#message("Check directory: ${ROOT_DIRECTORY}/${SUBDIR_NAME}")
FIND_SUBDIRECTORY ("${ROOT_DIRECTORY}/${SUBDIR_NAME}" "${DIRECTORY_SUFFIX}" SUBDIR_REC_NAME)
if (NOT "${SUBDIR_REC_NAME}" STREQUAL "")
set(${SUBDIRECTORY_NAME} "${SUBDIR_REC_NAME}" PARENT_SCOPE)
#message("Subdirectory is found: ${SUBDIRECTORY_NAME}")
BREAK()
endif()
endif()
endforeach()
endfunction()
function (OCCT_ORIGIN_AND_PATCHED_FILES RELATIVE_PATH SEARCH_TEMPLATE RESULT)
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}")
file (GLOB FOUND_FILES "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
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 (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}")
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 (EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}/${ORIGIN_FILE_NAME}")
continue()
if (NOT EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}/${ORIGIN_FILE_NAME}")
list (APPEND FOUND_FILES ${ORIGIN_FILE})
endif()
endif()
# append origin version if patched one is not found
list (APPEND FOUND_FILES ${ORIGIN_FILE})
endforeach()
set (${RESULT} ${FOUND_FILES} PARENT_SCOPE)
endfunction()
function (FILLUP_PRODUCT_SEARCH_TEMPLATE PRODUCT_NAME COMPILER COMPILER_BITNESS SEARCH_TEMPLATES)
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*${COMPILER}.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "^[a-zA-Z]*[0-9]*-${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+")
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*")
set (SEARCH_TEMPLATES ${SEARCH_TEMPLATES} PARENT_SCOPE)
endfunction()
function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_COMPILER_BITNESS()
string (TOLOWER "${PRODUCT_NAME}" lower_PRODUCT_NAME)
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*${COMPILER}.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER_BITNESS}")
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+")
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}")
if ("${lower_PRODUCT_NAME}" STREQUAL "egl")
string (SUBSTRING "${lower_PRODUCT_NAME}" 1 -1 lower_PRODUCT_NAME)
list (APPEND SEARCH_TEMPLATES "[^gl]+${lower_PRODUCT_NAME}.*")
elseif ("${lower_PRODUCT_NAME}" STREQUAL "tbb")
list (APPEND SEARCH_TEMPLATES "^.*${lower_PRODUCT_NAME}.*")
else()
FILLUP_PRODUCT_SEARCH_TEMPLATE(${lower_PRODUCT_NAME} ${COMPILER} ${COMPILER_BITNESS} SEARCH_TEMPLATES)
if (WIN32 AND "${COMPILER}" STREQUAL "clang")
# for clang on Windows, search for "vc" as well
FILLUP_PRODUCT_SEARCH_TEMPLATE(${lower_PRODUCT_NAME} "vc" ${COMPILER_BITNESS} SEARCH_TEMPLATES)
endif()
endif()
SUBDIRECTORY_NAMES ("${ROOT_DIR}" SUBDIR_NAME_LIST)
@@ -135,23 +220,21 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
endforeach()
if (LOCAL_RESULT)
list (LENGTH "${LOCAL_RESULT}" LOC_LEN)
math (EXPR LAST_ELEMENT_INDEX "${LOC_LEN}-1")
list (GET LOCAL_RESULT ${LAST_ELEMENT_INDEX} DUMMY)
list (GET LOCAL_RESULT -1 DUMMY)
set (${RESULT} ${DUMMY} PARENT_SCOPE)
endif()
endfunction()
macro (OCCT_INSTALL_FILE_OR_DIR BEING_INSTALLED_OBJECT DESTINATION_PATH)
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}")
if (IS_DIRECTORY "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}")
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 "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
install (DIRECTORY "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
else()
install (FILES "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
install (FILES "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
endif()
else()
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}")
@@ -163,8 +246,8 @@ macro (OCCT_INSTALL_FILE_OR_DIR BEING_INSTALLED_OBJECT DESTINATION_PATH)
endmacro()
macro (OCCT_CONFIGURE_AND_INSTALL BEING_CONGIRUGED_FILE BUILD_NAME INSTALL_NAME DESTINATION_PATH)
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}")
configure_file("${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
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()
@@ -172,58 +255,219 @@ macro (OCCT_CONFIGURE_AND_INSTALL BEING_CONGIRUGED_FILE BUILD_NAME INSTALL_NAME
install(FILES "${OCCT_BINARY_DIR}/${BUILD_NAME}" DESTINATION "${DESTINATION_PATH}" RENAME ${INSTALL_NAME})
endmacro()
macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOOLKITS)
set (OCCT_SOURCE_DIRS)
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}")
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}")
endfunction()
function (EXTRACT_PACKAGE_FILES RELATIVE_PATH OCCT_PACKAGE RESULT_FILES RESULT_INCLUDE_FOLDER)
# 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 "")
get_property(OCCT_PACKAGE_FILES GLOBAL PROPERTY OCCT_PACKAGE_${RELATIVE_PATH}_${OCCT_PACKAGE}_FILES)
get_property(OCCT_PACKAGE_INCLUDE_DIR GLOBAL PROPERTY OCCT_PACKAGE_${RELATIVE_PATH}_${OCCT_PACKAGE}_INCLUDE_DIR)
if (OCCT_PACKAGE_FILES)
set (${RESULT_FILES} ${OCCT_PACKAGE_FILES} PARENT_SCOPE)
set (${RESULT_INCLUDE_FOLDER} ${OCCT_PACKAGE_INCLUDE_DIR} PARENT_SCOPE)
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()
# collect and searach for the files in the package directory or patached 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()
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()
endif()
set (${RESULT_FILES} ${FILE_PATH_LIST} PARENT_SCOPE)
set (${RESULT_INCLUDE_FOLDER} ${OCCT_PACKAGE_INCLUDE_DIR} PARENT_SCOPE)
set_property(GLOBAL PROPERTY OCCT_PACKAGE_${RELATIVE_PATH}_${OCCT_PACKAGE}_FILES "${FILE_PATH_LIST}")
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)
set (OCCT_TOOLKIT_DEPS "")
set (OCCT_TOOLKIT_INCLUDE_FOLDERS "")
get_property(OCCT_TOOLKIT_DEPS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_DEPS)
get_property(OCCT_TOOLKIT_INCLUDE_FOLDERS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_INCLUDE_FOLDERS)
if (OCCT_TOOLKIT_DEPS)
set (${RESULT_TKS_AS_DEPS} ${OCCT_TOOLKIT_DEPS} PARENT_SCOPE)
set (${RESULT_INCLUDE_FOLDERS} ${OCCT_TOOLKIT_INCLUDE_FOLDERS} PARENT_SCOPE)
return()
endif()
set (EXTERNAL_LIBS)
EXTRACT_TOOLKIT_EXTERNLIB (${RELATIVE_PATH} ${OCCT_TOOLKIT} EXTERNAL_LIBS)
foreach (EXTERNAL_LIB ${EXTERNAL_LIBS})
string (REGEX MATCH "^TK" TK_FOUND ${EXTERNAL_LIB})
if (TK_FOUND)
list (APPEND OCCT_TOOLKIT_DEPS ${EXTERNAL_LIB})
endif()
endforeach()
set (OCCT_TOOLKIT_PACKAGES)
EXTRACT_TOOLKIT_PACKAGES (${RELATIVE_PATH} ${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)
list (APPEND OCCT_TOOLKIT_INCLUDE_FOLDERS ${OCCT_PACKAGE_INCLUDE_DIR})
endforeach()
set (${RESULT_TKS_AS_DEPS} ${OCCT_TOOLKIT_DEPS} PARENT_SCOPE)
set (${RESULT_INCLUDE_FOLDERS} ${OCCT_TOOLKIT_INCLUDE_FOLDERS} PARENT_SCOPE)
set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_DEPS "${OCCT_TOOLKIT_DEPS}")
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)
set (OCCT_TOOLKIT_DEPS "")
set (OCCT_TOOLKIT_INCLUDE_FOLDERS "")
get_property(OCCT_TOOLKIT_DEPS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_FULL_DEPS)
get_property(OCCT_TOOLKIT_INCLUDE_FOLDERS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_FULL_INCLUDE_FOLDERS)
if (OCCT_TOOLKIT_DEPS)
set (${RESULT_TKS_AS_DEPS} ${OCCT_TOOLKIT_DEPS} PARENT_SCOPE)
set (${RESULT_INCLUDE_FOLDERS} ${OCCT_TOOLKIT_INCLUDE_FOLDERS} PARENT_SCOPE)
return()
endif()
EXCTRACT_TOOLKIT_DEPS(${RELATIVE_PATH} ${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)
list(APPEND OCCT_TOOLKIT_FULL_DEPS ${DEP_TOOLKIT_DEPS})
list(APPEND OCCT_TOOLKIT_INCLUDE_FOLDERS ${DEP_INCLUDE_DIRS})
endforeach()
list(REMOVE_DUPLICATES OCCT_TOOLKIT_FULL_DEPS)
list(REMOVE_DUPLICATES OCCT_TOOLKIT_INCLUDE_FOLDERS)
set (${RESULT_TKS_AS_DEPS} ${OCCT_TOOLKIT_FULL_DEPS} PARENT_SCOPE)
set (${RESULT_INCLUDE_FOLDERS} ${OCCT_TOOLKIT_INCLUDE_FOLDERS} PARENT_SCOPE)
set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_FULL_DEPS "${OCCT_TOOLKIT_FULL_DEPS}")
set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_FULL_INCLUDE_FOLDERS "${OCCT_TOOLKIT_INCLUDE_FOLDERS}")
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}")
file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
endif()
set (${FILE_CONTENT} ${LOCAL_FILE_CONTENT} PARENT_SCOPE)
endfunction()
function (COLLECT_AND_INSTALL_OCCT_HEADER_FILES THE_ROOT_TARGET_OCCT_DIR THE_OCCT_BUILD_TOOLKITS THE_RELATIVE_PATH THE_OCCT_INSTALL_DIR_PREFIX)
set (OCCT_USED_PACKAGES)
# consider patched header.in template
set (TEMPLATE_HEADER_PATH "${CMAKE_SOURCE_DIR}/adm/templates/header.in")
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/header.in")
set (TEMPLATE_HEADER_PATH "${APPLY_OCCT_PATCH_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 (ROOT_OCCT_DIR ${CMAKE_SOURCE_DIR})
foreach (OCCT_USED_TOOLKIT ${OCCT_BUILD_TOOLKITS})
# append parent folder
list (APPEND OCCT_SOURCE_DIRS ${OCCT_USED_TOOLKIT})
# append all required package folders
set (OCCT_USED_TOOLKIT_DEPS)
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_USED_TOOLKIT_DEPS)
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_USED_TOOLKIT_DEPS)
endif()
foreach (OCCT_USED_TOOLKIT_DEP ${OCCT_USED_TOOLKIT_DEPS})
list (APPEND OCCT_SOURCE_DIRS ${OCCT_USED_TOOLKIT_DEP})
set (OCCT_HEADER_FILES_COMPLETE)
foreach(OCCT_TOOLKIT ${THE_OCCT_BUILD_TOOLKITS})
# parse PACKAGES file
EXTRACT_TOOLKIT_PACKAGES (${THE_RELATIVE_PATH} ${OCCT_TOOLKIT} USED_PACKAGES)
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 (APPEND OCCT_HEADER_FILES_COMPLETE ${HEADER_FILES_FILTERING})
endforeach()
endforeach()
foreach (OCCT_SOURCE_DIR ${OCCT_SOURCE_DIRS})
# get all header files from each src folder
file (GLOB OCCT_HEADER_FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_SOURCE_DIR}/*.[hgl]xx" "${CMAKE_SOURCE_DIR}/src/${OCCT_SOURCE_DIR}/*.h")
install (FILES ${OCCT_HEADER_FILES} DESTINATION "${INSTALL_DIR}/inc")
# Check that copying is done and match the include installation type.
# Check by first file in list.
list(GET OCCT_HEADER_FILES_COMPLETE 0 FIRST_OCCT_HEADER_FILE)
get_filename_component (FIRST_OCCT_HEADER_FILE ${FIRST_OCCT_HEADER_FILE} NAME)
set (TO_FORCE_COPY FALSE)
if (NOT EXISTS "${THE_ROOT_TARGET_OCCT_DIR}/${THE_OCCT_INSTALL_DIR_PREFIX}/${FIRST_OCCT_HEADER_FILE}")
set (TO_FORCE_COPY TRUE)
else()
# get content and check the number of lines inside file.
# If more then 1 then it is a symlink.
file (STRINGS "${THE_ROOT_TARGET_OCCT_DIR}/${THE_OCCT_INSTALL_DIR_PREFIX}/${FIRST_OCCT_HEADER_FILE}" FIRST_OCCT_HEADER_FILE_CONTENT)
list (LENGTH FIRST_OCCT_HEADER_FILE_CONTENT FIRST_OCCT_HEADER_FILE_CONTENT_LEN)
if (${FIRST_OCCT_HEADER_FILE_CONTENT_LEN} EQUAL 1 AND BUILD_INCLUDE_SYMLINK)
set (TO_FORCE_COPY TRUE)
elseif(${FIRST_OCCT_HEADER_FILE_CONTENT_LEN} GREATER 1 AND NOT BUILD_INCLUDE_SYMLINK)
set (TO_FORCE_COPY TRUE)
endif()
endif()
foreach (OCCT_HEADER_FILE ${OCCT_HEADER_FILES_COMPLETE})
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME)
set(TARGET_FILE "${THE_ROOT_TARGET_OCCT_DIR}/${THE_OCCT_INSTALL_DIR_PREFIX}/${HEADER_FILE_NAME}")
# create new file including found header
foreach (OCCT_HEADER_FILE ${OCCT_HEADER_FILES})
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME)
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
endforeach()
# consider pathed the source files
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_SOURCE_DIR}")
file (GLOB PATCHED_OCCT_HEADER_FILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_SOURCE_DIR}/*.[hgl]xx" "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_SOURCE_DIR}/*.h")
install (FILES ${PATCHED_OCCT_HEADER_FILES} DESTINATION "${INSTALL_DIR}/inc")
# create new patched file including found header
foreach (OCCT_HEADER_FILE ${PATCHED_OCCT_HEADER_FILES})
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME)
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
endforeach()
# Check if the file already exists in the target directory
if (TO_FORCE_COPY OR NOT EXISTS "${TARGET_FILE}")
if (BUILD_INCLUDE_SYMLINK)
file (CREATE_LINK "${OCCT_HEADER_FILE}" "${TARGET_FILE}" SYMBOLIC)
else()
set (OCCT_HEADER_FILE_CONTENT "#include \"${OCCT_HEADER_FILE}\"")
configure_file ("${TEMPLATE_HEADER_PATH}" "${TARGET_FILE}" @ONLY)
endif()
endif()
endforeach()
endmacro()
set (OCCT_HEADER_FILES_INSTALLATION ${OCCT_HEADER_FILES_COMPLETE})
list (FILTER OCCT_HEADER_FILES_INSTALLATION INCLUDE REGEX ".*[.](h|lxx)")
install (FILES ${OCCT_HEADER_FILES_INSTALLATION} DESTINATION "${INSTALL_DIR}/${THE_OCCT_INSTALL_DIR_PREFIX}")
endfunction()
function(ADD_PRECOMPILED_HEADER INPUT_TARGET PRECOMPILED_HEADER THE_IS_PRIVATE)
if (NOT BUILD_USE_PCH)
return()
endif()
if (${THE_IS_PRIVATE})
target_precompile_headers(${INPUT_TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${PRECOMPILED_HEADER}>")
else()
target_precompile_headers(${INPUT_TARGET} PUBLIC "$<$<COMPILE_LANGUAGE:CXX>:${PRECOMPILED_HEADER}>")
endif()
endfunction()
macro (OCCT_COPY_FILE_OR_DIR BEING_COPIED_OBJECT DESTINATION_PATH)
# first of all, copy original files
@@ -231,23 +475,23 @@ macro (OCCT_COPY_FILE_OR_DIR BEING_COPIED_OBJECT DESTINATION_PATH)
file (COPY "${CMAKE_SOURCE_DIR}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
endif()
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_COPIED_OBJECT}")
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_COPIED_OBJECT}")
# secondly, rewrite original files with patched ones
file (COPY "${APPLY_OCCT_PATCH_DIR}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
file (COPY "${BUILD_PATCH}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
endif()
endmacro()
macro (OCCT_CONFIGURE BEING_CONGIRUGED_FILE FINAL_NAME)
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}")
configure_file("${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
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 (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
add_subdirectory(${APPLY_OCCT_PATCH_DIR}/${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")
add_subdirectory (${CMAKE_SOURCE_DIR}/${BEING_ADDED_DIRECTORY})
else()
@@ -262,11 +506,8 @@ function (OCCT_IS_PRODUCT_REQUIRED CSF_VAR_NAME USE_PRODUCT)
message(STATUS "Warning: the list of being used toolkits is empty")
else()
foreach (USED_TOOLKIT ${BUILD_TOOLKITS})
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${USED_TOOLKIT}/EXTERNLIB")
file (READ "${APPLY_OCCT_PATCH_DIR}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB")
file (READ "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
endif()
set (FILE_CONTENT)
EXTRACT_TOOLKIT_EXTERNLIB ("src" ${USED_TOOLKIT} FILE_CONTENT)
string (REGEX MATCH "${CSF_VAR_NAME}" DOES_FILE_CONTAIN "${FILE_CONTENT}")
@@ -278,17 +519,6 @@ function (OCCT_IS_PRODUCT_REQUIRED CSF_VAR_NAME USE_PRODUCT)
endif()
endfunction()
function (FILE_TO_LIST FILE_NAME FILE_CONTENT)
set (LOCAL_FILE_CONTENT)
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${FILE_NAME}")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
elseif (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}")
file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
endif()
set (${FILE_CONTENT} ${LOCAL_FILE_CONTENT} PARENT_SCOPE)
endfunction()
# Function to determine if TOOLKIT is OCCT toolkit
function (IS_OCCT_TOOLKIT TOOLKIT_NAME MODULES IS_TOOLKIT_FOUND)
set (${IS_TOOLKIT_FOUND} OFF PARENT_SCOPE)
@@ -302,63 +532,11 @@ function (IS_OCCT_TOOLKIT TOOLKIT_NAME MODULES IS_TOOLKIT_FOUND)
endforeach(MODULE)
endfunction()
# TOOLKIT_DEPS is defined with dependencies from file src/TOOLKIT_NAME/EXTERNLIB.
# CSF_ variables are ignored
function (OCCT_TOOLKIT_DEP TOOLKIT_NAME TOOLKIT_DEPS)
FILE_TO_LIST ("src/${TOOLKIT_NAME}/EXTERNLIB" FILE_CONTENT)
#list (APPEND LOCAL_TOOLKIT_DEPS ${TOOLKIT_NAME})
set (LOCAL_TOOLKIT_DEPS)
foreach (FILE_CONTENT_LINE ${FILE_CONTENT})
string (REGEX MATCH "^TK" TK_FOUND ${FILE_CONTENT_LINE})
if ("${FILE_CONTENT_LINE}" STREQUAL "DRAWEXE" OR NOT "${TK_FOUND}" STREQUAL "")
list (APPEND LOCAL_TOOLKIT_DEPS ${FILE_CONTENT_LINE})
endif()
endforeach()
set (${TOOLKIT_DEPS} ${LOCAL_TOOLKIT_DEPS} PARENT_SCOPE)
endfunction()
# TOOLKIT_FULL_DEPS is defined with complete dependencies (all levels)
function (OCCT_TOOLKIT_FULL_DEP TOOLKIT_NAME TOOLKIT_FULL_DEPS)
# first level dependencies are stored in LOCAL_TOOLKIT_FULL_DEPS
OCCT_TOOLKIT_DEP (${TOOLKIT_NAME} LOCAL_TOOLKIT_FULL_DEPS)
list (LENGTH LOCAL_TOOLKIT_FULL_DEPS LIST_LENGTH)
set (LIST_INDEX 0)
while (LIST_INDEX LESS LIST_LENGTH)
list (GET LOCAL_TOOLKIT_FULL_DEPS ${LIST_INDEX} CURRENT_TOOLKIT)
OCCT_TOOLKIT_DEP (${CURRENT_TOOLKIT} CURRENT_TOOLKIT_DEPS)
# append toolkits are not contained
foreach (CURRENT_TOOLKIT_DEP ${CURRENT_TOOLKIT_DEPS})
set (CURRENT_TOOLKIT_DEP_FOUND OFF)
foreach (LOCAL_TOOLKIT_FULL_DEP ${LOCAL_TOOLKIT_FULL_DEPS})
if ("${CURRENT_TOOLKIT_DEP}" STREQUAL "${LOCAL_TOOLKIT_FULL_DEP}")
set (CURRENT_TOOLKIT_DEP_FOUND ON)
break()
endif()
endforeach()
if ("${CURRENT_TOOLKIT_DEP_FOUND}" STREQUAL "OFF")
list (APPEND LOCAL_TOOLKIT_FULL_DEPS ${CURRENT_TOOLKIT_DEP})
endif()
endforeach()
# increment the list index
MATH(EXPR LIST_INDEX "${LIST_INDEX}+1")
# calculate new length
list (LENGTH LOCAL_TOOLKIT_FULL_DEPS LIST_LENGTH)
endwhile()
set (${TOOLKIT_FULL_DEPS} ${LOCAL_TOOLKIT_FULL_DEPS} PARENT_SCOPE)
endfunction()
# Function to get list of modules and toolkits from file adm/MODULES.
# Function to get list of modules/toolkits/samples from file adm/${FILE_NAME}.
# Creates list <$MODULE_LIST> to store list of MODULES and
# <NAME_OF_MODULE>_TOOLKITS foreach module to store its toolkits.
function (OCCT_MODULES_AND_TOOLKITS MODULE_LIST)
FILE_TO_LIST ("adm/MODULES" FILE_CONTENT)
# <NAME_OF_MODULE>_TOOLKITS foreach module to store its toolkits, where "TOOLKITS" is defined by TOOLKITS_NAME_SUFFIX.
function (OCCT_MODULES_AND_TOOLKITS FILE_NAME TOOLKITS_NAME_SUFFIX MODULE_LIST)
FILE_TO_LIST ("adm/${FILE_NAME}" FILE_CONTENT)
foreach (CONTENT_LINE ${FILE_CONTENT})
string (REPLACE " " ";" CONTENT_LINE ${CONTENT_LINE})
@@ -366,33 +544,311 @@ function (OCCT_MODULES_AND_TOOLKITS MODULE_LIST)
list (REMOVE_AT CONTENT_LINE 0)
list (APPEND ${MODULE_LIST} ${MODULE_NAME})
# (!) REMOVE THE LINE BELOW (implicit variables)
set (${MODULE_NAME}_TOOLKITS ${CONTENT_LINE} PARENT_SCOPE)
set (${MODULE_NAME}_${TOOLKITS_NAME_SUFFIX} ${CONTENT_LINE} PARENT_SCOPE)
endforeach()
set (${MODULE_LIST} ${${MODULE_LIST}} PARENT_SCOPE)
endfunction()
# Returns OCCT version string from file Standard_Version.hxx (if available)
function (OCCT_VERSION OCCT_VERSION_VAR)
set (OCC_VERSION_COMPLETE "7.1.0")
set (OCC_VERSION_DEVELOPMENT "")
set (OCCT_VERSION_LOCALVAR "${OCC_VERSION_COMPLETE}.${OCC_VERSION_DEVELOPMENT}")
# Returns OCC version string from file Standard_Version.hxx (if available)
function (OCC_VERSION OCC_VERSION_MAJOR OCC_VERSION_MINOR OCC_VERSION_MAINTENANCE OCC_VERSION_DEVELOPMENT OCC_VERSION_STRING_EXT)
set (OCC_VERSION_MAJOR 7)
set (OCC_VERSION_MINOR 0)
set (OCC_VERSION_MAINTENANCE 0)
set (OCC_VERSION_DEVELOPMENT dev)
set (OCC_VERSION_COMPLETE "7.0.0")
set (STANDARD_VERSION_FILE "${CMAKE_SOURCE_DIR}/src/Standard/Standard_Version.hxx")
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/Standard/Standard_Version.hxx")
set (STANDARD_VERSION_FILE "${BUILD_PATCH}/src/Standard/Standard_Version.hxx")
endif()
if (EXISTS "${STANDARD_VERSION_FILE}")
foreach (SOUGHT_VERSION OCC_VERSION_COMPLETE OCC_VERSION_DEVELOPMENT)
foreach (SOUGHT_VERSION OCC_VERSION_MAJOR OCC_VERSION_MINOR OCC_VERSION_MAINTENANCE)
file (STRINGS "${STANDARD_VERSION_FILE}" ${SOUGHT_VERSION} REGEX "^#define ${SOUGHT_VERSION} .*")
string (REGEX REPLACE ".*${SOUGHT_VERSION} .*([^ ]+).*" "\\1" ${SOUGHT_VERSION} "${${SOUGHT_VERSION}}" )
endforeach()
foreach (SOUGHT_VERSION OCC_VERSION_DEVELOPMENT OCC_VERSION_COMPLETE)
file (STRINGS "${STANDARD_VERSION_FILE}" ${SOUGHT_VERSION} REGEX "^#define ${SOUGHT_VERSION} .*")
string (REGEX REPLACE ".*${SOUGHT_VERSION} .*\"([^ ]+)\".*" "\\1" ${SOUGHT_VERSION} "${${SOUGHT_VERSION}}" )
endforeach()
if (NOT "${OCC_VERSION_DEVELOPMENT}" STREQUAL "")
set (OCCT_VERSION_LOCALVAR "${OCC_VERSION_COMPLETE}.${OCC_VERSION_DEVELOPMENT}")
else()
set (OCCT_VERSION_LOCALVAR "${OCC_VERSION_COMPLETE}")
endif()
endif()
set (${OCCT_VERSION_VAR} "${OCCT_VERSION_LOCALVAR}" PARENT_SCOPE)
set (OCC_VERSION_MAJOR "${OCC_VERSION_MAJOR}" PARENT_SCOPE)
set (OCC_VERSION_MINOR "${OCC_VERSION_MINOR}" PARENT_SCOPE)
set (OCC_VERSION_MAINTENANCE "${OCC_VERSION_MAINTENANCE}" PARENT_SCOPE)
set (OCC_VERSION_DEVELOPMENT "${OCC_VERSION_DEVELOPMENT}" PARENT_SCOPE)
if (OCC_VERSION_DEVELOPMENT AND OCC_VERSION_COMPLETE)
set (OCC_VERSION_STRING_EXT "${OCC_VERSION_COMPLETE}.${OCC_VERSION_DEVELOPMENT}" PARENT_SCOPE)
else()
set (OCC_VERSION_STRING_EXT "${OCC_VERSION_COMPLETE}" PARENT_SCOPE)
endif()
endfunction()
macro (CHECK_PATH_FOR_CONSISTENCY THE_ROOT_PATH_NAME THE_BEING_CHECKED_PATH_NAME THE_VAR_TYPE THE_MESSAGE_OF_BEING_CHECKED_PATH)
set (THE_ROOT_PATH "${${THE_ROOT_PATH_NAME}}")
set (THE_BEING_CHECKED_PATH "${${THE_BEING_CHECKED_PATH_NAME}}")
if (THE_BEING_CHECKED_PATH OR EXISTS "${THE_BEING_CHECKED_PATH}")
get_filename_component (THE_ROOT_PATH_ABS "${THE_ROOT_PATH}" ABSOLUTE)
get_filename_component (THE_BEING_CHECKED_PATH_ABS "${THE_BEING_CHECKED_PATH}" ABSOLUTE)
string (REGEX MATCH "${THE_ROOT_PATH_ABS}" DOES_PATH_CONTAIN "${THE_BEING_CHECKED_PATH_ABS}")
if (NOT DOES_PATH_CONTAIN) # if cmake found the being checked path at different place from THE_ROOT_PATH_ABS
set (${THE_BEING_CHECKED_PATH_NAME} "" CACHE ${THE_VAR_TYPE} "${THE_MESSAGE_OF_BEING_CHECKED_PATH}" FORCE)
endif()
else()
set (${THE_BEING_CHECKED_PATH_NAME} "" CACHE ${THE_VAR_TYPE} "${THE_MESSAGE_OF_BEING_CHECKED_PATH}" FORCE)
endif()
endmacro()
macro (FLEX_AND_BISON_TARGET_APPLY THE_PACKAGE_NAME RELATIVE_SOURCES_DIR)
# Generate Flex and Bison files
if (NOT ${BUILD_YACCLEX})
return()
endif()
# flex files
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${THE_PACKAGE_NAME}" "*[.]lex" SOURCE_FILES_FLEX)
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
# bison files
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${THE_PACKAGE_NAME}" "*[.]yacc" SOURCE_FILES_BISON)
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
if (NOT (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0))
message(FATAL_ERROR "Error: number of FLEX and BISON files is not equal for ${THE_PACKAGE_NAME}")
endif()
list (SORT SOURCE_FILES_FLEX)
list (SORT SOURCE_FILES_BISON)
math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1")
foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN})
list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE)
get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE)
list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE)
get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE)
string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL)
if (NOT (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL}))
continue()
endif()
# Note: files are generated in original source directory (not in patch!)
set (FLEX_BISON_TARGET_DIR "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${THE_PACKAGE_NAME}")
# choose appropriate extension for generated files: "cxx" if source file contains
# instruction to generate C++ code, "c" otherwise
set (BISON_OUTPUT_FILE_EXT "c")
set (FLEX_OUTPUT_FILE_EXT "c")
file (STRINGS "${CURRENT_BISON_FILE}" FILE_BISON_CONTENT)
foreach (FILE_BISON_CONTENT_LINE ${FILE_BISON_CONTENT})
string (REGEX MATCH "%language \"C\\+\\+\"" CXX_BISON_LANGUAGE_FOUND ${FILE_BISON_CONTENT_LINE})
if (CXX_BISON_LANGUAGE_FOUND)
set (BISON_OUTPUT_FILE_EXT "cxx")
endif()
endforeach()
file (STRINGS "${CURRENT_FLEX_FILE}" FILE_FLEX_CONTENT)
foreach (FILE_FLEX_CONTENT_LINE ${FILE_FLEX_CONTENT})
string (REGEX MATCH "%option c\\+\\+" CXX_FLEX_LANGUAGE_FOUND ${FILE_FLEX_CONTENT_LINE})
if (CXX_FLEX_LANGUAGE_FOUND)
set (FLEX_OUTPUT_FILE_EXT "cxx")
endif()
endforeach()
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT})
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.${FLEX_OUTPUT_FILE_EXT})
if (EXISTS ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT})
message (STATUS "Info: remove old output BISON file: ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}")
file(REMOVE ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT})
endif()
if (EXISTS ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx)
message (STATUS "Info: remove old output BISON file: ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx")
file(REMOVE ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx)
endif()
if (EXISTS ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE})
message (STATUS "Info: remove old output FLEX file: ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}")
file(REMOVE ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE})
endif()
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} "${FLEX_BISON_TARGET_DIR}/${BISON_OUTPUT_FILE}"
COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME} -l -M ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/=")
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} "${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}"
COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME} -L")
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
endforeach()
endmacro()
# Adds OCCT_INSTALL_BIN_LETTER variable ("" for Release, "d" for Debug and
# "i" for RelWithDebInfo) in OpenCASCADETargets-*.cmake files during
# installation process.
# This and the following macros are used to overcome limitation of CMake
# prior to version 3.3 not supporting per-configuration install paths
# for install target files (see https://cmake.org/Bug/view.php?id=14317)
macro (OCCT_UPDATE_TARGET_FILE)
if (MSVC)
OCCT_INSERT_CODE_FOR_TARGET ()
endif()
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\")
foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES})
file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT)
file (REMOVE \"\${TARGET_FILENAME}\")
foreach (line IN LISTS TARGET_FILE_CONTENT)
string (REGEX REPLACE \"[\\\\]?[\\\$]{OCCT_INSTALL_BIN_LETTER}\" \"\${OCCT_INSTALL_BIN_LETTER}\" line \"\${line}\")
file (APPEND \"\${TARGET_FILENAME}\" \"\${line}\\n\")
endforeach()
endforeach()")
endmacro()
macro (OCCT_INSERT_CODE_FOR_TARGET)
install(CODE "if (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$\")
set (OCCT_INSTALL_BIN_LETTER \"\")
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$\")
set (OCCT_INSTALL_BIN_LETTER \"i\")
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Dd][Ee][Bb][Uu][Gg])$\")
set (OCCT_INSTALL_BIN_LETTER \"d\")
endif()")
endmacro()
macro (OCCT_UPDATE_DRAW_DEFAULT_FILE)
install(CODE "set (DRAW_DEFAULT_FILE_NAME \"${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}/DrawResources/DrawPlugin\")
file (STRINGS \"\${DRAW_DEFAULT_FILE_NAME}\" DRAW_DEFAULT_CONTENT)
file (REMOVE \"\${DRAW_DEFAULT_FILE_NAME}\")
foreach (line IN LISTS DRAW_DEFAULT_CONTENT)
string (REGEX MATCH \": TK\([a-zA-Z]+\)$\" IS_TK_LINE \"\${line}\")
string (REGEX REPLACE \": TK\([a-zA-Z]+\)$\" \": TK\${CMAKE_MATCH_1}${BUILD_SHARED_LIBRARY_NAME_POSTFIX}\" line \"\${line}\")
file (APPEND \"\${DRAW_DEFAULT_FILE_NAME}\" \"\${line}\\n\")
endforeach()")
endmacro()
macro (OCCT_CREATE_SYMLINK_TO_FILE LIBRARY_NAME LINK_NAME)
if (NOT WIN32)
install (CODE "if (EXISTS \"${LIBRARY_NAME}\")
execute_process (COMMAND ln -s \"${LIBRARY_NAME}\" \"${LINK_NAME}\")
endif()
")
endif()
endmacro()
# Function to process CSF libraries and append their file names to a specified list.
# Additionally, handle library directories for different build configurations.
# Arguments:
# CURRENT_CSF - The current CSF libraries to process.
# LIST_NAME - The name of the list to append the processed library file names to.
# TARGET_NAME - The target to which the library directories will be added.
function (PROCESS_CSF_LIBRARIES CURRENT_CSF LIST_NAME TARGET_NAME)
separate_arguments (CURRENT_CSF)
# Local variables to collect found libraries and directories
set(FOUND_LIBS "")
set(FOUND_DEBUG_DIRS "")
set(FOUND_RELEASE_DIRS "")
# Check if the result is already cached
string(REPLACE ";" "_" CACHE_KEY "${CURRENT_CSF}")
get_property(CACHED_LIBS GLOBAL PROPERTY "CACHED_LIBS_${CACHE_KEY}" SET)
get_property(CACHED_DEBUG_DIRS GLOBAL PROPERTY "CACHED_DEBUG_DIRS_${CACHE_KEY}" SET)
get_property(CACHED_RELEASE_DIRS GLOBAL PROPERTY "CACHED_RELEASE_DIRS_${CACHE_KEY}" SET)
if (CACHED_LIBS AND NOT "${CACHED_LIBS}" STREQUAL "1")
list (APPEND FOUND_LIBS ${CACHED_LIBS})
if (CACHED_DEBUG_DIRS)
list (APPEND FOUND_DEBUG_DIRS ${CACHED_DEBUG_DIRS})
endif()
if (CACHED_RELEASE_DIRS)
list (APPEND FOUND_RELEASE_DIRS ${CACHED_RELEASE_DIRS})
endif()
else()
foreach (CSF_LIBRARY ${CURRENT_CSF})
set (LIBRARY_FROM_CACHE 0)
set (CSF_LIBRARY_ORIGINAL ${CSF_LIBRARY})
string (TOLOWER "${CSF_LIBRARY}" CSF_LIBRARY)
string (REPLACE "+" "[+]" CSF_LIBRARY "${CSF_LIBRARY}")
string (REPLACE "." "" CSF_LIBRARY "${CSF_LIBRARY}")
get_cmake_property(ALL_CACHE_VARIABLES CACHE_VARIABLES)
string (REGEX MATCHALL "(^|;)3RDPARTY_[^;]+_LIBRARY[^;]*" ALL_CACHE_VARIABLES "${ALL_CACHE_VARIABLES}")
set (DEBUG_DIR "")
set (RELEASE_DIR "")
foreach (CACHE_VARIABLE ${ALL_CACHE_VARIABLES})
set (CURRENT_CACHE_LIBRARY ${${CACHE_VARIABLE}})
string (TOLOWER "${CACHE_VARIABLE}" CACHE_VARIABLE)
if (NOT EXISTS "${CURRENT_CACHE_LIBRARY}" OR IS_DIRECTORY "${CURRENT_CACHE_LIBRARY}")
continue()
endif()
string (REGEX MATCH "_${CSF_LIBRARY}$" IS_ENDING "${CACHE_VARIABLE}")
string (REGEX MATCH "^([a-z]+)" CSF_WO_VERSION "${CSF_LIBRARY}")
string (REGEX MATCH "_${CSF_WO_VERSION}$" IS_ENDING_WO_VERSION "${CACHE_VARIABLE}")
if ("3rdparty_${CSF_LIBRARY}_library" STREQUAL "${CACHE_VARIABLE}" OR
"3rdparty_${CSF_WO_VERSION}_library" STREQUAL "${CACHE_VARIABLE}" OR
NOT "x${IS_ENDING}" STREQUAL "x" OR
NOT "x${IS_ENDING_WO_VERSION}" STREQUAL "x")
get_filename_component(LIBRARY_NAME "${CURRENT_CACHE_LIBRARY}" NAME)
list (APPEND FOUND_LIBS "${LIBRARY_NAME}")
get_filename_component(LIBRARY_DIR "${CURRENT_CACHE_LIBRARY}" DIRECTORY)
set (RELEASE_DIR "${LIBRARY_DIR}")
set (LIBRARY_FROM_CACHE 1)
elseif ("3rdparty_${CSF_LIBRARY}_library_debug" STREQUAL "${CACHE_VARIABLE}" OR
"3rdparty_${CSF_LIBRARY}_debug_library" STREQUAL "${CACHE_VARIABLE}")
get_filename_component(LIBRARY_NAME "${CURRENT_CACHE_LIBRARY}" NAME)
list (APPEND FOUND_LIBS "${LIBRARY_NAME}")
get_filename_component(LIBRARY_DIR "${CURRENT_CACHE_LIBRARY}" DIRECTORY)
set (DEBUG_DIR "${LIBRARY_DIR}")
set (LIBRARY_FROM_CACHE 1)
endif()
if (DEBUG_DIR AND RELEASE_DIR)
break()
endif()
endforeach()
if (NOT ${LIBRARY_FROM_CACHE} AND NOT "${CSF_LIBRARY}" STREQUAL "")
list (APPEND FOUND_LIBS "${CSF_LIBRARY_ORIGINAL}")
continue()
endif()
if (DEBUG_DIR AND RELEASE_DIR)
list (APPEND FOUND_DEBUG_DIRS "${DEBUG_DIR}")
list (APPEND FOUND_RELEASE_DIRS "${RELEASE_DIR}")
elseif (DEBUG_DIR)
list (APPEND FOUND_DEBUG_DIRS "${DEBUG_DIR}")
list (APPEND FOUND_RELEASE_DIRS "${DEBUG_DIR}")
message (WARNING "Debug directory found but no release directory found. Using debug directory for both configurations.")
elseif (RELEASE_DIR)
list (APPEND FOUND_DEBUG_DIRS "${RELEASE_DIR}")
list (APPEND FOUND_RELEASE_DIRS "${RELEASE_DIR}")
endif()
endforeach()
# Cache the result
set_property(GLOBAL PROPERTY "CACHED_LIBS_${CACHE_KEY}" "${FOUND_LIBS}")
set_property(GLOBAL PROPERTY "CACHED_DEBUG_DIRS_${CACHE_KEY}" "${FOUND_DEBUG_DIRS}")
set_property(GLOBAL PROPERTY "CACHED_RELEASE_DIRS_${CACHE_KEY}" "${FOUND_RELEASE_DIRS}")
endif()
# Append found values to the external variable
list(APPEND ${LIST_NAME} ${FOUND_LIBS})
set(${LIST_NAME} "${${LIST_NAME}}" PARENT_SCOPE)
# Handle library directories for different build configurations
list (REMOVE_DUPLICATES FOUND_RELEASE_DIRS)
list (REMOVE_DUPLICATES FOUND_DEBUG_DIRS)
foreach (RELEASE_DIR ${FOUND_RELEASE_DIRS})
get_filename_component(RELEASE_DIR_ABS "${RELEASE_DIR}" ABSOLUTE)
target_link_directories(${TARGET_NAME} PUBLIC "$<$<CONFIG:RELEASE>:${RELEASE_DIR_ABS}>;$<$<CONFIG:RELWITHDEBINFO>:${RELEASE_DIR_ABS}>")
endforeach()
foreach (DEBUG_DIR ${FOUND_DEBUG_DIRS})
get_filename_component(DEBUG_DIR_ABS "${DEBUG_DIR}" ABSOLUTE)
target_link_directories(${TARGET_NAME} PUBLIC "$<$<CONFIG:DEBUG>:${DEBUG_DIR_ABS}>")
endforeach()
endfunction()
macro(OCCT_ADD_VCPKG_FEATURE THE_FEATURE)
if (BUILD_USE_VCPKG)
list(APPEND VCPKG_MANIFEST_FEATURES "${THE_FEATURE}" PARENT_SCOPE)
endif()
endmacro()
macro (OCCT_UNSET_VCPKG_FEATURE THE_FEATURE)
if (BUILD_USE_VCPKG)
list (REMOVE_ITEM VCPKG_MANIFEST_FEATURES "${THE_FEATURE}" PARENT_SCOPE)
endif()
endmacro()

View File

@@ -0,0 +1,78 @@
# OCCT resource files generation
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)
set (CurrentResource_Directory "${CurrentResource}")
set (isResDirectory TRUE)
else()
get_filename_component (CurrentResource_Name "${CurrentResource}" NAME)
list (APPEND RESOURCE_FILES "res:::${CurrentResource_Name}")
get_filename_component (CurrentResource_Directory "${CurrentResource}" DIRECTORY)
endif()
# Add current toolkit into RESOURCE_TOOLKITS array to copy it to the BUILD directory
list (APPEND RESOURCE_TOOLKITS "${CurrentResource_Directory}")
list (REMOVE_DUPLICATES RESOURCE_TOOLKITS)
if (BUILD_RESOURCES)
foreach (RESOURCE_FILE ${RESOURCE_FILES})
string (REGEX MATCH "^[^:]+:::" IS_RESOURCE "${RESOURCE_FILE}")
if (IS_RESOURCE)
string (REGEX REPLACE "[^:]+:+" "" RESOURCE_FILE "${RESOURCE_FILE}")
get_filename_component (CurrentResource_FileName "${RESOURCE_FILE}" NAME)
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}")
# 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")
# read resource file
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${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};")
# Save generated content to header file
set (HEADER_FILE "${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${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()
FILE_TO_LIST ("adm/RESOURCES" RESOURCES)
foreach (CurrentResource ${RESOURCES})
get_filename_component (CurrentResource_FileName "${CurrentResource}" NAME)
if ("${CurrentResource_FileName}" STREQUAL TObj.msg OR
"${CurrentResource_FileName}" STREQUAL BOPAlgo.msg OR
"${CurrentResource_FileName}" STREQUAL Units.dat OR
"${CurrentResource}" STREQUAL XSMessage OR
"${CurrentResource}" STREQUAL SHMessage OR
"${CurrentResource}" STREQUAL Shaders)
OCCT_GENERATE_CONTENT_ONLY ("${CurrentResource}")
endif()
endforeach()

View File

@@ -1,163 +1,306 @@
# script for each OCCT toolkit
# Get all used packages from toolkit
foreach (OCCT_PACKAGE ${TOOLKIT_MODULES})
if (WIN32)
list (APPEND PRECOMPILED_DEFS "-D__${OCCT_PACKAGE}_DLL")
# filling some variables by default values(src) or using custom(tools, samples)
set (RELATIVE_SOURCES_DIR "${RELATIVE_DIR}")
if ("${RELATIVE_SOURCES_DIR}" STREQUAL "")
#if it is not defined, use default directory
set (RELATIVE_SOURCES_DIR "src")
endif()
set (OCC_MODULES_LIST "${MODULES_LIST}")
if ("${OCC_MODULES_LIST}" STREQUAL "")
set (OCC_MODULES_LIST ${OCCT_MODULES})
endif()
set (OCC_TARGET_FOLDER "${TARGET_FOLDER}")
if ("${OCC_TARGET_FOLDER}" STREQUAL "")
set (OCC_TARGET_FOLDER "Modules")
endif()
set (OCCT_TOOLKITS_NAME_SUFFIX "${TOOLKITS_NAME_SUFFIX}")
if ("${OCCT_TOOLKITS_NAME_SUFFIX}" STREQUAL "")
set (OCCT_TOOLKITS_NAME_SUFFIX "TOOLKITS")
endif()
# parse PACKAGES file
EXTRACT_TOOLKIT_PACKAGES (${RELATIVE_SOURCES_DIR} ${PROJECT_NAME} USED_PACKAGES)
if ("${USED_PACKAGES}" STREQUAL "")
set (USED_PACKAGES ${PROJECT_NAME})
endif()
if (USE_QT)
# Qt dependencies
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/qt_macro)
FIND_QT_PACKAGE(PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT_INCLUDES)
include_directories("${PROJECT_INCLUDES}")
endif(USE_QT)
set (PRECOMPILED_DEFS)
if (NOT BUILD_SHARED_LIBS)
list (APPEND PRECOMPILED_DEFS "-DOCCT_NO_PLUGINS")
if (WIN32 AND NOT EXECUTABLE_PROJECT)
list (APPEND PRECOMPILED_DEFS "-DOCCT_STATIC_BUILD")
endif()
endif()
# Get all used packages from toolkit
UNSET(RESOURCE_FILES)
foreach (OCCT_PACKAGE ${USED_PACKAGES})
#remove part after "/" in the OCCT_PACKAGE variable if exists
string (FIND "${OCCT_PACKAGE}" "/" _index)
if (_index GREATER -1)
math (EXPR _index "${_index}")
string (SUBSTRING "${OCCT_PACKAGE}" 0 ${_index} OCCT_PACKAGE_NAME)
else()
set (OCCT_PACKAGE_NAME "${OCCT_PACKAGE}")
endif()
# ${OCCT_SOURCE_DIR}/src/${OCCT_PACKAGE}
set (SOURCE_FILES)
set (HEADER_FILES)
# Generate Flex and Bison files
if (${REBUILD_PLATFORM_DEPENDENT_CODE})
EXTRACT_PACKAGE_FILES (${RELATIVE_SOURCES_DIR} ${OCCT_PACKAGE} ALL_FILES INCLUDE_FOLDER)
# flex files
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
list (SORT SOURCE_FILES_FLEX)
# bison files
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
list (SORT SOURCE_FILES_BISON)
if (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0)
math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1")
foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN})
list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE)
get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE)
list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE)
get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE)
string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL)
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.c)
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.c)
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} ${CMP_DIR}/${BISON_OUTPUT_FILE} COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME}")
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} ${CMP_DIR}/${FLEX_OUTPUT_FILE} COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME}")
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
endif()
endforeach()
endif()
endif()
# header files
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
if(APPLE)
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
endif()
else()
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
if(APPLE)
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
endif()
endif()
set (HEADER_FILES_FILTERING ${ALL_FILES})
set (SOURCE_FILES_FILTERING ${ALL_FILES})
list (FILTER HEADER_FILES_FILTERING INCLUDE REGEX ".+[.](h|p|g|lxx)")
list (APPEND HEADER_FILES ${HEADER_FILES_M} ${HEADER_FILES_LXX} ${SOURCE_FILES_GXX})
list (APPEND SOURCE_FILES ${SOURCE_FILES_C})
if(APPLE)
list (APPEND SOURCE_FILES ${SOURCE_FILES_M})
list (FILTER SOURCE_FILES_FILTERING INCLUDE REGEX ".+[.](c|mm)")
else()
list (FILTER SOURCE_FILES_FILTERING INCLUDE REGEX ".+[.](c)")
endif()
foreach(HEADER_FILE ${HEADER_FILES})
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
message (STATUS "Info. consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
list (APPEND USED_INCFILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
else()
list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
endif()
endforeach()
list (APPEND HEADER_FILES ${HEADER_FILES_FILTERING})
list (APPEND SOURCE_FILES ${SOURCE_FILES_FILTERING})
foreach(SOURCE_FILE ${SOURCE_FILES})
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
message (STATUS "Info. consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
list (APPEND USED_SRCFILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
else()
list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
endif()
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${HEADER_FILES_FILTERING}")
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${SOURCE_FILES_FILTERING}")
list (APPEND USED_INCFILES ${HEADER_FILES})
list (APPEND USED_SRCFILES ${SOURCE_FILES})
if (USE_QT)
FIND_AND_INSTALL_QT_RESOURCES (${OCCT_PACKAGE} RESOURCE_FILES)
#message("Qt Resource files are: ${QT_RESOURCE_FILES} in ${OCCT_PACKAGE}")
endif(USE_QT)
#message("Resource files are: ${RESOURCE_FILES} in ${OCCT_PACKAGE}")
foreach(RESOURCE_FILE ${RESOURCE_FILES})
SOURCE_GROUP ("Resource Files\\${OCCT_PACKAGE_NAME}" FILES "${RESOURCE_FILE}")
endforeach()
endforeach()
string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}")
# Get from toolkits EXTERNLIB all used libs
OCCT_TOOLKIT_DEP (${PROJECT_NAME} ${PROJECT_NAME}_DEPS)
foreach (PROJECT_DEP ${${PROJECT_NAME}_DEPS})
IS_OCCT_TOOLKIT (${PROJECT_DEP} OCCT_MODULES FOUND_TOOLKIT)
if ("${FOUND_TOOLKIT}" STREQUAL "ON")
list (APPEND USED_LIBS "${PROJECT_DEP}")
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})
list (FIND ${OCCT_MODULE}_${OCCT_TOOLKITS_NAME_SUFFIX} ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
if (NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
set (CURRENT_MODULE ${OCCT_MODULE})
endif()
endforeach()
# Create project for toolkit
list (FIND BUILD_TOOLKITS ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
if ("${BUILD_TOOLKITS}" STREQUAL "" OR NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
if (MSVC)
OCCT_INSERT_CODE_FOR_TARGET ()
endif()
foreach (OCCT_MODULE ${OCCT_MODULES})
list (FIND ${OCCT_MODULE}_TOOLKITS ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
if (NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
set (CURRENT_MODULE ${OCCT_MODULE})
if (USE_QT)
FIND_AND_WRAP_MOC_FILES("${USED_INCFILES}" "${PROJECT_NAME}_MOC_FILES")
#message("MOC files: ${${PROJECT_NAME}_MOC_FILES}")
endif (USE_QT)
if (EXECUTABLE_PROJECT)
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
install (TARGETS ${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}/${PROJECT_NAME}.wasm DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}")
endif()
else()
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
if (MSVC)
if (BUILD_FORCE_RelWithDebInfo)
set (aReleasePdbConf "Release")
else()
set (aReleasePdbConf)
endif()
endforeach()
if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
else()
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Release
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin"
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS RelWithDebInfo
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini"
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
install (TARGETS ${PROJECT_NAME}
CONFIGURATIONS Debug
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind"
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
if (MSVC)
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind/${PROJECT_NAME}.pdb
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
if (BUILD_SHARED_LIBS)
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb
CONFIGURATIONS Debug ${aReleasePdbConf} RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
else()
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb
CONFIGURATIONS Debug ${aReleasePdbConf} RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}")
endif()
endif()
set_property (TARGET ${PROJECT_NAME} PROPERTY FOLDER "Modules/${CURRENT_MODULE}")
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
target_link_libraries (${PROJECT_NAME} ${USED_LIBS})
endif()
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
set (CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT ${CMAKE_SHARED_LIBRARY_SUFFIX})
set (CMAKE_SHARED_LIBRARY_SUFFIX "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()
install (TARGETS ${PROJECT_NAME}
EXPORT OpenCASCADE${CURRENT_MODULE}Targets
RUNTIME DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}"
ARCHIVE DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
INCLUDES DESTINATION ${INSTALL_DIR_INCLUDE})
if (NOT WIN32)
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
set (LINK_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT}")
set (LIBRARY_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}")
OCCT_CREATE_SYMLINK_TO_FILE (${LIBRARY_NAME} ${LINK_NAME})
endif()
endif()
endif()
if (CURRENT_MODULE)
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "${OCC_TARGET_FOLDER}/${CURRENT_MODULE}")
set_target_properties (${PROJECT_NAME} PROPERTIES MODULE "${CURRENT_MODULE}")
if (APPLE)
if (NOT "${INSTALL_NAME_DIR}" STREQUAL "")
set_target_properties (${PROJECT_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "${INSTALL_NAME_DIR}")
endif()
endif()
endif()
get_property (OCC_VERSION_MAJOR GLOBAL PROPERTY OCC_VERSION_MAJOR)
get_property (OCC_VERSION_MINOR GLOBAL PROPERTY OCC_VERSION_MINOR)
get_property (OCC_VERSION_MAINTENANCE GLOBAL PROPERTY OCC_VERSION_MAINTENANCE)
set (OCC_SOVERSION "")
if (BUILD_SOVERSION_NUMBERS GREATER 2)
set (OCC_SOVERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
elseif (BUILD_SOVERSION_NUMBERS GREATER 1)
set (OCC_SOVERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}")
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}")
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
set (USED_EXTERNLIB_AND_TOOLKITS)
# SOME EXECUTABLE PROJECTS MAY USE CUSTOM TOOLKITS AND EXTERNAL LIBRARIES
if (CUSTOM_EXTERNLIB)
set (USED_EXTERNLIB_AND_TOOLKITS ${CUSTOM_EXTERNLIB})
foreach (EXTERNAL_LIB ${CUSTOM_EXTERNLIB})
string (REGEX MATCH "^TK" TK_FOUND ${EXTERNAL_LIB})
if (TK_FOUND)
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${EXTERNAL_LIB})
endif()
endforeach()
else()
EXTRACT_TOOLKIT_EXTERNLIB ("${RELATIVE_SOURCES_DIR}" "${PROJECT_NAME}" USED_EXTERNLIB_AND_TOOLKITS)
EXCTRACT_TOOLKIT_DEPS ("${RELATIVE_SOURCES_DIR}" "${PROJECT_NAME}" USED_TOOLKITS_BY_CURRENT_PROJECT _)
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT ${PROJECT_NAME})
endif()
foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
string (REGEX MATCH "^ *#" COMMENT_FOUND ${USED_ITEM})
if (COMMENT_FOUND)
continue()
endif()
string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
string (REGEX MATCH "^vtk" VTK_FOUND ${USED_ITEM})
if (NOT "${VTK_FOUND}" STREQUAL "")
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
if (BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK)
OCCT_INSTALL_VTK(${USED_ITEM})
endif()
continue()
endif()
# Search for 3rd-party libraries as a dependency
set (CURRENT_CSF ${${USED_ITEM}})
if ("x${CURRENT_CSF}" STREQUAL "x")
continue()
endif()
if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlLibs}")
add_definitions (-DHAVE_OPENGL)
endif()
if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlesLibs}")
add_definitions (-DHAVE_GLES2)
endif()
PROCESS_CSF_LIBRARIES ("${CURRENT_CSF}" USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT "${PROJECT_NAME}")
endforeach()
if (APPLE)
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
if (NOT ${IS_X11_FOUND} EQUAL -1)
find_package (X11 COMPONENTS X11)
if (NOT X11_FOUND)
message (STATUS "Warning: X11 is not found. It's required to install The XQuartz project: http://www.xquartz.org")
endif()
endif()
endif()
# Update list of used VTK libraries if OpenGL2 Rendering BackEnd is used.
# Add VTK_OPENGL2_BACKEND definition.
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2" OR IS_VTK_9XX)
add_definitions(-DVTK_OPENGL2_BACKEND)
foreach (VTK_EXCLUDE_LIBRARY vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL)
list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "${VTK_EXCLUDE_LIBRARY}" IS_VTK_OPENGL_FOUND)
if (NOT ${IS_VTK_OPENGL_FOUND} EQUAL -1)
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT ${VTK_EXCLUDE_LIBRARY})
if (${VTK_EXCLUDE_LIBRARY} STREQUAL vtkRenderingOpenGL)
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingOpenGL2)
if(VTK_MAJOR_VERSION GREATER 6)
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingGL2PSOpenGL2)
endif()
endif()
endif()
endforeach()
else()
if(VTK_MAJOR_VERSION EQUAL 6 AND VTK_MINOR_VERSION GREATER 2 OR VTK_MAJOR_VERSION GREATER 6)
list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "vtkRenderingFreeTypeOpenGL" IS_VTK_RENDER_FREETYPE_FOUND)
if (NOT ${IS_VTK_RENDER_FREETYPE_FOUND} EQUAL -1)
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT "vtkRenderingFreeTypeOpenGL")
endif()
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)
foreach (PROJECT_LIBRARY_DEBUG ${PROJECT_LIBRARIES_DEBUG})
target_link_libraries (${PROJECT_NAME} debug ${PROJECT_LIBRARY_DEBUG})
endforeach()
foreach (PROJECT_LIBRARY_RELEASE ${PROJECT_LIBRARIES_RELEASE})
target_link_libraries (${PROJECT_NAME} optimized ${PROJECT_LIBRARY_RELEASE})
endforeach()
endif()
# suppress deprecation warnings inside OCCT itself for old gcc versions with unavailable Standard_DISABLE_DEPRECATION_WARNINGS
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6.0)
add_definitions("-DOCCT_NO_DEPRECATED")
message (STATUS "Warning: internal deprecation warnings by Standard_DEPRECATED have been disabled due to old gcc version being used")
endif()
endif()

View File

@@ -0,0 +1,18 @@
if ("${TARGET_FOLDER}" STREQUAL "")
set (EXECUTABLE_PROJECT ON)
set (USE_QT ON)
set (RELATIVE_DIR "samples/qt")
set (MODULES_LIST ${OCCT_SAMPLES})
set (TARGET_FOLDER "Samples")
set (TOOLKITS_NAME_SUFFIX "SAMPLES_TOOLKITS")
include_directories("${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/${RELATIVE_DIR}")
else()
unset (USE_QT)
unset (RELATIVE_DIR)
unset (EXECUTABLE_PROJECT)
unset (MODULES_LIST)
unset (TARGET_FOLDER)
unset (TOOLKITS_NAME_SUFFIX)
endif("${TARGET_FOLDER}" STREQUAL "")

View File

@@ -0,0 +1,13 @@
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 "")

18
adm/cmake/openvr.cmake Normal file
View File

@@ -0,0 +1,18 @@
# OpenVR SDK
# OpenVR is an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting.
# https://github.com/ValveSoftware/openvr
# vcpkg processing
if (BUILD_USE_VCPKG)
set (USED_3RDPARTY_OPENVR_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
find_library (FIND_OPENVR_LIB NAMES "${CSF_OpenVR}"
PATHS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib"
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
set (CSF_OpenVR "${FIND_OPENVR_LIB}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/")
return()
endif()
THIRDPARTY_PRODUCT("OPENVR" "openvr.h" "CSF_OpenVR" "")

41
adm/cmake/qt.cmake Normal file
View File

@@ -0,0 +1,41 @@
#qt
# Qt is searched manually first (just determine root)
message (STATUS "Processing Qt 3-rd party")
if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME)
if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
set (3RDPARTY_QT_DIR "" CACHE PATH "The directory containing qt")
message (FATAL_ERROR "Could not find used third-party product: 3RDPARTY_QT_DIR")
endif()
# Combine directory name with absolute path and show in GUI
set (3RDPARTY_QT_DIR "${3RDPARTY_DIR}/${3RDPARTY_QT_DIR_NAME}" CACHE PATH "The directory containing Qt" FORCE)
message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}")
endif()
set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}")
# Now set CMAKE_PREFIX_PATH to point to local Qt installation.
# Without this setting find_package() will not work
set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR})
# Now we can apply standard CMake finder for Qt5. We do this mostly
# to have qt5_wrap_cpp() function available and Qt5_FOUND variable filled
find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)
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)
#message (STATUS "Qt4 cmake configuration")
else()
#message (STATUS "Qt5 cmake configuration")
endif()
if (3RDPARTY_QT_DIR OR EXISTS "${3RDPARTY_QT_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_QT_DIR}/bin")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_QT_DLL_DIR)
endif()

117
adm/cmake/qt_macro.cmake Normal file
View File

@@ -0,0 +1,117 @@
#qt
macro (FIND_QT_PACKAGE PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT_INCLUDES)
if ("${3RDPARTY_QT_DIR}" STREQUAL "")
message (FATAL_ERROR "Empty Qt dir")
endif()
if (${Qt5_FOUND})
#message (STATUS "Qt5 cmake configuration")
set(PROJECT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS}" "${Qt5Quick_INCLUDE_DIRS}" "${Qt5Xml_INCLUDE_DIRS}")
set(PROJECT_LIBRARIES_DEBUG "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}" "${Qt5Xml_LIBRARIES}")
set(PROJECT_LIBRARIES_RELEASE "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}" "${Qt5Xml_LIBRARIES}")
# processing *.ts files to generate *.qm
find_package(Qt5LinguistTools)
get_target_property(QT_LRELEASE_EXECUTABLE Qt5::lrelease LOCATION)
mark_as_advanced(QT_LRELEASE_EXECUTABLE)
GET_FILENAME_COMPONENT(QT_BINARY_DIR ${QT_LRELEASE_EXECUTABLE} DIRECTORY)
MARK_AS_ADVANCED(QT_BINARY_DIR)
else()
#message (STATUS "Qt4 cmake configuration")
set(PROJECT_INCLUDES ${QT_INCLUDES})
if (WIN32)
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/QtCored4.lib;${3RDPARTY_QT_DIR}/lib/QtGuid4.lib;${3RDPARTY_QT_DIR}/lib/QtXmld4.lib")
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/QtCore4.lib;${3RDPARTY_QT_DIR}/lib/QtGui4.lib;${3RDPARTY_QT_DIR}/lib/QtXml4.lib")
else()
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so;${3RDPARTY_QT_DIR}/lib/libQtXml.so")
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so;${3RDPARTY_QT_DIR}/lib/libQtXml.so")
endif(WIN32)
find_program(QT_LRELEASE_EXECUTABLE lrelease)
endif()
endmacro()
macro (FIND_AND_WRAP_MOC_FILES HEADER_FILES GENERATED_MOC_FILES)
set (GENERATED_MOC_FILES "")
foreach (FILE ${HEADER_FILES})
# processing only files where Q_OBJECT exists
file(STRINGS "${FILE}" LINES REGEX "Q_OBJECT")
if(LINES)
unset (MOC_FILE)
if (${Qt5_FOUND})
qt5_wrap_cpp(MOC_FILE ${FILE})
else()
qt4_wrap_cpp(MOC_FILE ${FILE})
endif()
#message (STATUS "... Info: next MOC file ${MOC_FILE}")
list(APPEND ${GENERATED_MOC_FILES} ${MOC_FILE})
endif(LINES)
endforeach (FILE)
endmacro()
macro (FIND_AND_WRAP_RESOURCE_FILE RESOURCE_FILE_NAME RCC_FILES)
if(EXISTS "${RESOURCE_FILE_NAME}")
if (${Qt5_FOUND})
qt5_add_resources(RCC_FILES "${RESOURCE_FILE_NAME}")
else()
qt4_add_resources(RCC_FILES "${RESOURCE_FILE_NAME}")
# suppress some GCC warnings coming from source files generated from .qrc resources
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable")
endif()
endif()
endif()
endmacro()
macro (FIND_AND_WRAP_TS_FILE RESOURCE_FILE_NAME TARGET_FOLDER QM_FILES)
if(EXISTS "${RESOURCE_FILE_NAME}")
if (${Qt5_FOUND})
qt5_add_translation(QM_FILES "${RESOURCE_FILE_NAME}")
else()
qt4_add_translation(QM_FILES "${RESOURCE_FILE_NAME}")
endif()
endif()
endmacro()
macro (FIND_AND_INSTALL_QT_RESOURCES OCCT_PACKAGE RESOURCE_FILES)
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" TS_FILES REGEX ".+[.]ts")
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" QRC_FILES REGEX ".+[.]qrc")
string (FIND "${OCCT_PACKAGE}" "/" _index)
if (_index GREATER -1)
math (EXPR _index "${_index}")
string (SUBSTRING "${OCCT_PACKAGE}" 0 ${_index} OCCT_PACKAGE_NAME)
else()
set (OCCT_PACKAGE_NAME "${OCCT_PACKAGE}")
endif(_index GREATER -1)
#message("QRC files are: ${QRC_FILES} in ${OCCT_PACKAGE}")
foreach (QRC_FILE ${QRC_FILES})
set (QRC_FILE_RELATIVE "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${QRC_FILE}")
if (EXISTS ${QRC_FILE_RELATIVE})
FIND_AND_WRAP_RESOURCE_FILE(${QRC_FILE_RELATIVE} RCC_FILES)
list (APPEND ${RESOURCE_FILES} "${RCC_FILES}")
endif()
endforeach()
#message("TS files are: ${TS_FILES} in ${OCCT_PACKAGE}")
foreach (TS_FILE ${TS_FILES})
set (TS_FILE_RELATIVE "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${TS_FILE}")
FIND_AND_WRAP_TS_FILE(${TS_FILE_RELATIVE} "${TARGET_FOLDER}/${CURRENT_MODULE}" QM_FILES)
if (EXISTS ${TS_FILE_RELATIVE})
list (APPEND ${RESOURCE_FILES} "${TS_FILE_RELATIVE}")
list (APPEND ${RESOURCE_FILES} "${QM_FILES}")
endif()
endforeach()
foreach (QM_FILE ${QM_FILES})
INSTALL(FILES ${QM_FILE} DESTINATION "${INSTALL_DIR_RESOURCE}/samples")
#message("install *.qm files (${QM_FILE}) to: ${INSTALL_DIR_RESOURCE}/samples")
endforeach (QM_FILE ${QM_FILES})
endmacro()

94
adm/cmake/rapidjson.cmake Normal file
View File

@@ -0,0 +1,94 @@
# RapidJSON
# vcpkg processing
if (BUILD_USE_VCPKG)
find_package(RapidJSON CONFIG REQUIRED)
set(CSF_RapidJSON rapidjson)
list (APPEND 3RDPARTY_INCLUDE_DIRS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/rapidjson")
return()
endif()
if (NOT DEFINED INSTALL_RAPIDJSON)
set (INSTALL_RAPIDJSON OFF CACHE BOOL "${INSTALL_RAPIDJSON_DESCR}")
endif()
# RapidJSON directory
if (NOT DEFINED 3RDPARTY_RAPIDJSON_DIR)
set (3RDPARTY_RAPIDJSON_DIR "" CACHE PATH "The directory containing RapidJSON")
endif()
# search for RapidJSON in user defined directory
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_RAPIDJSON_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" RapidJSON RAPIDJSON_DIR_NAME)
if (RAPIDJSON_DIR_NAME)
set (3RDPARTY_RAPIDJSON_DIR "${3RDPARTY_DIR}/${RAPIDJSON_DIR_NAME}" CACHE PATH "The directory containing RapidJSON" FORCE)
endif()
endif()
endif()
if (NOT DEFINED 3RDPARTY_RAPIDJSON_INCLUDE_DIR)
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the RAPIDJSON")
endif()
if (NOT 3RDPARTY_RAPIDJSON_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
set (HEADER_NAMES rapidjson/rapidjson.h)
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "3RDPARTY_RAPIDJSON_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to RapidJSON header file" FORCE)
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
find_path (3RDPARTY_RAPIDJSON_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_RAPIDJSON_DIR}
PATH_SUFFIXES include rapidjson
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_RAPIDJSON_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATH_SUFFIXES include rapidjson
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
# use default (CMake) RapidJSON search
if (NOT 3RDPARTY_RAPIDJSON_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
set (CACHED_RAPIDJSON_DIR $ENV{RapidJSON_DIR})
set (ENV{RapidJSON_DIR} "${3RDPARTY_RAPIDJSON_DIR}")
endif()
find_package(RapidJSON QUIET)
# restore ENV{RapidJSON_DIR}
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
set (ENV{RapidJSON_DIR} ${CACHED_RAPIDJSON_DIR})
endif()
if (${RAPIDJSON_FOUND})
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "${RAPIDJSON_INCLUDE_DIR}" CACHE PATH "the path to RapidJSON header file" FORCE)
set (3RDPARTY_RAPIDJSON_DIR "${RAPIDJSON_ROOT_DIR}" CACHE PATH "The directory containing RapidJSON" FORCE)
endif()
endif()
endif()
if (3RDPARTY_RAPIDJSON_INCLUDE_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
# Install header files
if (INSTALL_RAPIDJSON)
file(GLOB RAPIDJSON_SUBDIRS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}/*")
foreach(SUBDIR ${RAPIDJSON_SUBDIRS})
if(IS_DIRECTORY "${SUBDIR}")
install (DIRECTORY "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
else()
install (FILES "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
endif()
endforeach()
endif()
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_RAPIDJSON_INCLUDE_DIR)
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)

View File

@@ -1,257 +1,261 @@
# tbb
if (NOT DEFINED INSTALL_TBB)
set (INSTALL_TBB OFF CACHE BOOL "${INSTALL_TBB_DESCR}")
endif()
# tbb directory
if (NOT DEFINED 3RDPARTY_TBB_DIR)
set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing tbb")
endif()
# tbb include directory
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the tbb")
endif()
# tbb library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TBB_LIBRARY OR NOT 3RDPARTY_TBB_LIBRARY_DIR)
set (3RDPARTY_TBB_LIBRARY "" CACHE FILEPATH "tbb library" FORCE)
endif()
# tbb library directory
if (NOT DEFINED 3RDPARTY_TBB_LIBRARY_DIR)
set (3RDPARTY_TBB_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tbb library")
endif()
# tbb malloc library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TBBMALLOC_LIBRARY OR NOT 3RDPARTY_TBBMALLOC_LIBRARY_DIR)
set (3RDPARTY_TBBMALLOC_LIBRARY "" CACHE FILEPATH "tbb malloc library" FORCE)
endif()
# tbb malloc library directory
if (NOT DEFINED 3RDPARTY_TBBMALLOC_LIBRARY_DIR)
set (3RDPARTY_TBBMALLOC_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tbb malloc library")
endif()
# tbb shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TBB_DLL OR NOT 3RDPARTY_TBB_DLL_DIR)
set (3RDPARTY_TBB_DLL "" CACHE FILEPATH "tbb shared library" FORCE)
# vcpkg processing
if (BUILD_USE_VCPKG)
find_package(TBB CONFIG REQUIRED)
set(CSF_TBB TBB::tbb TBB::tbbmalloc)
if (WIN32)
set (USED_3RDPARTY_TBB_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin")
else()
set (USED_3RDPARTY_TBB_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib")
endif()
list (APPEND 3RDPARTY_INCLUDE_DIRS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/tbb")
return()
endif()
# tbb shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TBB_DLL_DIR)
set (3RDPARTY_TBB_DLL_DIR "" CACHE FILEPATH "The directory containing tbb shared library")
endif()
# tbb malloc shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TBBMALLOC_DLL OR NOT 3RDPARTY_TBBMALLOC_DLL_DIR)
set (3RDPARTY_TBBMALLOC_DLL "" CACHE FILEPATH "tbb malloc shared library" FORCE)
endif()
endif()
# tbb malloc shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TBBMALLOC_DLL_DIR)
set (3RDPARTY_TBBMALLOC_DLL_DIR "" CACHE FILEPATH "The directory containing tbb malloc shared library")
endif()
if (MSVC)
if (MSVC AND BUILD_SHARED_LIBS)
add_definitions (-D__TBB_NO_IMPLICIT_LINKAGE)
add_definitions (-D__TBBMALLOC_NO_IMPLICIT_LINKAGE)
endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
if (NOT DEFINED INSTALL_TBB AND BUILD_SHARED_LIBS)
set (INSTALL_TBB OFF CACHE BOOL "${INSTALL_TBB_DESCR}")
endif()
# search for product directory inside 3RDPARTY_DIR directory
if (NOT 3RDPARTY_TBB_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" "TBB" TBB_DIR_NAME)
if (TBB_DIR_NAME)
message (STATUS "Info: TBB: ${TBB_DIR_NAME} folder is used")
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
# Initialize tbb directory.
if (NOT DEFINED 3RDPARTY_TBB_DIR)
set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing tbb")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_DIR)
message (FATAL_ERROR "3RDPARTY_DIR is not defined.")
endif()
endif()
OCCT_MAKE_COMPILER_BITNESS()
if (${COMPILER_BITNESS} STREQUAL 32)
set (TBB_ARCH_NAME ia32)
else()
set (TBB_ARCH_NAME intel64)
endif()
# search for include directory in defined 3rdparty directory
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
set (3RDPARTY_TBB_INCLUDE_DIR "3RDPARTY_TBB_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing the headers of tbb" FORCE)
find_path (3RDPARTY_TBB_INCLUDE_DIR tbb/tbb.h PATHS "${3RDPARTY_TBB_DIR}/include" NO_DEFAULT_PATH)
find_path (3RDPARTY_TBB_INCLUDE_DIR tbb/tbb.h PATHS "${3RDPARTY_TBB_DIR}/include")
endif()
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE FILEPATH "The directory containing the headers of tbb" FORCE)
endif()
OCCT_MAKE_COMPILER_SHORT_NAME()
# TBB_COMPILER_FOLER
#if (WIN32)
set (TBB_COMPILER_FOLER ${COMPILER})
#else()
# set (TBB_COMPILER_FOLER ${COMPILER})
#endif()
# search for tbb and tbb malloc library in defined 3rdparty directory
foreach (LIBRARY_NAME TBB TBBMALLOC)
if (NOT WIN32)
file (GLOB TBB_SUBDIRS RELATIVE ${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/ ${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/*)
list (SORT TBB_SUBDIRS)
list (REVERSE TBB_SUBDIRS)
list (LENGTH TBB_SUBDIRS TBB_SUBDIRS_LENGTH)
set (TBB_SUBDIR_FIRST "")
if (${TBB_SUBDIRS_LENGTH})
list (GET TBB_SUBDIRS 0 TBB_SUBDIR_FIRST)
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${TBB_SUBDIR_FIRST}")
endif()
if ("${3RDPARTY_DIR}" STREQUAL "")
message (FATAL_ERROR "3RDPARTY_DIR is empty string.")
endif()
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR)
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "${LIBRARY_NAME} library" FORCE)
elseif (3RDPARTY_${LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
get_filename_component(3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR_TMP "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}" PATH)
if (NOT "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}" STREQUAL "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR_TMP}")
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "${LIBRARY_NAME} library" FORCE)
if (NOT EXISTS "${3RDPARTY_DIR}")
message (FATAL_ERROR "3RDPARTY_DIR is not exist.")
endif()
# Below, we have correct 3RDPARTY_DIR.
# Initialize TBB folder in connection with 3RDPARTY_DIR.
if (("${3RDPARTY_TBB_DIR}" STREQUAL "") OR (NOT EXISTS "${3RDPARTY_TBB_DIR}"))
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" TBB TBB_DIR_NAME)
if (TBB_DIR_NAME)
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
endif()
endif()
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "3RDPARTY_${LIBRARY_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "Path to library of ${LIBRARY_NAME}" FORCE)
# Here we have full path name to installation directory of TBB.
# Employ it.
if (EXISTS "${3RDPARTY_TBB_DIR}")
find_package (
TBB 2021.5
PATHS "${3RDPARTY_TBB_DIR}" NO_DEFAULT_PATH
REQUIRED
CONFIG)
string (TOLOWER "${LIBRARY_NAME}" lower_LIBRARY_NAME)
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${lower_LIBRARY_NAME} PATHS
"${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}"
"${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
NO_DEFAULT_PATH)
# Archive include directory
get_target_property (TBB_INCLUDE_DIR TBB::tbb INTERFACE_INCLUDE_DIRECTORIES)
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB")
endif()
if (EXISTS "${TBB_INCLUDE_DIR}")
set (3RDPARTY_TBB_INCLUDE_DIR "${TBB_INCLUDE_DIR}" CACHE PATH "The directory containing headers of the TBB" FORCE)
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
endif()
# second search if previous one do not find anything
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${LIBRARY_NAME})
# Get installed configuration of tbb
get_target_property (TARGET_TBB_IMPORT_CONFS TBB::tbb IMPORTED_CONFIGURATIONS)
list (GET TARGET_TBB_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
separate_arguments (CSF_TBB)
foreach (LIB IN LISTS CSF_TBB)
string(TOLOWER "${LIB}" LIB_LOWER)
string(TOUPPER "${LIB}" LIB_UPPER)
# Archive *.lib files and directory containing it.
get_target_property (TBB_LIB_FILE "TBB::${LIB_LOWER}" IMPORTED_IMPLIB_${CHOSEN_IMPORT_CONF})
# Reserve cache variable for *.lib.
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY)
set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.lib)")
endif()
# Reserve cache variable for directory containing *.lib file.
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR)
set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR "" CACHE PATH "The directory containing ${LIB_UPPER} library (*.lib)")
endif()
if (EXISTS "${TBB_LIB_FILE}")
set (3RDPARTY_${LIB_UPPER}_LIBRARY
"${TBB_LIB_FILE}"
CACHE FILEPATH
"${LIB_UPPER} library (*.lib)"
FORCE)
get_filename_component (TBB_LIB_FILE_DIRECTORY "${TBB_LIB_FILE}" DIRECTORY)
set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR
"${TBB_LIB_FILE_DIRECTORY}"
CACHE PATH
"The directory containing ${LIB_UPPER} library (*.lib)"
FORCE)
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIB_UPPER}_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR)
endif()
# Archive *.dll files and directory containing it.
get_target_property (TBB_DLL_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
# Reserve cache variable for *.dll.
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL)
set (3RDPARTY_${LIB_UPPER}_DLL "" CACHE FILEPATH "${LIB_UPPER} library (*.dll)")
endif()
# Reserve cache variable for directory containing *.dll file.
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL_DIR)
set (3RDPARTY_${LIB_UPPER}_DLL_DIR "" CACHE PATH "The directory containing ${LIB_UPPER} library (*.dll)")
endif()
if (EXISTS "${TBB_DLL_FILE}")
set (3RDPARTY_${LIB_UPPER}_DLL
"${TBB_DLL_FILE}"
CACHE FILEPATH
"${LIB_UPPER} library (*.dll)"
FORCE)
get_filename_component (TBB_DLL_FILE_DIRECTORY "${TBB_DLL_FILE}" DIRECTORY)
set (3RDPARTY_${LIB_UPPER}_DLL_DIR
"${TBB_DLL_FILE_DIRECTORY}"
CACHE PATH
"The directory containing ${LIB_UPPER} library (*.dll)"
FORCE)
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${LIB_UPPER}_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${LIB_UPPER}_DLL_DIR)
endif()
# install *.dll (tbb & tbbmalloc)
if (INSTALL_TBB)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (SINGLE_GENERATOR)
install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS Release DESTINATION "${INSTALL_DIR_BIN}")
install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS RelWithDebInfo DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS Debug DESTINATION "${INSTALL_DIR_BIN}d")
endif()
endif()
mark_as_advanced (3RDPARTY_${LIB_UPPER}_LIBRARY 3RDPARTY_${LIB_UPPER}_DLL)
endforeach()
if (INSTALL_TBB)
set (USED_3RDPARTY_TBB_DIR "")
else()
# the *.dll/*.so* directory for using by the executable
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR})
endif()
else()
message (FATAL_ERROR "Installation directory with TBB is not exist.")
endif()
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}")
get_filename_component(3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}" PATH)
endif()
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBRARY_NAME} library" FORCE)
# search for dll in defined 3rdparty directory (just for win case)
if (WIN32)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL_DIR)
set (3RDPARTY_${LIBRARY_NAME}_DLL "" CACHE FILEPATH "${LIBRARY_NAME} shared library" FORCE)
elseif (3RDPARTY_${LIBRARY_NAME}_DLL AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
get_filename_component(3RDPARTY_${LIBRARY_NAME}_DLL_DIR_TMP "${3RDPARTY_${LIBRARY_NAME}_DLL}" PATH)
if (NOT "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}" STREQUAL "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR_TMP}")
set (3RDPARTY_${LIBRARY_NAME}_DLL "" CACHE FILEPATH "${LIBRARY_NAME} shared library" FORCE)
else ()
# NOT WIN32 branch
if ((DEFINED 3RDPARTY_DIR) AND (NOT "${3RDPARTY_DIR}" STREQUAL "") AND (EXISTS "${3RDPARTY_DIR}"))
# Here, we have correct 3RDPARTY_DIR.
# Trying to specify TBB folder in connection with 3RDPARTY_DIR
if (("${3RDPARTY_TBB_DIR}" STREQUAL "") OR (NOT EXISTS "${3RDPARTY_TBB_DIR}"))
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" TBB TBB_DIR_NAME)
if (TBB_DIR_NAME)
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
endif()
endif()
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
set (3RDPARTY_${LIBRARY_NAME}_DLL "3RDPARTY_${LIBRARY_NAME}_DLL-NOTFOUND" CACHE FILEPATH "Path to shared library of ${LIBRARY_NAME}" FORCE)
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME} PATHS
"${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}"
"${3RDPARTY_TBB_DIR}/bin/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
NO_DEFAULT_PATH)
# second search if previous one do not find anything
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME})
endif()
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL_DIR OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}")
get_filename_component(3RDPARTY_${LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${LIBRARY_NAME}_DLL}" PATH)
set (3RDPARTY_${LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${LIBRARY_NAME} shared library" FORCE)
endif()
endif() # end dll search
endforeach() # end tbb / tbbmalloc
# include found paths to common variables
if (3RDPARTY_TBB_INCLUDE_DIR AND EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
endif()
foreach (LIBRARY_NAME TBB TBBMALLOC)
if (3RDPARTY_${LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR)
endif()
if (WIN32)
if (3RDPARTY_${LIBRARY_NAME}_DLL OR EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}")
if ((NOT "${3RDPARTY_TBB_DIR}" STREQUAL "") AND (EXISTS "${3RDPARTY_TBB_DIR}"))
# Find TBB 2021.5 in existing directory.
find_package (
TBB 2021.5
PATHS "${3RDPARTY_TBB_DIR}" NO_DEFAULT_PATH
REQUIRED
CONFIG)
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBRARY_NAME}_DLL_DIR)
# Find TBB 2021.5 in system directory.
find_package (
TBB 2021.5
REQUIRED
CONFIG)
endif()
endif()
endforeach()
# install tbb
if (INSTALL_TBB)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
else()
get_filename_component(TBBLIB ${3RDPARTY_TBB_LIBRARY} NAME)
get_filename_component(TBBMALLOCLIB ${3RDPARTY_TBBMALLOC_LIBRARY} NAME)
# Find TBB 2021.5 in system directory.
find_package (
TBB 2021.5
REQUIRED
CONFIG)
endif()
# TBB has been configured (in other case FATAL_ERROR occurs).
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${TBBLIB}.2)
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${TBBLIB}.2)
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${TBBLIB}.2)
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${TBBMALLOCLIB}.2)
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${TBBMALLOCLIB}.2)
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${TBBMALLOCLIB}.2)
# Archive include directory.
get_target_property (TBB_INCLUDE_DIR TBB::tbb INTERFACE_INCLUDE_DIRECTORIES)
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB")
endif()
if (EXISTS "${TBB_INCLUDE_DIR}")
set (3RDPARTY_TBB_INCLUDE_DIR "${TBB_INCLUDE_DIR}" CACHE PATH "The directory containing headers of the TBB" FORCE)
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
endif()
set (USED_3RDPARTY_TBB_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR})
# Get installed configuration of tbb
get_target_property (TARGET_TBB_IMPORT_CONFS TBB::tbb IMPORTED_CONFIGURATIONS)
list (GET TARGET_TBB_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
separate_arguments (CSF_TBB)
foreach (LIB IN LISTS CSF_TBB)
string(TOLOWER "${LIB}" LIB_LOWER)
string(TOUPPER "${LIB}" LIB_UPPER)
# Archive *.so files and directory containing it.
get_target_property (TBB_SO_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
# Reserve cache variable for *.so.
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY)
set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.so)")
endif()
# Reserve cache variable for directory containing *.so file.
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR)
set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR "" CACHE PATH "The directory containing ${LIB_UPPER} library (*.so)")
endif()
if (EXISTS "${TBB_SO_FILE}")
set (3RDPARTY_${LIB_UPPER}_LIBRARY
"${TBB_SO_FILE}"
CACHE FILEPATH
"${LIB_UPPER} library (*.so)"
FORCE)
get_filename_component (TBB_SO_FILE_DIRECTORY "${TBB_SO_FILE}" DIRECTORY)
set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR
"${TBB_SO_FILE_DIRECTORY}"
CACHE PATH
"The directory containing ${LIB_UPPER} library (*.so)"
FORCE)
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIB_UPPER}_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR)
endif()
# install *.so* (tbb & tbbmalloc)
if (INSTALL_TBB)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (SINGLE_GENERATOR)
install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS Release DESTINATION "${INSTALL_DIR_LIB}")
install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS RelWithDebInfo DESTINATION "${INSTALL_DIR_LIB}i")
install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS Debug DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()
endforeach()
if (INSTALL_TBB)
set (USED_3RDPARTY_TBB_DIR "")
else()
# the *.so* directory for using by the executable
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
endif()
endif()
mark_as_advanced (3RDPARTY_TBB_LIBRARY 3RDPARTY_TBBMALLOC_LIBRARY 3RDPARTY_TBB_DLL 3RDPARTY_TBBMALLOC_DLL)

View File

@@ -1,6 +1,6 @@
# tcl
if (NOT DEFINED INSTALL_TCL)
if (NOT DEFINED INSTALL_TCL AND NOT BUILD_USE_VCPKG)
set (INSTALL_TCL OFF CACHE BOOL "${INSTALL_TCL_DESCR}")
endif()
@@ -14,9 +14,9 @@ if (NOT DEFINED 3RDPARTY_TCL_INCLUDE_DIR)
set (3RDPARTY_TCL_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tcl")
endif()
# tk include directory
if (NOT DEFINED 3RDPARTY_TK_INCLUDE_DIR)
set (3RDPARTY_TK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tk")
if (BUILD_USE_VCPKG)
set (3RDPARTY_TCL_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" CACHE PATH "The directory containing tcl" FORCE)
set (3RDPARTY_TCL_INCLUDE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" CACHE FILEPATH "The directory containing headers of tcl" FORCE)
endif()
# tcl library file (with absolute path)
@@ -29,16 +29,6 @@ if (NOT DEFINED 3RDPARTY_TCL_LIBRARY_DIR)
set (3RDPARTY_TCL_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tcl library")
endif()
# tk library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TK_LIBRARY OR NOT 3RDPARTY_TK_LIBRARY_DIR)
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "tk library" FORCE)
endif()
# tk library directory
if (NOT DEFINED 3RDPARTY_TK_LIBRARY_DIR)
set (3RDPARTY_TK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tk library")
endif()
# tcl shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TCL_DLL OR NOT 3RDPARTY_TCL_DLL_DIR)
@@ -51,17 +41,6 @@ if (WIN32 AND NOT DEFINED 3RDPARTY_TCL_DLL_DIR)
set (3RDPARTY_TCL_DLL_DIR "" CACHE FILEPATH "The directory containing tcl shared library")
endif()
# tk shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TK_DLL OR NOT 3RDPARTY_TK_DLL_DIR)
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "tk shared library" FORCE)
endif()
endif()
# tk shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TK_DLL_DIR)
set (3RDPARTY_TK_DLL_DIR "" CACHE FILEPATH "The directory containing tk shared library")
endif()
# search for tcl in user defined directory
if (NOT 3RDPARTY_TCL_DIR AND 3RDPARTY_DIR)
@@ -76,226 +55,146 @@ if (3RDPARTY_TCL_DIR AND EXISTS "${3RDPARTY_TCL_DIR}")
set (TCL_INCLUDE_PATH "${3RDPARTY_TCL_DIR}/include")
endif()
# check tcl/tk include dir, library dir and shared library dir
macro (DIR_SUBDIR_FILE_FIT LIBNAME)
if (3RDPARTY_TCL_DIR AND EXISTS "${3RDPARTY_TCL_DIR}")
# tcl/tk include dir
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
endif()
# tcl/tk library dir
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
endif()
# tcl/tk shared library dir
if (WIN32)
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL_DIR}")
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
endif()
endif()
endif()
# check tcl/tk library
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY}")
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
endif()
# check tcl/tk shared library
if (WIN32)
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
if (3RDPARTY_${LIBNAME}_DLL AND EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DLL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL}")
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
endif()
else()
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
endif()
endif()
endmacro()
DIR_SUBDIR_FILE_FIT(TCL)
DIR_SUBDIR_FILE_FIT(TK)
# check tcl include dir, library dir and shared library dir
COMPLIANCE_PRODUCT_CONSISTENCY(TCL)
# use default (CMake) TCL search
find_package(TCL)
find_package(TCL QUIET)
foreach (LIBNAME TCL TK)
string (TOLOWER "${LIBNAME}" LIBNAME_L)
# tcl include dir
if (NOT 3RDPARTY_TCL_INCLUDE_DIR)
if (TCL_INCLUDE_PATH AND EXISTS "${TCL_INCLUDE_PATH}")
set (3RDPARTY_TCL_INCLUDE_DIR "${TCL_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of TCL" FORCE)
endif()
endif()
# tcl/tk include dir
if (NOT 3RDPARTY_${LIBNAME}_INCLUDE_DIR)
if (${LIBNAME}_INCLUDE_PATH AND EXISTS "${${LIBNAME}_INCLUDE_PATH}")
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "${${LIBNAME}_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
# tcl dir and library
if (NOT 3RDPARTY_TCL_LIBRARY)
if (TCL_LIBRARY AND EXISTS "${TCL_LIBRARY}")
set (3RDPARTY_TCL_LIBRARY "${TCL_LIBRARY}" CACHE FILEPATH "TCL library" FORCE)
if (NOT 3RDPARTY_TCL_LIBRARY_DIR)
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
set (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TCL library" FORCE)
endif()
endif()
endif()
# tcl/tk dir and library
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY)
if (${LIBNAME}_LIBRARY AND EXISTS "${${LIBNAME}_LIBRARY}")
set (3RDPARTY_${LIBNAME}_LIBRARY "${${LIBNAME}_LIBRARY}" CACHE FILEPATH "${LIBNAME} library" FORCE)
if (WIN32)
if (NOT 3RDPARTY_TCL_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll .a)
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY_DIR)
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY}" PATH)
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
endif()
endif()
endif()
if (WIN32)
if (NOT 3RDPARTY_${LIBNAME}_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_${LIBNAME}_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_DLL_DIR}")
elseif (3RDPARTY_TCL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
elseif (3RDPARTY_${LIBNAME}_LIBRARY_DIR)
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_${LIBNAME}_DLL "3RDPARTY_${LIBNAME}_DLL-NOTFOUND" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
find_library (3RDPARTY_${LIBNAME}_DLL NAMES ${LIBNAME_L}86 ${LIBNAME_L}85
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
endif()
endif()
DIR_SUBDIR_FILE_FIT(${LIBNAME})
# tcl/tk dir and library
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY)
set (3RDPARTY_${LIBNAME}_LIBRARY "3RDPARTY_${LIBNAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${LIBNAME} library" FORCE)
find_library (3RDPARTY_${LIBNAME}_LIBRARY NAMES ${LIBNAME_L}8.6 ${LIBNAME_L}86 ${LIBNAME_L}8.5 ${LIBNAME_L}85
PATHS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}"
NO_DEFAULT_PATH)
# search in another place if previous search doesn't find anything
find_library (3RDPARTY_${LIBNAME}_LIBRARY NAMES ${LIBNAME_L}8.6 ${LIBNAME_L}86 ${LIBNAME_L}8.5 ${LIBNAME_L}85
PATHS "${3RDPARTY_TCL_DIR}/lib"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TCL_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DLL_DIR}")
elseif (3RDPARTY_TCL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
elseif (3RDPARTY_TCL_LIBRARY_DIR)
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR_PARENT "${3RDPARTY_TCL_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_LIBRARY_DIR_PARENT}/bin")
endif()
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY_DIR AND 3RDPARTY_${LIBNAME}_LIBRARY)
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY}" PATH)
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
endif()
set (3RDPARTY_TCL_DLL "3RDPARTY_TCL_DLL-NOTFOUND" CACHE FILEPATH "TCL shared library" FORCE)
find_library (3RDPARTY_TCL_DLL NAMES ${CSF_TclLibs}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
endif()
endif()
COMPLIANCE_PRODUCT_CONSISTENCY(TCL)
# tcl dir and library
if (NOT 3RDPARTY_TCL_LIBRARY)
set (3RDPARTY_TCL_LIBRARY "3RDPARTY_TCL_LIBRARY-NOTFOUND" CACHE FILEPATH "TCL library" FORCE)
find_library (3RDPARTY_TCL_LIBRARY NAMES ${CSF_TclLibs}
PATHS "${3RDPARTY_TCL_LIBRARY_DIR}"
NO_DEFAULT_PATH)
# search in another place if previous search doesn't find anything
find_library (3RDPARTY_TCL_LIBRARY NAMES ${CSF_TclLibs}
PATHS "${3RDPARTY_TCL_DIR}/lib"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TCL_LIBRARY OR NOT EXISTS "${3RDPARTY_TCL_LIBRARY}")
set (3RDPARTY_TCL_LIBRARY "" CACHE FILEPATH "TCL library" FORCE)
endif()
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION "")
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
get_filename_component (${LIBNAME}_LIBRARY_NAME "${3RDPARTY_${LIBNAME}_LIBRARY}" NAME)
string(REGEX REPLACE "^.*${LIBNAME_L}([0-9]\\.*[0-9]).*$" "\\1" ${LIBNAME}_LIBRARY_VERSION "${${LIBNAME}_LIBRARY_NAME}")
if (NOT "${${LIBNAME}_LIBRARY_VERSION}" STREQUAL "${${LIBNAME}_LIBRARY_NAME}")
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION "${${LIBNAME}_LIBRARY_VERSION}")
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
message (STATUS "Info: ${LIBNAME} version isn't found")
endif()
if (NOT 3RDPARTY_TCL_LIBRARY_DIR AND 3RDPARTY_TCL_LIBRARY)
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
set (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TCL library" FORCE)
endif()
endif()
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION_WITH_DOT "")
if (3RDPARTY_${LIBNAME}_LIBRARY_VERSION)
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_${LIBNAME}_MAJOR_VERSION "${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}")
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_${LIBNAME}_MINOR_VERSION "${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}")
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_${LIBNAME}_MAJOR_VERSION}.${3RDPARTY_${LIBNAME}_MINOR_VERSION}")
set (3RDPARTY_TCL_LIBRARY_VERSION "")
if (3RDPARTY_TCL_LIBRARY AND EXISTS "${3RDPARTY_TCL_LIBRARY}")
get_filename_component (TCL_LIBRARY_NAME "${3RDPARTY_TCL_LIBRARY}" NAME)
string(REGEX REPLACE "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY_NAME}")
if (NOT "${TCL_LIBRARY_VERSION}" STREQUAL "${TCL_LIBRARY_NAME}")
set (3RDPARTY_TCL_LIBRARY_VERSION "${TCL_LIBRARY_VERSION}")
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
message (STATUS "Info: TCL version isn't found")
endif()
endif()
if (WIN32)
if (NOT 3RDPARTY_${LIBNAME}_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
set (3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT "")
if (3RDPARTY_TCL_LIBRARY_VERSION)
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_TCL_MAJOR_VERSION "${3RDPARTY_TCL_LIBRARY_VERSION}")
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_TCL_MINOR_VERSION "${3RDPARTY_TCL_LIBRARY_VERSION}")
set (3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_TCL_MAJOR_VERSION}.${3RDPARTY_TCL_MINOR_VERSION}")
endif()
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_${LIBNAME}_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_DLL_DIR}")
elseif (3RDPARTY_TCL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
else()
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT}/bin")
endif()
if (WIN32)
if (NOT 3RDPARTY_TCL_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll .a)
set (3RDPARTY_${LIBNAME}_DLL "3RDPARTY_${LIBNAME}_DLL-NOTFOUND" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
find_library (3RDPARTY_${LIBNAME}_DLL NAMES ${LIBNAME_L}${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_${LIBNAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
endif()
if (NOT 3RDPARTY_${LIBNAME}_DLL_DIR AND 3RDPARTY_${LIBNAME}_DLL)
get_filename_component (3RDPARTY_${LIBNAME}_DLL_DIR "${3RDPARTY_${LIBNAME}_DLL}" PATH)
set (3RDPARTY_${LIBNAME}_DLL_DIR "${3RDPARTY_${LIBNAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
endif()
endif()
endif()
# include found paths to common variables
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_INCLUDE_DIR)
endif()
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_LIBRARY_DIR})
endif()
if (WIN32)
if (3RDPARTY_${LIBNAME}_DLL OR EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TCL_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DLL_DIR}")
elseif (3RDPARTY_TCL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_DLL_DIR)
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR_PARENT "${3RDPARTY_TCL_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_TCL_DLL "3RDPARTY_TCL_DLL-NOTFOUND" CACHE FILEPATH "TCL shared library" FORCE)
find_library (3RDPARTY_TCL_DLL NAMES tcl${3RDPARTY_TCL_LIBRARY_VERSION}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TCL_DLL OR NOT EXISTS "${3RDPARTY_TCL_DLL}")
set (3RDPARTY_TCL_DLL "" CACHE FILEPATH "TCL shared library" FORCE)
endif()
endif()
endforeach()
if (NOT 3RDPARTY_TCL_DLL_DIR AND 3RDPARTY_TCL_DLL)
get_filename_component (3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL}" PATH)
set (3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL_DIR}" CACHE FILEPATH "The directory containing TCL shared library" FORCE)
endif()
endif()
# install tcltk
# include found paths to common variables
if (3RDPARTY_TCL_INCLUDE_DIR AND EXISTS "${3RDPARTY_TCL_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TCL_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_INCLUDE_DIR)
endif()
if (3RDPARTY_TCL_LIBRARY AND EXISTS "${3RDPARTY_TCL_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TCL_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_TCL_LIBRARY_DIR)
endif()
if (WIN32)
if (3RDPARTY_TCL_DLL OR EXISTS "${3RDPARTY_TCL_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_TCL_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_TCL_DLL_DIR)
endif()
endif()
# install tcl
if (INSTALL_TCL)
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
@@ -306,49 +205,46 @@ if (INSTALL_TCL)
if (WIN32)
# tcl 8.6 requires zlib. install all dlls from tcl bin folder that may contain zlib also
# collect and install all dlls from tcl/tk dll dirs
# collect and install all dlls from tcl dll dirs
file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
install (FILES ${TCL_DLLS} ${TK_DLLS}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (FILES ${TCL_DLLS} ${TK_DLLS}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (FILES ${TCL_DLLS} ${TK_DLLS}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
if (SINGLE_GENERATOR)
install (FILES ${TCL_DLLS} DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES ${TCL_DLLS}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES ${TCL_DLLS}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES ${TCL_DLLS}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_TCL_LIBRARY_REALPATH ${3RDPARTY_TCL_LIBRARY} REALPATH)
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
if (SINGLE_GENERATOR)
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}")
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i")
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()
if (TCL_TCLSH_VERSION)
# tcl is required to install in lib folder (without)
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR_LIB}")
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR_LIB}")
else()
message (STATUS "\nWarning: tclX.X and tkX.X subdirs won't be copyied during the installation process.")
message (STATUS "\nWarning: tclX.X subdir won't be copied during the installation process.")
message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
endif()
@@ -362,7 +258,20 @@ else()
endif()
endif()
mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TK_LIBRARY 3RDPARTY_TCL_DLL 3RDPARTY_TK_DLL)
mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TCL_DLL)
if (TK_FOUND AND 3RDPARTY_TCL_DIR)
get_filename_component (TK_WISH_ABSOLUTE "${TK_WISH}" ABSOLUTE)
get_filename_component (3RDPARTY_TCL_DIR_ABSOLUTE "${3RDPARTY_TCL_DIR}" ABSOLUTE)
string (FIND "${TK_WISH_ABSOLUTE}" "${3RDPARTY_TCL_DIR_ABSOLUTE}" THE_SAME_FOLDER)
if (${THE_SAME_FOLDER} EQUAL 0)
set (3RDPARTY_TCLTK_DIR "${3RDPARTY_TCL_DIR}")
message (STATUS "Info: TK is used from TCL folder: ${3RDPARTY_TCLTK_DIR}")
endif()
endif()
# unset all redundant variables
#TCL
@@ -373,3 +282,4 @@ OCCT_CHECK_AND_UNSET (TCL_TCLSH)
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TK_WISH)

293
adm/cmake/tk.cmake Normal file
View File

@@ -0,0 +1,293 @@
# tk
if (NOT DEFINED INSTALL_TK AND BUILD_SHARED_LIBS)
set (INSTALL_TK OFF CACHE BOOL "${INSTALL_TK_DESCR}")
endif()
# tk directory
if (NOT DEFINED 3RDPARTY_TK_DIR)
set (3RDPARTY_TK_DIR "" CACHE PATH "The directory containing tk")
endif ()
if (NOT 3RDPARTY_TK_DIR AND 3RDPARTY_TCLTK_DIR)
set (3RDPARTY_TK_DIR "${3RDPARTY_TCLTK_DIR}" CACHE PATH "The directory containing tk" FORCE)
endif()
# tk include directory
if (NOT DEFINED 3RDPARTY_TK_INCLUDE_DIR)
set (3RDPARTY_TK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tk")
endif()
# if (BUILD_USE_VCPKG)
# set (3RDPARTY_TK_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" CACHE PATH "The directory containing tk" FORCE)
# set (3RDPARTY_TCLTK_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" CACHE PATH "The directory containing tcltk" FORCE)
# set (3RDPARTY_TK_INCLUDE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" CACHE FILEPATH "The directory containing headers of tk" FORCE)
# endif()
if (BUILD_SHARED_LIBS)
# tk library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TK_LIBRARY OR NOT 3RDPARTY_TK_LIBRARY_DIR)
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "tk library" FORCE)
endif()
# tk library directory
if (NOT DEFINED 3RDPARTY_TK_LIBRARY_DIR)
set (3RDPARTY_TK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tk library")
endif()
# tk shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TK_DLL OR NOT 3RDPARTY_TK_DLL_DIR)
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "tk shared library" FORCE)
endif()
endif()
# tk shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TK_DLL_DIR)
set (3RDPARTY_TK_DLL_DIR "" CACHE FILEPATH "The directory containing tk shared library")
endif()
endif()
# search for tk in user defined directory
if (NOT 3RDPARTY_TK_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" tk TK_DIR_NAME)
if (TK_DIR_NAME)
set (3RDPARTY_TK_DIR "${3RDPARTY_DIR}/${TK_DIR_NAME}" CACHE PATH "The directory containing tk" FORCE)
endif()
endif()
# define paths for default engine
if (3RDPARTY_TK_DIR AND EXISTS "${3RDPARTY_TK_DIR}")
set (TK_INCLUDE_PATH "${3RDPARTY_TK_DIR}/include")
endif()
# check tk include dir, library dir and shared library dir
COMPLIANCE_PRODUCT_CONSISTENCY(TK)
# use default (CMake) TCL search
find_package(TCL QUIET)
# tk include dir
if (NOT 3RDPARTY_TK_INCLUDE_DIR)
if (TK_INCLUDE_PATH AND EXISTS "${TK_INCLUDE_PATH}")
set (3RDPARTY_TK_INCLUDE_DIR "${TK_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of TK" FORCE)
endif()
endif()
if (BUILD_SHARED_LIBS)
# tk dir and library
if (NOT 3RDPARTY_TK_LIBRARY)
if (TK_LIBRARY AND EXISTS "${TK_LIBRARY}")
set (3RDPARTY_TK_LIBRARY "${TK_LIBRARY}" CACHE FILEPATH "TK library" FORCE)
if (NOT 3RDPARTY_TK_LIBRARY_DIR)
get_filename_component (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY}" PATH)
set (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TK library" FORCE)
endif()
endif()
endif()
if (WIN32)
if (NOT 3RDPARTY_TK_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll" ".a")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TK_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DLL_DIR}")
elseif (3RDPARTY_TK_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DIR}/bin")
elseif (3RDPARTY_TK_LIBRARY_DIR)
get_filename_component (3RDPARTY_TK_LIBRARY_DIR_PARENT "${3RDPARTY_TK_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_TK_DLL "3RDPARTY_TK_DLL-NOTFOUND" CACHE FILEPATH "TK shared library" FORCE)
find_library (3RDPARTY_TK_DLL NAMES ${CSF_TclTkLibs}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
endif()
endif()
endif()
COMPLIANCE_PRODUCT_CONSISTENCY(TK)
if (BUILD_SHARED_LIBS)
# tk dir and library
if (NOT 3RDPARTY_TK_LIBRARY)
set (3RDPARTY_TK_LIBRARY "3RDPARTY_TK_LIBRARY-NOTFOUND" CACHE FILEPATH "TK library" FORCE)
find_library (3RDPARTY_TK_LIBRARY NAMES ${CSF_TclTkLibs}
PATHS "${3RDPARTY_TK_LIBRARY_DIR}"
NO_DEFAULT_PATH)
# search in another place if previous search doesn't find anything
find_library (3RDPARTY_TK_LIBRARY NAMES ${CSF_TclTkLibs}
PATHS "${3RDPARTY_TK_DIR}/lib"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TK_LIBRARY OR NOT EXISTS "${3RDPARTY_TK_LIBRARY}")
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "TK library" FORCE)
endif()
if (NOT 3RDPARTY_TK_LIBRARY_DIR AND 3RDPARTY_TK_LIBRARY)
get_filename_component (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY}" PATH)
set (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TK library" FORCE)
endif()
endif()
set (3RDPARTY_TK_LIBRARY_VERSION "")
if (3RDPARTY_TK_LIBRARY AND EXISTS "${3RDPARTY_TK_LIBRARY}")
get_filename_component (TK_LIBRARY_NAME "${3RDPARTY_TK_LIBRARY}" NAME)
string(REGEX REPLACE "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY_NAME}")
if (NOT "${TK_LIBRARY_VERSION}" STREQUAL "${TK_LIBRARY_NAME}")
set (3RDPARTY_TK_LIBRARY_VERSION "${TK_LIBRARY_VERSION}")
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
message (STATUS "Info: TK version isn't found")
endif()
endif()
set (3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT "")
if (3RDPARTY_TK_LIBRARY_VERSION)
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_TK_MAJOR_VERSION "${3RDPARTY_TK_LIBRARY_VERSION}")
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_TK_MINOR_VERSION "${3RDPARTY_TK_LIBRARY_VERSION}")
set (3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_TK_MAJOR_VERSION}.${3RDPARTY_TK_MINOR_VERSION}")
endif()
if (WIN32)
if (NOT 3RDPARTY_TK_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll" ".a")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TK_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DLL_DIR}")
elseif (3RDPARTY_TK_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DIR}/bin")
else()
get_filename_component (3RDPARTY_TK_LIBRARY_DIR_PARENT "${3RDPARTY_TK_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_TK_DLL "3RDPARTY_TK_DLL-NOTFOUND" CACHE FILEPATH "TK shared library" FORCE)
find_library (3RDPARTY_TK_DLL NAMES tk${3RDPARTY_TK_LIBRARY_VERSION}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TK_DLL OR NOT EXISTS "${3RDPARTY_TK_DLL}")
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "TK shared library" FORCE)
endif()
endif()
if (NOT 3RDPARTY_TK_DLL_DIR AND 3RDPARTY_TK_DLL)
get_filename_component (3RDPARTY_TK_DLL_DIR "${3RDPARTY_TK_DLL}" PATH)
set (3RDPARTY_TK_DLL_DIR "${3RDPARTY_TK_DLL_DIR}" CACHE FILEPATH "The directory containing TK shared library" FORCE)
endif()
endif()
endif()
# include found paths to common variables
if (3RDPARTY_TK_INCLUDE_DIR AND EXISTS "${3RDPARTY_TK_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TK_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TK_INCLUDE_DIR)
endif()
if (BUILD_SHARED_LIBS)
if (3RDPARTY_TK_LIBRARY AND EXISTS "${3RDPARTY_TK_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TK_LIBRARY_DIR}")
else()
set (USE_TK OFF)
message(STATUS "Warning: TK library is not found. TK will be disabled.")
endif()
if (WIN32)
if (3RDPARTY_TK_DLL OR EXISTS "${3RDPARTY_TK_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_TK_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_TK_DLL_DIR)
endif()
endif()
# install tk
if (INSTALL_TK)
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
# tk 8.6 requires zlib. install all dlls from tk bin folder that may contain zlib also
# collect and install all dlls from tk dll dirs
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
if (SINGLE_GENERATOR)
install (FILES ${TK_DLLS} DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES ${TK_DLLS}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES ${TK_DLLS}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES ${TK_DLLS}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
if (SINGLE_GENERATOR)
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}/")
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}/i")
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()
if (TCL_TCLSH_VERSION)
# tk is required to install in lib folder (without)
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR_LIB}")
else()
message (STATUS "\nWarning: tkX.X subdir won't be copied during the installation process.")
message (STATUS "Try seeking tk within another folder by changing 3RDPARTY_TK_DIR variable.")
endif()
set (USED_3RDPARTY_TK_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_TK_DIR ${3RDPARTY_TK_DLL_DIR})
else()
set (USED_3RDPARTY_TK_DIR ${3RDPARTY_TK_LIBRARY_DIR})
endif()
endif()
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)
#TK
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TK_WISH)
if (NOT BUILD_SHARED_LIBS)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_LIBRARY)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_LIBRARY_DIR)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_DLL)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_DLL_DIR)
OCCT_CHECK_AND_UNSET (INSTALL_TK)
endif()

View File

@@ -1,7 +1,7 @@
# variable description
#
set (APPLY_OCCT_PATCH_DIR_DESCR
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
@@ -13,36 +13,102 @@ set (BUILD_LIBRARY_TYPE_DESCR
are linked dynamically and loaded at runtime. 'Static' libraries
are archives of object files for use when linking other targets")
set (REBUILD_PLATFORM_DEPENDENT_CODE_DESCR
set (BUILD_YACCLEX_DESCR
"Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and
ExprIntrp functionality are generated automatically with Flex/Bison. Checking this options
leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files")
set (OCCT_ALGO_EXTENDED_OUTPUT_DESCR
"Enables extended messages of many OCCT algorithms, usually printed to cout.
These include messages on internal errors and special cases encountered, timing etc")
set (BUILD_RESOURCES_DESCR "Enables regeneration of OCCT resource files")
set (BUILD_WITH_DEBUG_DESCR
"Enables extended messages of many OCCT algorithms, usually printed to cout.
These include messages on internal errors and special cases encountered, timing etc.
Applies only for Debug configuration.")
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
"Append the postfix to names of output libraries")
set (BUILD_SOVERSION_NUMBERS_DESCR
"Version numbers to put into SONAME: 0 - for empty, 1 - for major, 2 - for major.minor, 3 - for major.minor.maintenance")
set (BUILD_RELEASE_DISABLE_EXCEPTIONS_DESCR
"Disables exceptions like Standard_OutOfRange in Release builds.
Defines No_Exception macros for Release builds when enabled (default).
These exceptions are always enabled in Debug builds, but disable in Release for better performance")
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER_DESCR
"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.")
set (BUILD_FORCE_RelWithDebInfo_DESCR
"Generate PDB files within normal Release build.")
set (BUILD_USE_PCH_DESCR
"Use precompiled headers to accelerate the build.
Precompiled headers are generated automatically by Cotire tool.")
set (BUILD_INCLUDE_SYMLINK_DESCR
"Include symbolic links to the source files in the build directory.
OFF - using a reference file with direct include to the origin,
ON - symbolic link to the origin file are created")
# install variables
set (INSTALL_DIR_DESCR
"The place where built OCCT libraries, headers, test cases (INSTALL_OCCT_TEST_CASES variable),
samples (INSTALL_OCCT_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_GL2PS, INSTALL_TBB and
"The place where built OCCT libraries, headers, test cases (INSTALL_TEST_CASES variable),
samples (INSTALL_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_TBB and
other similar variables) will be placed during the installation process (building INSTALL project)")
set (INSTALL_DIR_WITH_VERSION_DESCR
"Use OCCT version number as suffix for names of directories")
set (INSTALL_DIR_LAYOUT_DESCR
"Defines structure of OCCT files (binaries, resources, headers etc.) for the install directory.
Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout).
If needed, layout can be customized with INSTALL_DIR_* variables.")
set (INSTALL_DIR_BIN_DESCR
"Subdirectory of INSTALL_DIR where binaries will be installed")
set (INSTALL_DIR_INCLUDE_DESCR
"Subdirectory of INSTALL_DIR where OCCT headers will be installed")
set (INSTALL_DIR_DATA_DESCR
"Subdirectory of INSTALL_DIR where sample data files will be installed")
set (INSTALL_DIR_DOC_DESCR
"Subdirectory of INSTALL_DIR where documentation will be installed")
set (INSTALL_DIR_LIB_DESCR
"Subdirectory of INSTALL_DIR where libraries (.so on Linux, .lib on Windows) will be installed")
set (INSTALL_DIR_RESOURCE_DESCR
"Subdirectory of INSTALL_DIR where OCCT resource files will be installed")
set (INSTALL_DIR_SAMPLES_DESCR
"Subdirectory of INSTALL_DIR where samples will be installed")
set (INSTALL_DIR_TESTS_DESCR
"Subdirectory of INSTALL_DIR where test scripts will be installed")
set (INSTALL_DIR_SCRIPT_DESCR
"Subdirectory of INSTALL_DIR where scripts will be installed")
set (INSTALL_DIR_CMAKE_DESCR
"Subdirectory of INSTALL_DIR where CMake configuration files will be installed.
Must be three levels below INSTALL_DIR")
macro (INSTALL_MESSAGE INSTALL_TARGET_VARIABLE INSTALL_TARGET_STRING)
set (${INSTALL_TARGET_VARIABLE}_DESCR
"Indicates whether ${INSTALL_TARGET_STRING} should be installed (building INSTALL
project) into the installation directory (INSTALL_DIR variable)")
endmacro()
INSTALL_MESSAGE (INSTALL_OCCT_SAMPLES "OCCT samples")
INSTALL_MESSAGE (INSTALL_OCCT_TEST_CASES "non-regression OCCT test scripts")
INSTALL_MESSAGE (INSTALL_DOC_OcctOverview "OCCT overview documentation (HTML format)")
INSTALL_MESSAGE (INSTALL_SAMPLES "OCCT samples")
INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts")
INSTALL_MESSAGE (INSTALL_DOC_Overview "OCCT overview documentation (HTML format)")
INSTALL_MESSAGE (INSTALL_FFMPEG "FFmpeg binaries")
INSTALL_MESSAGE (INSTALL_FREEIMAGE "FreeImage binaries")
INSTALL_MESSAGE (INSTALL_FREEIMAGEPLUS "FreeImagePlus binaries")
INSTALL_MESSAGE (INSTALL_OPENVR "OpenVR binaries")
INSTALL_MESSAGE (INSTALL_EIGEN "EIGEN header files")
INSTALL_MESSAGE (INSTALL_EGL "EGL binaries")
INSTALL_MESSAGE (INSTALL_GLES2 "OpenGL ES 2.0 binaries")
INSTALL_MESSAGE (INSTALL_FREETYPE "FreeType binaries")
INSTALL_MESSAGE (INSTALL_GL2PS "GL2PS binaries")
INSTALL_MESSAGE (INSTALL_TBB "TBB binaries")
INSTALL_MESSAGE (INSTALL_RAPIDJSON "RapidJSON header files")
INSTALL_MESSAGE (INSTALL_TCL "TCL binaries")
INSTALL_MESSAGE (INSTALL_TK "TK binaries")
INSTALL_MESSAGE (INSTALL_VTK "VTK binaries ")
# build variables
@@ -55,6 +121,7 @@ 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")
@@ -68,44 +135,87 @@ want to build some particular libraries (toolkits) only, then you may uncheck
all modules in the corresponding BUILD_MODUE_* options and provide the list of
necessary libraries here. Of course, all dependencies will be resolved automatically")
set (BUILD_MODULE_OcctMfcSamples_DESCR
set (BUILD_SAMPLES_MFC_DESCR
"Indicates whether OCCT MFC samples should be built together with OCCT.
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_DOC_OcctOverview_DESCR
set (BUILD_SAMPLES_QT_DESCR
"Indicates whether OCCT Qt samples should be built together with OCCT.
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.")
set (BUILD_DOC_Overview_DESCR
"Indicates whether OCCT overview documentation project (Markdown format) should be
created together with OCCT. It is not built together with OCCT. Checking this options
leads to automatic search of Doxygen binaries. Building of it will be call Doxygen command
to generate the documentation in HTML format. The documentation will be available in the
installation directory (overview.bat script) if INSTALL_DOC_OcctOverview variable is checked")
installation directory (overview.bat script) if INSTALL_DOC_Overview variable is checked")
set (3RDPARTY_DIR_DESCR
"The root directory where all required 3-rd party products will be searched. If a
3-rd party product have been found - corresponding CMake variables will be specified
"The root directory where all required third-party products will be searched. If a
third-party product have been found - corresponding CMake variables will be specified
(VTK: 3RDPARTY_VTK_DIR, 3RDPARTY_VTK_INCLUDE_DIR, 3RDPARTY_VTK_LIBRARY_DIR)")
set (USE_TK_DESCR
"Indicates whether Tk product should be used by Draw Harness for user interface")
set (USE_FREETYPE_DESCR
"Indicates whether FreeType product should be used in OCCT for text rendering using external font files")
set (USE_FFMPEG_DESCR
"Indicates whether FFmpeg framework is used or not. FFmpeg stands for
multimedia data handling, open-source software libraries used for video encoding and decoding.")
set (USE_FREEIMAGE_DESCR
"Indicates whether Freeimage product should be used in OCCT visualization
"Indicates whether FreeImage product should be used in OCCT visualization
module for support of popular graphics image formats (PNG, BMP etc)")
set (USE_GL2PS_DESCR
"Indicates whether GL2PS product should be used in OCCT visualization
module for support of vector image formats (PS, EPS etc)")
set (USE_OPENVR_DESCR
"Indicates whether OpenVR should be used in OCCT visualization module for VR support")
set (USE_RAPIDJSON_DESCR
"Indicates whether RapidJSON product should be used in OCCT DataExchange
module for support of JSON-based formats like glTF")
set (USE_DRACO_DESCR
"Indicates whether Draco mesh decoding library should be used by glTF reader")
set (USE_EGL_DESCR
"Indicates whether EGL should be used in OCCT visualization
module instead of conventional OpenGL context creation APIs")
set (USE_OPENGL_DESCR
"Indicates whether OpenGL desktop should be used in OCCT visualization module")
set (USE_GLES2_DESCR
"Indicates whether OpenGL ES 2.0 should be used in OCCT visualization module")
set (USE_TBB_DESCR
"Indicates whether TBB 3-rd party is used or not. TBB stands for Threading Building Blocks,
"Indicates whether TBB is used or not. TBB stands for Threading Building Blocks,
the technology of Intel Corp, which comes with different mechanisms and patterns for
injecting parallelism into your application. OCCT remains parallel even without TBB product")
set (USE_VTK_DESCR
"Indicates whether VTK 3-rd party is used or not. VTK stands for Visualization
"Indicates whether VTK is used or not. VTK stands for Visualization
ToolKit, the technology of Kitware Inc intended for general-purpose scientific
visualization. OCCT comes with a bridge between CAD data representation and
VTK by means of its dedicated VIS component (VTK Integration Services).")
set (USE_GLX_DESCR "Indicates whether X11 OpenGl on OSX is used or not")
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")
macro (BUILD_MODULE MODULE_NAME)
set (BUILD_MODULE_${MODULE_NAME} ON CACHE BOOL "${BUILD_MODULE_${MODULE_NAME}_DESCR}")
set (ENABLE_MODULE TRUE)
set (BUILD_MODULE_${MODULE_NAME} ${ENABLE_MODULE} CACHE BOOL "${BUILD_MODULE_${MODULE_NAME}_DESCR}")
endmacro()

View File

@@ -1,178 +1,314 @@
# vtk
# vcpkg processing
if (BUILD_USE_VCPKG)
find_package(VTK REQUIRED)
set(CSF_VTK VTK::CommonCore)
set(IS_VTK_9XX 1)
if (WIN32)
set (USED_3RDPARTY_VTK_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin")
else()
set (USED_3RDPARTY_VTK_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib")
endif()
list (APPEND 3RDPARTY_INCLUDE_DIRS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")
return()
endif()
if (NOT DEFINED INSTALL_VTK)
set (INSTALL_VTK OFF CACHE BOOL "${INSTALL_VTK_DESCR}")
endif()
# vtk directory
if (NOT DEFINED 3RDPARTY_VTK_DIR)
set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing vtk")
set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK")
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
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_VTK_DIR PATH "The directory containing VTK")
if (NOT 3RDPARTY_VTK_DIR OR NOT EXISTS "${3RDPARTY_VTK_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" VTK VTK_DIR_NAME)
if (VTK_DIR_NAME)
set (3RDPARTY_VTK_DIR "${3RDPARTY_DIR}/${VTK_DIR_NAME}" CACHE PATH "The directory containing VTK" FORCE)
endif()
endif()
else()
#set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK" FORCE)
endif()
# vtk include directory
if (NOT DEFINED 3RDPARTY_VTK_INCLUDE_DIR)
set (3RDPARTY_VTK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of vtk")
set (3RDPARTY_VTK_INCLUDE_DIR "" CACHE PATH "The directory containing headers of VTK")
endif()
# vtk library directory
if (NOT DEFINED 3RDPARTY_VTK_LIBRARY_DIR)
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing vtk library")
endif()
#if (BUILD_SHARED_LIBS)
# vtk library directory
if (NOT DEFINED 3RDPARTY_VTK_LIBRARY_DIR)
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE PATH "The directory containing VTK libraries")
endif()
# vtk dll directory
if (WIN32 AND NOT DEFINED 3RDPARTY_VTK_DLL_DIR)
set (3RDPARTY_VTK_DLL_DIR "" CACHE FILEPATH "The directory containing VTK dll")
endif()
# vtk dll directory
if (WIN32 AND NOT DEFINED 3RDPARTY_VTK_DLL_DIR)
set (3RDPARTY_VTK_DLL_DIR "" CACHE PATH "The directory containing VTK shared libraries")
endif()
#endif()
# search for vtk in user defined directory
if (NOT 3RDPARTY_VTK_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" vtk VTK_DIR_NAME)
if (VTK_DIR_NAME)
set (3RDPARTY_VTK_DIR "${3RDPARTY_DIR}/${VTK_DIR_NAME}" CACHE PATH "The directory containing vtk product" FORCE)
# check 3RDPARTY_VTK_ paths for consistency with specified 3RDPARTY_VTK_DIR
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_INCLUDE_DIR PATH "The directory containing headers of VTK")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_LIBRARY_DIR PATH "The directory containing VTK libraries")
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_DLL_DIR PATH "The directory containing VTK shared library")
endif()
endif()
endif()
# find installed vtk
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
set (CACHED_VTK_DIR $ENV{VTK_DIR})
set (ENV{VTK_DIR} "${3RDPARTY_VTK_DIR}")
endif()
find_package(VTK QUIET)
# find native vtk
if (NOT VTK_FOUND)
find_package(VTK QUIET PATHS "${3RDPARTY_VTK_DIR}")
endif()
if (NOT VTK_FOUND AND NOT 3RDPARTY_VTK_DIR OR NOT EXISTS "${3RDPARTY_VTK_DIR}")
message(SEND_ERROR "VTK not found. Set the 3RDPARTY_VTK_DIR cmake cache entry to the directory containing VTK.")
set (3RDPARTY_VTK_DIR "3RDPARTY_VTK_DIR-NOTFOUND" CACHE PATH "The directory containing vtk product" FORCE)
endif()
set(VTK_VERSION "")
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
get_filename_component(3RDPARTY_VTK_DIR_NAME "${3RDPARTY_VTK_DIR}" NAME)
string(REGEX MATCH "^VTK-([0-9].[0-9])" VTK_VERSION "${3RDPARTY_VTK_DIR_NAME}")
set(VTK_VERSION "${CMAKE_MATCH_1}")
if (NOT 3RDPARTY_VTK_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_DIR}/include/vtk-${VTK_VERSION}" CACHE FILEPATH "The directory containing includes of VTK" FORCE)
endif()
if (NOT 3RDPARTY_VTK_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
if(EXISTS "${3RDPARTY_VTK_DIR}/lib")
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
elseif (EXISTS "${3RDPARTY_VTK_DIR}/lib")
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
endif()
endif()
if(3RDPARTY_VTK_LIBRARY_DIR)
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_VTK_LIBRARY_DIR}")
endif()
set (ENV{VTK_DIR} ${CACHED_VTK_DIR})
endif()
# vtk libraries
# lib
set (VTK_LIBRARY_NAMES vtkCommonCore-${VTK_VERSION}.lib vtkCommonDataModel-${VTK_VERSION}.lib vtkCommonExecutionModel-${VTK_VERSION}.lib
vtkCommonMath-${VTK_VERSION}.lib vtkCommonTransforms-${VTK_VERSION}.lib vtkRenderingCore-${VTK_VERSION}.lib
vtkRenderingOpenGL-${VTK_VERSION}.lib vtkFiltersGeneral-${VTK_VERSION}.lib vtkIOCore-${VTK_VERSION}.lib
vtkIOImage-${VTK_VERSION}.lib vtkImagingCore-${VTK_VERSION}.lib vtkInteractionStyle-${VTK_VERSION}.lib )
#dll
set (VTK_DLL_NAMES vtkCommonComputationalGeometry-${VTK_VERSION}.dll
vtkCommonCore-${VTK_VERSION}.dll
vtkCommonDataModel-${VTK_VERSION}.dll
vtkCommonExecutionModel-${VTK_VERSION}.dll
vtkCommonMath-${VTK_VERSION}.dll
vtkCommonMisc-${VTK_VERSION}.dll
vtkCommonSystem-${VTK_VERSION}.dll
vtkCommonTransforms-${VTK_VERSION}.dll
vtkDICOMParser-${VTK_VERSION}.dll
vtkFiltersCore-${VTK_VERSION}.dll
vtkFiltersExtraction-${VTK_VERSION}.dll
vtkFiltersGeneral-${VTK_VERSION}.dll
vtkFiltersGeometry-${VTK_VERSION}.dll
vtkFiltersSources-${VTK_VERSION}.dll
vtkFiltersStatistics-${VTK_VERSION}.dll
vtkIOCore-${VTK_VERSION}.dll
vtkIOImage-${VTK_VERSION}.dll
vtkImagingCore-${VTK_VERSION}.dll
vtkImagingFourier-${VTK_VERSION}.dll
vtkImagingHybrid-${VTK_VERSION}.dll
vtkInteractionStyle-${VTK_VERSION}.dll
vtkRenderingCore-${VTK_VERSION}.dll
vtkRenderingOpenGL-${VTK_VERSION}.dll
vtkalglib-${VTK_VERSION}.dll
vtkjpeg-${VTK_VERSION}.dll
vtkmetaio-${VTK_VERSION}.dll
vtkpng-${VTK_VERSION}.dll
vtksys-${VTK_VERSION}.dll
vtktiff-${VTK_VERSION}.dll
vtkzlib-${VTK_VERSION}.dll )
# search for dll directory
if (WIN32)
if (NOT 3RDPARTY_VTK_DLL_DIR OR NOT EXISTS "${3RDPARTY_VTK_DLL_DIR}")
if(EXISTS "${3RDPARTY_VTK_DIR}/bin")
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
elseif (EXISTS "${3RDPARTY_VTK_DIR}/bind")
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bind" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
endif()
unset (IS_VTK_9XX)
if (VTK_FOUND)
message ("VTK version (${VTK_VERSION})")
if(VTK_MAJOR_VERSION EQUAL 8 AND VTK_MINOR_VERSION GREATER 9 OR VTK_MAJOR_VERSION GREATER 8)
set (IS_VTK_9XX 1)
else()
# add compiler flags, preprocessor definitions, include and link dirs
include (${VTK_USE_FILE})
endif()
if (3RDPARTY_VTK_DLL_DIR OR EXISTS "${3RDPARTY_VTK_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_VTK_DLL_DIR}")
endif()
endif()
if (VTK_LIBRARIES)
OCCT_CHECK_AND_UNSET(VTK_DIR)
set (3RDPARTY_VTK_INCLUDE_DIRS)
if (3RDPARTY_VTK_INCLUDE_DIR AND EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_VTK_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_INCLUDE_DIR)
endif()
# if (BUILD_SHARED_LIBS)
set (3RDPARTY_VTK_LIBRARY_DIRS)
set (3RDPARTY_VTK_DLL_DIRS)
# endif()
if (INSTALL_VTK)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
if(3RDPARTY_VTK_DLL_DIR AND EXISTS "${3RDPARTY_VTK_DLL_DIR}")
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
foreach(VTK_DLL_NAME ${VTK_DLL_NAMES})
set (3RDPARTY_VTK_DLL "3RDPARTY_VTK_DLL-NOTFOUND" CACHE FILEPATH "VTK shared library" FORCE)
find_library(3RDPARTY_VTK_DLL "${VTK_DLL_NAME}" PATHS "${3RDPARTY_VTK_DLL_DIR}" NO_DEFAULT_PATH)
if (NOT 3RDPARTY_VTK_DLL OR NOT EXISTS "${3RDPARTY_VTK_DLL}")
list (APPEND 3RDPARTY_NOT_INCLUDED "${3RDPARTY_VTK_DLL}")
else()
install (FILES ${3RDPARTY_VTK_DLL}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (FILES ${3RDPARTY_VTK_DLL}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (FILES ${3RDPARTY_VTK_DLL}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
foreach (VTK_LIBRARY ${VTK_LIBRARIES})
if (IS_VTK_9XX)
string (REGEX MATCH "^VTK::" IS_VTK_LIBRARY ${VTK_LIBRARY})
else()
string (REGEX MATCH "^vtk" IS_VTK_LIBRARY ${VTK_LIBRARY})
endif()
if (NOT IS_VTK_LIBRARY OR NOT TARGET ${VTK_LIBRARY})
continue()
endif()
# get paths from corresponding variables
if (${VTK_LIBRARY}_INCLUDE_DIRS AND EXISTS "${${VTK_LIBRARY}_INCLUDE_DIRS}")
list (APPEND 3RDPARTY_VTK_INCLUDE_DIRS "${${VTK_LIBRARY}_INCLUDE_DIRS}")
endif()
if (${VTK_LIBRARY}_LIBRARY_DIRS AND EXISTS "${${VTK_LIBRARY}_LIBRARY_DIRS}")
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_LIBRARY}_LIBRARY_DIRS}")
endif()
if (${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS AND EXISTS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
if (NOT WIN32)
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
endif()
endforeach()
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_DLL)
endif()
else ()
foreach(VTK_DLL_NAME ${VTK_DLL_NAMES})
string(REPLACE ".dll" ".so.1" VTK_DLL_NAME "${VTK_DLL_NAME}")
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME "lib${VTK_DLL_NAME}")
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME "lib${VTK_DLL_NAME}")
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME "lib${VTK_DLL_NAME}")
endif()
# get paths from corresponding properties
get_target_property (TARGET_VTK_IMPORT_CONFS ${VTK_LIBRARY} IMPORTED_CONFIGURATIONS)
if (TARGET_VTK_IMPORT_CONFS)
list (GET TARGET_VTK_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
# todo: choose configuration in connection with the build type
#if (CMAKE_BUILD_TYPE)
# foreach (IMPORT_CONF ${TARGET_VTK_IMPORT_CONFS})
# endforeach()
#endif()
# Work-around against link failure in case if VTK contains dependency
# on DirectX: its run-time is always present on Windows, but SDK can
# be absent on current workstation, while not actually needed for
# OCCT linking.
# VTK 6.1 for VC 10
get_target_property (TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${VTK_LIBRARY} IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF})
if(TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES)
string (REGEX MATCH "[^;]*d3d[0-9]+[.]lib" HARDCODED_D3D9_LIB "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
if (HARDCODED_D3D9_LIB)
message (STATUS "Warning: ${HARDCODED_D3D9_LIB} has been removed from imported dependencies of ${VTK_LIBRARY}")
list (REMOVE_ITEM TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${HARDCODED_D3D9_LIB})
set_target_properties (${VTK_LIBRARY} PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF} "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
endif()
endif()
# VTK 6.1 for VC 12, 14
get_target_property (TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${VTK_LIBRARY} INTERFACE_LINK_LIBRARIES)
if(TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES)
string (REGEX MATCH "[^;]*d3d[0-9]+[.]lib" HARDCODED_D3D9_LIB "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
if (HARDCODED_D3D9_LIB)
message (STATUS "Warning: ${HARDCODED_D3D9_LIB} has been removed from imported dependencies of ${VTK_LIBRARY}")
list (REMOVE_ITEM TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${HARDCODED_D3D9_LIB})
set_target_properties (${VTK_LIBRARY} PROPERTIES INTERFACE_LINK_LIBRARIES "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
endif()
endif()
get_target_property (TARGET_PROPERTY_IMP_PATH ${VTK_LIBRARY} IMPORTED_IMPLIB_${CHOSEN_IMPORT_CONF})
if(TARGET_PROPERTY_IMP_PATH AND EXISTS "${TARGET_PROPERTY_IMP_PATH}")
get_filename_component (TARGET_PROPERTY_IMP_DIR "${TARGET_PROPERTY_IMP_PATH}" PATH)
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${TARGET_PROPERTY_IMP_DIR}")
endif()
get_target_property (TARGET_PROPERTY_LOCATION_PATH ${VTK_LIBRARY} IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
if(TARGET_PROPERTY_LOCATION_PATH AND EXISTS "${TARGET_PROPERTY_LOCATION_PATH}")
get_filename_component (TARGET_PROPERTY_LOCATION_DIR "${TARGET_PROPERTY_LOCATION_PATH}" PATH)
if (WIN32)
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${TARGET_PROPERTY_LOCATION_DIR}")
else()
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${TARGET_PROPERTY_LOCATION_DIR}")
endif()
endif()
endif()
endforeach()
endif()
set (USED_3RDPARTY_VTK_DIR "")
else()
# the library directory for using by the executable
if (3RDPARTY_VTK_INCLUDE_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_INCLUDE_DIRS)
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIRS})
list (GET 3RDPARTY_VTK_INCLUDE_DIRS 0 3RDPARTY_VTK_INCLUDE_DIR)
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_INCLUDE_DIR}" CACHE PATH "The directory containing headers of VTK" FORCE)
endif()
# if (BUILD_SHARED_LIBS)
if (3RDPARTY_VTK_LIBRARY_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_LIBRARY_DIRS)
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIRS})
list (GET 3RDPARTY_VTK_LIBRARY_DIRS 0 3RDPARTY_VTK_LIBRARY_DIR)
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_LIBRARY_DIR}" CACHE PATH "The directory containing VTK libraries" FORCE)
endif()
if (WIN32)
if (3RDPARTY_VTK_DLL_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_DLL_DIRS)
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIRS})
list (GET 3RDPARTY_VTK_DLL_DIRS 0 3RDPARTY_VTK_DLL_DIR)
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DLL_DIR}" CACHE PATH "The directory containing VTK shared libraries" FORCE)
endif()
endif()
# endif()
endif()
if (3RDPARTY_VTK_INCLUDE_DIR AND EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIR})
elseif (NOT VTK_FOUND)
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_INCLUDE_DIR)
endif()
if (BUILD_SHARED_LIBS)
if (3RDPARTY_VTK_LIBRARY_DIR AND EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIR})
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_VTK_LIBRARY_DIR)
endif()
if (WIN32)
if (3RDPARTY_VTK_DLL_DIR OR EXISTS "${3RDPARTY_VTK_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIR})
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_VTK_DLL_DIR)
endif()
endif()
endif()
# Install vtk library using vtk targets
macro (OCCT_INSTALL_VTK VTK_LIBRARY_NAME)
# Check that input library name contains "vtk" prefix
string (REGEX MATCH "^vtk" IS_VTK_LIBRARY ${VTK_LIBRARY_NAME})
# Check that input library was not already installed
list (FIND OCCT_VTK_USED_TARGETS ${VTK_LIBRARY_NAME} VTK_LIBRARY_IS_USED)
if (BUILD_SHARED_LIBS AND INSTALL_VTK AND TARGET ${VTK_LIBRARY_NAME} AND VTK_LIBRARY_IS_USED EQUAL -1 AND IS_VTK_LIBRARY)
OCCT_MAKE_OS_WITH_BITNESS()
# Get configuration of vtk
get_target_property (TARGET_VTK_IMPORT_CONFS ${VTK_LIBRARY_NAME} IMPORTED_CONFIGURATIONS)
list (GET TARGET_VTK_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
# Get dependencies for current input library
get_property(VTK_LIBRARY_PATH TARGET ${VTK_LIBRARY_NAME} PROPERTY LOCATION)
get_property(VTK_DEPEND TARGET ${VTK_LIBRARY_NAME} PROPERTY IMPORTED_LINK_DEPENDENT_LIBRARIES_${CHOSEN_IMPORT_CONF})
get_property(VTK_IMPORTED_INTERFACE TARGET ${VTK_LIBRARY_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF})
get_property(VTK_INTERFACE TARGET ${VTK_LIBRARY_NAME} PROPERTY INTERFACE_LINK_LIBRARIES)
list (APPEND VTK_DEPEND ${VTK_INTERFACE} ${VTK_IMPORTED_INTERFACE})
# Install
if (WIN32)
if (SINGLE_GENERATOR)
install (FILES "${VTK_LIBRARY_PATH}" DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_VTK_LIBRARY_ABS ${VTK_LIBRARY_PATH} REALPATH)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}")
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i")
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()
set (USED_3RDPARTY_VTK_DIR "")
# Mark current library as already installed
list (APPEND OCCT_VTK_USED_TARGETS ${VTK_LIBRARY_NAME})
set (OCCT_VTK_USED_TARGETS "${OCCT_VTK_USED_TARGETS}" CACHE INTERNAL "" FORCE)
# Recursively install all depended libraries
foreach(VTK_TARGET ${VTK_DEPEND})
OCCT_INSTALL_VTK(${VTK_TARGET})
endforeach()
endif()
endmacro()
if (NOT BUILD_SHARED_LIBS)
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_DLL_DIR)
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_LIBRARY_DIR)
OCCT_CHECK_AND_UNSET(INSTALL_VTK)
endif()
# the library directory for using by the executable
if (NOT INSTALL_VTK)
if (WIN32)
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_DLL_DIR})
else()
@@ -180,4 +316,6 @@ else()
endif()
endif()
mark_as_advanced (VTK_INCLUDE_DIRS VTK_LIBRARY_DIRS VTK_DIR)
OCCT_CHECK_AND_UNSET (VTK_INCLUDE_DIRS)
OCCT_CHECK_AND_UNSET (VTK_LIBRARY_DIRS)
OCCT_CHECK_AND_UNSET (VTK_DIR)

View File

@@ -1,544 +0,0 @@
#!/usr/bin/tclsh
# =======================================================================
# Created on: 2012-01-26
# Created by: Kirill GAVRILOV
# Copyright (c) 2012 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.
# =======================================================================
# GUI procedure for search of third-party tools and generation of environment
# customization script
# =======================================================================
# load tools
source [file join [file dirname [info script]] genconfdeps.tcl]
package require Tk
set aRowIter 0
frame .myFrame -padx 5 -pady 5
pack .myFrame -fill both -expand 1
set SYS_VS_LIST {}
set SYS_VC_LIST {}
set SYS_VCVARS_LIST {}
# detect installed Visual Studio instances from global environment
if { [info exists ::env(VS150COMNTOOLS)] } {
lappend ::SYS_VS_LIST "Visual Studio 201x (vc15)"
lappend ::SYS_VC_LIST "vc15"
lappend ::SYS_VCVARS_LIST "%VS150COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
}
if { [info exists ::env(VS140COMNTOOLS)] } {
lappend ::SYS_VS_LIST "Visual Studio 2015 (vc14)"
lappend ::SYS_VC_LIST "vc14"
lappend ::SYS_VCVARS_LIST "%VS140COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
}
if { [info exists ::env(VS120COMNTOOLS)] } {
lappend ::SYS_VS_LIST "Visual Studio 2013 (vc12)"
lappend ::SYS_VC_LIST "vc12"
lappend ::SYS_VCVARS_LIST "%VS120COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
}
if { [info exists ::env(VS110COMNTOOLS)] } {
lappend ::SYS_VS_LIST "Visual Studio 2012 (vc11)"
lappend ::SYS_VC_LIST "vc11"
lappend ::SYS_VCVARS_LIST "%VS110COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
}
if { [info exists ::env(VS100COMNTOOLS)] } {
lappend ::SYS_VS_LIST "Visual Studio 2010 (vc10)"
lappend ::SYS_VC_LIST "vc10"
lappend ::SYS_VCVARS_LIST "%VS100COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
}
if { [info exists ::env(VS90COMNTOOLS)] } {
lappend ::SYS_VS_LIST "Visual Studio 2008 (vc9)"
lappend ::SYS_VC_LIST "vc9"
lappend ::SYS_VCVARS_LIST "%VS90COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
}
if { [info exists ::env(VS80COMNTOOLS)] } {
lappend ::SYS_VS_LIST "Visual Studio 2005 (vc8)"
lappend ::SYS_VC_LIST "vc8"
lappend ::SYS_VCVARS_LIST "%VS80COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
}
lappend ::SYS_VS_LIST "Custom"
lappend ::SYS_VC_LIST "vcX"
lappend ::SYS_VCVARS_LIST "%VSXXCOMNTOOLS%..\\..\\VC\\vcvarsall.bat"
set aVcVerIndex [lsearch $::SYS_VC_LIST $::VCVER]
set ::VSVER [lindex $::SYS_VS_LIST $aVcVerIndex]
if { "$::VCVARS" == "" } {
set ::VCVARS [lindex $::SYS_VCVARS_LIST $aVcVerIndex]
}
proc wokdep:gui:Close {} {
# if changed ask
exit
}
proc wokdep:gui:SwitchConfig {} {
set ::VCVER [lindex $::SYS_VC_LIST [.myFrame.myVsCombo current]]
set ::VCVARS [lindex $::SYS_VCVARS_LIST [.myFrame.myVsCombo current]]
set ::CSF_OPT_INC {}
set ::CSF_OPT_LIB32 {}
set ::CSF_OPT_LIB64 {}
set ::CSF_OPT_BIN32 {}
set ::CSF_OPT_BIN64 {}
wokdep:gui:UpdateList
}
proc wokdep:gui:SwitchArch {} {
if { "$::ARCH" == "32" } {
wokdep:gui:Show32Bitness ::aRowIter
}
if { "$::ARCH" == "64" } {
wokdep:gui:Show64Bitness ::aRowIter
}
if { [llength [grid info .myFrame.mySave]] != 0 } {
grid forget .myFrame.mySave .myFrame.myClose
}
# Bottom section
grid .myFrame.mySave -row $::aRowIter -column 4 -columnspan 2
grid .myFrame.myClose -row $::aRowIter -column 6 -columnspan 2
}
proc wokdep:gui:UpdateList {} {
set anIncErrs {}
set anLib32Errs {}
set anLib64Errs {}
set anBin32Errs {}
set anBin64Errs {}
wokdep:SearchTclTk anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
wokdep:SearchFreeType anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
wokdep:SearchX11 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
if { "$::HAVE_FREEIMAGE" == "true" } {
wokdep:SearchFreeImage anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
if { "$::HAVE_GL2PS" == "true" } {
wokdep:SearchGL2PS anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
if { "$::HAVE_TBB" == "true" } {
wokdep:SearchTBB anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
if { "$::HAVE_OPENCL" == "true" } {
wokdep:SearchOpenCL anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
if { "$::HAVE_VTK" == "true" } {
wokdep:SearchVTK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
if { "$::CHECK_QT4" == "true" } {
wokdep:SearchQt4 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
if { "$::CHECK_JDK" == "true" } {
wokdep:SearchJDK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
.myFrame.myIncErrLbl configure -text [join $anIncErrs "\n"]
.myFrame.myLib32ErrLbl configure -text [join $anLib32Errs "\n"]
.myFrame.myLib64ErrLbl configure -text [join $anLib64Errs "\n"]
.myFrame.myBin32ErrLbl configure -text [join $anBin32Errs "\n"]
.myFrame.myBin64ErrLbl configure -text [join $anBin64Errs "\n"]
}
proc wokdep:gui:BrowseVcVars {} {
set aResult [tk_chooseDirectory -initialdir $::VCVARS -title "Choose a directory"]
if { "$aResult" != "" } {
set ::VCVARS $aResult
}
}
proc wokdep:gui:BrowsePartiesRoot {} {
set aResult [tk_chooseDirectory -initialdir $::PRODUCTS_PATH -title "Choose a directory"]
if { "$aResult" != "" } {
set ::PRODUCTS_PATH $aResult
wokdep:gui:UpdateList
}
}
proc wokdep:gui:AddIncPath {} {
set aResult [tk_chooseDirectory -title "Choose a directory"]
if { "$aResult" != "" } {
lappend ::CSF_OPT_INC "$aResult"
wokdep:gui:UpdateList
}
}
proc wokdep:gui:AddLib32Path {} {
set aResult [tk_chooseDirectory -title "Choose a directory"]
if { "$aResult" != "" } {
lappend ::CSF_OPT_LIB32 "$aResult"
wokdep:gui:UpdateList
}
}
proc wokdep:gui:AddLib64Path {} {
set aResult [tk_chooseDirectory -title "Choose a directory"]
if { "$aResult" != "" } {
lappend ::CSF_OPT_LIB64 "$aResult"
wokdep:gui:UpdateList
}
}
proc wokdep:gui:AddBin32Path {} {
set aResult [tk_chooseDirectory -title "Choose a directory"]
if { "$aResult" != "" } {
lappend ::CSF_OPT_BIN32 "$aResult"
wokdep:gui:UpdateList
}
}
proc wokdep:gui:AddBin64Path {} {
set aResult [tk_chooseDirectory -title "Choose a directory"]
if { "$aResult" != "" } {
lappend ::CSF_OPT_BIN64 "$aResult"
wokdep:gui:UpdateList
}
}
proc wokdep:gui:RemoveIncPath {} {
set aSelIndices [.myFrame.myIncList curselection]
if { [llength $aSelIndices] != 0 } {
.myFrame.myIncList delete [lindex $aSelIndices 0]
}
wokdep:gui:UpdateList
}
proc wokdep:gui:RemoveLib32Path {} {
set aSelIndices [.myFrame.myLib32List curselection]
if { [llength $aSelIndices] != 0 } {
.myFrame.myLib32List delete [lindex $aSelIndices 0]
}
wokdep:gui:UpdateList
}
proc wokdep:gui:RemoveLib64Path {} {
set aSelIndices [.myFrame.myLib64List curselection]
if { [llength $aSelIndices] != 0 } {
.myFrame.myLib64List delete [lindex $aSelIndices 0]
}
wokdep:gui:UpdateList
}
proc wokdep:gui:RemoveBin32Path {} {
set aSelIndices [.myFrame.myBin32List curselection]
if { [llength $aSelIndices] != 0 } {
.myFrame.myBin32List delete [lindex $aSelIndices 0]
}
wokdep:gui:UpdateList
}
proc wokdep:gui:RemoveBin64Path {} {
set aSelIndices [.myFrame.myBin64List curselection]
if { [llength $aSelIndices] != 0 } {
.myFrame.myBin64List delete [lindex $aSelIndices 0]
}
wokdep:gui:UpdateList
}
proc wokdep:gui:ResetIncPath {} {
set ::CSF_OPT_INC {}
wokdep:gui:UpdateList
}
proc wokdep:gui:ResetLib32Path {} {
set ::CSF_OPT_LIB32 {}
wokdep:gui:UpdateList
}
proc wokdep:gui:ResetLib64Path {} {
set ::CSF_OPT_LIB64 {}
wokdep:gui:UpdateList
}
proc wokdep:gui:ResetBin32Path {} {
set ::CSF_OPT_BIN32 {}
wokdep:gui:UpdateList
}
proc wokdep:gui:ResetBin64Path {} {
set ::CSF_OPT_BIN64 {}
wokdep:gui:UpdateList
}
proc wokdep:gui:Show32Bitness { theRowIter } {
upvar $theRowIter aRowIter
if { [llength [grid info .myFrame.myLib64Lbl]] != 0 } {
grid forget .myFrame.myLib64Lbl .myFrame.myLib64List .myFrame.myLib64Scrl
grid forget .myFrame.myLib64Add .myFrame.myLib64Remove .myFrame.myLib64Clear .myFrame.myLib64ErrLbl
grid forget .myFrame.myBin64Lbl .myFrame.myBin64List .myFrame.myBin64Scrl
grid forget .myFrame.myBin64Add .myFrame.myBin64Remove .myFrame.myBin64Clear .myFrame.myBin64ErrLbl
}
# Additional libraries (32-bit) search paths
grid .myFrame.myLib32Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myLib32List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
grid .myFrame.myLib32Scrl -row $aRowIter -column 5 -rowspan 4
grid .myFrame.myLib32Add -row $aRowIter -column 6
incr aRowIter
#grid .myFrame.myLib32Edit -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib32Remove -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib32Clear -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
# Additional executables (32-bit) search paths
grid .myFrame.myBin32Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myBin32List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
grid .myFrame.myBin32Scrl -row $aRowIter -column 5 -rowspan 4
grid .myFrame.myBin32Add -row $aRowIter -column 6
incr aRowIter
#grid .myFrame.myBin32Edit -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin32Remove -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin32Clear -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
}
proc wokdep:gui:Show64Bitness { theRowIter } {
upvar $theRowIter aRowIter
if { [llength [grid info .myFrame.myLib32Lbl]] != 0 } {
grid forget .myFrame.myLib32Lbl .myFrame.myLib32List .myFrame.myLib32Scrl
grid forget .myFrame.myLib32Add .myFrame.myLib32Remove .myFrame.myLib32Clear .myFrame.myLib32ErrLbl
grid forget .myFrame.myBin32Lbl .myFrame.myBin32List .myFrame.myBin32Scrl
grid forget .myFrame.myBin32Add .myFrame.myBin32Remove .myFrame.myBin32Clear .myFrame.myBin32ErrLbl
}
# Additional libraries (64-bit) search paths
grid .myFrame.myLib64Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myLib64List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
grid .myFrame.myLib64Scrl -row $aRowIter -column 5 -rowspan 4
grid .myFrame.myLib64Add -row $aRowIter -column 6
incr aRowIter
#grid .myFrame.myLib64Edit -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib64Remove -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib64Clear -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
# Additional executables (64-bit) search paths
grid .myFrame.myBin64Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myBin64List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
grid .myFrame.myBin64Scrl -row $aRowIter -column 5 -rowspan 4
grid .myFrame.myBin64Add -row $aRowIter -column 6
incr aRowIter
#grid .myFrame.myBin64Edit -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin64Remove -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin64Clear -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
}
# Header
ttk::label .myFrame.myVsLbl -text "Visual Studio configuration" -relief solid -padding {5 5 80 5}
ttk::combobox .myFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 30
ttk::combobox .myFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6
entry .myFrame.myVcEntry -textvariable VCVER -width 6
entry .myFrame.myVcVarsEntry -textvariable VCVARS -width 70
ttk::button .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars
#
ttk::label .myFrame.myOcctBuildLbl -text "OCCT headers configuration" -relief solid -padding {5 5 80 5}
checkbutton .myFrame.myScutsCheck -offvalue "false" -onvalue "true" -variable SHORTCUT_HEADERS
ttk::label .myFrame.myScutsLbl -text "Short-cut headers instead original ones in inc"
#
ttk::label .myFrame.mySrchLbl -text "3rd-parties search path" -relief solid -padding {5 5 80 5}
entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH -width 80
ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
checkbutton .myFrame.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
ttk::label .myFrame.myFImageLbl -text "Use FreeImage"
checkbutton .myFrame.myGl2psCheck -offvalue "false" -onvalue "true" -variable HAVE_GL2PS -command wokdep:gui:UpdateList
ttk::label .myFrame.myGl2psLbl -text "Use GL2PS"
checkbutton .myFrame.myTbbCheck -offvalue "false" -onvalue "true" -variable HAVE_TBB -command wokdep:gui:UpdateList
ttk::label .myFrame.myTbbLbl -text "Use Intel TBB"
checkbutton .myFrame.myOpenClCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENCL -command wokdep:gui:UpdateList
ttk::label .myFrame.myOpenClLbl -text "Use OpenCL"
checkbutton .myFrame.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
ttk::label .myFrame.myMacGLXLbl -text "Use X11 for windows drawing"
ttk::label .myFrame.myVtkLbl -text "Use VTK"
checkbutton .myFrame.myVtkCheck -offvalue "false" -onvalue "true" -variable HAVE_VTK -command wokdep:gui:UpdateList
checkbutton .myFrame.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList
ttk::label .myFrame.myQt4Lbl -text "Search Qt4"
checkbutton .myFrame.myJDKCheck -offvalue "false" -onvalue "true" -variable CHECK_JDK -command wokdep:gui:UpdateList
ttk::label .myFrame.myJDKLbl -text "Search JDK"
# Additional headers search paths
ttk::label .myFrame.myIncLbl -text "Additional headers search paths" -relief solid -padding {5 5 80 5}
scrollbar .myFrame.myIncScrl -command ".myFrame.myIncList yview"
listbox .myFrame.myIncList -listvariable CSF_OPT_INC -width 80 -height 5 -yscrollcommand ".myFrame.myIncScrl set"
ttk::button .myFrame.myIncAdd -text "Add" -command wokdep:gui:AddIncPath
ttk::button .myFrame.myIncEdit -text "Edit"
ttk::button .myFrame.myIncRemove -text "Remove" -command wokdep:gui:RemoveIncPath
ttk::button .myFrame.myIncClear -text "Reset" -command wokdep:gui:ResetIncPath
ttk::label .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional libraries (32-bit) search paths
ttk::label .myFrame.myLib32Lbl -text "Additional libraries (32-bit) search paths" -relief solid -padding {5 5 80 5}
scrollbar .myFrame.myLib32Scrl -command ".myFrame.myLib32List yview"
listbox .myFrame.myLib32List -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set"
ttk::button .myFrame.myLib32Add -text "Add" -command wokdep:gui:AddLib32Path
ttk::button .myFrame.myLib32Edit -text "Edit"
ttk::button .myFrame.myLib32Remove -text "Remove" -command wokdep:gui:RemoveLib32Path
ttk::button .myFrame.myLib32Clear -text "Reset" -command wokdep:gui:ResetLib32Path
ttk::label .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional libraries (64-bit) search paths
ttk::label .myFrame.myLib64Lbl -text "Additional libraries (64-bit) search paths" -relief solid -padding {5 5 80 5}
scrollbar .myFrame.myLib64Scrl -command ".myFrame.myLib64List yview"
listbox .myFrame.myLib64List -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set"
ttk::button .myFrame.myLib64Add -text "Add" -command wokdep:gui:AddLib64Path
ttk::button .myFrame.myLib64Edit -text "Edit"
ttk::button .myFrame.myLib64Remove -text "Remove" -command wokdep:gui:RemoveLib64Path
ttk::button .myFrame.myLib64Clear -text "Reset" -command wokdep:gui:ResetLib64Path
ttk::label .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional executables (32-bit) search paths
ttk::label .myFrame.myBin32Lbl -text "Additional executables (32-bit) search paths" -relief solid -padding {5 5 80 5}
scrollbar .myFrame.myBin32Scrl -command ".myFrame.myBin32List yview"
listbox .myFrame.myBin32List -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set"
ttk::button .myFrame.myBin32Add -text "Add" -command wokdep:gui:AddBin32Path
ttk::button .myFrame.myBin32Edit -text "Edit"
ttk::button .myFrame.myBin32Remove -text "Remove" -command wokdep:gui:RemoveBin32Path
ttk::button .myFrame.myBin32Clear -text "Reset" -command wokdep:gui:ResetBin32Path
ttk::label .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional executables (64-bit) search paths
ttk::label .myFrame.myBin64Lbl -text "Additional executables (64-bit) search paths" -relief solid -padding {5 5 80 5}
scrollbar .myFrame.myBin64Scrl -command ".myFrame.myBin64List yview"
listbox .myFrame.myBin64List -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set"
ttk::button .myFrame.myBin64Add -text "Add" -command wokdep:gui:AddBin64Path
ttk::button .myFrame.myBin64Edit -text "Edit"
ttk::button .myFrame.myBin64Remove -text "Remove" -command wokdep:gui:RemoveBin64Path
ttk::button .myFrame.myBin64Clear -text "Reset" -command wokdep:gui:ResetBin64Path
ttk::label .myFrame.myBin64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Bottom
ttk::button .myFrame.mySave -text "Save" -command wokdep:SaveCustom
ttk::button .myFrame.myClose -text "Close" -command wokdep:gui:Close
# Create grid
# Header
if { "$tcl_platform(platform)" == "windows" } {
grid .myFrame.myVsLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myVsCombo -row $aRowIter -column 0 -columnspan 2 -sticky w
grid .myFrame.myArchCombo -row $aRowIter -column 2 -sticky w
incr aRowIter
grid .myFrame.myVcEntry -row $aRowIter -column 0
grid .myFrame.myVcVarsEntry -row $aRowIter -column 1 -columnspan 4 -sticky w
grid .myFrame.myVcBrowseBtn -row $aRowIter -column 6
incr aRowIter
}
#
grid .myFrame.myOcctBuildLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myScutsCheck -row $aRowIter -column 0 -sticky e
grid .myFrame.myScutsLbl -row $aRowIter -column 1 -columnspan 2 -sticky w
incr aRowIter
#
grid .myFrame.mySrchLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.mySrchEntry -row $aRowIter -column 0 -columnspan 5
grid .myFrame.mySrchBrowseBtn -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myFImageCheck -row $aRowIter -column 0 -sticky e
grid .myFrame.myFImageLbl -row $aRowIter -column 1 -sticky w
grid .myFrame.myQt4Check -row $aRowIter -column 2 -sticky e
grid .myFrame.myQt4Lbl -row $aRowIter -column 3 -sticky w
incr aRowIter
grid .myFrame.myGl2psCheck -row $aRowIter -column 0 -sticky e
grid .myFrame.myGl2psLbl -row $aRowIter -column 1 -sticky w
grid .myFrame.myJDKCheck -row $aRowIter -column 2 -sticky e
grid .myFrame.myJDKLbl -row $aRowIter -column 3 -sticky w
incr aRowIter
grid .myFrame.myTbbCheck -row $aRowIter -column 0 -sticky e
grid .myFrame.myTbbLbl -row $aRowIter -column 1 -sticky w
incr aRowIter
grid .myFrame.myOpenClCheck -row $aRowIter -column 0 -sticky e
grid .myFrame.myOpenClLbl -row $aRowIter -column 1 -sticky w
incr aRowIter
grid .myFrame.myVtkCheck -row $aRowIter -column 0 -sticky e
grid .myFrame.myVtkLbl -row $aRowIter -column 1 -sticky w
incr aRowIter
if { "$::tcl_platform(os)" == "Darwin" } {
grid .myFrame.myMacGLXCheck -row $aRowIter -column 0 -sticky e
grid .myFrame.myMacGLXLbl -row $aRowIter -column 1 -sticky w
incr aRowIter
}
# Additional headers search paths
grid .myFrame.myIncLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myIncList -row $aRowIter -column 0 -rowspan 4 -columnspan 5
grid .myFrame.myIncScrl -row $aRowIter -column 5 -rowspan 4
grid .myFrame.myIncAdd -row $aRowIter -column 6
incr aRowIter
#grid .myFrame.myIncEdit -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myIncRemove -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myIncClear -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myIncErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
# Additional 32-bit search paths
if { "$ARCH" == "32" } {
wokdep:gui:Show32Bitness aRowIter
}
# Additional 64-bit search paths
if { "$ARCH" == "64" } {
wokdep:gui:Show64Bitness aRowIter
}
# Bottom section
grid .myFrame.mySave -row $aRowIter -column 4 -columnspan 2
grid .myFrame.myClose -row $aRowIter -column 6 -columnspan 2
# Bind events
bind .myFrame.myVsCombo <<ComboboxSelected>> {
wokdep:gui:SwitchConfig
}
bind .myFrame.myArchCombo <<ComboboxSelected>> {
wokdep:gui:SwitchArch
}
.myFrame.mySrchEntry configure -validate all -validatecommand {
#return [file exists "$::PRODUCTS_PATH"]
wokdep:gui:UpdateList
return 1
}
wokdep:gui:UpdateList

File diff suppressed because it is too large Load Diff

View File

@@ -10,9 +10,9 @@ 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
if [ -e "${aScriptPath}/../env.sh" ]; then source "${aScriptPath}/../env.sh"; fi
tclsh "${aScriptPath}/adm/start.tcl" $anArgs
tclsh "${aScriptPath}/start.tcl" gendoc $anArgs
export PATH="$anOldPath"
export LD_LIBRARY_PATH="$anOldLd"

View File

@@ -6,8 +6,8 @@ rem should be in the PATH
SET "OLD_PATH=%PATH%"
if exist "%~dp0env.bat" (
call "%~dp0env.bat"
if exist "%~dp0../env.bat" (
call "%~dp0../env.bat"
)
set "TCL_EXEC=tclsh.exe"
@@ -15,7 +15,7 @@ set "TCL_EXEC=tclsh.exe"
for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X)
if defined TCL_FOUND (
%TCL_EXEC% %~dp0adm/start.tcl gendoc %*
%TCL_EXEC% %~dp0start.tcl gendoc %*
) else (
echo "Error. %TCL_EXEC% is not found. Please update PATH variable"
)

View File

@@ -56,7 +56,7 @@ proc OCCDoc_PrintHelpMessage {} {
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"
puts " -v : Enables more verbose output"
}
# A command for User Documentation compilation
@@ -70,7 +70,7 @@ proc gendoc {args} {
set DOCLABEL ""
set VERB_MODE "NO"
set SEARCH_MODE "none"
set MATHJAX_LOCATION "http://cdn.mathjax.org/mathjax/latest"
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
@@ -171,7 +171,7 @@ proc gendoc {args} {
if { $DOCTYPE_COMBO_FLAG != 1 } {
set DOC_TYPE "REFMAN"
set DOCTYPE_COMBO_FLAG 1
if { [info exists env(PRODROOT)] && [file exists $::env(PRODROOT)/src/VAS/Products.tcl] } {
if { [file exists [OCCDoc_GetProdRootDir]/src/VAS/Products.tcl] } {
set GENERATE_PRODUCTS_REFMAN "YES"
}
} else {
@@ -237,8 +237,10 @@ proc gendoc {args} {
}
} 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 {
@@ -247,16 +249,16 @@ proc gendoc {args} {
}
} elseif {$arg_n == "mathjax"} {
if { [ lsearch $args_names "pdf" ] != -1 } {
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"
}
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 is not used with pdf and will be ignored."
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"
@@ -303,27 +305,35 @@ proc gendoc {args} {
puts ""
# Clean logfiles
set DOXYLOG [OCCDoc_GetRootDir]/doc/doxygen_warnings_and_errors.log
set PDFLOG [OCCDoc_GetRootDir]/doc/pdflatex_warnings_and_errors.log
file delete -force $PDFLOG
file delete -force $DOXYLOG
# Start main activities
if { $GEN_MODE != "PDF_ONLY" } {
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
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...\n"
puts "Generating OCCT User Guides in PDF format..."
foreach pdf $DOCFILES {
puts "Info: Processing file $pdf\n"
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 "[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generation completed."
puts "\nPDF files are generated in \n[file normalize [OCCDoc_GetRootDir]/doc/pdf]"
puts "\n[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generation completed."
}
}
@@ -333,12 +343,7 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s
global available_docfiles
global available_pdf
set PRODPATH ""
if { [string compare -nocase $generateProductsRefman "YES"] == 0 } {
set PRODPATH "$::env(PRODROOT)"
}
set ROOTDIR [OCCDoc_GetRootDir $PRODPATH]
set ROOTDIR [OCCDoc_GetRootDir [OCCDoc_GetProdRootDir]]
set INDIR [OCCDoc_GetDoxDir]
set OUTDIR $ROOTDIR/doc
set PDFDIR $OUTDIR/pdf
@@ -348,7 +353,29 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s
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] } {
@@ -357,19 +384,24 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s
if { ![file exists $HTMLDIR] } {
file mkdir $HTMLDIR
}
if { ![file exists $PDFDIR] } {
file mkdir $PDFDIR
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 { ![file exists $UGDIR] } {
file mkdir $UGDIR
if { $generatorMode == "PDF_ONLY" } {
if { [file exists $LATEXDIR] } {
file delete -force $LATEXDIR
}
file mkdir $LATEXDIR
}
if { ![file exists $DGDIR] } {
file mkdir $DGDIR
}
if { [file exists $LATEXDIR] } {
file delete -force $LATEXDIR
}
file mkdir $LATEXDIR
}
if { $docType == "REFMAN" } {
if { ![file exists $TAGFILEDIR] } {
@@ -397,7 +429,11 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s
set DOCDIR "$OUTDIR/refman"
puts "\nGenerating Open CASCADE Reference Manual\n"
} elseif { $docType == "OVERVIEW" } {
set DOCDIR "$OUTDIR/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" } {
@@ -416,7 +452,7 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s
# 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 $PRODPATH] == -1 } {
if { [OCCDoc_MakeDoxyfile $docType $DOCDIR $TAGFILEDIR $DOXYFILE $generatorMode $docfiles $modules $verboseMode $searchMode $HHC_PATH $mathjax_relative_location $GRAPHVIZ_PATH [OCCDoc_GetProdRootDir]] == -1 } {
return -1
}
@@ -424,23 +460,31 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s
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..."
}
set DOXYLOG $OUTDIR/doxygen_warnings_and_errors.log
set RESULT [catch {exec $DOXYGEN_PATH $DOXYFILE >> $OUTDIR/doxygen_out.log} DOX_ERROR]
# 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 "\nWarning: Doxygen reported $NbErrors messages."
puts "See log in $DOXYLOG\n"
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===================================================="
@@ -462,7 +506,7 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s
if {[OCCDoc_PostProcessor $DOCDIR] == 0} {
puts "$curtime Generation completed."
puts "\nInfo: doxygen log file is located in:"
puts "$OUTDIR/doxygen_out.log."
puts "${DOXYOUT}."
puts "\nReference Manual is generated in \n$DOCDIR"
}
} elseif { $docType == "OVERVIEW" } {
@@ -529,25 +573,29 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s
puts "Info: Executing $LATEXDIR/Makefile..."
}
}
set PDFLOG $OUTDIR/pdflatex_warnings_and_errors.log
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] >> "$OUTDIR/pdflatex_out.log"} LaTeX_ERROR]
set RESULT [catch {eval exec [auto_execok $LATEXDIR/make.bat] >> "$PDFOUT"} LaTeX_ERROR]
} else {
set RESULT [catch {eval exec "make -f $LATEXDIR/Makefile" >> "$OUTDIR/pdflatex_out.log"} LaTeX_ERROR]
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" >> "$OUTDIR/pdflatex_out.log"} LaTeX_ERROR]
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 "\nWarning: PDFLaTeX reported $NbErrors messages.\nSee log in $PDFLOG\n"
set LaTeX_ERROR_FILE [open $PDFLOG "a"]
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"
@@ -564,32 +612,38 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s
set destFolder $PDFDIR
set parsed_string [split $TEX "_"]
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
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" } {
file rename $OUTDIR/overview.chm $OUTDIR/occt_overview.chm
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 "\nHTML documentation is generated in \n$DOCDIR"
puts "HTML documentation is generated in \n$DOCDIR"
} elseif { $generatorMode == "CHM_ONLY" } {
puts "Generated CHM documentation is in \n$OUTDIR/overview.chm"
}
if { $generatorMode == "CHM_ONLY" } {
puts "\nGenerated CHM documentation is in \n$OUTDIR/overview.chm"
}
puts ""
}
# Remove temporary Doxygen files
@@ -597,14 +651,17 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s
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]
set TEMPLATES_DIR $inputDir/resources
set inputDir [OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]
set TEMPLATES_DIR [OCCDoc_GetDoxDir]/resources
set occt_version [OCCDoc_DetectCasVersion]
# Delete existent doxyfile
@@ -631,6 +688,17 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
# 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]
@@ -672,6 +740,16 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
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 {
@@ -731,7 +809,7 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
puts $doxyFile "DOTFILE_DIRS = $outDir/html"
puts $doxyFile "DOT_PATH = $graphvizPath"
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetIncDir $productsPath]"
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetSourceDir $productsPath]"
# list of files to generate
set mainpage [OCCDoc_MakeMainPage $outDir $outDir/$name.dox $modules $productsPath]
@@ -746,15 +824,21 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
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 = $inputDir/resources/occ_logo.png"
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 = $inputDir/resources/ "
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 } {

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,7 @@
# commercial license or contractual agreement.
# =======================================================================
# This script contains auxilary functions which can be used
# This script contains auxiliary functions which can be used
# in documentation generation process
# =======================================================================
@@ -32,12 +32,12 @@ proc OCCDoc_ParseArguments {arguments} {
array set args_values {}
foreach arg $arguments {
if {[regexp {^(-)[a-z]+$} $arg] == 1} {
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} {
} 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
@@ -59,8 +59,19 @@ proc OCCDoc_ParseArguments {arguments} {
}
# Returns script parent folder
proc OCCDoc_GetDoxDir {} {
return [file normalize [file dirname [info script]]/../dox]
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
@@ -71,7 +82,6 @@ proc OCCDoc_GetOCCTRootDir {} {
# Returns root dir
proc OCCDoc_GetRootDir { {theProductsPath ""} } {
if { $theProductsPath == "" } {
return [OCCDoc_GetOCCTRootDir]
} else {
@@ -169,8 +179,10 @@ proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH H
}
if {"$is_win" == "yes"} {
set exe ".exe"
set com ".com"
} else {
set exe ""
set com ""
}
set g_flag "no"
@@ -214,11 +226,11 @@ proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH H
}
}
if {$i_flag == "no"} {
if { [file exists $path/inkscape$exe] } {
if { [file exists $path/inkscape$com] } {
catch { exec $path/inkscape -V } version
puts "Info: $version "
puts " found in $path."
set inkscape_path "$path/inkscape$exe"
set inkscape_path "$path/inkscape$com"
set i_flag "yes"
}
}
@@ -346,15 +358,29 @@ proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH H
# 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
}
foreach file [glob -nocomplain $latexDir/*.svg] {
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 { [catch {exec inkscape -z -D --file=$file --export-pdf=$pdffile} res] } {
#puts "Error: $res."
return
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
}
}
}
}
@@ -609,7 +635,7 @@ proc OCCDoc_MakeMainPage {outDir outFile modules {theProductsDir ""} } {
foreach mod $modules {
puts $fd "\\li \\subpage [string tolower $module_prefix$mod]"
}
# insert modules relationship diagramm
# insert modules relationship diagram
puts $fd "\\dotfile [OCCDoc_CreateModulesDependencyGraph $outDir/html schema_all_modules $modules $module_prefix]"
puts $fd "**/\n"
}
@@ -736,8 +762,7 @@ proc OCCDoc_PostProcessor {outDir} {
# Loads a list of docfiles from file FILES.txt
proc OCCDoc_LoadFilesList {} {
set INPUTDIR [OCCDoc_GetDoxDir]
set INPUTDIR [OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]
global available_docfiles
set available_docfiles {}
@@ -799,7 +824,11 @@ proc OCCDoc_MakeRefmanTex {fileName latexDir verboseMode latexFilesList} {
}
# Copy template file to latex folder
file copy "[OCCDoc_GetDoxDir]/resources/occt_pdf_template.tex" $DOCNAME
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"]
@@ -808,6 +837,7 @@ proc OCCDoc_MakeRefmanTex {fileName latexDir verboseMode latexFilesList} {
# 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]
@@ -815,23 +845,23 @@ proc OCCDoc_MakeRefmanTex {fileName latexDir verboseMode latexFilesList} {
set docLabel ""
foreach aFileName $latexFilesList {
# Find the file in FILES_PDF.txt
set parsedFileName [split $aFileName "/" ]
set newfileName [string range $fileName [expr [string first "__" $fileName] + 2] end]
if { [lsearch -nocase $parsedFileName "$newfileName.md" ] != -1 } {
set filepath "[OCCDoc_GetDoxDir]/$aFileName"
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 texfile_loaded [string map [list DEFDOCLABEL "$docLabel" DEFCASVERSION "$casVersion" DEFFILENAME "$fileName" DEFYEAR "$year"] $texfile_loaded]
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

2
adm/scripts/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*custom.bat
*custom.sh

View File

@@ -0,0 +1,269 @@
@echo OFF
rem Auxiliary script for semi-automated building of OCCT for Android platform.
rem android_custom.bat should be configured with paths
rem to CMake, 3rd-parties, Android NDK and MinGW make tool.
set "aCasSrc=%~dp0..\.."
set "aBuildRoot=%aCasSrc%\work"
set aNbJobs=%NUMBER_OF_PROCESSORS%
rem Paths to 3rd-party tools and libraries
set "anNdkPath="
set "aFreeType="
set "aRapidJson="
set "aDraco="
rem Build stages to perform
set "toCMake=1"
set "toClean=0"
set "toMake=1"
set "toInstall=1"
set "toPack=1"
set "isStatic=0"
rem Minimal Android platform and CPU architectures
set "anNdkApiLevel=21"
set "anNdkAbiList=armeabi-v7a x86 arm64-v8a x86_64"
rem OCCT Modules to build
set "BUILD_ModelingData=ON"
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"
set "USE_RAPIDJSON=OFF"
set "USE_DRACO=OFF"
rem Archive tool
set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
set "THE_7Z_PATH=%ProgramW6432%\7-Zip\7z.exe"
rem Configuration file
if exist "%~dp0android_custom.bat" call "%~dp0android_custom.bat"
set "aCompiler=gcc"
set "aCppLib=gnustl_shared"
if not exist "%anNdkPath%/sources/cxx-stl/gnu-libstdc++" (
if exist "%anNdkPath%/sources/cxx-stl/llvm-libc++" (
set "aCompiler=clang"
set "aCppLib=c++_shared"
)
)
set "aLibType=Shared"
if ["%isStatic%"] == ["1"] set "aLibType=Static"
set "aDestDir=%aBuildRoot%\android-%aCompiler%"
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aDestDir%"
)
)
set "anOcctVerSuffix="
set "anOcctVersion=0.0.0"
set "aGitBranch="
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_DEVELOPMENT" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVerSuffix=%%i" )
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_COMPLETE" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVersion=%%i" )
for /f %%i in ('git symbolic-ref --short HEAD') do ( set "aGitBranch=%%i" )
for %%s in (%anNdkAbiList%) do (
call :cmakeGenerate "%anNdkApiLevel%" "%%s"
if errorlevel 1 (
if not ["%1"] == ["-nopause"] (
pause
)
exit /B 1
goto :eof
)
)
for /F "skip=1 delims=" %%F in ('
wmic PATH Win32_LocalTime GET Day^,Month^,Year /FORMAT:TABLE
') do (
for /F "tokens=1-3" %%L in ("%%F") do (
set DAY00=0%%L
set MONTH00=0%%M
set YEAR=%%N
)
)
set DAY00=%DAY00:~-2%
set MONTH00=%MONTH00:~-2%
set "aRevision=-%YEAR%-%MONTH00%-%DAY00%"
rem set "aRevision=-%aGitBranch%"
set "anArchName=occt-%anOcctVersion%%anOcctVerSuffix%%aRevision%-android"
set "aTarget=%aBuildRoot%\%anArchName%"
if ["%toPack%"] == ["1"] (
echo Creating archive %anArchName%.7z
rmdir /S /Q "%aTarget%"
if not exist "%aTarget%" ( mkdir "%aTarget%" )
if exist "%aBuildRoot%/%anArchName%.7z" del "%aBuildRoot%/%anArchName%.7z"
xcopy /S /Y "%aDestDir%\*" "%aTarget%\"
"%THE_7Z_PATH%" a -r %THE_7Z_PARAMS% "%aBuildRoot%/%anArchName%.7z" "%aTarget%"
)
if not ["%1"] == ["-nopause"] (
pause
)
goto :eof
:cmakeGenerate
set "anApi=%~1"
set "anAbi=%~2"
if ["%anApi%"] == [""] (
set "anApi=21"
if ["%anAbi%"] == ["armeabi-v7a"] ( set "anApi=16" )
if ["%anAbi%"] == ["x86"] ( set "anApi=16" )
)
set "aPlatformAndCompiler=android-%anAbi%-%aCompiler%"
set "aWorkDir=%aBuildRoot%\%aPlatformAndCompiler%-make"
set "aLogFile=%aBuildRoot%\build-%aPlatformAndCompiler%.log"
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aWorkDir%"
)
)
if not exist "%aWorkDir%" ( mkdir "%aWorkDir%" )
if exist "%aLogFile%" ( del "%aLogFile%" )
rem include some information about OCCT into archive
echo ^<pre^>> "%aWorkDir%\VERSION.html"
git status >> "%aWorkDir%\VERSION.html"
git log -n 100 >> "%aWorkDir%\VERSION.html"
echo ^</pre^>>> "%aWorkDir%\VERSION.html"
echo Start building OCCT for %aPlatformAndCompiler%
echo Start building OCCT for %aPlatformAndCompiler%, API level %anApi%>> %aLogFile%
pushd "%aWorkDir%"
set "aFreeTypeLibName=libfreetype.so"
if exist "%aFreeType%/libs/%anAbi%/libfreetype.a" ( set "aFreeTypeLibName=libfreetype.a" )
set "aTimeZERO=%TIME%"
if ["%toCMake%"] == ["1"] (
echo Configuring OCCT for Android %anAbi%, API level %anApi%...
cmake -G "MinGW Makefiles" ^
-D CMAKE_SYSTEM_NAME:STRING="Android" ^
-D CMAKE_ANDROID_NDK="%anNdkPath%" ^
-D CMAKE_BUILD_TYPE:STRING="Release" ^
-D CMAKE_ANDROID_ARCH_ABI:STRING="%anAbi%" ^
-D CMAKE_SYSTEM_VERSION:STRING="%anApi%" ^
-D CMAKE_ANDROID_STL_TYPE="%aCppLib%" ^
-D BUILD_LIBRARY_TYPE:STRING="%aLibType%" ^
-D INSTALL_DIR:PATH="%aDestDir%" ^
-D INSTALL_DIR_INCLUDE:STRING="inc" ^
-D INSTALL_DIR_LIB:STRING="libs/%anAbi%" ^
-D INSTALL_DIR_CMAKE:STRING="libs/%anAbi%/cmake/opencascade" ^
-D INSTALL_DIR_RESOURCE:STRING="src" ^
-D BUILD_MODULE_FoundationClasses:BOOL="ON" ^
-D BUILD_MODULE_ModelingData:BOOL="%BUILD_ModelingData%" ^
-D BUILD_MODULE_ModelingAlgorithms:BOOL="%BUILD_ModelingAlgorithms%" ^
-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%" ^
-D 3RDPARTY_FREETYPE_DIR:PATH="%aFreeType%" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="%aFreeType%/include" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="%aFreeType%/include" ^
-D 3RDPARTY_FREETYPE_LIBRARY_DIR:PATH="%aFreeType%/libs/%anAbi%" ^
-D 3RDPARTY_FREETYPE_LIBRARY:FILEPATH="%aFreeType%/libs/%anAbi%/%aFreeTypeLibName%" ^
-D USE_RAPIDJSON:BOOL="%USE_RAPIDJSON%" ^
-D 3RDPARTY_RAPIDJSON_DIR:PATH="%aRapidJson%" ^
-D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="%aRapidJson%/include" ^
-D USE_DRACO:BOOL="%USE_DRACO%" ^
-D 3RDPARTY_DRACO_DIR:PATH="%aDraco%" ^
-D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="%aDraco%/include" ^
-D 3RDPARTY_DRACO_LIBRARY_DIR_draco:PATH="%aDraco%/libs/%anAbi%" ^
"%aCasSrc%"
if errorlevel 1 (
popd
exit /B 1
goto :eof
)
)
set "aTimeGEN=%TIME%"
call :computeDuration %aTimeZERO% %aTimeGEN%
if ["%toCMake%"] == ["1"] (
echo Generation time: %DURATION%
echo Generation time: %DURATION%>> "%aLogFile%"
)
if ["%toClean%"] == ["1"] (
mingw32-make clean
)
if ["%toMake%"] == ["1"] (
echo Building...
mingw32-make -j %aNbJobs% 2>> "%aLogFile%"
if errorlevel 1 (
type "%aLogFile%"
popd
exit /B 1
goto :eof
)
type "%aLogFile%"
)
set "aTimeBUILD=%TIME%"
call :computeDuration %aTimeGEN% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Building time: %DURATION%
echo Building time: %DURATION%>> "%aLogFile%"
)
call :computeDuration %aTimeZERO% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Total building time: %DURATION%
echo Total building time: %DURATION%>> "%aLogFile%"
)
if ["%toInstall%"] == ["1"] (
echo Installing into %aDestDir%...
mingw32-make install 2>> "%aLogFile%"
copy /Y "%aWorkDir%\VERSION.html" "%aDestDir%\VERSION.html"
)
set "aTimeINSTALL=%TIME%"
call :computeDuration "%aTimeBUILD%" "%aTimeINSTALL%"
if ["%toInstall%"] == ["1"] (
echo Install time: %DURATION%
echo Install time: %DURATION%>> "%aLogFile%"
)
call :computeDuration "%aTimeZERO%" "%aTimeINSTALL%"
echo Total time: %DURATION%
echo Total time: %DURATION%>> "%aLogFile%"
popd
goto :eof
:computeDuration
set "aTimeFrom=%~1"
set "aTimeEnd=%~2"
rem handle time before 10AM (win10 - remove empty space at the beginning)
if "%aTimeFrom:~0,1%"==" " set "aTimeFrom=%aTimeFrom:~1%"
if "%aTimeEnd:~0,1%"==" " set "aTimeEnd=%aTimeEnd:~1%"
rem handle time before 10AM (win7 - add 0 at the beginning)
if "%aTimeFrom:~1,1%"==":" set "aTimeFrom=0%aTimeFrom%"
if "%aTimeEnd:~1,1%"==":" set "aTimeEnd=0%aTimeEnd%"
rem convert hours:minutes:seconds:ms into duration
set /A aTimeFrom=(1%aTimeFrom:~0,2%-100)*360000 + (1%aTimeFrom:~3,2%-100)*6000 + (1%aTimeFrom:~6,2%-100)*100 + (1%aTimeFrom:~9,2%-100)
set /A aTimeEnd= (1%aTimeEnd:~0,2%-100)*360000 + (1%aTimeEnd:~3,2%-100)*6000 + (1%aTimeEnd:~6,2%-100)*100 + (1%aTimeEnd:~9,2%-100)
set /A aDurTotalSec=%aTimeEnd%-%aTimeFrom%
if %aTimeEnd% LSS %aTimeFrom% set set /A aDurTotalSec=%aTimeFrom%-%aTimeEnd%
set /A aDurHH=%aDurTotalSec% / 360000
set /A aDurMM=(%aDurTotalSec% - %aDurHH%*360000) / 6000
set /A aDurSS=(%aDurTotalSec% - %aDurHH%*360000 - %aDurMM%*6000) / 100
if %aDurHH% LSS 10 set aDurHH=0%aDurHH%
if %aDurMM% LSS 10 set aDurMM=0%aDurMM%
if %aDurSS% LSS 10 set aDurSS=0%aDurSS%
set "DURATION=%aDurHH%:%aDurMM%:%aDurSS%"
goto :eof

View File

@@ -0,0 +1,34 @@
rem Environment configuration template for android_build.bat (to be renamed as android_custom.bat)
rem Paths to 3rd-party tools and libraries
rem call c:\TDM-GCC-64\mingwvars.bat
rem set "PATH=c:\CMake\bin;%PATH%"
rem set "anNdkPath=c:/android-ndk-r12"
rem set "aFreeType=c:/freetype-2.7.1-android"
rem set "aRapidJson=c:/rapidjson-1.1.0"
rem set "aDraco=c:/draco-1.4.1-android"
rem Uncomment to customize building steps
rem set "aBuildRoot=%~dp0..\..\work"
rem set "toCMake=1"
rem set "toClean=0"
rem set "toMake=1"
rem set "toInstall=1"
rem set "toPack=1"
rem set "isStatic=0"
rem Minimal Android platform and CPU architectures
rem set "anNdkApiLevel=21"
rem set "anNdkAbiList=arm64-v8a x86_64"
rem OCCT Modules to build
rem set "BUILD_ModelingData=ON"
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"
rem set "USE_DRACO=ON"

View File

@@ -0,0 +1,49 @@
rem Environment configuration template for cmake_gen.bat (to be renamed as cmake_gen_custom.bat)
set "OCCT3RDPARTY=%SrcRoot%\..\3rdparty"
set VS=14
set VSDATA=2015
rem Leave VSPLATFORM empty to build for x86 platform
set VSPLATFORM=Win64
rem ------------------------------------
rem Uncomment to customize building steps
rem ------------------------------------
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
rem set BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
rem set BUILD_USE_PCH=OFF
rem set BUILD_FORCE_RelWithDebInfo=OFF
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
rem set BUILD_MODULE_Visualization=ON
rem set USE_D3D=OFF
rem set USE_FFMPEG=OFF
rem set USE_FREEIMAGE=OFF
rem set USE_GLES2=OFF
rem set USE_RAPIDJSON=OFF
rem set USE_DRACO=OFF
rem set USE_TBB=OFF
rem set USE_VTK=OFF

View File

@@ -0,0 +1,44 @@
# Environment configuration template for cmake_gen.sh (to be renamed as cmake_gen_custom.sh)
OCCT3RDPARTY="$SrcRoot/../3rdparty"
FREETYPE_DIR="$OCCT3RDPARTY/freetype-2.7.1"
# ------------------------------------
# Uncomment to customize building steps
# ------------------------------------
#BUILD_DIR=build
#INSTALL_DIR="$SrcRoot/install"
#BUILD_DOC_Overview=OFF
#BUILD_Inspector=OFF
#BUILD_LIBRARY_TYPE=Shared
#BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
#BUILD_WITH_DEBUG=OFF
#BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
# Use semicolon-separated list of toolkits if you want to disable all modules
# 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
#BUILD_MODULE_Visualization=ON
#USE_FFMPEG=OFF
#USE_FREEIMAGE=OFF
#USE_GLES2=OFF
#USE_RAPIDJSON=OFF
#USE_DRACO=OFF
#USE_TBB=OFF
#USE_VTK=OFF
# This is to add any additional arguments to cmake
#AUX_ARGS=

90
adm/scripts/cmake_gen.bat Normal file
View File

@@ -0,0 +1,90 @@
@echo off
rem Auxiliary script for semi-automated building of OCCT using cmake.
rem cmake_custom.bat should be configured with VS version and path to 3rd-parties.
rem OCCT3RDPARTY must be specified as mandatory dependency.
setlocal
set "SrcRoot=%~dp0..\.."
set VS=14
set VSDATA=2015
set VSPLATFORM=Win64
set "BUILD_DIR=build-vs%VS%-%VSPLATFORM%"
set "OCCT3RDPARTY="
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
set BUILD_USE_PCH=OFF
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
set BUILD_MODULE_Visualization=ON
set USE_D3D=OFF
set USE_FFMPEG=OFF
set USE_FREEIMAGE=OFF
set USE_GLES2=OFF
set USE_RAPIDJSON=OFF
set USE_DRACO=OFF
set USE_TBB=OFF
set USE_VTK=OFF
if exist "%~dp0cmake_custom.bat" call "%~dp0cmake_custom.bat"
if not "%VSPLATFORM%"=="" set "arch_compile=Visual Studio %VS% %VSDATA% %VSPLATFORM%"
if "%VSPLATFORM%"=="" set "arch_compile=Visual Studio %VS% %VSDATA%"
set "INSTALL_DIR=%INSTALL_DIR:\=/%"
set "OCCT3RDPARTY=%OCCT3RDPARTY:\=/%"
set "BUILD_DIR=%SrcRoot%\%BUILD_DIR%"
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
pushd "%BUILD_DIR%"
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% ^
-D BUILD_USE_PCH:BOOL=%BUILD_USE_PCH% ^
-D BUILD_FORCE_RelWithDebInfo:BOOL=%BUILD_FORCE_RelWithDebInfo% ^
-D INSTALL_DIR:PATH="%INSTALL_DIR%" ^
-D USE_D3D:BOOL=%USE_D3D% ^
-D USE_FFMPEG:BOOL=%USE_FFMPEG% ^
-D USE_FREEIMAGE:BOOL=%USE_FREEIMAGE% ^
-D USE_GLES2:BOOL=%USE_GLES2% ^
-D USE_RAPIDJSON:BOOL=%USE_RAPIDJSON% ^
-D USE_DRACO:BOOL=%USE_DRACO% ^
-D USE_TBB:BOOL=%USE_TBB% ^
-D USE_VTK:BOOL=%USE_VTK% ^
"%SrcRoot%"
popd
endlocal

90
adm/scripts/cmake_gen.sh Executable file
View File

@@ -0,0 +1,90 @@
#!/bin/bash
# Auxiliary script for semi-automated building of OCCT using cmake.
# cmake_custom.sh should be configured with path to 3rd-parties.
# OCCT3RDPARTY and FREETYPE_DIR must be specified as mandatory dependencies.
ScriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
SrcRoot="${ScriptDir}/../.."
INSTALL_DIR="$SrcRoot/install"
BUILD_DIR=build
DEB=
CMAKE_BUILD_TYPE=Release
if [ "$1" = "-d" ]; then
DEB=d
BUILD_DIR=${BUILD_DIR}-deb
CMAKE_BUILD_TYPE=Debug
fi
INSTALL_DIR_BIN=lin64/gcc/bin$DEB
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
BUILD_MODULE_Visualization=ON
USE_FFMPEG=OFF
USE_FREEIMAGE=OFF
USE_GLES2=OFF
USE_RAPIDJSON=OFF
USE_DRACO=OFF
USE_TBB=OFF
USE_VTK=OFF
AUX_ARGS=
if [ -f "${ScriptDir}/cmake_custom.sh" ]; then
. "${ScriptDir}/cmake_custom.sh"
fi
BUILD_DIR="$SrcRoot/$BUILD_DIR"
if [ ! -d "$BUILD_DIR" ]; then mkdir -p "$BUILD_DIR"; fi
pushd "$BUILD_DIR"
cmake -G "Unix Makefiles" \
-D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
-D 3RDPARTY_DIR:PATH="$OCCT3RDPARTY" \
-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 \
-D INSTALL_DIR:PATH="$INSTALL_DIR" \
-D INSTALL_DIR_LAYOUT:STRING=Windows \
-D INSTALL_DIR_BIN:STRING=$INSTALL_DIR_BIN \
-D INSTALL_DIR_LIB:STRING=$INSTALL_DIR_LIB \
-D USE_FFMPEG:BOOL=$USE_FFMPEG \
-D USE_FREEIMAGE:BOOL=$USE_FREEIMAGE \
-D USE_GLES2:BOOL=$USE_GLES2 \
-D USE_RAPIDJSON:BOOL=$USE_RAPIDJSON \
-D USE_DRACO:BOOL=$USE_DRACO \
-D USE_TBB:BOOL=$USE_TBB \
-D USE_VTK:BOOL=$USE_VTK \
$AUX_ARGS "$SrcRoot"
popd

269
adm/scripts/ios_build.sh Executable file
View File

@@ -0,0 +1,269 @@
#!/bin/bash
# Auxiliary script for semi-automated building of OCCT for iOS platform.
# macos_custom.sh should be configured with paths to CMake and other 3rd-parties.
# FreeType should be specified as mandatory dependency.
aScriptDir=${BASH_SOURCE%/*}
if [ -d "$aScriptDir" ]; then cd "$aScriptDir"; fi
aScriptDir="$PWD"
aCasSrc=${aScriptDir}/../..
aNbJobs="$(getconf _NPROCESSORS_ONLN)"
export aBuildRoot=work
# paths to pre-built 3rd-parties
export aFreeType=
export aFreeImage=
export aRapidJson=
export aDraco=
# build stages to perform
export isStatic=1
export toCMake=1
export toClean=1
export toMake=1
export toInstall=1
export toPack=0
export toPackFat=0
export toDebug=0
export BUILD_ModelingData=ON
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
export USE_RAPIDJSON=OFF
export USE_DRACO=OFF
export IPHONEOS_DEPLOYMENT_TARGET=8.0
#export anAbiList="iPhoneOS|arm64 iPhoneSimulator|arm64 iPhoneSimulator|x86_64"
export anAbiList="iPhoneOS|arm64"
if [[ -f "${aScriptDir}/ios_custom.sh" ]]; then
source "${aScriptDir}/ios_custom.sh"
fi
anOcctVerSuffix=`grep -e "#define OCC_VERSION_DEVELOPMENT" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs`
anOcctVersion=`grep -e "#define OCC_VERSION_COMPLETE" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs`
aGitBranch=`git symbolic-ref --short HEAD`
YEAR=$(date +"%Y")
MONTH=$(date +"%m")
DAY=$(date +"%d")
aRevision=-${YEAR}-${MONTH}-${DAY}
#aRevision=-${aGitBranch}
set -o pipefail
aBuildType="Release"
aBuildTypePrefix=
if [[ $toDebug == 1 ]]; then
aBuildType="Debug"
aBuildTypePrefix="-debug"
fi
aLibType="Shared"
if [[ $isStatic == 1 ]]; then
aLibType="Static"
fi
function buildArch {
anAbi=$1
aPlatformSdk=$2
aPlatformAndCompiler=${aPlatformSdk}-${anAbi}${aBuildTypePrefix}-clang
aWorkDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}-make"
aDestDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}"
aLogFile="${aCasSrc}/${aBuildRoot}/build-${aPlatformAndCompiler}.log"
if [[ $toCMake == 1 ]] && [[ $toClean == 1 ]]; then
rm -r -f "$aWorkDir"
rm -r -f "$aDestDir"
fi
mkdir -p "$aWorkDir"
mkdir -p "$aDestDir"
rm -f "$aLogFile"
# include some information about OCCT into archive
echo \<pre\>> "${aWorkDir}/VERSION.html"
git status >> "${aWorkDir}/VERSION.html"
git log -n 100 >> "${aWorkDir}/VERSION.html"
echo \</pre\>>> "${aWorkDir}/VERSION.html"
pushd "$aWorkDir"
aTimeZERO=$SECONDS
function logDuration {
if [[ $1 == 1 ]]; then
aDur=$(($4 - $3))
echo $2 time: $aDur sec>> "$aLogFile"
fi
}
aSysRoot="/Applications/Xcode.app/Contents/Developer/Platforms/${aPlatformSdk}.platform/Developer/SDKs/${aPlatformSdk}.sdk"
# (re)generate Make files
if [[ $toCMake == 1 ]]; then
echo Configuring OCCT for iOS...
cmake -G "Unix Makefiles" \
-D CMAKE_SYSTEM_NAME="iOS" \
-D CMAKE_OSX_ARCHITECTURES:STRING="$anAbi" \
-D CMAKE_OSX_DEPLOYMENT_TARGET:STRING="$IPHONEOS_DEPLOYMENT_TARGET" \
-D CMAKE_OSX_SYSROOT:PATH="$aSysRoot" \
-D CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL="OFF" \
-D CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL="OFF" \
-D CMAKE_BUILD_TYPE:STRING="$aBuildType" \
-D BUILD_LIBRARY_TYPE:STRING="$aLibType" \
-D INSTALL_DIR:PATH="$aDestDir" \
-D INSTALL_DIR_INCLUDE:STRING="inc" \
-D INSTALL_DIR_LIB:STRING="lib" \
-D INSTALL_DIR_RESOURCE:STRING="src" \
-D INSTALL_NAME_DIR:STRING="@executable_path/../Frameworks" \
-D USE_FREETYPE:BOOL="$USE_FREETYPE" \
-D 3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \
-D 3RDPARTY_FREETYPE_LIBRARY_DIR:PATH="$aFreeType/lib" \
-D USE_RAPIDJSON:BOOL="$USE_RAPIDJSON" \
-D 3RDPARTY_RAPIDJSON_DIR:PATH="$aRapidJson" \
-D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="$aRapidJson/include" \
-D USE_DRACO:BOOL="$USE_DRACO" \
-D 3RDPARTY_DRACO_DIR:PATH="$aDraco" \
-D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="$aDraco/include" \
-D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="$aDraco/lib" \
-D USE_FREEIMAGE:BOOL="$USE_FREEIMAGE" \
-D 3RDPARTY_FREEIMAGE_DIR:PATH="$aFreeImage" \
-D 3RDPARTY_FREEIMAGE_INCLUDE_DIR:FILEPATH="$aFreeImage/include" \
-D 3RDPARTY_FREEIMAGE_LIBRARY_DIR:PATH="$aFreeImage/lib" \
-D 3RDPARTY_FREEIMAGE_LIBRARY:FILEPATH="$aFreeImage/lib/libfreeimage.a" \
-D BUILD_MODULE_FoundationClasses:BOOL="ON" \
-D BUILD_MODULE_ModelingData:BOOL="${BUILD_ModelingData}" \
-D BUILD_MODULE_ModelingAlgorithms:BOOL="${BUILD_ModelingAlgorithms}" \
-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"
aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi
fi
aTimeGEN=$SECONDS
logDuration $toCMake "Generation" $aTimeZERO $aTimeGEN
# clean up from previous build
if [[ $toClean == 1 ]]; then
make clean
fi
# build the project
if [[ $toMake == 1 ]]; then
echo Building...
make -j $aNbJobs 2>&1 | tee -a "$aLogFile"
aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi
fi
aTimeBUILD=$SECONDS
logDuration $toMake "Building" $aTimeGEN $aTimeBUILD
logDuration $toMake "Total building" $aTimeZERO $aTimeBUILD
# install the project
if [[ $toInstall == 1 ]]; then
echo Installing OCCT into $aDestDir...
make install 2>&1 | tee -a "$aLogFile"
cp -f "$aWorkDir/VERSION.html" "$aDestDir/VERSION.html"
echo Platform: ${aPlatformSdk} ABI: ${anAbi} Build: ${aBuildType} IPHONEOS_DEPLOYMENT_TARGET: ${IPHONEOS_DEPLOYMENT_TARGET} > "$aDestDir/build_target.txt"
fi
aTimeINSTALL=$SECONDS
logDuration $toInstall "Install" $aTimeBUILD $aTimeINSTALL
# create an archive
if [[ $toPack == 1 ]]; then
anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aPlatformAndCompiler}.tar.bz2
echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}...
rm ${aDestDir}/../${anArchName} &>/dev/null
pushd "$aDestDir"
tar -jcf ${aDestDir}/../${anArchName} *
popd
fi
aTimePACK=$SECONDS
logDuration $toPack "Packing archive" $aTimeINSTALL $aTimePACK
# finished
DURATION=$(($aTimePACK - $aTimeZERO))
echo Total time: $DURATION sec
logDuration 1 "Total" $aTimeZERO $aTimePACK
popd
}
for anArchIter in $anAbiList
do
IFS="|" read -r aPlatform anArch <<< "$anArchIter"
echo Platform: ${aPlatform} ABI: ${anArch} Build: ${aBuildType}
buildArch $anArch $aPlatform
done
# create a FAT archive
if [[ $toPackFat == 1 ]]; then
for aPlatIter in iPhoneOS iPhoneSimulator
do
aSuffixFat=${aPlatIter}${aBuildTypePrefix}-clang
aFatDir="${aCasSrc}/${aBuildRoot}/${aSuffixFat}"
# merge per-arch builds into fat builds
hasPlatform=0
for anArchIter in $anAbiList
do
IFS="|" read -r aPlatform anArch <<< "$anArchIter"
if [[ $aPlatIter != ${aPlatform} ]]; then
continue
fi
aSuffixThin=${aPlatform}-${anArch}${aBuildTypePrefix}-clang
anArchDir="${aCasSrc}/${aBuildRoot}/${aSuffixThin}"
if [[ $hasPlatform == 0 ]]; then
hasPlatform=1
echo Packing FAT archive for platform: ${aPlatform}
rm -r -f "$aFatDir"
mkdir -p "$aFatDir"
rsync -r --exclude '*.a' "$anArchDir/" "$aFatDir"
rm -f "$aFatDir/build_target.txt"
for aLibIter in $anArchDir/lib/*.a; do
aLibName=`basename $aLibIter`
lipo "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create
done
else
for aLibIter in $aFatDir/lib/*.a; do
aLibName=`basename $aLibIter`
lipo "$aFatDir/lib/$aLibName" "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create
#lipo -info "$aFatDir/lib/$aLibName"
done
fi
cat "$anArchDir/build_target.txt" >> "$aFatDir/build_target.txt"
done
# create an archive
for anArchIter in $anAbiList
do
IFS="|" read -r aPlatform anArch <<< "$anArchIter"
if [[ $aPlatIter != ${aPlatform} ]]; then
continue
fi
anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aSuffixFat}.tar.bz2
echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}...
rm ${aFatDir}/../${anArchName} &>/dev/null
pushd "$aFatDir"
tar -jcf ${aFatDir}/../${anArchName} *
popd
break
done
done
fi

View File

@@ -0,0 +1,31 @@
# environment configuration template for ios_build.sh (to be renamed as ios_custom_env.sh)
export PATH=/Applications/CMake.app/Contents/bin:$PATH
export aFreeType="$aSrcRoot/../3rdparty/freetype-2.10.4-ios"
export aFreeImage="$aSrcRoot/../3rdparty/freeimage-3.18-ios"
export aRapidJson="$aSrcRoot/../3rdparty/rapidjson-1.1.0"
export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-ios"
# Uncomment to customize building steps
#export isStatic=0
#export toCMake=1
#export toClean=1
#export toMake=1
#export toInstall=1
#export toPack=0
#export toPackFat=1
#export toDebug=0
#export BUILD_ModelingData=ON
#export BUILD_ModelingAlgorithms=ON
#export BUILD_Visualization=ON
#export BUILD_ApplicationFramework=ON
#export BUILD_DataExchange=ON
#export BUILD_DETools=OFF
#export USE_RAPIDJSON=ON
#export USE_DRACO=ON
#export USE_FREEIMAGE=ON
#export IPHONEOS_DEPLOYMENT_TARGET=8.0
#export anAbiList="iPhoneOS|arm64 iPhoneSimulator|arm64 iPhoneSimulator|x86_64"
#export anAbiList="iPhoneOS|arm64"

270
adm/scripts/macos_build.sh Executable file
View File

@@ -0,0 +1,270 @@
#!/bin/bash
# Auxiliary script for semi-automated building of OCCT for macOS platform.
# macos_custom.sh should be configured with paths to CMake and other 3rd-parties.
# FreeType should be specified as mandatory dependency.
aScriptDir=${BASH_SOURCE%/*}
if [ -d "$aScriptDir" ]; then cd "$aScriptDir"; fi
aScriptDir="$PWD"
aCasSrc=${aScriptDir}/../..
aNbJobs="$(getconf _NPROCESSORS_ONLN)"
export aBuildRoot=work
# paths to pre-built 3rd-parties
export aFreeType=
export aFreeImage=
export aRapidJson=
export aDraco=
# build stages to perform
export isStatic=0
export toCMake=1
export toClean=1
export toMake=1
export toInstall=1
export toPack=0
export toPackFat=0
export toDebug=0
export BUILD_ModelingData=ON
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
export USE_FREEIMAGE=ON
export USE_RAPIDJSON=OFF
export USE_DRACO=OFF
export MACOSX_DEPLOYMENT_TARGET=10.10
#export anAbiList="arm64 x86_64"
export anAbiList="x86_64"
aPlatform="macos"
if [[ -f "${aScriptDir}/macos_custom.sh" ]]; then
source "${aScriptDir}/macos_custom.sh"
fi
anOcctVerSuffix=`grep -e "#define OCC_VERSION_DEVELOPMENT" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs`
anOcctVersion=`grep -e "#define OCC_VERSION_COMPLETE" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs`
aGitBranch=`git symbolic-ref --short HEAD`
YEAR=$(date +"%Y")
MONTH=$(date +"%m")
DAY=$(date +"%d")
aRevision=-${YEAR}-${MONTH}-${DAY}
#aRevision=-${aGitBranch}
set -o pipefail
aBuildType="Release"
aBuildTypePrefix=
if [[ $toDebug == 1 ]]; then
aBuildType="Debug"
aBuildTypePrefix="-debug"
fi
aLibType="Shared"
aLibExt="dylib"
if [[ $isStatic == 1 ]]; then
aLibType="Static"
aLibExt="a"
fi
function buildArch {
anAbi=$1
aPlatformAndCompiler=${aPlatform}-${anAbi}${aBuildTypePrefix}-clang
aWorkDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}-make"
aDestDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}"
aLogFile="${aCasSrc}/${aBuildRoot}/build-${aPlatformAndCompiler}.log"
if [[ $toCMake == 1 ]] && [[ $toClean == 1 ]]; then
rm -r -f "$aWorkDir"
rm -r -f "$aDestDir"
fi
mkdir -p "$aWorkDir"
mkdir -p "$aDestDir"
rm -f "$aLogFile"
# include some information about OCCT into archive
echo \<pre\>> "${aWorkDir}/VERSION.html"
git status >> "${aWorkDir}/VERSION.html"
git log -n 100 >> "${aWorkDir}/VERSION.html"
echo \</pre\>>> "${aWorkDir}/VERSION.html"
pushd "$aWorkDir"
aTimeZERO=$SECONDS
function logDuration {
if [[ $1 == 1 ]]; then
aDur=$(($4 - $3))
echo $2 time: $aDur sec>> "$aLogFile"
fi
}
# (re)generate Make files
if [[ $toCMake == 1 ]]; then
echo Configuring OCCT for macOS...
cmake -G "Unix Makefiles" \
-D CMAKE_OSX_ARCHITECTURES:STRING="$anAbi" \
-D CMAKE_BUILD_TYPE:STRING="$aBuildType" \
-D BUILD_LIBRARY_TYPE:STRING="$aLibType" \
-D INSTALL_DIR:PATH="$aDestDir" \
-D INSTALL_DIR_INCLUDE:STRING="inc" \
-D INSTALL_DIR_LIB:STRING="lib" \
-D INSTALL_DIR_RESOURCE:STRING="src" \
-D INSTALL_NAME_DIR:STRING="@executable_path/../Frameworks" \
-D USE_FREETYPE:BOOL="$USE_FREETYPE" \
-D 3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \
-D 3RDPARTY_FREETYPE_LIBRARY_DIR:PATH="$aFreeType/lib" \
-D 3RDPARTY_FREETYPE_LIBRARY:FILEPATH="$aFreeType/lib/libfreetype.dylib" \
-D USE_RAPIDJSON:BOOL="$USE_RAPIDJSON" \
-D 3RDPARTY_RAPIDJSON_DIR:PATH="$aRapidJson" \
-D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="$aRapidJson/include" \
-D USE_DRACO:BOOL="$USE_DRACO" \
-D 3RDPARTY_DRACO_DIR:PATH="$aDraco" \
-D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="$aDraco/include" \
-D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="$aDraco/lib" \
-D USE_FREEIMAGE:BOOL="$USE_FREEIMAGE" \
-D 3RDPARTY_FREEIMAGE_DIR:PATH="$aFreeImage" \
-D 3RDPARTY_FREEIMAGE_INCLUDE_DIR:FILEPATH="$aFreeImage/include" \
-D 3RDPARTY_FREEIMAGE_LIBRARY_DIR:PATH="$aFreeImage/lib" \
-D 3RDPARTY_FREEIMAGE_LIBRARY:FILEPATH="$aFreeImage/lib/libfreeimage.a" \
-D BUILD_MODULE_FoundationClasses:BOOL="ON" \
-D BUILD_MODULE_ModelingData:BOOL="${BUILD_ModelingData}" \
-D BUILD_MODULE_ModelingAlgorithms:BOOL="${BUILD_ModelingAlgorithms}" \
-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"
aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi
fi
aTimeGEN=$SECONDS
logDuration $toCMake "Generation" $aTimeZERO $aTimeGEN
# clean up from previous build
if [[ $toClean == 1 ]]; then
make clean
fi
# build the project
if [[ $toMake == 1 ]]; then
echo Building OCCT...
make -j $aNbJobs 2>&1 | tee -a "$aLogFile"
aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi
fi
aTimeBUILD=$SECONDS
logDuration $toMake "Building" $aTimeGEN $aTimeBUILD
logDuration $toMake "Total building" $aTimeZERO $aTimeBUILD
# install the project
if [[ $toInstall == 1 ]]; then
echo Installing OCCT into $aDestDir...
make install 2>&1 | tee -a "$aLogFile"
cp -f "$aWorkDir/VERSION.html" "$aDestDir/VERSION.html"
echo Platform: macOS ABI: ${anAbi} Build: ${aBuildType} MACOSX_DEPLOYMENT_TARGET: ${MACOSX_DEPLOYMENT_TARGET} > "$aDestDir/build_target.txt"
fi
aTimeINSTALL=$SECONDS
logDuration $toInstall "Install" $aTimeBUILD $aTimeINSTALL
# create an archive
if [[ $toPack == 1 ]]; then
anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aPlatformAndCompiler}.tar.bz2
echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}...
rm ${aDestDir}/../${anArchName} &>/dev/null
pushd "$aDestDir"
tar -jcf ${aDestDir}/../${anArchName} *
popd
fi
aTimePACK=$SECONDS
logDuration $toPack "Packing archive" $aTimeINSTALL $aTimePACK
# finished
DURATION=$(($aTimePACK - $aTimeZERO))
echo Total time: $DURATION sec
logDuration 1 "Total" $aTimeZERO $aTimePACK
popd
}
for anArchIter in $anAbiList
do
echo Platform: macOS ABI: ${anArchIter} Build: ${aBuildType}
buildArch $anArchIter
done
# create a FAT archive
if [[ $toPackFat == 1 ]]; then
aSuffixFat=${aPlatform}${aBuildTypePrefix}-clang
aFatDir="${aCasSrc}/${aBuildRoot}/${aSuffixFat}"
# merge per-arch builds into fat builds
hasPlatform=0
for anArchIter in $anAbiList
do
aSuffixThin=${aPlatform}-${anArchIter}${aBuildTypePrefix}-clang
anArchDir="${aCasSrc}/${aBuildRoot}/${aSuffixThin}"
if [[ $hasPlatform == 0 ]]; then
hasPlatform=1
echo Packing FAT archive
rm -r -f "$aFatDir"
mkdir -p "$aFatDir"
if [[ $isStatic == 1 ]]; then
rsync -r -l --exclude '*.a' "$anArchDir/" "$aFatDir"
else
rsync -r -l --exclude '*.dylib' "$anArchDir/" "$aFatDir"
fi
rm -f "$aFatDir/build_target.txt"
if [[ -L "$anArchDir/bin/DRAWEXE" ]]; then
aDrawExe=$(readlink "$anArchDir/bin/DRAWEXE")
rm $aFatDir/bin/$aDrawExe
lipo "$anArchDir/bin/$aDrawExe" -output "$aFatDir/bin/$aDrawExe" -create
fi
for aLibIter in $anArchDir/lib/*.$aLibExt; do
aLibName=`basename $aLibIter`
if [[ -L "$anArchDir/lib/$aLibName" ]]; then
cp -a "$anArchDir/lib/$aLibName" "$aFatDir/lib/"
else
lipo "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create
fi
done
else
if [[ -L "$anArchDir/bin/DRAWEXE" ]]; then
aDrawExe=$(readlink "$anArchDir/bin/DRAWEXE")
lipo "$aFatDir/bin/$aDrawExe" "$anArchDir/bin/$aDrawExe" -output "$aFatDir/bin/$aDrawExe" -create
fi
for aLibIter in $aFatDir/lib/*.$aLibExt; do
aLibName=`basename $aLibIter`
if [[ ! -L "$anArchDir/lib/$aLibName" ]]; then
lipo "$aFatDir/lib/$aLibName" "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create
#lipo -info "$aFatDir/lib/$aLibName"
fi
done
fi
cat "$anArchDir/build_target.txt" >> "$aFatDir/build_target.txt"
done
# create an archive
anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aSuffixFat}.tar.bz2
echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}...
rm ${aFatDir}/../${anArchName} &>/dev/null
pushd "$aFatDir"
tar -jcf ${aFatDir}/../${anArchName} *
popd
fi

View File

@@ -0,0 +1,32 @@
# environment configuration template for macos_build.sh (to be renamed as macos_custom_env.sh)
export PATH=/Applications/CMake.app/Contents/bin:$PATH
export aFreeType="$aSrcRoot/../3rdparty/freetype-2.10.4-macos"
export aFreeImage="$aSrcRoot/../3rdparty/freeimage-3.18-macos"
export aRapidJson="$aSrcRoot/../3rdparty/rapidjson-1.1.0"
export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-macos"
# Uncomment to customize building steps
#export aBuildRoot=work
#export toCMake=1
#export toClean=1
#export toMake=1
#export toInstall=1
#export toPack=1
#export toPackFat=1
#export BUILD_ModelingData=ON
#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_RAPIDJSON=ON
#export USE_DRACO=ON
#export USE_FREEIMAGE=ON
#export MACOSX_DEPLOYMENT_TARGET=10.10
#export anAbiList=arm64
#export anAbiList=x86_64
#export anAbiList="arm64 x86_64"

269
adm/scripts/mingw_build.bat Normal file
View File

@@ -0,0 +1,269 @@
@echo OFF
rem Auxiliary script for semi-automated building of OCCT for Mingw-w64 platform.
rem mingw_custom.bat should be configured with paths to CMake, 3rd-parties and MinGW.
set "aCasSrc=%~dp0..\.."
set "aBuildRoot=%aCasSrc%\work"
set aNbJobs=%NUMBER_OF_PROCESSORS%
rem Paths to 3rd-party tools and libraries
set "aCmakeBin="
set "aMingwVars="
set "aFreeType="
set "aFreeImage="
set "aRapidJson="
set "aDraco="
set "aTclTk="
rem Build stages to perform
set "toCMake=1"
set "toClean=0"
set "toMake=1"
set "toInstall=1"
set "toPack=0"
set "toDebug=0"
set "isStatic=0"
rem OCCT Modules to build
set "BUILD_ModelingData=ON"
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
set "USE_FREETYPE=ON"
set "USE_RAPIDJSON=OFF"
set "USE_DRACO=OFF"
set "USE_FREEIMAGE=ON"
rem Archive tool
set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
set "THE_7Z_PATH=%ProgramW6432%\7-Zip\7z.exe"
rem Configuration file
if exist "%~dp0mingw_custom.bat" call "%~dp0mingw_custom.bat"
if not ["%aMingwVars%"] == [""] ( call "%aMingwVars%" )
if not ["%aCmakeBin%"] == [""] ( set "PATH=%aCmakeBin%;%PATH%" )
set "anOcctVerSuffix="
set "anOcctVersion=0.0.0"
set "aGitBranch="
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_DEVELOPMENT" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVerSuffix=%%i" )
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_COMPLETE" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVersion=%%i" )
for /f %%i in ('git symbolic-ref --short HEAD') do ( set "aGitBranch=%%i" )
set "aBuildType=Release"
set "aBuildTypePrefix="
set "aLibType=Shared"
if ["%isStatic%"] == ["1"] set "aLibType=Static"
if ["%toDebug%"] == ["1"] (
set "aBuildType=Debug"
set "aBuildTypePrefix=-debug"
)
call :cmakeGenerate
if errorlevel 1 (
if not ["%1"] == ["-nopause"] (
pause
)
exit /B 1
goto :eof
)
for /F "skip=1 delims=" %%F in ('
wmic PATH Win32_LocalTime GET Day^,Month^,Year /FORMAT:TABLE
') do (
for /F "tokens=1-3" %%L in ("%%F") do (
set DAY00=0%%L
set MONTH00=0%%M
set YEAR=%%N
)
)
set DAY00=%DAY00:~-2%
set MONTH00=%MONTH00:~-2%
set "aRevision=-%YEAR%-%MONTH00%-%DAY00%"
rem set "aRevision=-%aGitBranch%"
set "anArchName=occt-%anOcctVersion%%anOcctVerSuffix%%aRevision%-mingw64%aBuildTypePrefix%"
set "aTarget=%aBuildRoot%\%anArchName%"
if ["%toPack%"] == ["1"] (
echo Creating archive %anArchName%.7z
rmdir /S /Q "%aTarget%"
if not exist "%aTarget%" ( mkdir "%aTarget%" )
if exist "%aBuildRoot%/%anArchName%.7z" del "%aBuildRoot%/%anArchName%.7z"
xcopy /S /Y "%aDestDir%\*" "%aTarget%\"
echo Copying dependencies...
for %%i in (libstdc++-6.dll libwinpthread-1.dll libgcc_s_seh-1.dll) do (
if "%%~$PATH:i" == "" (
echo "Error: could not find %%i"
) else (
xcopy /Y "%%~$PATH:i" "%aTarget%\win64\gcc\bin"
)
)
"%THE_7Z_PATH%" a -r %THE_7Z_PARAMS% "%aBuildRoot%/%anArchName%.7z" "%aTarget%"
)
if not ["%1"] == ["-nopause"] (
pause
)
goto :eof
:cmakeGenerate
set "aPlatformAndCompiler=mingw64%aBuildTypePrefix%"
set "aWorkDir=%aBuildRoot%\occt-%aPlatformAndCompiler%-make"
set "aDestDir=%aBuildRoot%\occt-%aPlatformAndCompiler%"
set "aLogFile=%aBuildRoot%\occt-%aPlatformAndCompiler%-build.log"
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aWorkDir%"
rmdir /S /Q %aDestDir%"
)
)
if not exist "%aWorkDir%" ( mkdir "%aWorkDir%" )
if exist "%aLogFile%" ( del "%aLogFile%" )
rem include some information about OCCT into archive
echo ^<pre^>> "%aWorkDir%\VERSION.html"
git status >> "%aWorkDir%\VERSION.html"
git log -n 100 >> "%aWorkDir%\VERSION.html"
echo ^</pre^>>> "%aWorkDir%\VERSION.html"
echo Start building OCCT for %aPlatformAndCompiler%
echo Start building OCCT for %aPlatformAndCompiler%>> %aLogFile%
pushd "%aWorkDir%"
set "aTimeZERO=%TIME%"
if ["%toCMake%"] == ["1"] (
echo Configuring OCCT for MinGW-w64...
cmake -G "MinGW Makefiles" ^
-D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^
-D BUILD_LIBRARY_TYPE:STRING="%aLibType%" ^
-D INSTALL_DIR:PATH="%aDestDir%" ^
-D INSTALL_DIR_INCLUDE:STRING="inc" ^
-D INSTALL_DIR_RESOURCE:STRING="src" ^
-D BUILD_DOC_Overview:BOOL="OFF" ^
-D BUILD_MODULE_FoundationClasses:BOOL="ON" ^
-D BUILD_MODULE_ModelingData:BOOL="%BUILD_ModelingData%" ^
-D BUILD_MODULE_ModelingAlgorithms:BOOL="%BUILD_ModelingAlgorithms%" ^
-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" ^
-D 3RDPARTY_TCL_LIBRARY_DIR:PATH="%aTclTk%/lib" ^
-D 3RDPARTY_TCL_DLL_DIR:PATH="%aTclTk%/bin" ^
-D 3RDPARTY_TK_DIR:PATH="%aTclTk%" ^
-D 3RDPARTY_TK_INCLUDE_DIR:FILEPATH="%aTclTk%/include" ^
-D 3RDPARTY_TK_LIBRARY_DIR:PATH="%aTclTk%/lib" ^
-D 3RDPARTY_TK_DLL_DIR:PATH="%aTclTk%/bin" ^
-D USE_D3D:BOOL="ON" ^
-D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^
-D 3RDPARTY_FREETYPE_DIR:PATH="%aFreeType%" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="%aFreeType%/include" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="%aFreeType%/include" ^
-D 3RDPARTY_FREETYPE_LIBRARY_DIR:PATH="%aFreeType%/lib" ^
-D USE_FREEIMAGE:BOOL="%USE_FREEIMAGE%" ^
-D 3RDPARTY_FREEIMAGE_DIR:PATH="%aFreeImage%" ^
-D 3RDPARTY_FREEIMAGE_INCLUDE_DIR:FILEPATH="%aFreeImage%/include" ^
-D 3RDPARTY_FREEIMAGE_LIBRARY_DIR:PATH="%aFreeImage%/lib" ^
-D USE_RAPIDJSON:BOOL="%USE_RAPIDJSON%" ^
-D 3RDPARTY_RAPIDJSON_DIR:PATH="%aRapidJson%" ^
-D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="%aRapidJson%/include" ^
-D USE_DRACO:BOOL="%USE_DRACO%" ^
-D 3RDPARTY_DRACO_DIR:PATH="%aDraco%" ^
-D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="%aDraco%/include" ^
-D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="%aDraco%/lib" ^
"%aCasSrc%"
if errorlevel 1 (
popd
exit /B 1
goto :eof
)
)
set "aTimeGEN=%TIME%"
call :computeDuration %aTimeZERO% %aTimeGEN%
if ["%toCMake%"] == ["1"] (
echo Generation time: %DURATION%
echo Generation time: %DURATION%>> "%aLogFile%"
)
if ["%toClean%"] == ["1"] (
mingw32-make clean
)
if ["%toMake%"] == ["1"] (
echo Building...
mingw32-make -j %aNbJobs% 2>> "%aLogFile%"
if errorlevel 1 (
type "%aLogFile%"
popd
exit /B 1
goto :eof
)
type "%aLogFile%"
)
set "aTimeBUILD=%TIME%"
call :computeDuration %aTimeGEN% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Building time: %DURATION%
echo Building time: %DURATION%>> "%aLogFile%"
)
call :computeDuration %aTimeZERO% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Total building time: %DURATION%
echo Total building time: %DURATION%>> "%aLogFile%"
)
if ["%toInstall%"] == ["1"] (
echo Installing into %aDestDir%...
mingw32-make install 2>> "%aLogFile%"
copy /Y "%aWorkDir%\VERSION.html" "%aDestDir%\VERSION.html"
)
set "aTimeINSTALL=%TIME%"
call :computeDuration "%aTimeBUILD%" "%aTimeINSTALL%"
if ["%toInstall%"] == ["1"] (
echo Install time: %DURATION%
echo Install time: %DURATION%>> "%aLogFile%"
)
call :computeDuration "%aTimeZERO%" "%aTimeINSTALL%"
echo Total time: %DURATION%
echo Total time: %DURATION%>> "%aLogFile%"
popd
goto :eof
:computeDuration
set "aTimeFrom=%~1"
set "aTimeEnd=%~2"
rem handle time before 10AM (win10 - remove empty space at the beginning)
if "%aTimeFrom:~0,1%"==" " set "aTimeFrom=%aTimeFrom:~1%"
if "%aTimeEnd:~0,1%"==" " set "aTimeEnd=%aTimeEnd:~1%"
rem handle time before 10AM (win7 - add 0 at the beginning)
if "%aTimeFrom:~1,1%"==":" set "aTimeFrom=0%aTimeFrom%"
if "%aTimeEnd:~1,1%"==":" set "aTimeEnd=0%aTimeEnd%"
rem convert hours:minutes:seconds:ms into duration
set /A aTimeFrom=(1%aTimeFrom:~0,2%-100)*360000 + (1%aTimeFrom:~3,2%-100)*6000 + (1%aTimeFrom:~6,2%-100)*100 + (1%aTimeFrom:~9,2%-100)
set /A aTimeEnd= (1%aTimeEnd:~0,2%-100)*360000 + (1%aTimeEnd:~3,2%-100)*6000 + (1%aTimeEnd:~6,2%-100)*100 + (1%aTimeEnd:~9,2%-100)
set /A aDurTotalSec=%aTimeEnd%-%aTimeFrom%
if %aTimeEnd% LSS %aTimeFrom% set set /A aDurTotalSec=%aTimeFrom%-%aTimeEnd%
set /A aDurHH=%aDurTotalSec% / 360000
set /A aDurMM=(%aDurTotalSec% - %aDurHH%*360000) / 6000
set /A aDurSS=(%aDurTotalSec% - %aDurHH%*360000 - %aDurMM%*6000) / 100
if %aDurHH% LSS 10 set aDurHH=0%aDurHH%
if %aDurMM% LSS 10 set aDurMM=0%aDurMM%
if %aDurSS% LSS 10 set aDurSS=0%aDurSS%
set "DURATION=%aDurHH%:%aDurMM%:%aDurSS%"
goto :eof

View File

@@ -0,0 +1,30 @@
rem Environment configuration template for mingw_build.bat (to be renamed as mingw_custom.bat)
set "aCmakeBin=%ProgramW6432%\CMake\bin"
set "aFreeType=%aCasSrc%/../3rdparty/freetype-2.6.3-mingw-64"
set "aTclTk=%aCasSrc%/../3rdparty/tcltk-8.6.4-mingw-64"
set "aFreeImage=%aCasSrc%/../3rdparty/freeimage-3.17-0-mingw-64"
set "aRapidJson=%aCasSrc%/../3rdparty/rapidjson-1.1.0"
set "aDraco=%aCasSrc%/../3rdparty/draco-1.4-1-mingw-64"
set "aMingwVars=c:\mingw-8.3.0-msys2\mingwvars.bat"
rem Uncomment to customize building steps
rem set "aBuildRoot=work"
rem set "toCMake=1"
rem set "toClean=1"
rem set "toMake=1"
rem set "toInstall=1"
rem set "toPack=1"
rem set "toDebug=0"
rem set "BUILD_ModelingData=ON"
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"
rem set "USE_DRACO=ON"
rem set "USE_FREEIMAGE=ON"

335
adm/scripts/wasm_build.bat Normal file
View File

@@ -0,0 +1,335 @@
@echo OFF
rem Auxiliary script for semi-automated building of OCCT for WASM platform.
rem wasm_custom.bat should be configured with paths to CMake, 3rd-parties and Emscripten SDK.
rem FreeType should be specified as mandatory dependency.
set "aCasSrc=%~dp0..\.."
set "aBuildRoot=%aCasSrc%\work"
set aNbJobs=%NUMBER_OF_PROCESSORS%
rem Paths to 3rd-party tools and libraries
set "aCmakeBin="
set "aFreeType="
set "aRapidJson="
set "aDraco="
set "aTcl="
rem Build stages to perform
set "toCMake=1"
set "toClean=0"
set "toMake=1"
set "toInstall=1"
set "toPack=0"
set "toDebug=0"
set "toBuildSample=0"
set "sourceMapBase="
rem OCCT Modules to build
set "BUILD_ModelingData=ON"
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
set "USE_FREETYPE=ON"
set "USE_RAPIDJSON=OFF"
set "USE_DRACO=OFF"
set "USE_PTHREADS=OFF"
rem Archive tool
set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
set "THE_7Z_PATH=%ProgramW6432%\7-Zip\7z.exe"
rem Configuration file
if exist "%~dp0wasm_custom.bat" call "%~dp0wasm_custom.bat"
call "%EMSDK_ROOT%\emsdk_env.bat"
set "aToolchain=%EMSDK%/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
if not ["%aCmakeBin%"] == [""] ( set "PATH=%aCmakeBin%;%PATH%" )
set "anOcctVerSuffix="
set "anOcctVersion=0.0.0"
set "aGitBranch="
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_DEVELOPMENT" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVerSuffix=%%i" )
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_COMPLETE" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVersion=%%i" )
for /f %%i in ('git symbolic-ref --short HEAD') do ( set "aGitBranch=%%i" )
set "aBuildType=Release"
set "aBuildTypePrefix="
set "anExtraCxxFlags="
if /I ["%USE_PTHREADS%"] == ["ON"] (
set "anExtraCxxFlags=-pthread"
set "aBuildTypePrefix=%aBuildTypePrefix%-pthread"
)
if ["%toDebug%"] == ["1"] (
set "aBuildType=Debug"
set "aBuildTypePrefix=%aBuildTypePrefix%-debug"
)
call :cmakeGenerate
if errorlevel 1 (
if not ["%1"] == ["-nopause"] (
pause
)
exit /B 1
goto :eof
)
for /F "skip=1 delims=" %%F in ('
wmic PATH Win32_LocalTime GET Day^,Month^,Year /FORMAT:TABLE
') do (
for /F "tokens=1-3" %%L in ("%%F") do (
set DAY00=0%%L
set MONTH00=0%%M
set YEAR=%%N
)
)
set DAY00=%DAY00:~-2%
set MONTH00=%MONTH00:~-2%
set "aRevision=-%YEAR%-%MONTH00%-%DAY00%"
rem set "aRevision=-%aGitBranch%"
set "anArchName=occt-%anOcctVersion%%anOcctVerSuffix%%aRevision%-wasm32%aBuildTypePrefix%"
set "aTarget=%aBuildRoot%\%anArchName%"
if ["%toPack%"] == ["1"] (
echo Creating archive %anArchName%.7z
rmdir /S /Q "%aTarget%"
if not exist "%aTarget%" ( mkdir "%aTarget%" )
if exist "%aBuildRoot%/%anArchName%.7z" del "%aBuildRoot%/%anArchName%.7z"
xcopy /S /Y "%aDestDir%\*" "%aTarget%\"
if ["%toBuildSample%"] == ["1"] (
if not exist "%aTarget%\sample" ( mkdir "%aTarget%\sample" )
xcopy /S /Y "%aDestDirSmpl%\*" "%aTarget%\sample\"
)
"%THE_7Z_PATH%" a -r %THE_7Z_PARAMS% "%aBuildRoot%/%anArchName%.7z" "%aTarget%"
)
if not ["%1"] == ["-nopause"] (
pause
)
goto :eof
:cmakeGenerate
set "aPlatformAndCompiler=wasm32%aBuildTypePrefix%"
set "aWorkDir=%aBuildRoot%\occt-%aPlatformAndCompiler%-make"
set "aDestDir=%aBuildRoot%\occt-%aPlatformAndCompiler%"
set "aLogFile=%aBuildRoot%\occt-%aPlatformAndCompiler%-build.log"
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aWorkDir%"
rmdir /S /Q %aDestDir%"
)
)
if not exist "%aWorkDir%" ( mkdir "%aWorkDir%" )
if exist "%aLogFile%" ( del "%aLogFile%" )
set "aSrcRootSmpl=%aCasSrc%\samples\webgl"
set "aWorkDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-make"
set "aDestDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%"
set "aLogFileSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-build.log"
if ["%toBuildSample%"] == ["1"] (
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aWorkDirSmpl%"
rmdir /S /Q %aDestDirSmpl%"
)
)
if not exist "%aWorkDirSmpl%" ( mkdir "%aWorkDirSmpl%" )
if exist "%aLogFileSmpl%" ( del "%aLogFileSmpl%" )
)
rem include some information about OCCT into archive
echo ^<pre^>> "%aWorkDir%\VERSION.html"
git status >> "%aWorkDir%\VERSION.html"
git log -n 100 >> "%aWorkDir%\VERSION.html"
echo ^</pre^>>> "%aWorkDir%\VERSION.html"
echo Start building OCCT for %aPlatformAndCompiler%
echo Start building OCCT for %aPlatformAndCompiler%>> %aLogFile%
echo --->> %aLogFile%
call emcc --version >> %aLogFile%
echo --->> %aLogFile%
pushd "%aWorkDir%"
set "aTimeZERO=%TIME%"
if ["%toCMake%"] == ["1"] (
echo Configuring OCCT for WASM...
cmake -G "MinGW Makefiles" ^
-D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^
-D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^
-D BUILD_LIBRARY_TYPE:STRING="Static" ^
-D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^
-D INSTALL_DIR:PATH="%aDestDir%" ^
-D INSTALL_DIR_INCLUDE:STRING="inc" ^
-D INSTALL_DIR_RESOURCE:STRING="src" ^
-D BUILD_MODULE_FoundationClasses:BOOL="ON" ^
-D BUILD_MODULE_ModelingData:BOOL="%BUILD_ModelingData%" ^
-D BUILD_MODULE_ModelingAlgorithms:BOOL="%BUILD_ModelingAlgorithms%" ^
-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%" ^
-D 3RDPARTY_FREETYPE_DIR:PATH="%aFreeType%" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="%aFreeType%/include" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="%aFreeType%/include" ^
-D USE_RAPIDJSON:BOOL="%USE_RAPIDJSON%" ^
-D 3RDPARTY_RAPIDJSON_DIR:PATH="%aRapidJson%" ^
-D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="%aRapidJson%/include" ^
-D USE_DRACO:BOOL="%USE_DRACO%" ^
-D 3RDPARTY_DRACO_DIR:PATH="%aDraco%" ^
-D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="%aDraco%/include" ^
-D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="%aDraco%/lib" ^
-D 3RDPARTY_DRACO_LIBRARY:FILEPATH="%aDraco%/lib/libdraco.a" ^
-D USE_TK:BOOL="OFF" ^
-D 3RDPARTY_TCL_DIR:PATH="%aTcl%" ^
-D 3RDPARTY_TCL_INCLUDE_DIR:PATH="%aTcl%/include" ^
-D 3RDPARTY_TCL_LIBRARY_DIR:PATH="%aTcl%/lib" ^
-D 3RDPARTY_TCL_LIBRARY:FILEPATH="%aTcl%/lib/libtcl.a" ^
"%aCasSrc%"
if errorlevel 1 (
popd
exit /B 1
goto :eof
)
)
set "aTimeGEN=%TIME%"
call :computeDuration %aTimeZERO% %aTimeGEN%
if ["%toCMake%"] == ["1"] (
echo Generation time: %DURATION%
echo Generation time: %DURATION%>> "%aLogFile%"
)
if ["%toClean%"] == ["1"] (
mingw32-make clean
)
if ["%toMake%"] == ["1"] (
echo Building...
mingw32-make -j %aNbJobs% 2>> "%aLogFile%"
if errorlevel 1 (
type "%aLogFile%"
popd
exit /B 1
goto :eof
)
type "%aLogFile%"
)
set "aTimeBUILD=%TIME%"
call :computeDuration %aTimeGEN% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Building time: %DURATION%
echo Building time: %DURATION%>> "%aLogFile%"
)
call :computeDuration %aTimeZERO% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Total building time: %DURATION%
echo Total building time: %DURATION%>> "%aLogFile%"
)
if ["%toInstall%"] == ["1"] (
echo Installing into %aDestDir%...
mingw32-make install 2>> "%aLogFile%"
copy /Y "%aWorkDir%\VERSION.html" "%aDestDir%\VERSION.html"
)
set "aTimeINSTALL=%TIME%"
call :computeDuration "%aTimeBUILD%" "%aTimeINSTALL%"
if ["%toInstall%"] == ["1"] (
echo Install time: %DURATION%
echo Install time: %DURATION%>> "%aLogFile%"
)
call :computeDuration "%aTimeZERO%" "%aTimeINSTALL%"
echo Total time: %DURATION%
echo Total time: %DURATION%>> "%aLogFile%"
popd
if ["%toBuildSample%"] == ["0"] (
goto :eof
)
pushd "%aWorkDirSmpl%"
if ["%toCMake%"] == ["1"] (
cmake -G "MinGW Makefiles" ^
-D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^
-D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^
-D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^
-D CMAKE_INSTALL_PREFIX:PATH="%aDestDirSmpl%" ^
-D SOURCE_MAP_BASE:STRING="%sourceMapBase%" ^
-D OpenCASCADE_DIR:PATH="%aDestDir%/lib/cmake/opencascade" ^
-D freetype_DIR:PATH="%aFreeType%/lib/cmake/freetype" ^
"%aSrcRootSmpl%"
if errorlevel 1 (
popd
pause
exit /B
goto :eof
)
)
if ["%toClean%"] == ["1"] (
mingw32-make clean
)
if ["%toMake%"] == ["1"] (
echo Building...
mingw32-make -j %aNbJobs% 2>> "%aLogFileSmpl%"
if errorlevel 1 (
type "%aLogFileSmpl%"
popd
pause
exit /B
goto :eof
)
type "%aLogFileSmpl%"
)
if ["%toInstall%"] == ["1"] (
mingw32-make install 2>> "%aLogFileSmpl%"
if errorlevel 1 (
type "%aLogFileSmpl%"
popd
pause
exit /B
goto :eof
)
)
popd
goto :eof
:computeDuration
set "aTimeFrom=%~1"
set "aTimeEnd=%~2"
rem handle time before 10AM (win10 - remove empty space at the beginning)
if "%aTimeFrom:~0,1%"==" " set "aTimeFrom=%aTimeFrom:~1%"
if "%aTimeEnd:~0,1%"==" " set "aTimeEnd=%aTimeEnd:~1%"
rem handle time before 10AM (win7 - add 0 at the beginning)
if "%aTimeFrom:~1,1%"==":" set "aTimeFrom=0%aTimeFrom%"
if "%aTimeEnd:~1,1%"==":" set "aTimeEnd=0%aTimeEnd%"
rem convert hours:minutes:seconds:ms into duration
set /A aTimeFrom=(1%aTimeFrom:~0,2%-100)*360000 + (1%aTimeFrom:~3,2%-100)*6000 + (1%aTimeFrom:~6,2%-100)*100 + (1%aTimeFrom:~9,2%-100)
set /A aTimeEnd= (1%aTimeEnd:~0,2%-100)*360000 + (1%aTimeEnd:~3,2%-100)*6000 + (1%aTimeEnd:~6,2%-100)*100 + (1%aTimeEnd:~9,2%-100)
set /A aDurTotalSec=%aTimeEnd%-%aTimeFrom%
if %aTimeEnd% LSS %aTimeFrom% set set /A aDurTotalSec=%aTimeFrom%-%aTimeEnd%
set /A aDurHH=%aDurTotalSec% / 360000
set /A aDurMM=(%aDurTotalSec% - %aDurHH%*360000) / 6000
set /A aDurSS=(%aDurTotalSec% - %aDurHH%*360000 - %aDurMM%*6000) / 100
if %aDurHH% LSS 10 set aDurHH=0%aDurHH%
if %aDurMM% LSS 10 set aDurMM=0%aDurMM%
if %aDurSS% LSS 10 set aDurSS=0%aDurSS%
set "DURATION=%aDurHH%:%aDurMM%:%aDurSS%"
goto :eof

129
adm/scripts/wasm_build.sh Executable file
View File

@@ -0,0 +1,129 @@
#!/bin/bash
# Auxiliary script for semi-automated building of OCCT for WASM platform.
# wasm_custom.sh should be configured with paths to CMake, 3rd-parties and Emscripten SDK.
# FreeType should be specified as mandatory dependency.
export aScriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
export aSrcRoot="${aScriptDir}/../.."
export aBuildRoot=work
export aNbJobs=${NUMBER_OF_PROCESSORS}
export toCMake=1
export toClean=0
export toMake=1
export toInstall=1
export BUILD_ModelingData=ON
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"
fi
. "${EMSDK_ROOT}/emsdk_env.sh"
export aToolchain="${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
export aGitBranch=`git symbolic-ref --short HEAD`
echo "Compilation OCCT branch : $aGitBranch"
export aPlatformAndCompiler=wasm
export aWorkDir="${aSrcRoot}/${aBuildRoot}/${aPlatformAndCompiler}-make"
if [ ! -d "${aWorkDir}" ]; then
mkdir -p "${aWorkDir}"
fi
export aDestDir="${aSrcRoot}/${aBuildRoot}/${aPlatformAndCompiler}"
if [ ! -d "${aDestDir}" ]; then
mkdir -p "${aDestDir}"
fi
export aLogFile="${aSrcRoot}/${aBuildRoot}/build-${aPlatformAndCompiler}.log"
if [ -f "${aLogFile}" ]; then
rm "${aLogFile}"
fi
echo Start building OCCT for ${aPlatformAndCompiler}
echo Start building OCCT for ${aPlatformAndCompiler}>> "${aLogFile}"
pushd "${aWorkDir}"
pwd
echo toCMake=${toCMake}
if [ "${toCMake}" = "1" ]; then
echo "Configuring OCCT for WASM..."
echo cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DBUILD_LIBRARY_TYPE:STRING="Static" \
-DINSTALL_DIR:PATH="${aDestDir}" \
-DINSTALL_DIR_INCLUDE:STRING="inc" \
-DINSTALL_DIR_RESOURCE:STRING="src" \
-D3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \
-D3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \
-D3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \
-DBUILD_MODULE_FoundationClasses:BOOL="ON" \
-DBUILD_MODULE_ModelingData:BOOL="${BUILD_ModelingData}" \
-DBUILD_MODULE_ModelingAlgorithms:BOOL="${BUILD_ModelingAlgorithms}" \
-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}"
cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DBUILD_LIBRARY_TYPE:STRING="Static" \
-DINSTALL_DIR:PATH="${aDestDir}" \
-DINSTALL_DIR_INCLUDE:STRING="inc" \
-DINSTALL_DIR_RESOURCE:STRING="src" \
-D3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \
-D3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \
-D3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \
-DBUILD_MODULE_FoundationClasses:BOOL="ON" \
-DBUILD_MODULE_ModelingData:BOOL="${BUILD_ModelingData}" \
-DBUILD_MODULE_ModelingAlgorithms:BOOL="${BUILD_ModelingAlgorithms}" \
-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}"
if [ $? -ne 0 ]; then
echo "Problem during configuration"
popd
exit 1
fi
fi
if [ "${toClean}" = "1" ]; then
make clean
fi
if [ "${toMake}" = "1" ]; then
echo Building...
make -j ${aNbJobs} 2>> "${aLogFile}"
if [ $? -ne 0 ]; then
echo "Problem during make operation"
popd
exit 1
fi
echo "${aLogFile}"
fi
if [ "${toInstall}" = "1" ]; then
echo Installing into ${aDestDir}
make install 2>> "${aLogFile}"
fi
popd

View File

@@ -0,0 +1,30 @@
rem Environment configuration template for wasm_build.bat (to be renamed as wasm_custom.bat)
set "EMSDK_ROOT=%aCasSrc%\..\emsdk"
set "aFreeType=%aCasSrc%\..\3rdparty\freetype-2.7.1-wasm32"
rem set "aRapidJson=%aCasSrc%\..\3rdparty\rapidjson-1.1.0"
rem set "aDraco=%aCasSrc%\..\3rdparty\draco-1.4.1-wasm32"
rem set "aCmakeBin=%ProgramW6432%\CMake\bin"
rem Uncomment to customize building steps
rem set "aBuildRoot=work"
rem set "toCMake=1"
rem set "toClean=1"
rem set "toMake=1"
rem set "toInstall=1"
rem set "toPack=1"
rem set "toDebug=1"
rem set "toBuildSample=1"
rem Source map base (should point to server where C++ sources will be copied)
rem enables -g4 debug building option for WebGL sample and allows navigating C++ source code within JavaScript debugger.
rem set "sourceMapBase=http://localhost:9090/"
rem set "BUILD_ModelingData=ON"
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"
rem set "USE_PTHREADS=ON"

View File

@@ -0,0 +1,17 @@
# environment configuration template for occ_build_wasm.sh (to be renamed as wasm_custom_env.sh)
export aFreeType="$aSrcRoot/../3rdparty/freetype-2.7.1-wasm"
export EMSDK_ROOT="$aSrcRoot/../emsdk"
# Uncomment to customize building steps
#export aBuildRoot=work
#export toCMake=1
#export toClean=0
#export toMake=1
#export toInstall=1
#export BUILD_ModelingData=ON
#export BUILD_ModelingAlgorithms=ON
#export BUILD_Visualization=ON
#export BUILD_ApplicationFramework=ON
#export BUILD_DataExchange=ON
#export BUILD_DETools=OFF

View File

@@ -0,0 +1,117 @@
@echo OFF
rem Auxiliary script for semi-automated building of WebGL sample.
rem wasm_custom.bat should be configured with paths to CMake, 3rd-parties and Emscripten SDK.
rem FreeType should be specified as mandatory dependency.
set "aCasSrc=%~dp0..\.."
set "aBuildRoot=%aCasSrc%\work"
set aNbJobs=%NUMBER_OF_PROCESSORS%
rem Paths to 3rd-party tools and libraries
set "aCmakeBin="
set "aFreeType="
rem Build stages to perform
set "toCMake=1"
set "toClean=0"
set "toMake=1"
set "toInstall=1"
set "toDebug=0"
set "sourceMapBase="
set "USE_PTHREADS=OFF"
rem Configuration file
if exist "%~dp0wasm_custom.bat" call "%~dp0wasm_custom.bat"
call "%EMSDK_ROOT%\emsdk_env.bat"
set "aToolchain=%EMSDK%/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
if not ["%aCmakeBin%"] == [""] ( set "PATH=%aCmakeBin%;%PATH%" )
set "aBuildType=Release"
set "aBuildTypePrefix="
set "anExtraCxxFlags="
if /I ["%USE_PTHREADS%"] == ["ON"] (
set "anExtraCxxFlags=-pthread"
set "aBuildTypePrefix=%aBuildTypePrefix%-pthread"
)
if ["%toDebug%"] == ["1"] (
set "aBuildType=Debug"
set "aBuildTypePrefix=%aBuildTypePrefix%-debug"
)
call :cmakeGenerate
if not ["%1"] == ["-nopause"] (
pause
)
goto :eof
:cmakeGenerate
set "aPlatformAndCompiler=wasm32%aBuildTypePrefix%"
set "aDestDirOcct=%aBuildRoot%\occt-%aPlatformAndCompiler%"
set "aSrcRootSmpl=%aCasSrc%\samples\webgl"
set "aWorkDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-make"
set "aDestDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%"
set "aLogFileSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-build.log"
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aWorkDirSmpl%"
rmdir /S /Q %aDestDirSmpl%"
)
)
if not exist "%aWorkDirSmpl%" ( mkdir "%aWorkDirSmpl%" )
if exist "%aLogFileSmpl%" ( del "%aLogFileSmpl%" )
pushd "%aWorkDirSmpl%"
if ["%toCMake%"] == ["1"] (
cmake -G "MinGW Makefiles" ^
-D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^
-D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^
-D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^
-D CMAKE_INSTALL_PREFIX:PATH="%aDestDirSmpl%" ^
-D SOURCE_MAP_BASE:STRING="%sourceMapBase%" ^
-D OpenCASCADE_DIR:PATH="%aDestDirOcct%/lib/cmake/opencascade" ^
-D freetype_DIR:PATH="%aFreeType%/lib/cmake/freetype" ^
"%aSrcRootSmpl%"
if errorlevel 1 (
popd
pause
exit /B
goto :eof
)
)
if ["%toClean%"] == ["1"] (
mingw32-make clean
)
if ["%toMake%"] == ["1"] (
echo Building...
mingw32-make -j %aNbJobs% 2>> "%aLogFileSmpl%"
if errorlevel 1 (
type "%aLogFileSmpl%"
popd
pause
exit /B
goto :eof
)
type "%aLogFileSmpl%"
)
if ["%toInstall%"] == ["1"] (
mingw32-make install 2>> "%aLogFileSmpl%"
if errorlevel 1 (
type "%aLogFileSmpl%"
popd
pause
exit /B
goto :eof
)
)
popd
goto :eof

View File

@@ -1,21 +1,42 @@
<?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@
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
</LocalDebuggerEnvironment>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|@X_COMPILER_BITNESS@'">
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
</LocalDebuggerEnvironment>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@X_COMPILER_BITNESS@'">
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
</LocalDebuggerEnvironment>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,14 @@
#-----------------------------------------------------------------------------
#
# OpenCASCADECompileDefinitionsAndFlags-@OCCT_CONFIGURATION_LOWER@.cmake - OpenCASCADE CMake file
# with compile definitions and C/C++ flags for @OCCT_CONFIGURATION@ configuration.
#
# This file is configured by OpenCASCADE.
#
# The C and C++ flags added by OpenCASCADE to the cmake-configured flags.
set (OpenCASCADE_C_FLAGS_@OCCT_CONFIGURATION_UPPER@ "@SET_OpenCASCADE_CMAKE_C_FLAGS@")
set (OpenCASCADE_CXX_FLAGS_@OCCT_CONFIGURATION_UPPER@ "@SET_OpenCASCADE_CMAKE_CXX_FLAGS@")
# The compile definitions used by OpenCASCADE.
@SET_OpenCASCADE_COMPILE_DEFINITIONS@

View File

@@ -0,0 +1,94 @@
#-----------------------------------------------------------------------------
#
# OpenCASCADEConfig.cmake - OpenCASCADE CMake configuration file for external projects.
#
# This file is configured by OpenCASCADE.
#
if(OpenCASCADE_ALREADY_INCLUDED)
return()
endif()
set(OpenCASCADE_ALREADY_INCLUDED 1)
# The OpenCASCADE version number
set (OpenCASCADE_MAJOR_VERSION "@OCC_VERSION_MAJOR@")
set (OpenCASCADE_MINOR_VERSION "@OCC_VERSION_MINOR@")
set (OpenCASCADE_MAINTENANCE_VERSION "@OCC_VERSION_MAINTENANCE@")
set (OpenCASCADE_DEVELOPMENT_VERSION "@OCC_VERSION_DEVELOPMENT@")
# Compute the installation prefix from this OpenCASCADEConfig.cmake file
# location, by going up one level + one level if "cmake" + one level if "lib".
# This is made to support different locations of CMake files:
# - in UNIX style: $INSTALL_DIR/lib/cmake/opencascade-<version>
# - in Windows style: $INSTALL_DIR/cmake
# - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade-<version>
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/libs/${CMAKE_ANDROID_ARCH_ABI}$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
# Set OpenCASCADE paths to headers, binaries, libraries, resources, tests, samples, data
set (OpenCASCADE_BINARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_BIN@")
set (OpenCASCADE_LIBRARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_LIB@")
set (OpenCASCADE_SCRIPT_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_SCRIPT@")
set (OpenCASCADE_INCLUDE_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_INCLUDE@")
set (OpenCASCADE_RESOURCE_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_RESOURCE@")
# The C and C++ flags added by OpenCASCADE to the cmake-configured flags.
set (OpenCASCADE_C_FLAGS "@CMAKE_C_FLAGS@")
set (OpenCASCADE_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
@SET_OpenCASCADE_LINKER_FLAGS@
# List of available OpenCASCADE modules.
set (OpenCASCADE_MODULES @OCCT_MODULES_ENABLED@)
@SET_OpenCASCADE_MODULES_TOOLKITS@
# List of available OpenCASCADE libraries.
set (OpenCASCADE_LIBRARIES @OCCT_LIBRARIES@)
# OpenCASCADE global configuration options.
set (OpenCASCADE_COMPILER "@COMPILER@")
set (OpenCASCADE_BUILD_WITH_DEBUG @BUILD_WITH_DEBUG@)
set (OpenCASCADE_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
@SET_OpenCASCADE_BUILD_TYPE@
# Use of third-party libraries.
set (OpenCASCADE_WITH_TCL @USE_TCL@)
set (OpenCASCADE_WITH_FREETYPE @USE_FREETYPE@)
set (OpenCASCADE_WITH_FREEIMAGE @USE_FREEIMAGE@)
set (OpenCASCADE_WITH_TBB @USE_TBB@)
set (OpenCASCADE_WITH_VTK @USE_VTK@)
set (OpenCASCADE_WITH_FFMPEG @USE_FFMPEG@)
set (OpenCASCADE_WITH_GLES2 @USE_GLES2@)
@SET_OpenCASCADE_WITH_D3D@
@SET_OpenCASCADE_WITH_GLX@
# Import OpenCASCADE compile definitions, C and C++ flags for each installed configuration.
file(GLOB CONFIG_FILES "${CMAKE_CURRENT_LIST_DIR}/OpenCASCADECompileDefinitionsAndFlags-*.cmake")
foreach(f ${CONFIG_FILES})
include(${f})
endforeach()
if (NOT OpenCASCADE_FIND_COMPONENTS)
set (OpenCASCADE_FIND_COMPONENTS ${OpenCASCADE_MODULES})
endif ()
# Import OpenCASCADE targets.
foreach(_comp ${OpenCASCADE_FIND_COMPONENTS})
if (NOT ";${OpenCASCADE_MODULES};" MATCHES "${_comp}")
set(OpenCASCADE_FOUND False)
set(OpenCASCADE_NOTFOUND_MESSAGE "Specified unsupported component: ${_comp}")
if (NOT OpenCASCADE_FIND_QUIETLY)
message (ERROR ": ${OpenCASCADE_NOTFOUND_MESSAGE}")
endif()
else()
include("${CMAKE_CURRENT_LIST_DIR}/OpenCASCADE${_comp}Targets.cmake")
endif()
endforeach()

View File

@@ -0,0 +1,30 @@
<?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

@@ -0,0 +1,8 @@
# A toolchain file to configure a Makefile Generators or the Ninja generator to target Android for cross-compiling.
# Set CMAKE_ANDROID_NDK variable equal to your Android NDK path.
set (CMAKE_SYSTEM_NAME Android)
set (CMAKE_SYSTEM_VERSION 15) # API level
set (CMAKE_ANDROID_ARCH_ABI armeabi-v7a)
set (CMAKE_ANDROID_NDK "")
set (CMAKE_ANDROID_STL_TYPE gnustl_shared)

40
adm/templates/build.bat Normal file
View File

@@ -0,0 +1,40 @@
@echo off
setlocal
rem Setup environment
call "%~dp0env.bat" %1 %2 %3
rem Define path to project file
set "PRJFILE=%~dp0OCCT.sln"
if "%VCVER%" == "vc8" (
call "%VS80COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc9" (
call "%VS90COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc10" (
call "%VS100COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc11" (
call "%VS110COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc12" (
call "%VS120COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc14" (
call "%VS140COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc141" (
call "%VS141COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc142" (
call "%VS142COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc143" (
call "%VS143COMNTOOLS%/vsvars32.bat" > nul
) else (
echo Error: wrong VS identifier
exit /B
)
set BUILDCONFIG=Release
if "%CASDEB%"=="i" set BUILDCONFIG=RelWithDebInfo
if "%CASDEB%"=="d" set BUILDCONFIG=Debug
if "%ARCH%"=="32" set PLATFORM=win32
if "%ARCH%"=="64" set PLATFORM=x64
msbuild "%PRJFILE%" /m /fl /flp:LogFile="build_%BUILDCONFIG%.log" /p:Configuration=%BUILDCONFIG% /p:Platform=%PLATFORM% /p:BuildProjectReferences=false
endlocal

View File

@@ -0,0 +1,20 @@
@echo off
rem Setup environment
call "%~dp0env.bat" %1 %2 %3
rem Define path to project file
set "PRJFILE=%~dp0\adm\wnt\cbp\OCCT.workspace"
if not exist "%PRJFILE%" set "PRJFILE=%~dp0\adm\wnt\cbp\Products.workspace"
if not "%4" == "" (
set "PRJFILE=%4"
)
if "%CB_PATH%"=="" if exist "%PROGRAMFILES%\CodeBlocks" set "CB_PATH=%PROGRAMFILES%\CodeBlocks\codeblocks.exe"
if "%CB_PATH%"=="" if exist "%PROGRAMFILES(x86)%\CodeBlocks" set "CB_PATH=%PROGRAMFILES(x86)%\CodeBlocks\codeblocks.exe"
if "%CB_PATH%"=="" set "CB_PATH=codeblocks.exe"
set "CASBIN=wnt\cbp"
set "PATH=%~dp0%CASBIN%\bin%CASDEB%;%PATH%"
start "" "%CB_PATH%" "%PRJFILE%"

View File

@@ -1,11 +1,12 @@
#!/bin/bash
# This file has been generated by genproj.tcl script from CASROOT/adm/templates/codeblocks.sh
export TARGET="cbp"
source ./env.sh "$1" "$TARGET"
if [ -e "/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks" ]; then
/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks ./adm/$WOKSTATION/cbp/OCCT.workspace
/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks ./adm/$WOKSTATION/cbp/__SOLUTION__.workspace
else
codeblocks ./adm/$WOKSTATION/cbp/OCCT.workspace
codeblocks ./adm/$WOKSTATION/cbp/__SOLUTION__.workspace
fi

View File

@@ -1,14 +1,5 @@
echo off
if not ["%1"] == [""] set "VCVER=%1"
if not ["%2"] == [""] set "ARCH=%2"
if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
if /I ["%3"] == ["debug"] set "CASDEB=d"
if /I ["%3"] == ["d"] set "CASDEB=d"
if /I ["%3"] == ["i"] set "CASDEB=i"
if /I ["%3"] == ["relwithdeb"] set "CASDEB=i"
rem include other custom.bat files with specific 3rdparty paths
@ADDITIONAL_CUSTOM_CONTENT@

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