mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f830959be3 |
@@ -1,40 +0,0 @@
|
||||
# This workflow will build OCCT on Ubuntu with Clang compiler
|
||||
# using the provided Docker image with Clang tools.
|
||||
#
|
||||
# Notes:
|
||||
# freetype is disabled
|
||||
# samples are not built
|
||||
|
||||
name: Build OCCT on Linux with Clang x64 dynamic
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
build-linux-clang:
|
||||
name: Build on Ubuntu with Clang
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake clang make libbtbb-dev libx11-dev libglu1-mesa-dev
|
||||
|
||||
- name: Configure OCCT
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_C_COMPILER=clang \
|
||||
-D CMAKE_CXX_COMPILER=clang++ \
|
||||
-D USE_FREETYPE=OFF \
|
||||
-D CMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
- name: Build OCCT
|
||||
run: |
|
||||
cd build
|
||||
make -j$(nproc)
|
@@ -1,40 +0,0 @@
|
||||
# This workflow will build OCCT on Linux with GCC x64 dynamic
|
||||
# using the provided Docker image with GCC tools.
|
||||
#
|
||||
# Notes:
|
||||
# freetype is disabled
|
||||
# samples are not built
|
||||
|
||||
name: Build OCCT on Linux with GCC x64 dynamic
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
build-linux-gcc:
|
||||
name: Build on Ubuntu with GCC
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- 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
|
||||
|
||||
- name: Configure OCCT
|
||||
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 ..
|
||||
|
||||
- name: Build OCCT
|
||||
run: |
|
||||
cd build
|
||||
make -j$(nproc)
|
@@ -1,43 +0,0 @@
|
||||
# This workflow builds OCCT on macOS with Clang x64 dynamic.
|
||||
#
|
||||
# Notes:
|
||||
# freetype is disabled
|
||||
# samples are not built
|
||||
|
||||
name: Build OCCT on macOS with Clang x64 dynamic
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
build-macos-clang:
|
||||
name: Build on macOS with Clang
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install tcl-tk tbb gl2ps xerces-c \
|
||||
libxmu libxi libxft libxpm \
|
||||
glew
|
||||
|
||||
- name: Configure OCCT
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_C_COMPILER=clang \
|
||||
-D CMAKE_CXX_COMPILER=clang++ \
|
||||
-D USE_FREETYPE=OFF \
|
||||
-D CMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
- name: Build OCCT
|
||||
run: |
|
||||
cd build
|
||||
make -j$(sysctl -n hw.logicalcpu)
|
@@ -1,44 +0,0 @@
|
||||
# This workflow will build OCCT on Windows with MSVC x64 in dynamic mode
|
||||
# using the provided Docker image with MSVC tools.
|
||||
#
|
||||
# Notes:
|
||||
# freetype is disabled
|
||||
# Draw module is disabled
|
||||
# samples are not built
|
||||
|
||||
name: Build OCCT on Windows with MSVC x64 dynamic
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
build-windows-msvc:
|
||||
name: Build on Windows with MSVC
|
||||
runs-on: windows-latest
|
||||
|
||||
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: Install dependencies
|
||||
run: |
|
||||
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||
choco install magicsplat-tcl-tk -y
|
||||
|
||||
- name: Configure OCCT
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -T host=x64 -D USE_FREETYPE=OFF -D BUILD_MODULE_Draw=OFF -D CMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
- name: Build OCCT
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --config Release -- /m
|
69
.github/workflows/codemsvc.yml
vendored
69
.github/workflows/codemsvc.yml
vendored
@@ -1,69 +0,0 @@
|
||||
# Security scanning with Microsoft C++ Code Analysis.
|
||||
# Checks any master integration and publish warnings into security GitHub tab.
|
||||
#
|
||||
# Find more information at:
|
||||
# https://github.com/microsoft/msvc-code-analysis-action
|
||||
|
||||
name: Microsoft C++ Code Analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
env:
|
||||
# Path to the CMake build directory.
|
||||
build: '${{ github.workspace }}/build'
|
||||
config: 'Debug'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
permissions:
|
||||
contents: read # for actions/checkout to fetch code
|
||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||
name: Analyze
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||
choco install magicsplat-tcl-tk -y
|
||||
|
||||
- name: Configure CMake
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -D USE_FREETYPE=OFF -DCMAKE_BUILD_TYPE=${{ env.config }} ..
|
||||
|
||||
- name: Run MSVC Code Analysis
|
||||
uses: microsoft/msvc-code-analysis-action@v0.1.1
|
||||
# Provide a unique ID to access the sarif output path
|
||||
id: run-analysis
|
||||
with:
|
||||
cmakeBuildDirectory: ${{ env.build }}
|
||||
buildConfiguration: ${{ env.config }}
|
||||
# Ruleset file that will determine what checks will be run
|
||||
ruleset: NativeRecommendedRules.ruleset
|
||||
# Paths to ignore analysis of CMake targets and includes
|
||||
# ignoredPaths: ${{ github.workspace }}/dependencies;${{ github.workspace }}/test
|
||||
|
||||
# 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 }}
|
||||
|
||||
# Upload SARIF file as an Artifact to download and view
|
||||
- name: Upload SARIF as an Artifact
|
||||
uses: actions/upload-artifact@v4.3.6
|
||||
with:
|
||||
name: sarif-file
|
||||
path: ${{ steps.run-analysis.outputs.sarif }}
|
60
.github/workflows/codeql.yml
vendored
60
.github/workflows/codeql.yml
vendored
@@ -1,60 +0,0 @@
|
||||
# Security scanning with CodeQL.
|
||||
# Checks any master integration and publish warnings into security GitHub tab.
|
||||
#
|
||||
# Find more information at:
|
||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning
|
||||
|
||||
name: CodeQL Code Analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
runs-on: ${{ 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: c-cpp
|
||||
build-mode: manual
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- 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
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3.26.5
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
|
||||
- if: matrix.build-mode == 'manual'
|
||||
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)
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3.26.5
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,7 +1,6 @@
|
||||
|
||||
# standard directories for derived files in CASROOT
|
||||
/.adm
|
||||
/.vscode
|
||||
/lin
|
||||
/mac
|
||||
/wnt
|
||||
|
@@ -19,7 +19,7 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
# 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
|
||||
# specify product folder in connectin 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}")
|
||||
|
||||
|
@@ -12,7 +12,7 @@ if (NOT BISON_EXECUTABLE OR NOT EXISTS "${BISON_EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
# Add paths to 3rdparty subfolders containing name "bison" to CMAKE_PROGRAM_PATH variable to make
|
||||
# these paths searched by find_package
|
||||
# these paths searhed by find_package
|
||||
if (3RDPARTY_DIR)
|
||||
file (GLOB BISON_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*bison*/")
|
||||
foreach (candidate_path ${BISON_PATHS})
|
||||
|
@@ -2580,7 +2580,7 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget)
|
||||
message (STATUS "add_custom_command: TARGET ${_target} PRE_BUILD ${_cmds}")
|
||||
endif()
|
||||
# because CMake PRE_BUILD command does not support dependencies,
|
||||
# we check dependencies explicitly in cotire script mode when the pre-build action is run
|
||||
# we check dependencies explicity in cotire script mode when the pre-build action is run
|
||||
add_custom_command(
|
||||
TARGET "${_target}"
|
||||
PRE_BUILD ${_cmds}
|
||||
@@ -2637,7 +2637,7 @@ function (cotire_setup_unity_generation_commands _language _target _targetScript
|
||||
endif()
|
||||
if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
||||
# unity file compilation results in potentially huge object file,
|
||||
# thus use /bigobj by default under cl.exe and Windows Intel
|
||||
# thus use /bigobj by default unter cl.exe and Windows Intel
|
||||
set_property (SOURCE "${_unityFile}" APPEND_STRING PROPERTY COMPILE_FLAGS "/bigobj")
|
||||
endif()
|
||||
cotire_set_cmd_to_prologue(_unityCmd)
|
||||
|
@@ -15,7 +15,7 @@ if (NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
# 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
|
||||
# CMAKE_INCLUDE_PATH variables to make these paths searhed by find_package
|
||||
if (3RDPARTY_DIR)
|
||||
file (GLOB FLEX_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*flex*")
|
||||
foreach (candidate_path ${FLEX_PATHS})
|
||||
|
@@ -14,7 +14,7 @@ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
OCCT_MAKE_COMPILER_BITNESS()
|
||||
|
||||
# specify freetype folder in connection with 3RDPARTY_DIR
|
||||
# specify freetype folder in connectin with 3RDPARTY_DIR
|
||||
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
||||
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_FREETYPE_DIR PATH "The directory containing freetype")
|
||||
|
||||
|
@@ -27,7 +27,7 @@ if (WIN32)
|
||||
|
||||
# Below, we have correct 3RDPARTY_DIR.
|
||||
|
||||
# Initialize TBB folder in connection with 3RDPARTY_DIR.
|
||||
# Initialize TBB folder in connectin 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)
|
||||
@@ -44,7 +44,7 @@ if (WIN32)
|
||||
REQUIRED
|
||||
CONFIG)
|
||||
|
||||
# Archive include directory
|
||||
# Achive 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")
|
||||
@@ -56,17 +56,13 @@ if (WIN32)
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
# 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})
|
||||
# Achive *.lib files and directory containing it.
|
||||
get_target_property (TBB_LIB_FILE "TBB::${LIB_LOWER}" IMPORTED_IMPLIB_RELEASE)
|
||||
# Reserve cache variable for *.lib.
|
||||
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY)
|
||||
set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.lib)")
|
||||
@@ -92,8 +88,8 @@ if (WIN32)
|
||||
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})
|
||||
# Achive *.dll files and directory containing it.
|
||||
get_target_property (TBB_DLL_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_RELEASE)
|
||||
# Reserve cache variable for *.dll.
|
||||
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL)
|
||||
set (3RDPARTY_${LIB_UPPER}_DLL "" CACHE FILEPATH "${LIB_UPPER} library (*.dll)")
|
||||
@@ -175,9 +171,9 @@ else ()
|
||||
REQUIRED
|
||||
CONFIG)
|
||||
endif()
|
||||
# TBB has been configured (in other case FATAL_ERROR occurs).
|
||||
# TBB has been configured (in other case FATAL_ERROR occures).
|
||||
|
||||
# Archive include directory.
|
||||
# Achive 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")
|
||||
@@ -189,17 +185,13 @@ else ()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
# 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})
|
||||
# Achive *.so files and directory containing it.
|
||||
get_target_property (TBB_SO_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_RELEASE)
|
||||
# Reserve cache variable for *.so.
|
||||
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY)
|
||||
set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.so)")
|
||||
|
@@ -405,7 +405,7 @@ proc Rename {thePath theExtensions theNewNames theCheckMode} {
|
||||
}
|
||||
}
|
||||
|
||||
# @thePackagePath either file or folder. If it is a folder,
|
||||
# @thePackagePath eather file or folder. If it is a folder,
|
||||
# all files with @theHeaderExtensions are processed.
|
||||
# "fwd.tcollection" section from upgrade.ini file is used to find out what
|
||||
# classes have been converted and, thus, what forward declarations can be replaced
|
||||
|
@@ -370,7 +370,7 @@ https://dev.opencascade.org/resources/download/3rd-party-components
|
||||
| Flex 2.6.4+ and Bison 3.7.1+ | https://sourceforge.net/projects/winflexbison/ | Data Exchange | Updating STEP and ExprIntrp parsers |
|
||||
| RapidJSON 1.1+ | https://rapidjson.org/ | Data Exchange | Reading glTF files |
|
||||
| Draco 1.4.1+ | https://github.com/google/draco | Data Exchange | Reading compressed glTF files |
|
||||
| Tcl/Tk 8.6.3+ | https://www.tcl.tk/software/tcltk/download.html | DRAW Test Harness | Tcl interpreter in Draw module |
|
||||
| Tcl/Tk 8.6.3+ | https://www.tcl.tk/software/tcltk/download.html | DRAW Test Harness | Tcl interpretor in Draw module |
|
||||
| Qt 5.3.2+ | https://www.qt.io/download/ | Inspector and Samples | Inspector Qt samples and |
|
||||
| Doxygen 1.8.5+ | https://www.doxygen.nl/download.html | Documentation | (Re)generating documentation |
|
||||
| Graphviz 2.38+ | https://graphviz.org/ | Documentation | Generating dependency graphs |
|
||||
|
@@ -763,7 +763,7 @@ filter2->AddSkipped("TDataStd_Integer");
|
||||
app->Open("example.cbf", doc, filter2);
|
||||
~~~~
|
||||
|
||||
*PCDM_ReaderFilter::AppendMode_Protect* means that if the loading algorithm finds already existing attribute in the document, it will not be overwritten by attribute from the loading file. If it is needed to
|
||||
*PCDM_ReaderFilter::AppendMode_Protect* means that if the loading algorithm finds already existing attribute in the document, it will not be overwritten by attibute from the loading file. If it is needed to
|
||||
substitute the existing attributes, the reading mode *PCDM_ReaderFilter::AppendMode_Overwrite* must be used instead.
|
||||
|
||||
*AddRead* and *AddSkipped* methods for attributes should not be used in one filter. If it is so, *AddSkipped* attributes are ignored during the read.
|
||||
@@ -971,7 +971,7 @@ The "correct" history of a used modeling operation serves the basis of naming me
|
||||
| Closed wire | Edges | All edges |
|
||||
| Opened wire | Edges and ending vertexes | All edges plus ending vertexes of the wire |
|
||||
| Edge | Vertexes | Two vertexes are expected |
|
||||
| Compound or CompSolid | To be used consequently the above declared rule applied to all sub-shapes of the first level | Compound/CompSolid to be explored level by level until any the mentioned above types will be met |
|
||||
| Compound or CompSolid | To be used consequentially the above declared rule applied to all sub-shapes of the first level | Compound/CompSolid to be explored level by level until any the mentioned above types will be met |
|
||||
|
||||
The history should return (and track) only elementary types of sub-shapes, i.e. Faces, Edges and Vertexes, while other so-called aggregation types: Compounds, Shells, Wires, are calculated by Selection mechanism automatically.
|
||||
|
||||
|
@@ -119,7 +119,7 @@ if (OpenCASCADE_INCLUDE_DIR_FOUND AND OpenCASCADE_LIBRARY_DIR_FOUND)
|
||||
set (OpenCASCADE_INSTALL_PREFIX ${OpenCASCADE_DIR})
|
||||
|
||||
# Define OCCT toolkits so that CMake can put absolute paths to linker;
|
||||
# the library existence is not checked here, since modules can be disabled.
|
||||
# the library existance is not checked here, since modules can be disabled.
|
||||
foreach (aLibIter ${OpenCASCADE_TKLIST})
|
||||
add_library (${aLibIter} SHARED IMPORTED)
|
||||
|
||||
|
@@ -2266,12 +2266,6 @@ void AIS_ViewController::handleCameraActions (const Handle(AIS_InteractiveContex
|
||||
myGL.Orientation.ToFitAll = false;
|
||||
}
|
||||
|
||||
if (theView->Viewer()->Grid()->IsActive()
|
||||
&& theView->Viewer()->GridEcho())
|
||||
{
|
||||
theView->Viewer()->Grid()->Update();
|
||||
}
|
||||
|
||||
if (myGL.IsNewGesture)
|
||||
{
|
||||
if (myAnchorPointPrs1->HasInteractiveContext())
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
// This is a generic header for any STEP scheme
|
||||
// This is a generic header for any STEP sheme
|
||||
static Handle(TCollection_HAsciiString) nulstr;
|
||||
static Handle(Interface_HArray1OfHAsciiString) nularr;
|
||||
|
||||
|
@@ -146,7 +146,7 @@ static void Hunt(const TColStd_Array1OfReal& Arr,
|
||||
const Standard_Real Coord,
|
||||
Standard_Integer& Iloc)
|
||||
{//Warning: Hunt is used to find number of knot which equals coordinate component,
|
||||
// when coordinate component definitely equals a knot only.
|
||||
// when coordinate component definitly equals a knot only.
|
||||
Standard_Real Tol=Precision::PConfusion()/10;
|
||||
Standard_Integer i=1;
|
||||
while((i <= Arr.Upper()) && (Abs(Coord - Arr(i)) > Tol)){
|
||||
@@ -638,7 +638,7 @@ static void Locate2Coord(const Standard_Integer Index,
|
||||
if((DComp > 0)&&(Abs(DComp)>Tol)) {
|
||||
Hunt(Arr,Comp,N);
|
||||
if (N >= NUp){
|
||||
//limit case: Hunt() caught upper knot. Take the last span.
|
||||
//limit case: Hunt() cought upper knot. Take the last span.
|
||||
N = NUp - 1;
|
||||
}
|
||||
if(Index==1) { Tmp1=BSplS->UKnot(N);
|
||||
@@ -659,7 +659,7 @@ static void Locate2Coord(const Standard_Integer Index,
|
||||
if((DComp < 0)&&(Abs(DComp)>Tol)){
|
||||
Hunt(Arr,Comp,N);
|
||||
if (N <= NLo) {
|
||||
//limit case: Hunt() caught lower knot. Take the first span.
|
||||
//limit case: Hunt() cought lower knot. Take the first span.
|
||||
N = NLo + 1;
|
||||
}
|
||||
if(Index==1) { Tmp1=BSplS->UKnot(N-1);
|
||||
|
@@ -559,7 +559,7 @@ Standard_Boolean Adaptor3d_TopolTool::Identical
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
|
||||
#define myMinPnts 4 //Absolute possible minimum of sample points
|
||||
#define myMinPnts 4 //Absolut possible minimum of sample points
|
||||
//Restriction of IntPolyh
|
||||
|
||||
|
||||
|
@@ -68,7 +68,7 @@ public:
|
||||
//! get the Multplicities of the section
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const = 0;
|
||||
|
||||
//! Returns if the sections are rational or not
|
||||
//! Returns if the sections are rationnal or not
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const = 0;
|
||||
|
||||
//! Returns the number of intervals for continuity
|
||||
|
@@ -27,7 +27,7 @@ struct Aspect_XVisualInfo;
|
||||
//! This class creates and provides connection with X server.
|
||||
//! Raises exception if can not connect to X server.
|
||||
//! On Windows and Mac OS X (in case when Cocoa used) platforms this class does nothing.
|
||||
//! WARNING: Do not close display connection manually!
|
||||
//! WARRNING: Do not close display connection manually!
|
||||
class Aspect_DisplayConnection : public Standard_Transient
|
||||
{
|
||||
DEFINE_STANDARD_RTTIEXT(Aspect_DisplayConnection, Standard_Transient)
|
||||
|
@@ -16,10 +16,10 @@
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Aspect_Grid,Standard_Transient)
|
||||
|
||||
Aspect_Grid::Aspect_Grid (const Standard_Real theXOrigin,
|
||||
const Standard_Real theYOrigin,
|
||||
const Standard_Real theAngle,
|
||||
const Quantity_Color& theColor,
|
||||
const Quantity_Color& theTenthColor)
|
||||
const Standard_Real theYOrigin,
|
||||
const Standard_Real theAngle,
|
||||
const Quantity_Color& theColor,
|
||||
const Quantity_Color& theTenthColor)
|
||||
: myRotationAngle (theAngle),
|
||||
myXOrigin (theXOrigin),
|
||||
myYOrigin (theYOrigin),
|
||||
@@ -60,7 +60,7 @@ void Aspect_Grid::Rotate (const Standard_Real theAngle)
|
||||
}
|
||||
|
||||
void Aspect_Grid::Translate (const Standard_Real theDx,
|
||||
const Standard_Real theDy)
|
||||
const Standard_Real theDy)
|
||||
{
|
||||
myXOrigin += theDx;
|
||||
myYOrigin += theDy;
|
||||
@@ -69,7 +69,7 @@ void Aspect_Grid::Translate (const Standard_Real theDx,
|
||||
}
|
||||
|
||||
void Aspect_Grid::SetColors (const Quantity_Color& theColor,
|
||||
const Quantity_Color& theTenthColor)
|
||||
const Quantity_Color& theTenthColor)
|
||||
{
|
||||
myColor = theColor;
|
||||
myTenthColor = theTenthColor;
|
||||
@@ -77,16 +77,16 @@ void Aspect_Grid::SetColors (const Quantity_Color& theColor,
|
||||
}
|
||||
|
||||
void Aspect_Grid::Colors (Quantity_Color& theColor,
|
||||
Quantity_Color& theTenthColor) const
|
||||
Quantity_Color& theTenthColor) const
|
||||
{
|
||||
theColor = myColor;
|
||||
theTenthColor = myTenthColor;
|
||||
}
|
||||
|
||||
void Aspect_Grid::Hit (const Standard_Real theX,
|
||||
const Standard_Real theY,
|
||||
Standard_Real& theGridX,
|
||||
Standard_Real& theGridY) const
|
||||
const Standard_Real theY,
|
||||
Standard_Real& theGridX,
|
||||
Standard_Real& theGridY) const
|
||||
{
|
||||
if (myIsActive)
|
||||
{
|
||||
|
@@ -86,9 +86,6 @@ public:
|
||||
|
||||
//! Display the grid at screen.
|
||||
Standard_EXPORT virtual void Display() = 0;
|
||||
|
||||
//! Update grid presentation
|
||||
Standard_EXPORT virtual void Update() = 0;
|
||||
|
||||
//! Erase the grid from screen.
|
||||
Standard_EXPORT virtual void Erase() const = 0;
|
||||
|
@@ -1,67 +0,0 @@
|
||||
// Created on: 1995-03-02
|
||||
// Created by: Jean-Louis Frenkel
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Aspect_GridParams_HeaderFile
|
||||
#define _Aspect_GridParams_HeaderFile
|
||||
|
||||
#include <Quantity_Color.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
|
||||
class Aspect_GridParams
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor.
|
||||
Aspect_GridParams()
|
||||
: myIsHorizontal (true),
|
||||
myIsDrawAxis(true),
|
||||
myColor(0.8, 0.8, 0.8, Quantity_TOC_RGB),
|
||||
myScale (0.01),
|
||||
myIsInfinity (false),
|
||||
myPosition (0.0, 0.0, 0.0),
|
||||
myLineThickness (0.01)
|
||||
{}
|
||||
|
||||
//! Getters
|
||||
Standard_Boolean IsHorizontal() const { return myIsHorizontal; }
|
||||
Standard_Boolean IsDrawAxis() const { return myIsDrawAxis; }
|
||||
const Quantity_Color& Color() const { return myColor; }
|
||||
Standard_Real Scale() const { return myScale; }
|
||||
Standard_Boolean IsInfinity() const { return myIsInfinity; }
|
||||
const gp_Pnt& Position() const { return myPosition; }
|
||||
Standard_Real LineThickness() const { return myLineThickness; }
|
||||
|
||||
//! Setters
|
||||
void SetIsHorizontal (Standard_Boolean theValue) { myIsHorizontal = theValue; }
|
||||
void SetIsDrawAxis (Standard_Boolean theValue) { myIsDrawAxis = theValue; }
|
||||
void SetColor (const Quantity_Color& theColor) { myColor = theColor; }
|
||||
void SetScale (Standard_Real theScale) { myScale = theScale; }
|
||||
void SetIsInfinity (Standard_Boolean theValue) { myIsInfinity = theValue; }
|
||||
void SetPosition (const gp_Pnt& thePosition) { myPosition = thePosition; }
|
||||
void SetLineThickness (Standard_Real theThickness) { myLineThickness = theThickness; }
|
||||
|
||||
private:
|
||||
|
||||
Quantity_Color myColor;
|
||||
gp_Pnt myPosition;
|
||||
Standard_Real myScale;
|
||||
Standard_Real myLineThickness;
|
||||
Standard_Boolean myIsHorizontal;
|
||||
Standard_Boolean myIsDrawAxis;
|
||||
Standard_Boolean myIsInfinity;
|
||||
};
|
||||
|
||||
#endif // _Aspect_GridParams_HeaderFile
|
@@ -27,11 +27,8 @@ Aspect_RectangularGrid::Aspect_RectangularGrid(
|
||||
const Standard_Real aFirstAngle,
|
||||
const Standard_Real aSecondAngle,
|
||||
const Standard_Real aRotationAngle)
|
||||
: Aspect_Grid (anXOrigin,anYOrigin,aRotationAngle),
|
||||
myXStep (aXStep),
|
||||
myYStep (aYStep),
|
||||
myFirstAngle (aFirstAngle),
|
||||
mySecondAngle (aSecondAngle)
|
||||
:Aspect_Grid(anXOrigin,anYOrigin,aRotationAngle),myXStep(aXStep),myYStep(aYStep),myFirstAngle(aFirstAngle),mySecondAngle(aSecondAngle)
|
||||
|
||||
{
|
||||
Standard_NumericError_Raise_if(!CheckAngle (aFirstAngle,mySecondAngle),
|
||||
"networks are parallel");
|
||||
|
@@ -25,7 +25,6 @@ Aspect_GraphicsLibrary.hxx
|
||||
Aspect_Grid.cxx
|
||||
Aspect_Grid.hxx
|
||||
Aspect_GridDrawMode.hxx
|
||||
Aspect_GridParams.hxx
|
||||
Aspect_GridType.hxx
|
||||
Aspect_NeutralWindow.cxx
|
||||
Aspect_NeutralWindow.hxx
|
||||
|
@@ -341,8 +341,12 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange)
|
||||
GeomAbs_CurveType aType1 = aBAC1.GetType();
|
||||
GeomAbs_CurveType aType2 = aBAC2.GetType();
|
||||
//
|
||||
bAnalytical = (aType1 == GeomAbs_Line && aType2 == GeomAbs_Circle) ||
|
||||
(aType1 == GeomAbs_Circle && aType2 == GeomAbs_Line);
|
||||
bAnalytical = (((aType1 == GeomAbs_Line) &&
|
||||
(aType2 == GeomAbs_Line ||
|
||||
aType2 == GeomAbs_Circle)) ||
|
||||
((aType2 == GeomAbs_Line) &&
|
||||
(aType1 == GeomAbs_Line ||
|
||||
aType1 == GeomAbs_Circle)));
|
||||
}
|
||||
//
|
||||
for (i=1; i<=aNbCPrts; ++i) {
|
||||
@@ -439,7 +443,7 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange)
|
||||
|
||||
Standard_Real aTolVnew = BRep_Tool::Tolerance(aVnew);
|
||||
if (bAnalytical) {
|
||||
// increase tolerance for Line/Circle intersection, but do not update
|
||||
// increase tolerance for Line/Line intersection, but do not update
|
||||
// the vertex till its intersection with some other shape
|
||||
Standard_Real aTolMin = (BRepAdaptor_Curve(aE1).GetType() == GeomAbs_Line) ?
|
||||
(aCR1.Last() - aCR1.First()) / 2. : (aCR2.Last() - aCR2.First()) / 2.;
|
||||
|
@@ -51,12 +51,12 @@ public:
|
||||
//! Warning:
|
||||
//! The Wires must be closed.
|
||||
//!
|
||||
//! The edges of <W> can be modified if they don't have
|
||||
//! pcurves on the surface <S> of <F>. In this case
|
||||
//! if <Proj> is false the first pcurve of the edge
|
||||
//! is positioned on <S>.
|
||||
//! if <Proj> is True, the Pcurve On <S> is the
|
||||
//! projection of the curve 3d on <F>.
|
||||
//! The edges of <W> can be modified if they have not pcurves
|
||||
//! on the surface <S> of <F>. In this case
|
||||
//! if <Proj> is false the first pcurve of the edge
|
||||
//! is positionned on <S>.
|
||||
//! if <Proj> is True ,the Pcurve On <S> is the
|
||||
//! projection of the curve 3d on <F>.
|
||||
Standard_EXPORT void Add (TopoDS_Wire& W);
|
||||
|
||||
//! Removes all the Wires
|
||||
|
@@ -86,13 +86,13 @@ public:
|
||||
|
||||
Standard_EXPORT void VerticesForSubstitute (TopTools_DataMapOfShapeShape& VerVerMap);
|
||||
|
||||
//! Set maximal tolerance used for comparing distances between vertices.
|
||||
//! Set maximal tolerance used for comparing distaces between vertices.
|
||||
void SetTolConf(const Standard_Real theTolConf)
|
||||
{
|
||||
myTolConf = theTolConf;
|
||||
}
|
||||
|
||||
//! Get maximal tolerance used for comparing distances between vertices.
|
||||
//! Get maximal tolerance used for comparing distaces between vertices.
|
||||
Standard_Real GetTolConf() const
|
||||
{
|
||||
return myTolConf;
|
||||
|
@@ -49,7 +49,7 @@ BRepBlend_AppFuncRoot::BRepBlend_AppFuncRoot(Handle(BRepBlend_Line)& Line,
|
||||
// Tables
|
||||
Func.GetShape( NbPoles, NbKnots, Degree, NbPoles2d);
|
||||
|
||||
// Calculation of BaryCentre (rational case).
|
||||
// Calculation of BaryCentre (rationnal case).
|
||||
if (Func.IsRational()) {
|
||||
Standard_Real Xmax =-1.e100, Xmin = 1.e100,
|
||||
Ymax =-1.e100, Ymin = 1.e100,
|
||||
|
@@ -69,7 +69,7 @@ public:
|
||||
//! get the Multplicities of the section
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns if the section is rational or not
|
||||
//! Returns if the section is rationnal or not
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the number of intervals for continuity
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
Standard_EXPORT virtual void Resolution (const Standard_Integer Index, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary (in radian)
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -139,7 +139,7 @@ public:
|
||||
|
||||
Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C);
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -140,7 +140,7 @@ public:
|
||||
|
||||
Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C);
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -133,7 +133,7 @@ public:
|
||||
|
||||
Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C);
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -132,7 +132,7 @@ public:
|
||||
|
||||
Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C);
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -202,7 +202,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
||||
// is tangent to the edge curve. This condition is bad for classification.
|
||||
// Therefore try to go to another point in the hope that there will be
|
||||
// no tangent. If there tangent is preserved then leave the last point in
|
||||
// order to get this edge chance to participate in classification.
|
||||
// order to get this edge chanse to participate in classification.
|
||||
if (myCurEdgePar + Probing_Step < Probing_End)
|
||||
continue;
|
||||
}
|
||||
|
@@ -541,7 +541,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
|
||||
|
||||
if (!Surf.IsNull()) { // Add the face at end
|
||||
|
||||
// Waiting the use of traces & restriction in BRepFill_Sweep
|
||||
// Waiting the use of traces & retriction in BRepFill_Sweep
|
||||
// Make Fuse.
|
||||
BRepLib_MakeFace MkF;
|
||||
MkF.Init(Surf, Standard_True, Precision::Confusion());
|
||||
|
@@ -3144,7 +3144,7 @@ void CutEdgeProf (const TopoDS_Edge& E,
|
||||
|
||||
//=======================================================================
|
||||
//function : CutEdge
|
||||
//purpose : Cut an edge at the extrema of curves and at points of inflexion.
|
||||
//purpose : Cut an edge at thw extrema of curves and at points of inflexion.
|
||||
// Closed circles are also cut in two.
|
||||
// If <Cuts> are empty the edge is not modified.
|
||||
// The first and the last vertex of the original edge
|
||||
|
@@ -122,18 +122,18 @@ public:
|
||||
protected:
|
||||
|
||||
|
||||
//! Initialize all the fields, this methode has to
|
||||
//! Initialize all the fields, this methode have to
|
||||
//! be called by the constructors of Inherited class.
|
||||
Standard_EXPORT void Init (const TopoDS_Wire& Path);
|
||||
|
||||
//! To preserve if possible the Tangent in transformations
|
||||
//! To preseve if possible the Tangent in transformations
|
||||
//! It is the default mode.
|
||||
Standard_EXPORT void TangentIsMain();
|
||||
|
||||
//! To preserve if possible the Normal in transformations
|
||||
//! To preseve if possible the Normal in transformations
|
||||
Standard_EXPORT void NormalIsMain();
|
||||
|
||||
//! To preserve if possible the BiNormal in transformations
|
||||
//! To preseve if possible the BiNormal in transformations
|
||||
Standard_EXPORT void BiNormalIsMain();
|
||||
|
||||
TopoDS_Wire myPath;
|
||||
|
@@ -501,7 +501,7 @@ TopoDS_Shape BRepFill_Pipe::Section(const TopoDS_Vertex& VSpine) const
|
||||
|
||||
TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point)
|
||||
{
|
||||
// Positioning
|
||||
// Postioning
|
||||
gp_Pnt P;
|
||||
P = Point;
|
||||
P.Transform(myTrsf);
|
||||
|
@@ -1155,7 +1155,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
|
||||
|
||||
//=======================================================================
|
||||
//function : Place
|
||||
//purpose : Implement a Section in the local reference frame
|
||||
//purpose : Implement a Section in the local refernce frame
|
||||
// and return its parameter on the trajectory
|
||||
//=======================================================================
|
||||
void BRepFill_PipeShell::Place(const BRepFill_Section& Sec,
|
||||
|
@@ -48,7 +48,7 @@ class BRepFill_PipeShell;
|
||||
DEFINE_STANDARD_HANDLE(BRepFill_PipeShell, Standard_Transient)
|
||||
|
||||
//! Computes a topological shell using some wires
|
||||
//! (spines and profiles) and displacement option
|
||||
//! (spines and profiles) and diplacement option
|
||||
//! Perform general sweeping construction
|
||||
class BRepFill_PipeShell : public Standard_Transient
|
||||
{
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
//! to be C0.
|
||||
//! Give section to sweep.
|
||||
//! Possibilities are :
|
||||
//! - Give one or several profile
|
||||
//! - Give one or sevral profile
|
||||
//! - Give one profile and an homotetic law.
|
||||
//! - Automatic compute of correspondence between profile, and section on the sweeped shape
|
||||
//! - correspondence between profile, and section on the sweeped shape defined by a vertex of the spine
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
Standard_EXPORT void SetTransition (const BRepFill_TransitionStyle Mode = BRepFill_Modified, const Standard_Real Angmin = 1.0e-2, const Standard_Real Angmax = 6.0);
|
||||
|
||||
//! Perform simulation of the sweep :
|
||||
//! Some Section are returned.
|
||||
//! Somes Section are returned.
|
||||
Standard_EXPORT void Simulate (const Standard_Integer NumberOfSection, TopTools_ListOfShape& Sections);
|
||||
|
||||
//! Builds the resulting shape (redefined from MakeShape).
|
||||
|
@@ -2890,7 +2890,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
|
||||
|
||||
//=======================================================================
|
||||
//function : Build
|
||||
//purpose : Construct the result of sweeping
|
||||
//purpose : Construt the result of sweeping
|
||||
//======================================================================
|
||||
void BRepFill_Sweep::Build(TopTools_MapOfShape& ReversedEdges,
|
||||
BRepFill_DataMapOfShapeHArray2OfShape& Tapes,
|
||||
|
@@ -64,7 +64,7 @@ public:
|
||||
//! Tolerance To controle Corner management.
|
||||
//!
|
||||
//! If the discontinuity is lesser than <AngleMin> in radian The
|
||||
//! Transition Performed will be always "Modified"
|
||||
//! Transition Performed will be alway "Modified"
|
||||
Standard_EXPORT void SetAngularControl (const Standard_Real AngleMin = 0.01, const Standard_Real AngleMax = 6.0);
|
||||
|
||||
//! Set the flag that indicates attempt to approximate
|
||||
@@ -72,13 +72,13 @@ public:
|
||||
//! to be C0.
|
||||
Standard_EXPORT void SetForceApproxC1 (const Standard_Boolean ForceApproxC1);
|
||||
|
||||
//! Build the Sweep Surface
|
||||
//! Build the Sweep Surface
|
||||
//! Transition define Transition strategy
|
||||
//! Approx define Approximation Strategy
|
||||
//! - GeomFill_Section : The composed Function Location X Section
|
||||
//! is directly approximated.
|
||||
//! - GeomFill_Location : The location law is approximated, and the
|
||||
//! SweepSurface builds an algebraic composition
|
||||
//! SweepSurface is bulid algebric composition
|
||||
//! of approximated location law and section law
|
||||
//! This option is Ok, if Section.Surface() methode
|
||||
//! is effective.
|
||||
|
@@ -37,7 +37,7 @@ class TopoDS_Edge;
|
||||
//! - define if necessary a new tolerance
|
||||
//! - set if necessary analysis of degenerated shapes off
|
||||
//! - add shapes to be controlled -> Add
|
||||
//! - compute -> Perform
|
||||
//! - compute -> Perfom
|
||||
//! - output couples of connected edges for control
|
||||
//! - output the problems if any
|
||||
class BRepOffsetAPI_FindContigousEdges
|
||||
|
@@ -166,7 +166,7 @@ void BRepOffsetAPI_MakeOffset::Init(const GeomAbs_JoinType Join,
|
||||
//=======================================================================
|
||||
//function : SetApprox
|
||||
//purpose : Set approximation flag
|
||||
// for conversion input contours into ones consisting of
|
||||
// for convertion input contours into ones consisting of
|
||||
// 2D circular arcs and 2D linear segments only
|
||||
//=======================================================================
|
||||
|
||||
|
@@ -64,7 +64,7 @@ public:
|
||||
Standard_EXPORT void Init (const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean IsOpenResult = Standard_False);
|
||||
|
||||
//! Set approximation flag
|
||||
//! for conversion input contours into ones consisting of
|
||||
//! for convertion input contours into ones consisting of
|
||||
//! 2D circular arcs and 2D linear segments only.
|
||||
Standard_EXPORT void SetApprox (const Standard_Boolean ToApprox);
|
||||
|
||||
|
@@ -114,7 +114,7 @@ public:
|
||||
const Standard_Boolean RemoveIntEdges = Standard_False,
|
||||
const Message_ProgressRange& theRange = Message_ProgressRange());
|
||||
|
||||
//! Returns instance of the underlying intersection / arc algorithm.
|
||||
//! Returns instance of the unrelying intersection / arc algorithm.
|
||||
Standard_EXPORT virtual const BRepOffset_MakeOffset& MakeOffset() const;
|
||||
|
||||
//! Does nothing.
|
||||
|
@@ -112,7 +112,7 @@ public:
|
||||
//! along the path.
|
||||
//! Give section to sweep.
|
||||
//! Possibilities are :
|
||||
//! - Give one or several section
|
||||
//! - Give one or sevral section
|
||||
//! - Give one profile and an homotetic law.
|
||||
//! - Automatic compute of correspondence between spine, and section
|
||||
//! on the sweeped shape
|
||||
|
@@ -306,7 +306,7 @@ static Standard_Integer fillet2d(Draw_Interpretor& di, Standard_Integer n, const
|
||||
Standard_Boolean status = algo.Perform(radius);
|
||||
if (!status)
|
||||
{
|
||||
di << "Error: the algorithm failed.";
|
||||
di << "Error: the algrithm failed.";
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ static Standard_Integer fillet2d(Draw_Interpretor& di, Standard_Integer n, const
|
||||
TopoDS_Edge fillet = algo.Result(common, M1, M2);
|
||||
if (fillet.IsNull())
|
||||
{
|
||||
di << "Error: the algorithm produced no result.";
|
||||
di << "Error: the algrithm produced no result.";
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ static Standard_Integer chamfer2d(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
TopoDS_Edge chamfer = algo.Result(M1, M2, length1, length2);
|
||||
if (chamfer.IsNull())
|
||||
{
|
||||
di << "Error: the algorithm produced no result.";
|
||||
di << "Error: the algrithm produced no result.";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@@ -1263,7 +1263,7 @@ void BSplCLib::MovePoint (const Standard_Real U,
|
||||
}
|
||||
}
|
||||
|
||||
// find a kk2 if symmetry
|
||||
// find a kk2 if symetriy
|
||||
kk2 = kk1;
|
||||
i = kk1 - FirstNonZeroBsplineIndex + 2;
|
||||
if ((kk1+1) <= LastIndex) {
|
||||
|
@@ -2845,7 +2845,7 @@ void BSplSLib::MovePoint (const Standard_Real U,
|
||||
}
|
||||
}
|
||||
|
||||
// find a ukk2 if symmetry
|
||||
// find a ukk2 if symetriy
|
||||
ukk2 = ukk1;
|
||||
i = ukk1 - UFirstNonZeroBsplineIndex + 2;
|
||||
if ((ukk1+1) <= ULastIndex) {
|
||||
@@ -2871,7 +2871,7 @@ void BSplSLib::MovePoint (const Standard_Real U,
|
||||
}
|
||||
}
|
||||
|
||||
// find a vkk2 if symmetry
|
||||
// find a vkk2 if symetriy
|
||||
vkk2 = vkk1;
|
||||
j = vkk1 - VFirstNonZeroBsplineIndex + 2;
|
||||
if ((vkk1+1) <= VLastIndex) {
|
||||
|
@@ -115,7 +115,7 @@ public:
|
||||
//! Returns the point on the first support.
|
||||
Standard_EXPORT virtual const gp_Pnt& Pnt2() const = 0;
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const = 0;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
Standard_Integer& NbPoles2d) = 0;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -148,7 +148,7 @@ public:
|
||||
Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE = 0;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -156,7 +156,7 @@ public:
|
||||
//! but the values calculated can be senseless.
|
||||
Standard_EXPORT virtual Blend_DecrochStatus Decroch (const math_Vector& Sol, gp_Vec& NRst1, gp_Vec& TgRst1, gp_Vec& NRst2, gp_Vec& TgRst2) const = 0;
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const = 0;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) = 0;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -150,7 +150,7 @@ public:
|
||||
//! specific to the function.
|
||||
Standard_EXPORT virtual Standard_Boolean Decroch (const math_Vector& Sol, gp_Vec& NS, gp_Vec& TgS) const = 0;
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const = 0;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) = 0;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -116,7 +116,7 @@ public:
|
||||
|
||||
Standard_EXPORT void Set (const Standard_Real Radius, const Standard_Integer Choix);
|
||||
|
||||
//! Sets the type of section generation for the
|
||||
//! Sets the type of section generation for the
|
||||
//! approximations.
|
||||
Standard_EXPORT void Set (const BlendFunc_SectionShape TypeSection);
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetSection (const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, TColgp_Array1OfPnt& tabP, TColgp_Array1OfVec& tabV);
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
//! <S>. May be one if Continuity(me) >= <S>
|
||||
Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Stores in <T> the parameters bounding the intervals
|
||||
//! Stores in <T> the parameters bounding the intervals
|
||||
//! of continuity <S>.
|
||||
//!
|
||||
//! The array must provide enough room to accommodate
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -117,7 +117,7 @@ public:
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetSection (const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, TColgp_Array1OfPnt& tabP, TColgp_Array1OfVec& tabV);
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -111,7 +111,7 @@ public:
|
||||
//! Utile pour une visu rapide et approximative de la surface.
|
||||
Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Lin& C);
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -62,7 +62,7 @@ BlendFunc_ConstRad::BlendFunc_ConstRad(const Handle(Adaptor3d_Surface)& S1,
|
||||
distmin(RealLast()),
|
||||
mySShape(BlendFunc_Rational)
|
||||
{
|
||||
// Initialisation of cash control variables.
|
||||
// Initialisaton of cash control variables.
|
||||
tval = -9.876e100;
|
||||
xval.Init(-9.876e100);
|
||||
myXOrder = -1;
|
||||
|
@@ -116,7 +116,7 @@ public:
|
||||
//! Utile pour une visu rapide et approximative de la surface.
|
||||
Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C);
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -108,14 +108,14 @@ public:
|
||||
|
||||
Standard_EXPORT void Set (const Standard_Integer Choix);
|
||||
|
||||
//! Sets the type of section generation for the
|
||||
//! Sets the type of section generation for the
|
||||
//! approximations.
|
||||
Standard_EXPORT void Set (const BlendFunc_SectionShape TypeSection);
|
||||
|
||||
//! Method for graphic traces
|
||||
Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C);
|
||||
|
||||
//! Returns if the section is rational
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -105,7 +105,7 @@ public:
|
||||
Standard_Integer& NbPoles2d) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -127,7 +127,7 @@ public:
|
||||
Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -1,492 +0,0 @@
|
||||
// Copyright (c) 2024 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.
|
||||
|
||||
#include <DE_ShapeFixConfigurationNode.hxx>
|
||||
|
||||
#include <DE_ConfigurationContext.hxx>
|
||||
#include <DE_PluginHolder.hxx>
|
||||
#include <DE_Wrapper.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(DE_ShapeFixConfigurationNode, DE_ConfigurationNode)
|
||||
|
||||
namespace
|
||||
{
|
||||
static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE()
|
||||
{
|
||||
static const TCollection_AsciiString aScope = "provider";
|
||||
return aScope;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : DE_ShapeFixConfigurationNode
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
DE_ShapeFixConfigurationNode::DE_ShapeFixConfigurationNode()
|
||||
: DE_ConfigurationNode()
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
// function : DE_ShapeFixConfigurationNode
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
DE_ShapeFixConfigurationNode::DE_ShapeFixConfigurationNode(const Handle(DE_ShapeFixConfigurationNode)& theNode)
|
||||
: DE_ConfigurationNode(theNode)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : Load
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
bool DE_ShapeFixConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource)
|
||||
{
|
||||
TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + ".healing";
|
||||
|
||||
HealingParameters.Tolerance3d = theResource->RealVal("tolerance3d", HealingParameters.Tolerance3d, aScope);
|
||||
HealingParameters.MaxTolerance3d = theResource->RealVal("max.tolerance3d", HealingParameters.MaxTolerance3d, aScope);
|
||||
HealingParameters.MinTolerance3d = theResource->RealVal("min.tolerance3d", HealingParameters.MinTolerance3d, aScope);
|
||||
HealingParameters.FixFreeShellMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("free.shell", (int)HealingParameters.FixFreeShellMode, aScope);
|
||||
HealingParameters.FixFreeFaceMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("free.face", (int)HealingParameters.FixFreeFaceMode, aScope);
|
||||
HealingParameters.FixFreeWireMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("free.wire", (int)HealingParameters.FixFreeWireMode, aScope);
|
||||
HealingParameters.FixSameParameterMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("same.parameter", (int)HealingParameters.FixSameParameterMode, aScope);
|
||||
HealingParameters.FixSolidMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("solid", (int)HealingParameters.FixSolidMode, aScope);
|
||||
HealingParameters.FixShellOrientationMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("shell.orientation", (int)HealingParameters.FixShellOrientationMode, aScope);
|
||||
HealingParameters.CreateOpenSolidMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("create.open.solid", (int)HealingParameters.CreateOpenSolidMode, aScope);
|
||||
HealingParameters.FixShellMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("shell", (int)HealingParameters.FixShellMode, aScope);
|
||||
HealingParameters.FixFaceOrientationMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("face.orientation", (int)HealingParameters.FixFaceOrientationMode, aScope);
|
||||
HealingParameters.FixFaceMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("face", (int)HealingParameters.FixFaceMode, aScope);
|
||||
HealingParameters.FixWireMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("wire", (int)HealingParameters.FixWireMode, aScope);
|
||||
HealingParameters.FixOrientationMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("orientation", (int)HealingParameters.FixOrientationMode, aScope);
|
||||
HealingParameters.FixAddNaturalBoundMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("add.natural.bound", (int)HealingParameters.FixAddNaturalBoundMode, aScope);
|
||||
HealingParameters.FixMissingSeamMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("missing.seam", (int)HealingParameters.FixMissingSeamMode, aScope);
|
||||
HealingParameters.FixSmallAreaWireMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("small.area.wire", (int)HealingParameters.FixSmallAreaWireMode, aScope);
|
||||
HealingParameters.RemoveSmallAreaFaceMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("remove.small.area.face", (int)HealingParameters.RemoveSmallAreaFaceMode, aScope);
|
||||
HealingParameters.FixIntersectingWiresMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("intersecting.wires", (int)HealingParameters.FixIntersectingWiresMode, aScope);
|
||||
HealingParameters.FixLoopWiresMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("loop.wires", (int)HealingParameters.FixLoopWiresMode, aScope);
|
||||
HealingParameters.FixSplitFaceMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("split.face", (int)HealingParameters.FixSplitFaceMode, aScope);
|
||||
HealingParameters.AutoCorrectPrecisionMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("auto.correct.precision", (int)HealingParameters.AutoCorrectPrecisionMode, aScope);
|
||||
HealingParameters.ModifyTopologyMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("modify.topology", (int)HealingParameters.ModifyTopologyMode, aScope);
|
||||
HealingParameters.ModifyGeometryMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("modify.geometry", (int)HealingParameters.ModifyGeometryMode, aScope);
|
||||
HealingParameters.ClosedWireMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("closed.wire", (int)HealingParameters.ClosedWireMode, aScope);
|
||||
HealingParameters.PreferencePCurveMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("preference.pcurve", (int)HealingParameters.PreferencePCurveMode, aScope);
|
||||
HealingParameters.FixReorderMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("reorder.edges", (int)HealingParameters.FixReorderMode, aScope);
|
||||
HealingParameters.FixSmallMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("remove.small.edges", (int)HealingParameters.FixSmallMode, aScope);
|
||||
HealingParameters.FixConnectedMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("connected.edges", (int)HealingParameters.FixConnectedMode, aScope);
|
||||
HealingParameters.FixEdgeCurvesMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("edge.curves", (int)HealingParameters.FixEdgeCurvesMode, aScope);
|
||||
HealingParameters.FixDegeneratedMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("add.degenerated.edges", (int)HealingParameters.FixDegeneratedMode, aScope);
|
||||
HealingParameters.FixLackingMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("add.lacking.edges", (int)HealingParameters.FixLackingMode, aScope);
|
||||
HealingParameters.FixSelfIntersectionMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("selfintersection", (int)HealingParameters.FixSelfIntersectionMode, aScope);
|
||||
HealingParameters.RemoveLoopMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("remove.loop", (int)HealingParameters.RemoveLoopMode, aScope);
|
||||
HealingParameters.FixReversed2dMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("reversed2d", (int)HealingParameters.FixReversed2dMode, aScope);
|
||||
HealingParameters.FixRemovePCurveMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("remove.pcurve", (int)HealingParameters.FixRemovePCurveMode, aScope);
|
||||
HealingParameters.FixRemoveCurve3dMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("remove.curve3d", (int)HealingParameters.FixRemoveCurve3dMode, aScope);
|
||||
HealingParameters.FixAddPCurveMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("add.pcurve", (int)HealingParameters.FixAddPCurveMode, aScope);
|
||||
HealingParameters.FixAddCurve3dMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("add.curve3d", (int)HealingParameters.FixAddCurve3dMode, aScope);
|
||||
HealingParameters.FixSeamMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("correct.order.in.seam", (int)HealingParameters.FixSeamMode, aScope);
|
||||
HealingParameters.FixShiftedMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("shifted", (int)HealingParameters.FixShiftedMode, aScope);
|
||||
HealingParameters.FixEdgeSameParameterMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("edge.same.parameter", (int)HealingParameters.FixEdgeSameParameterMode, aScope);
|
||||
HealingParameters.FixNotchedEdgesMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("notched.edges", (int)HealingParameters.FixNotchedEdgesMode, aScope);
|
||||
HealingParameters.FixTailMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("tail", (int)HealingParameters.FixTailMode, aScope);
|
||||
HealingParameters.MaxTailAngle = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("max.tail.angle", (int)HealingParameters.MaxTailAngle, aScope);
|
||||
HealingParameters.MaxTailWidth = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("max.tail.width", (int)HealingParameters.MaxTailWidth, aScope);
|
||||
HealingParameters.FixSelfIntersectingEdgeMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("selfintersecting.edge", (int)HealingParameters.FixSelfIntersectingEdgeMode, aScope);
|
||||
HealingParameters.FixIntersectingEdgesMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("intersecting.edges", (int)HealingParameters.FixIntersectingEdgesMode, aScope);
|
||||
HealingParameters.FixNonAdjacentIntersectingEdgesMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("nonadjacent.intersecting.edges", (int)HealingParameters.FixNonAdjacentIntersectingEdgesMode, aScope);
|
||||
HealingParameters.FixVertexPositionMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("vertex.position", (int)HealingParameters.FixVertexPositionMode, aScope);
|
||||
HealingParameters.FixVertexToleranceMode = (DE_ShapeFixParameters::FixMode)
|
||||
theResource->IntegerVal("vertex.tolerance", (int)HealingParameters.FixVertexToleranceMode, aScope);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : Save
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
TCollection_AsciiString DE_ShapeFixConfigurationNode::Save() const
|
||||
{
|
||||
TCollection_AsciiString aResult;
|
||||
TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + ".healing";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Shape healing parameters:\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the maximum allowable tolerance\n";
|
||||
aResult += "!Default value: 1.e-6. Available values: any real positive (non null) value\n";
|
||||
aResult += aScope + "tolerance3d :\t " + HealingParameters.Tolerance3d + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the maximum allowable tolerance\n";
|
||||
aResult += "!Default value: 1.0. Available values: any real positive (non null) value\n";
|
||||
aResult += aScope + "max.tolerance3d :\t " + HealingParameters.MaxTolerance3d + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the minimum allowable tolerance\n";
|
||||
aResult += "!Default value: 1.e-7. Available values: any real positive (non null) value\n";
|
||||
aResult += aScope + "min.tolerance3d :\t " + HealingParameters.MinTolerance3d + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying fixes of ShapeFix_Shell for ShapeFix_Shape\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "free.shell :\t " + (int)HealingParameters.FixFreeShellMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying fixes of ShapeFix_Face for ShapeFix_Shape\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "free.face :\t " + (int)HealingParameters.FixFreeFaceMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying fixes of ShapeFix_Wire for ShapeFix_Shape\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "free.wire :\t " + (int)HealingParameters.FixFreeWireMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying ShapeFix::SameParameter after all fixes\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "same.parameter :\t " + (int)HealingParameters.FixSameParameterMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying fixes of ShapeFix_Solid\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "solid :\t " + (int)HealingParameters.FixSolidMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying analysis and fixes of orientation of shells in the solid\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "shell.orientation :\t " + (int)HealingParameters.FixShellOrientationMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for creation of solids. If operation is executed then solids are created from open shells ";
|
||||
aResult += "else solids are created from closed shells only\n";
|
||||
aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "create.open.solid :\t " + (int)HealingParameters.CreateOpenSolidMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying fixes of ShapeFix_Shell for ShapeFix_Solid\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "shell :\t " + (int)HealingParameters.FixShellMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying analysis and fixes of orientation of faces in the shell\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "face.orientation :\t " + (int)HealingParameters.FixFaceOrientationMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying fixes of ShapeFix_Face\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "face :\t " + (int)HealingParameters.FixFaceMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying fixes of ShapeFix_Wire\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "wire :\t " + (int)HealingParameters.FixWireMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying a fix for the orientation of faces in the shell\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "orientation :\t " + (int)HealingParameters.FixOrientationMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the add natural bound mode. If operation is executed then natural boundary is added on faces that miss them\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "add.natural.bound :\t " + (int)HealingParameters.FixAddNaturalBoundMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the fix missing seam mode (tries to insert seam is missed)\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "missing.seam :\t " + (int)HealingParameters.FixMissingSeamMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the fix small area wire mode (drops small wires)\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "small.area.wire :\t " + (int)HealingParameters.FixSmallAreaWireMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the remove face with small area (drops faces with small outer wires)\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "remove.small.area.face :\t " + (int)HealingParameters.RemoveSmallAreaFaceMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the fix intersecting wires mode in ShapeFix_Face\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "intersecting.wires :\t " + (int)HealingParameters.FixIntersectingWiresMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the fix loop wires mode in ShapeFix_Face\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "loop.wires :\t " + (int)HealingParameters.FixLoopWiresMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the fix split face mode in ShapeFix_Face\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "split.face :\t " + (int)HealingParameters.FixSplitFaceMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the auto-correct precision mode in ShapeFix_Face\n";
|
||||
aResult += "!Default value: \"Fix\"(1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "auto.correct.precision :\t " + (int)HealingParameters.AutoCorrectPrecisionMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to modify topology of the wire during fixing (adding/removing edges etc.)\n";
|
||||
aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "modify.topology :\t " + (int)HealingParameters.ModifyTopologyMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to modify geometry of the edges and vertices\n";
|
||||
aResult += "!Default value: \"Fix\"(1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "modify.geometry :\t " + (int)HealingParameters.ModifyGeometryMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to defines whether the wire is to be closed (by calling methods like FixDegenerated() ";
|
||||
aResult += "!and FixConnected() for lastand first edges\n";
|
||||
aResult += "!Default value: \"Fix\"(1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "closed.wire :\t " + (int)HealingParameters.ClosedWireMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to defines the 2d representation of the wire is preferable over 3d one ";
|
||||
aResult += "(in the case of ambiguity in FixEdgeCurves)\n";
|
||||
aResult += "!and FixConnected() for lastand first edges\n";
|
||||
aResult += "!Default value: \"Fix\"(1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "preference.pcurve :\t " + (int)HealingParameters.PreferencePCurveMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to reorder edges in the wire\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "reorder.edges :\t " + (int)HealingParameters.FixReorderMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to remove small edges\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "remove.small.edges :\t " + (int)HealingParameters.FixSmallMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for fix connecting edges in the wire\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "connected.edges :\t " + (int)HealingParameters.FixConnectedMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for fix edges (3Dcurves and 2D curves)\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "edge.curves :\t " + (int)HealingParameters.FixEdgeCurvesMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for add degenerated edges\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "add.degenerated.edges :\t " + (int)HealingParameters.FixDegeneratedMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for add lacking edges\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "add.lacking.edges :\t " + (int)HealingParameters.FixLackingMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for fix selfintersection edges\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "selfintersection :\t " + (int)HealingParameters.FixSelfIntersectionMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to remove loop\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "remove.loop :\t " + (int)HealingParameters.RemoveLoopMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to fix edge if pcurve is directed opposite to 3d curve\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "reversed2d :\t " + (int)HealingParameters.FixReversed2dMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to remove the pcurve(s) of the edge if it does not match the vertices\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "remove.pcurve :\t " + (int)HealingParameters.FixRemovePCurveMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to remove 3d curve of the edge if it does not match the vertices\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "remove.curve3d :\t " + (int)HealingParameters.FixRemoveCurve3dMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to add pcurve(s) of the edge if missing (by projecting 3d curve)\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "add.pcurve :\t " + (int)HealingParameters.FixAddPCurveMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to build 3d curve of the edge if missing\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "add.curve3d :\t " + (int)HealingParameters.FixAddCurve3dMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to correct order of pcurves in the seam edge depends on its orientation\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "correct.order.in.seam :\t " + (int)HealingParameters.FixSeamMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode allowed to shifts wrong 2D curves back, ensuring that the 2D curves of the edges in the wire are connected\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "shifted :\t " + (int)HealingParameters.FixShiftedMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying EdgeSameParameter\n";
|
||||
aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "edge.same.parameter :\t " + (int)HealingParameters.FixEdgeSameParameterMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for fix notched edges\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "notched.edges :\t " + (int)HealingParameters.FixNotchedEdgesMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for fix tail in wire\n";
|
||||
aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "tail :\t " + (int)HealingParameters.FixTailMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for max angle of the tails\n";
|
||||
aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "max.tail.angle :\t " + (int)HealingParameters.MaxTailAngle + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for max tail width\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "max.tail.width :\t " + (int)HealingParameters.MaxTailWidth + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for fix selfintersecting of edge\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "selfintersecting.edge :\t " + (int)HealingParameters.FixSelfIntersectingEdgeMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for fix intersecting edges\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "intersecting.edges :\t " + (int)HealingParameters.FixIntersectingEdgesMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for fix non adjacent intersecting edges\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "nonadjacent.intersecting.edges :\t " + (int)HealingParameters.FixNonAdjacentIntersectingEdgesMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for applying ShapeFix::FixVertexPosition before all fixes\n";
|
||||
aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "vertex.position :\t " + (int)HealingParameters.FixVertexPositionMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Defines the mode for increases the tolerances of the edge vertices to comprise ";
|
||||
aResult += "!the ends of 3d curve and pcurve on the given face (first method) or all pcurves stored in an edge (second one)\n";
|
||||
aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n";
|
||||
aResult += aScope + "vertex.tolerance :\t " + (int)HealingParameters.FixVertexToleranceMode + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
return aResult;
|
||||
}
|
@@ -1,51 +0,0 @@
|
||||
// Copyright (c) 2024 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.
|
||||
|
||||
#ifndef _DE_ShapeFixConfigurationNode_HeaderFile
|
||||
#define _DE_ShapeFixConfigurationNode_HeaderFile
|
||||
|
||||
#include <DE_ConfigurationNode.hxx>
|
||||
#include <DE_ShapeFixParameters.hxx>
|
||||
#include <TColStd_ListOfAsciiString.hxx>
|
||||
|
||||
class DE_ConfigurationContext;
|
||||
|
||||
//! Base class to work with shape healing parameters for child classes.
|
||||
class DE_ShapeFixConfigurationNode : public DE_ConfigurationNode
|
||||
{
|
||||
DEFINE_STANDARD_RTTIEXT(DE_ShapeFixConfigurationNode, DE_ConfigurationNode)
|
||||
public:
|
||||
|
||||
//! Initializes all field by default
|
||||
Standard_EXPORT DE_ShapeFixConfigurationNode();
|
||||
|
||||
//! Copies values of all fields
|
||||
//! @param[in] theConfigurationNode object to copy
|
||||
Standard_EXPORT DE_ShapeFixConfigurationNode(const Handle(DE_ShapeFixConfigurationNode)& theConfigurationNode);
|
||||
|
||||
//! Updates values according the resource
|
||||
//! @param[in] theResource input resource to use
|
||||
//! @return True if Load was successful
|
||||
Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE;
|
||||
|
||||
//! Writes configuration to the string
|
||||
//! @return result resource string
|
||||
Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
DE_ShapeFixParameters HealingParameters; //!< Shape healing parameters
|
||||
|
||||
};
|
||||
|
||||
#endif // _DE_ShapeFixConfigurationNode_HeaderFile
|
@@ -1,82 +0,0 @@
|
||||
// Copyright (c) 2024 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.
|
||||
|
||||
#ifndef _DE_ShapeFixParameters_HeaderFile
|
||||
#define _DE_ShapeFixParameters_HeaderFile
|
||||
|
||||
//! Struct for shape healing parameters storage
|
||||
struct DE_ShapeFixParameters
|
||||
{
|
||||
//! Enum, classifying a type of value for parameters
|
||||
enum class FixMode : char
|
||||
{
|
||||
FixOrNot = -1, //!< Procedure will be executed or not (depending on the situation)
|
||||
NotFix = 0, //!< Procedure will be executed
|
||||
Fix = 1 //!< Procedure will be executed anyway
|
||||
};
|
||||
|
||||
double Tolerance3d = 1.e-6;
|
||||
double MaxTolerance3d = 1.0;
|
||||
double MinTolerance3d = 1.e-7;
|
||||
FixMode FixFreeShellMode = FixMode::FixOrNot;
|
||||
FixMode FixFreeFaceMode = FixMode::FixOrNot;
|
||||
FixMode FixFreeWireMode = FixMode::FixOrNot;
|
||||
FixMode FixSameParameterMode = FixMode::FixOrNot;
|
||||
FixMode FixSolidMode = FixMode::FixOrNot;
|
||||
FixMode FixShellOrientationMode = FixMode::FixOrNot;
|
||||
FixMode CreateOpenSolidMode = FixMode::NotFix;
|
||||
FixMode FixShellMode = FixMode::FixOrNot;
|
||||
FixMode FixFaceOrientationMode = FixMode::FixOrNot;
|
||||
FixMode FixFaceMode = FixMode::FixOrNot;
|
||||
FixMode FixWireMode = FixMode::FixOrNot;
|
||||
FixMode FixOrientationMode = FixMode::FixOrNot;
|
||||
FixMode FixAddNaturalBoundMode = FixMode::FixOrNot;
|
||||
FixMode FixMissingSeamMode = FixMode::FixOrNot;
|
||||
FixMode FixSmallAreaWireMode = FixMode::FixOrNot;
|
||||
FixMode RemoveSmallAreaFaceMode = FixMode::FixOrNot;
|
||||
FixMode FixIntersectingWiresMode = FixMode::FixOrNot;
|
||||
FixMode FixLoopWiresMode = FixMode::FixOrNot;
|
||||
FixMode FixSplitFaceMode = FixMode::FixOrNot;
|
||||
FixMode AutoCorrectPrecisionMode = FixMode::FixOrNot;
|
||||
FixMode ModifyTopologyMode = FixMode::NotFix;
|
||||
FixMode ModifyGeometryMode = FixMode::Fix;
|
||||
FixMode ClosedWireMode = FixMode::Fix;
|
||||
FixMode PreferencePCurveMode = FixMode::Fix;
|
||||
FixMode FixReorderMode = FixMode::FixOrNot;
|
||||
FixMode FixSmallMode = FixMode::FixOrNot;
|
||||
FixMode FixConnectedMode = FixMode::FixOrNot;
|
||||
FixMode FixEdgeCurvesMode = FixMode::FixOrNot;
|
||||
FixMode FixDegeneratedMode = FixMode::FixOrNot;
|
||||
FixMode FixLackingMode = FixMode::FixOrNot;
|
||||
FixMode FixSelfIntersectionMode = FixMode::FixOrNot;
|
||||
FixMode RemoveLoopMode = FixMode::FixOrNot;
|
||||
FixMode FixReversed2dMode = FixMode::FixOrNot;
|
||||
FixMode FixRemovePCurveMode = FixMode::FixOrNot;
|
||||
FixMode FixRemoveCurve3dMode = FixMode::FixOrNot;
|
||||
FixMode FixAddPCurveMode = FixMode::FixOrNot;
|
||||
FixMode FixAddCurve3dMode = FixMode::FixOrNot;
|
||||
FixMode FixSeamMode = FixMode::FixOrNot;
|
||||
FixMode FixShiftedMode = FixMode::FixOrNot;
|
||||
FixMode FixEdgeSameParameterMode = FixMode::NotFix;
|
||||
FixMode FixNotchedEdgesMode = FixMode::FixOrNot;
|
||||
FixMode FixTailMode = FixMode::NotFix;
|
||||
FixMode MaxTailAngle = FixMode::NotFix;
|
||||
FixMode MaxTailWidth = FixMode::FixOrNot;
|
||||
FixMode FixSelfIntersectingEdgeMode = FixMode::FixOrNot;
|
||||
FixMode FixIntersectingEdgesMode = FixMode::FixOrNot;
|
||||
FixMode FixNonAdjacentIntersectingEdgesMode = FixMode::FixOrNot;
|
||||
FixMode FixVertexPositionMode = FixMode::NotFix;
|
||||
FixMode FixVertexToleranceMode = FixMode::FixOrNot;
|
||||
};
|
||||
|
||||
#endif // _DE_ShapeFixParameters_HeaderFile
|
@@ -5,8 +5,5 @@ DE_ConfigurationNode.hxx
|
||||
DE_PluginHolder.hxx
|
||||
DE_Provider.cxx
|
||||
DE_Provider.hxx
|
||||
DE_ShapeFixConfigurationNode.cxx
|
||||
DE_ShapeFixConfigurationNode.hxx
|
||||
DE_ShapeFixParameters.hxx
|
||||
DE_Wrapper.cxx
|
||||
DE_Wrapper.hxx
|
||||
|
@@ -60,7 +60,7 @@ public:
|
||||
Standard_EXPORT void Initialize (const Adaptor3d_Surface& S, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup, const Standard_Real TolC, const Standard_Real TolS);
|
||||
|
||||
//! Computes the distances.
|
||||
//! An exception is raised if the fields have not been
|
||||
//! An exception is raised if the fieds have not been
|
||||
//! initialized.
|
||||
Standard_EXPORT void Perform (const Adaptor3d_Curve& C, const Standard_Real Uinf, const Standard_Real Usup);
|
||||
|
||||
|
@@ -72,7 +72,7 @@ public:
|
||||
Standard_EXPORT void Initialize (const Adaptor3d_Surface& S, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV);
|
||||
|
||||
//! Computes the distances.
|
||||
//! An exception is raised if the fields have not been
|
||||
//! An exception is raised if the fieds have not been
|
||||
//! initialized.
|
||||
Standard_EXPORT void Perform (const gp_Pnt& P);
|
||||
|
||||
|
@@ -51,7 +51,7 @@ public:
|
||||
Standard_EXPORT void Initialize (const Adaptor3d_Surface& S2, const Standard_Real Uinf2, const Standard_Real Usup2, const Standard_Real Vinf2, const Standard_Real Vsup2, const Standard_Real TolS1);
|
||||
|
||||
//! Computes the distances.
|
||||
//! An exception is raised if the fields have not been
|
||||
//! An exception is raised if the fieds have not been
|
||||
//! initialized.
|
||||
Standard_EXPORT void Perform (const Adaptor3d_Surface& S1, const Standard_Real Uinf1, const Standard_Real Usup1, const Standard_Real Vinf1, const Standard_Real Vsup1, const Standard_Real TolS1);
|
||||
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
protected:
|
||||
|
||||
|
||||
//! Angles correspond to the Ox axis
|
||||
//! Angles corresspond to the Ox axis
|
||||
//! ConstrOrder1(2) can be equal to 0, 1 or 2
|
||||
Standard_EXPORT FairCurve_Energy(const Handle(TColgp_HArray1OfPnt2d)& Poles, const Standard_Integer ConstrOrder1, const Standard_Integer ConstrOrder2, const Standard_Boolean WithAuxValue = Standard_False, const Standard_Real Angle1 = 0, const Standard_Real Angle2 = 0, const Standard_Integer Degree = 2, const Standard_Real Curvature1 = 0, const Standard_Real Curvature2 = 0);
|
||||
|
||||
@@ -92,13 +92,13 @@ protected:
|
||||
|
||||
Standard_Integer Indice (const Standard_Integer i, const Standard_Integer j) const;
|
||||
|
||||
//! compute the pole which depend of variables and G1 constraint
|
||||
//! compute the pole which depend of variables and G1 constraint
|
||||
Standard_EXPORT void ComputePolesG1 (const Standard_Integer Side, const Standard_Real Lambda, const gp_Pnt2d& P1, gp_Pnt2d& P2) const;
|
||||
|
||||
//! compute the pole which depend of variables and G2 constraint
|
||||
//! compute the pole which depend of variables and G2 constraint
|
||||
Standard_EXPORT void ComputePolesG2 (const Standard_Integer Side, const Standard_Real Lambda, const Standard_Real Rho, const gp_Pnt2d& P1, gp_Pnt2d& P2) const;
|
||||
|
||||
//! compute the energy (and derivatives) in intermediate format
|
||||
//! compute the energy (and derivatives) in intermediat format
|
||||
Standard_EXPORT virtual Standard_Boolean Compute (const Standard_Integer DerivativeOrder, math_Vector& Result) = 0;
|
||||
|
||||
|
||||
|
@@ -45,7 +45,7 @@ public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Angles correspond to the Ox axis
|
||||
//! Angles corresspond to the Ox axis
|
||||
Standard_EXPORT FairCurve_EnergyOfBatten(const Standard_Integer BSplOrder, const Handle(TColStd_HArray1OfReal)& FlatKnots, const Handle(TColgp_HArray1OfPnt2d)& Poles, const Standard_Integer ContrOrder1, const Standard_Integer ContrOrder2, const FairCurve_BattenLaw& Law, const Standard_Real LengthSliding, const Standard_Boolean FreeSliding = Standard_True, const Standard_Real Angle1 = 0, const Standard_Real Angle2 = 0);
|
||||
|
||||
//! return the lengthSliding = P1P2 + Sliding
|
||||
@@ -66,7 +66,7 @@ protected:
|
||||
//! compute the poles which correspond with the variable X
|
||||
Standard_EXPORT virtual void ComputePoles (const math_Vector& X) Standard_OVERRIDE;
|
||||
|
||||
//! compute the energy in intermediate format
|
||||
//! compute the energy in intermediat format
|
||||
Standard_EXPORT virtual Standard_Boolean Compute (const Standard_Integer DerivativeOrder, math_Vector& Result) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
@@ -45,7 +45,7 @@ public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Angles correspond to the Ox axis
|
||||
//! Angles corresspond to the Ox axis
|
||||
Standard_EXPORT FairCurve_EnergyOfMVC(const Standard_Integer BSplOrder, const Handle(TColStd_HArray1OfReal)& FlatKnots, const Handle(TColgp_HArray1OfPnt2d)& Poles, const Standard_Integer ContrOrder1, const Standard_Integer ContrOrder2, const FairCurve_BattenLaw& Law, const Standard_Real PhysicalRatio, const Standard_Real LengthSliding, const Standard_Boolean FreeSliding = Standard_True, const Standard_Real Angle1 = 0, const Standard_Real Angle2 = 0, const Standard_Real Curvature1 = 0, const Standard_Real Curvature2 = 0);
|
||||
|
||||
//! return the lengthSliding = P1P2 + Sliding
|
||||
@@ -63,10 +63,10 @@ public:
|
||||
protected:
|
||||
|
||||
|
||||
//! compute the poles which correspond with the variable X
|
||||
//! compute the poles which correspond with the variable X
|
||||
Standard_EXPORT virtual void ComputePoles (const math_Vector& X) Standard_OVERRIDE;
|
||||
|
||||
//! compute the energy in intermediate format
|
||||
//! compute the energy in intermediat format
|
||||
Standard_EXPORT virtual Standard_Boolean Compute (const Standard_Integer DerivativeOrder, math_Vector& Result) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
@@ -598,7 +598,7 @@ static void Pretreatment(TColGeom2d_Array1OfBSplineCurve& tab)
|
||||
|
||||
//=======================================================================
|
||||
//function : NeedToBeTreated
|
||||
//purpose : Say if the BSpline is rational and if the two first and two
|
||||
//purpose : Say if the BSpline is rationnal and if the two first and two
|
||||
// last weigths are different
|
||||
//=======================================================================
|
||||
|
||||
|
@@ -616,7 +616,7 @@ static void Pretreatment(TColGeom_Array1OfBSplineCurve& tab)
|
||||
|
||||
//=======================================================================
|
||||
//function : NeedToBeTreated
|
||||
//purpose : Say if the BSpline is rational and if the two first and two
|
||||
//purpose : Say if the BSpline is rationnal and if the two first and two
|
||||
// last weigths are different
|
||||
//=======================================================================
|
||||
|
||||
|
@@ -79,7 +79,7 @@ public:
|
||||
//! get the Multplicities of the section
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns if the section is rational or not
|
||||
//! Returns if the section is rationnal or not
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the number of intervals for continuity
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary (in radian)
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -74,7 +74,7 @@ public:
|
||||
//! get the Multplicities of the section
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns if the sections are rational or not
|
||||
//! Returns if the sections are rationnal or not
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns if the sections are periodic or not
|
||||
|
@@ -100,7 +100,7 @@ public:
|
||||
//! get the Multplicities of the section
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns if the sections are rational or not
|
||||
//! Returns if the sections are rationnal or not
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns if the sections are periodic or not
|
||||
|
@@ -69,7 +69,7 @@ public:
|
||||
//! get the Multplicities of the section
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const = 0;
|
||||
|
||||
//! Returns if the sections are rational or not
|
||||
//! Returns if the sections are rationnal or not
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const = 0;
|
||||
|
||||
//! Returns if the sections are periodic or not
|
||||
|
@@ -99,7 +99,7 @@ public:
|
||||
Standard_EXPORT virtual void Resolution (const Standard_Integer Index, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respect
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary (in radian)
|
||||
//! SurfTol error inside the surface.
|
||||
|
@@ -74,7 +74,7 @@ public:
|
||||
//! get the Multplicities of the section
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns if the sections are rational or not
|
||||
//! Returns if the sections are rationnal or not
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns if the sections are periodic or not
|
||||
|
@@ -1985,7 +1985,7 @@ void GeomLib::AxeOfInertia(const TColgp_Array1OfPnt& Points,
|
||||
//function : CanBeTreated
|
||||
//purpose : indicates if the surface can be treated(if the conditions are
|
||||
// filled) and need to be treated(if the surface hasn't been yet
|
||||
// treated or if the surface is rational and non periodic)
|
||||
// treated or if the surface is rationnal and non periodic)
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Boolean CanBeTreated(Handle(Geom_BSplineSurface)& BSurf)
|
||||
|
@@ -42,9 +42,9 @@ public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Tol is a Tolerance to make the difference between
|
||||
//! Tol is a Tolerance to make the difference between
|
||||
//! the result plane and the result line.
|
||||
//! if POption = 1 : automatic parametrisation
|
||||
//! if POption = 1 : automatical parametrisation
|
||||
//! if POption = 2 : parametrisation by eigen vectors
|
||||
//! if NOption = 1 : the average plane is the inertial plane.
|
||||
//! if NOption = 2 : the average plane is the plane of max. flux.
|
||||
|
@@ -1986,7 +1986,7 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
|
||||
// the table of sequences Parcont contains all
|
||||
// parameter of points on curves
|
||||
// Field myPlateCont contains parameter of points on a plate;
|
||||
// it excludes duplicate points and incompatible zones.
|
||||
// it excludes duplicate points and imcompatible zones.
|
||||
// The first part corresponds to verification of compatibility
|
||||
// and to removal of duplicate points.
|
||||
//---------------------------------------------------------
|
||||
|
@@ -14,7 +14,6 @@
|
||||
#ifndef _Graphic3d_CView_HeaderFile
|
||||
#define _Graphic3d_CView_HeaderFile
|
||||
|
||||
#include <Aspect_GridParams.hxx>
|
||||
#include <Aspect_RenderingContext.hxx>
|
||||
#include <Aspect_SkydomeBackground.hxx>
|
||||
#include <Aspect_Window.hxx>
|
||||
@@ -548,12 +547,6 @@ public: //! @name obsolete Graduated Trihedron functionality
|
||||
//! Erases Graduated Trihedron.
|
||||
virtual void GraduatedTrihedronErase() {}
|
||||
|
||||
//! Displays Grid.
|
||||
virtual void GridDisplay (const Aspect_GridParams& theGridParams) { (void)theGridParams; }
|
||||
|
||||
//! Erases Grid.
|
||||
virtual void GridErase() {}
|
||||
|
||||
//! Sets minimum and maximum points of scene bounding box for Graduated Trihedron stored in graphic view object.
|
||||
//! @param theMin [in] the minimum point of scene.
|
||||
//! @param theMax [in] the maximum point of scene.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2013-2021 OPEN CASCADE SAS
|
||||
// Copyright (c) 2013-2021 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
@@ -2183,109 +2183,3 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getColoredQuadProgram()
|
||||
|
||||
return aProgSrc;
|
||||
}
|
||||
|
||||
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getGridProgram() const
|
||||
{
|
||||
Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram();
|
||||
|
||||
Graphic3d_ShaderObject::ShaderVariableList aUniforms, aStageInOuts;
|
||||
aStageInOuts.Append (Graphic3d_ShaderObject::ShaderVariable ("vec3 NearPoint", Graphic3d_TOS_VERTEX | Graphic3d_TOS_FRAGMENT));
|
||||
aStageInOuts.Append (Graphic3d_ShaderObject::ShaderVariable ("vec3 FarPoint", Graphic3d_TOS_VERTEX | Graphic3d_TOS_FRAGMENT));
|
||||
aStageInOuts.Append (Graphic3d_ShaderObject::ShaderVariable ("mat4 MVP", Graphic3d_TOS_VERTEX | Graphic3d_TOS_FRAGMENT));
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("float uZNear", Graphic3d_TOS_FRAGMENT));
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("float uZFar", Graphic3d_TOS_FRAGMENT));
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("float uScale", Graphic3d_TOS_FRAGMENT));
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("float uThickness", Graphic3d_TOS_FRAGMENT));
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("bool uIsDrawAxis", Graphic3d_TOS_FRAGMENT));
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("vec3 uColor", Graphic3d_TOS_FRAGMENT));
|
||||
|
||||
TCollection_AsciiString aSrcVert = TCollection_AsciiString()
|
||||
+ EOL"vec3 gridPlane[6] = vec3[] (vec3( 1.0, 1.0, 0.0), vec3(-1.0, -1.0, 0.0), vec3(-1.0, 1.0, 0.0),"
|
||||
EOL" vec3(-1.0, -1.0, 0.0), vec3( 1.0, 1.0, 0.0), vec3( 1.0, -1.0, 0.0));"
|
||||
|
||||
EOL"vec3 UnprojectPoint (float aX, float anY, float aZ)"
|
||||
EOL"{"
|
||||
EOL" vec4 anUnprojPnt = occModelWorldMatrixInverse * occWorldViewMatrixInverse * occProjectionMatrixInverse * vec4 (aX, anY, aZ, 1.0);"
|
||||
EOL" return anUnprojPnt.xyz / anUnprojPnt.w;"
|
||||
EOL"}"
|
||||
|
||||
EOL"void main()"
|
||||
EOL"{"
|
||||
EOL" vec3 aVertex = gridPlane[gl_VertexID];"
|
||||
EOL" NearPoint = UnprojectPoint (aVertex.x, aVertex.y, 0.0);"
|
||||
EOL" FarPoint = UnprojectPoint (aVertex.x, aVertex.y, 1.0);"
|
||||
EOL" MVP = occProjectionMatrix * occWorldViewMatrix * occModelWorldMatrix;"
|
||||
EOL" gl_Position = vec4 (aVertex, 1.0);"
|
||||
EOL"}";
|
||||
|
||||
TCollection_AsciiString aSrcFrag = TCollection_AsciiString()
|
||||
+ EOL"vec4 grid (vec3 theFragPos3D, vec3 theColor, float theScale, bool theIsDrawAxis, float theThickness)"
|
||||
EOL"{"
|
||||
EOL" vec2 aCoord = theFragPos3D.xy * theScale;"
|
||||
|
||||
EOL" vec2 aDerivative = max (fwidth (aCoord), vec2 (theThickness));"
|
||||
EOL" vec2 aGrid = abs (fract (aCoord - 0.5) - 0.5) / aDerivative;"
|
||||
EOL" float aLine = min (aGrid.x, aGrid.y);"
|
||||
EOL" float aMinY = min (aDerivative.y, 1.0);"
|
||||
EOL" float aMinX = min (aDerivative.x, 1.0);"
|
||||
|
||||
EOL" vec4 aColor = vec4 (theColor, round (1.0 - min (aLine, 1.0)));"
|
||||
EOL" if (uIsDrawAxis && theIsDrawAxis)"
|
||||
EOL" {"
|
||||
EOL" bool isYAxis = abs(aCoord.x) < aMinX;"
|
||||
EOL" bool isXAxis = abs(aCoord.y) < aMinY;"
|
||||
EOL" if (isXAxis && isYAxis) { aColor.xyz = vec3 (0.0, 0.0, 1.0); }"
|
||||
EOL" else if (isXAxis) { aColor.xyz = vec3 (1.0, 0.0, 0.0); }"
|
||||
EOL" else if (isYAxis) { aColor.xyz = vec3 (0.0, 1.0, 0.0); }"
|
||||
EOL" }"
|
||||
EOL" return aColor;"
|
||||
EOL" }"
|
||||
|
||||
EOL"float computeDepth (vec3 thePos)"
|
||||
EOL"{"
|
||||
EOL" vec4 aClipSpacePos = MVP * vec4 (thePos, 1.0);"
|
||||
EOL" return (aClipSpacePos.z / aClipSpacePos.w);"
|
||||
EOL"}"
|
||||
|
||||
EOL"float computeLinearDepth (vec3 thePos)"
|
||||
EOL"{"
|
||||
EOL" float aClipSpaceDepth = computeDepth (thePos) * 2.0 - 1.0;"
|
||||
EOL" float aLinearDepth = (2.0 * uZNear * uZFar) / (uZFar + uZNear - aClipSpaceDepth * (uZFar - uZNear));"
|
||||
EOL" return aLinearDepth / uZFar;"
|
||||
EOL"}"
|
||||
|
||||
EOL"void main()"
|
||||
EOL"{"
|
||||
EOL" float aParam = -NearPoint.z / (FarPoint.z - NearPoint.z);"
|
||||
EOL" vec3 aFragPos3D = NearPoint + aParam * (FarPoint - NearPoint);"
|
||||
EOL" float aLinearDepth = computeLinearDepth (aFragPos3D);"
|
||||
|
||||
EOL" vec4 aBigGridColor = grid (aFragPos3D, uColor, uScale, true, uThickness);"
|
||||
EOL" vec4 aColor = aBigGridColor.a == 0.0"
|
||||
EOL" ? grid (aFragPos3D, 0.25 * uColor, uScale * 10.0, false, uThickness)"
|
||||
EOL" : aBigGridColor;"
|
||||
EOL" float aDepth = computeDepth (aFragPos3D);"
|
||||
EOL" float aFar = gl_DepthRange.far;"
|
||||
EOL" float aNear = gl_DepthRange.near;"
|
||||
EOL" aDepth = ((aFar - aNear) * aDepth + aNear + aFar) * 0.5;"
|
||||
EOL" if (aColor.a == 0.0 || (-1.0 < aLinearDepth && aLinearDepth < 0.0))"
|
||||
EOL" {"
|
||||
EOL" discard;"
|
||||
EOL" };"
|
||||
|
||||
EOL" if (aLinearDepth < 0.0)"
|
||||
EOL" {"
|
||||
EOL" float aFading = max (0.0, 0.5 * log (abs (aLinearDepth)));"
|
||||
EOL" aColor.a *= aFading;"
|
||||
EOL" }"
|
||||
|
||||
EOL" gl_FragDepth = aDepth;"
|
||||
EOL" occFragColor = aColor;"
|
||||
EOL"}";
|
||||
|
||||
defaultGlslVersion (aProgSrc, "grid", 0);
|
||||
aProgSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcVert, Graphic3d_TOS_VERTEX, aUniforms, aStageInOuts));
|
||||
aProgSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts));
|
||||
|
||||
return aProgSrc;
|
||||
}
|
||||
|
@@ -148,9 +148,6 @@ protected:
|
||||
//! Generates shader program to render correctly colored quad.
|
||||
Standard_EXPORT Handle(Graphic3d_ShaderProgram) getColoredQuadProgram() const;
|
||||
|
||||
//! Generates shader program to render grid.
|
||||
Standard_EXPORT Handle(Graphic3d_ShaderProgram) getGridProgram() const;
|
||||
|
||||
//! Prepare GLSL source for IBL generation used in PBR pipeline.
|
||||
Standard_EXPORT Handle(Graphic3d_ShaderProgram) getPBREnvBakingProgram (Standard_Integer theIndex) const;
|
||||
|
||||
|
@@ -1842,7 +1842,7 @@ void EstLimForInfRevl(const gp_Lin& Line,
|
||||
gp_Pln aPlnPrp = aPln.Rotated (gp_Ax1 (O,aXVec), M_PI/2.);
|
||||
|
||||
// project Line and it's X-axe symmetric one to plane and intersect
|
||||
// resulting curve with projection of Basic Curve
|
||||
// resulting curve with projection of Basic Curev
|
||||
Standard_Real aVmin = RealLast(), aVmax = -aVmin;
|
||||
Standard_Boolean aNoInt1 = Standard_False, aNoInt2 = Standard_False;
|
||||
ProjectIntersectAndEstLim (Line, aPln, aBasCurvProj, aVmin, aVmax, aNoInt1);
|
||||
|
@@ -239,7 +239,7 @@ IntWalk_StatusDeflection IntWalk_IWalking::TestDeflection
|
||||
// the norm (square) of 3.*lambda (d1 - d4)/8.
|
||||
// either the norm of :
|
||||
// 3.*(Sqrt(Norme)/3.)*StepSign*(d1-d4)/8.
|
||||
// which produces, taking the square :
|
||||
// which produces, takin the square :
|
||||
// Norme * (d1-d4).SquareMagnitude()/64.
|
||||
|
||||
Standard_Real FlecheCourante =
|
||||
|
@@ -28,7 +28,7 @@ Standard_Boolean OSD::RealToCString(const Standard_Real aReal,
|
||||
if (Sprintf(aString,"%.17e",aReal) <= 0) //BUC60808
|
||||
return Standard_False ;
|
||||
|
||||
// Suppress "e+00" and insignificant 0's
|
||||
// Suppress "e+00" and unsignificant 0's
|
||||
|
||||
p = strchr(aString,'e');
|
||||
if (p) {
|
||||
|
@@ -315,7 +315,7 @@ void OSD_Error::Perror() {
|
||||
}
|
||||
break;
|
||||
case EINTR:
|
||||
buffer += "operation broken by a signal";
|
||||
buffer += "operation breaked by a signal";
|
||||
extCode = ERR_INTR;
|
||||
break;
|
||||
case ENOMEM:
|
||||
|
@@ -1361,27 +1361,6 @@ Standard_Boolean OpenGl_ShaderManager::preparePBREnvBakingProgram (Standard_Inte
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : prepareGridProgram
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Standard_Boolean OpenGl_ShaderManager::prepareGridProgram()
|
||||
{
|
||||
Handle(Graphic3d_ShaderProgram) aProgramSrc = getGridProgram();
|
||||
|
||||
TCollection_AsciiString aKey;
|
||||
if (!Create (aProgramSrc, aKey, myGridProgram))
|
||||
{
|
||||
myGridProgram = new OpenGl_ShaderProgram(); // just mark as invalid
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
myContext->BindProgram (myGridProgram);
|
||||
myContext->BindProgram (Handle(OpenGl_ShaderProgram)());
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetBgCubeMapProgram
|
||||
// purpose :
|
||||
|
@@ -225,16 +225,6 @@ public:
|
||||
return myContext->BindProgram (myPBREnvBakingProgram[theIndex]);
|
||||
}
|
||||
|
||||
//! Bind program for grid visualisation.
|
||||
Standard_Boolean BindGridProgram()
|
||||
{
|
||||
if (myGridProgram.IsNull())
|
||||
{
|
||||
prepareGridProgram();
|
||||
}
|
||||
return bindProgramWithState (myGridProgram, Graphic3d_TypeOfShadingModel_Unlit);
|
||||
}
|
||||
|
||||
//! Generates shader program to render environment cubemap as background.
|
||||
Standard_EXPORT const Handle(Graphic3d_ShaderProgram)& GetBgCubeMapProgram();
|
||||
|
||||
@@ -719,9 +709,6 @@ protected:
|
||||
Standard_Boolean IsPbrAllowed() const { return myShadingModel == Graphic3d_TypeOfShadingModel_Pbr
|
||||
|| myShadingModel == Graphic3d_TypeOfShadingModel_PbrFacet; }
|
||||
|
||||
//! Generate standard GLSL program for grid.
|
||||
Standard_EXPORT Standard_Boolean prepareGridProgram();
|
||||
|
||||
protected:
|
||||
|
||||
//! Packed properties of light source
|
||||
@@ -789,7 +776,6 @@ protected:
|
||||
Handle(Graphic3d_ShaderProgram) myBgCubeMapProgram; //!< program for background cubemap rendering
|
||||
Handle(Graphic3d_ShaderProgram) myBgSkydomeProgram; //!< program for background cubemap rendering
|
||||
Handle(Graphic3d_ShaderProgram) myColoredQuadProgram; //!< program for correct quad rendering
|
||||
Handle(OpenGl_ShaderProgram) myGridProgram; //!< program for grid rendering
|
||||
|
||||
Handle(OpenGl_ShaderProgram) myStereoPrograms[Graphic3d_StereoMode_NB]; //!< standard stereo programs
|
||||
|
||||
|
@@ -108,7 +108,6 @@ OpenGl_View::OpenGl_View (const Handle(Graphic3d_StructureManager)& theMgr,
|
||||
myCaps (theCaps),
|
||||
myWasRedrawnGL (Standard_False),
|
||||
myToShowGradTrihedron (false),
|
||||
myToShowGrid (false),
|
||||
myStateCounter (theCounter),
|
||||
myCurrLightSourceState (theCounter->Increment()),
|
||||
myLightsRevision (0),
|
||||
@@ -503,25 +502,6 @@ void OpenGl_View::GraduatedTrihedronErase()
|
||||
myToShowGradTrihedron = false;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GridDisplay
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void OpenGl_View::GridDisplay (const Aspect_GridParams& theGridParams)
|
||||
{
|
||||
myGridParams = theGridParams;
|
||||
myToShowGrid = true;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GridErase
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void OpenGl_View::GridErase()
|
||||
{
|
||||
myToShowGrid = false;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GraduatedTrihedronMinMaxValues
|
||||
// purpose :
|
||||
@@ -2518,12 +2498,6 @@ void OpenGl_View::render (Graphic3d_Camera::Projection theProjection,
|
||||
aContext->core11fwd->glDisable (GL_LIGHTING);
|
||||
}
|
||||
|
||||
// ====================================
|
||||
// Step 3: Redraw grid
|
||||
// ====================================
|
||||
|
||||
renderGrid();
|
||||
|
||||
// =================================
|
||||
// Step 3: Redraw main plane
|
||||
// =================================
|
||||
@@ -2616,82 +2590,6 @@ void OpenGl_View::render (Graphic3d_Camera::Projection theProjection,
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : renderGrid
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void OpenGl_View::renderGrid()
|
||||
{
|
||||
if (!myToShowGrid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const Handle(OpenGl_Context)& aContext = myWorkspace->GetGlContext();
|
||||
|
||||
if (MinMaxValues (Standard_True).IsVoid())
|
||||
{
|
||||
Bnd_Box aDummy;
|
||||
aDummy.Set (myGridParams.Position());
|
||||
aContext->Camera()->ZFitAll (1.0, aDummy, aDummy);
|
||||
}
|
||||
|
||||
Standard_Real aZNear = aContext->Camera()->ZNear();
|
||||
Standard_Real aZFar = aContext->Camera()->ZFar();
|
||||
|
||||
aContext->Camera()->SetZRange (aZNear, Max (aZNear * 1.001, aZFar));
|
||||
|
||||
aContext->ProjectionState.SetCurrent (aContext->Camera()->ProjectionMatrixF());
|
||||
|
||||
aContext->ApplyProjectionMatrix();
|
||||
|
||||
OpenGl_Mat4 aCurrent = aContext->WorldViewState.Current();
|
||||
aContext->WorldViewState.Push();
|
||||
|
||||
OpenGl_Mat4 aMat;
|
||||
if (!myGridParams.IsHorizontal())
|
||||
{
|
||||
aMat.SetRow (0, Graphic3d_Vec4 (1, 0, 0, 0));
|
||||
aMat.SetRow (1, Graphic3d_Vec4 (0, 0, -1, 0));
|
||||
aMat.SetRow (2, Graphic3d_Vec4 (0, 1, 0, 0));
|
||||
aMat.SetRow (3, Graphic3d_Vec4 (0, 0, 0, 1));
|
||||
}
|
||||
const gp_Pnt& aPosition = myGridParams.Position();
|
||||
aMat.SetColumn (3, Graphic3d_Vec4 ((float)aPosition.X(), (float)aPosition.Y(), (float)aPosition.Z(), 1.0));
|
||||
|
||||
aContext->WorldViewState.SetCurrent (aCurrent * aMat);
|
||||
aContext->ApplyWorldViewMatrix();
|
||||
|
||||
aContext->core11fwd->glEnable (GL_BLEND);
|
||||
aContext->core11fwd->glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
aContext->core11fwd->glEnable (GL_MULTISAMPLE);
|
||||
|
||||
const Standard_Real aCameraScale = aContext->Camera()->Scale();
|
||||
Standard_Real aScale = myGridParams.IsInfinity()
|
||||
? 10.0 / pow (10.0, floor (log10 (Max (aCameraScale, 1.0))) + 1.0)
|
||||
: myGridParams.Scale();
|
||||
|
||||
if (aContext->ShaderManager()->BindGridProgram())
|
||||
{
|
||||
const Handle(OpenGl_ShaderProgram)& aProg = aContext->ActiveProgram();
|
||||
aProg->SetUniform (aContext, "uZNear", GLfloat (aContext->Camera()->ZNear()));
|
||||
aProg->SetUniform (aContext, "uZFar", GLfloat (aContext->Camera()->ZFar()));
|
||||
aProg->SetUniform (aContext, "uScale", GLfloat (aScale));
|
||||
aProg->SetUniform (aContext, "uThickness", GLfloat (myGridParams.LineThickness()));
|
||||
aProg->SetUniform (aContext, "uColor", OpenGl_Vec3 (myGridParams.Color().Rgb()));
|
||||
aProg->SetUniform(aContext, "uIsDrawAxis", GLboolean(myGridParams.IsDrawAxis()));
|
||||
|
||||
aContext->core20fwd->glDrawArrays (GL_TRIANGLES, 0, 6);
|
||||
aContext->BindProgram (NULL);
|
||||
}
|
||||
|
||||
aContext->Camera()->SetZRange (aZNear, aZFar);
|
||||
|
||||
aContext->WorldViewState.Pop();
|
||||
aContext->ApplyWorldViewMatrix();
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : InvalidateBVHData
|
||||
// purpose :
|
||||
|
@@ -306,12 +306,6 @@ public: //! @name obsolete Graduated Trihedron functionality
|
||||
//! Erases Graduated Trihedron.
|
||||
Standard_EXPORT virtual void GraduatedTrihedronErase() Standard_OVERRIDE;
|
||||
|
||||
//! Displays Grid.
|
||||
Standard_EXPORT virtual void GridDisplay (const Aspect_GridParams& theGridParams) Standard_OVERRIDE;
|
||||
|
||||
//! Erases Grid.
|
||||
Standard_EXPORT virtual void GridErase() Standard_OVERRIDE;
|
||||
|
||||
//! Sets minimum and maximum points of scene bounding box for Graduated Trihedron stored in graphic view object.
|
||||
//! @param theMin [in] the minimum point of scene.
|
||||
//! @param theMax [in] the maximum point of scene.
|
||||
@@ -402,9 +396,6 @@ protected: //! @name Rendering of GL graphics (with prepared drawing buffer).
|
||||
OpenGl_FrameBuffer* theOitAccumFbo,
|
||||
const Standard_Boolean theToDrawImmediate);
|
||||
|
||||
//! Renders grid
|
||||
Standard_EXPORT void renderGrid();
|
||||
|
||||
//! Renders trihedron.
|
||||
void renderTrihedron (const Handle(OpenGl_Workspace) &theWorkspace);
|
||||
|
||||
@@ -458,9 +449,7 @@ protected:
|
||||
gp_XYZ myLocalOrigin;
|
||||
Handle(OpenGl_FrameBuffer) myFBO;
|
||||
Standard_Boolean myToShowGradTrihedron;
|
||||
Standard_Boolean myToShowGrid;
|
||||
Graphic3d_GraduatedTrihedron myGTrihedronData;
|
||||
Aspect_GridParams myGridParams;
|
||||
|
||||
Handle(Graphic3d_LightSet) myNoShadingLight;
|
||||
Handle(Graphic3d_LightSet) myLights;
|
||||
|
@@ -105,7 +105,7 @@ public:
|
||||
|
||||
Standard_EXPORT static Standard_Boolean ComputeGeometry (const TopoDS_Vertex& aVertex, gp_Pnt& point, const Handle(Geom_Plane)& aPlane, Standard_Boolean& isOnPlane);
|
||||
|
||||
//! Tries to get Plane from Face. Returns Surface of Face
|
||||
//! Tryes to get Plane from Face. Returns Surface of Face
|
||||
//! in aSurf. Returns Standard_True and Plane of Face in
|
||||
//! aPlane in following cases:
|
||||
//! Face is Plane, Offset of Plane,
|
||||
|
@@ -502,7 +502,7 @@ void PrsDim_AngleDimension::DrawArcWithText (const Handle(Prs3d_Presentation)& t
|
||||
|
||||
if (isLineBreak)
|
||||
{
|
||||
// compute gap for label as parametric size of sector on circle segment
|
||||
// compute gap for label as parameteric size of sector on circle segment
|
||||
Standard_Real aSectorOfText = theTextWidth / aRadius;
|
||||
Standard_Real aTextBegin = aParamMid - aSectorOfText * 0.5;
|
||||
Standard_Real aTextEnd = aParamMid + aSectorOfText * 0.5;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user