Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration request to master #194

Merged
merged 9 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 1 addition & 51 deletions .github/ISSUE_TEMPLATE/Bug Report.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,11 @@
name: "Bug Report"
description: "Report a bug related to the OCCT"
labels: ["2. Bug"]
labels: ["2. Bug", "0. New"]
body:
- type: markdown
attributes:
value: |
**Please provide the following information:**
- type: dropdown
attributes:
label: Category
description: "Select the bug category"
options:
- Application Framework
- Build
- Coding
- Configuration
- Data Exchange
- Documentation
- DRAW
- Foundation Classes
- Mesh
- Modeling
- Samples
- Shape Healing
- Testing
- Visualization
validations:
required: true
- type: dropdown
id: severity
attributes:
label: Severity
description: "Select the bug severity"
options:
- Crash
- Critical
- Major
- Minor
- Trivial
default: 2
validations:
required: true
- type: textarea
id: description
attributes:
Expand Down Expand Up @@ -93,11 +58,6 @@ body:
default: 0
validations:
required: true
- type: input
id: compiler_version
attributes:
label: Compiler Version
description: "Specify the compiler version (optional)"
- type: dropdown
id: bitness
attributes:
Expand Down Expand Up @@ -125,16 +85,6 @@ body:
default: 6
validations:
required: true
- type: input
id: precise_occt_version
attributes:
label: Precise OCCT Version or Branch
description: "Specify the precise OCCT version, branch, or SSH (optional)"
- type: input
id: environment
attributes:
label: Environment
description: "Details about your environment (OS, compiler, etc.)"
- type: textarea
id: additional_files
attributes:
Expand Down
23 changes: 1 addition & 22 deletions .github/ISSUE_TEMPLATE/Feature Request.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
name: "Feature Request"
description: "Request a new feature or enhancement for the OCCT"
labels: ["2. Enhancement"]
labels: ["2. Enhancement", "0. New"]
body:
- type: markdown
attributes:
value: |
**Please provide the following information:**
- type: dropdown
attributes:
label: Category
description: "Select the bug category"
options:
- Application Framework
- Build
- Coding
- Configuration
- Data Exchange
- Documentation
- DRAW
- Foundation Classes
- Mesh
- Modeling
- Samples
- Shape Healing
- Testing
- Visualization
validations:
required: true
- type: textarea
id: description
attributes:
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,10 @@ if (BUILD_Inspector)
endforeach()

# collect all the headers to <binary dir>/inc/inspector folder

# Ensure the include directory exists
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/inspector")

string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT tool header files into ${CMAKE_BINARY_DIR}/inc/inspector ...")
COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOL_TOOLKITS}" "tools" "${INSTALL_DIR_INCLUDE}/inspector")
Expand Down
22 changes: 0 additions & 22 deletions adm/cmake/3rdparty_macro.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -364,25 +364,3 @@ macro (COMPLIANCE_PRODUCT_CONSISTENCY LIBNAME)
endif()
endif()
endmacro()

macro(CONFIGURE_DRACO_DEPS)
if (USE_DRACO)
set (USED_LIB_RELEASE ${3RDPARTY_DRACO_LIBRARY})
if (WIN32)
set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY_DEBUG})
else()
set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY})
endif()
set (USED_LIB_CONF)
if (EXISTS ${USED_LIB_DEBUG})
set (USED_LIB_CONF "$<$<CONFIG:DEBUG>:${USED_LIB_DEBUG}>;${USED_LIB_CONF}")
endif()
if (EXISTS ${USED_LIB_RELEASE})
set (USED_LIB_CONF "$<$<CONFIG:RELEASE>:${USED_LIB_RELEASE}>;${USED_LIB_CONF}")
set (USED_LIB_CONF "$<$<CONFIG:RELWITHDEBINFO>:${USED_LIB_RELEASE}>;${USED_LIB_CONF}")
endif()
if (DEFINED USED_LIB_CONF)
set_property (TARGET ${PROJECT_NAME} APPEND PROPERTY LINK_LIBRARIES "${USED_LIB_CONF}")
endif()
endif()
endmacro()
116 changes: 116 additions & 0 deletions adm/cmake/occt_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -727,3 +727,119 @@ macro (OCCT_CREATE_SYMLINK_TO_FILE LIBRARY_NAME LINK_NAME)
")
endif()
endmacro()

# Function to process CSF libraries and append their file names to a specified list.
# Additionally, handle library directories for different build configurations.
# Arguments:
# CURRENT_CSF - The current CSF libraries to process.
# LIST_NAME - The name of the list to append the processed library file names to.
# TARGET_NAME - The target to which the library directories will be added.
function (PROCESS_CSF_LIBRARIES CURRENT_CSF LIST_NAME TARGET_NAME)
separate_arguments (CURRENT_CSF)

# Local variables to collect found libraries and directories
set(FOUND_LIBS "")
set(FOUND_DEBUG_DIRS "")
set(FOUND_RELEASE_DIRS "")

# Check if the result is already cached
string(REPLACE ";" "_" CACHE_KEY "${CURRENT_CSF}")
get_property(CACHED_LIBS GLOBAL PROPERTY "CACHED_LIBS_${CACHE_KEY}" SET)
get_property(CACHED_DEBUG_DIRS GLOBAL PROPERTY "CACHED_DEBUG_DIRS_${CACHE_KEY}" SET)
get_property(CACHED_RELEASE_DIRS GLOBAL PROPERTY "CACHED_RELEASE_DIRS_${CACHE_KEY}" SET)
if (CACHED_LIBS AND NOT "${CACHED_LIBS}" STREQUAL "1")
list (APPEND FOUND_LIBS ${CACHED_LIBS})
if (CACHED_DEBUG_DIRS)
list (APPEND FOUND_DEBUG_DIRS ${CACHED_DEBUG_DIRS})
endif()
if (CACHED_RELEASE_DIRS)
list (APPEND FOUND_RELEASE_DIRS ${CACHED_RELEASE_DIRS})
endif()
else()
foreach (CSF_LIBRARY ${CURRENT_CSF})
set (LIBRARY_FROM_CACHE 0)
set (CSF_LIBRARY_ORIGINAL ${CSF_LIBRARY})
string (TOLOWER "${CSF_LIBRARY}" CSF_LIBRARY)
string (REPLACE "+" "[+]" CSF_LIBRARY "${CSF_LIBRARY}")
string (REPLACE "." "" CSF_LIBRARY "${CSF_LIBRARY}")
get_cmake_property(ALL_CACHE_VARIABLES CACHE_VARIABLES)
string (REGEX MATCHALL "(^|;)3RDPARTY_[^;]+_LIBRARY[^;]*" ALL_CACHE_VARIABLES "${ALL_CACHE_VARIABLES}")
set (DEBUG_DIR "")
set (RELEASE_DIR "")
set (BOTH_DIR "")
foreach (CACHE_VARIABLE ${ALL_CACHE_VARIABLES})
set (CURRENT_CACHE_LIBRARY ${${CACHE_VARIABLE}})
string (TOLOWER "${CACHE_VARIABLE}" CACHE_VARIABLE)
if (NOT EXISTS "${CURRENT_CACHE_LIBRARY}" OR IS_DIRECTORY "${CURRENT_CACHE_LIBRARY}")
continue()
endif()
string (REGEX MATCH "_${CSF_LIBRARY}$" IS_ENDING "${CACHE_VARIABLE}")
string (REGEX MATCH "^([a-z]+)" CSF_WO_VERSION "${CSF_LIBRARY}")
string (REGEX MATCH "_${CSF_WO_VERSION}$" IS_ENDING_WO_VERSION "${CACHE_VARIABLE}")

if ("3rdparty_${CSF_LIBRARY}_library" STREQUAL "${CACHE_VARIABLE}" OR
"3rdparty_${CSF_WO_VERSION}_library" STREQUAL "${CACHE_VARIABLE}" OR
NOT "x${IS_ENDING}" STREQUAL "x" OR
NOT "x${IS_ENDING_WO_VERSION}" STREQUAL "x")
get_filename_component(LIBRARY_NAME "${CURRENT_CACHE_LIBRARY}" NAME)
list (APPEND FOUND_LIBS "${LIBRARY_NAME}")
get_filename_component(LIBRARY_DIR "${CURRENT_CACHE_LIBRARY}" DIRECTORY)
set (RELEASE_DIR "${LIBRARY_DIR}")
set (LIBRARY_FROM_CACHE 1)
elseif ("3rdparty_${CSF_LIBRARY}_library_debug" STREQUAL "${CACHE_VARIABLE}" OR
"3rdparty_${CSF_LIBRARY}_debug_library" STREQUAL "${CACHE_VARIABLE}")
get_filename_component(LIBRARY_NAME "${CURRENT_CACHE_LIBRARY}" NAME)
list (APPEND FOUND_LIBS "${LIBRARY_NAME}")
get_filename_component(LIBRARY_DIR "${CURRENT_CACHE_LIBRARY}" DIRECTORY)
set (DEBUG_DIR "${LIBRARY_DIR}")
set (LIBRARY_FROM_CACHE 1)
endif()

if (DEBUG_DIR AND RELEASE_DIR)
break()
endif()
endforeach()
if (NOT ${LIBRARY_FROM_CACHE} AND NOT "${CSF_LIBRARY}" STREQUAL "")
list (APPEND FOUND_LIBS "${CSF_LIBRARY_ORIGINAL}")
continue()
endif()
if (DEBUG_DIR AND RELEASE_DIR)
list (APPEND FOUND_DEBUG_DIRS "${DEBUG_DIR}")
list (APPEND FOUND_RELEASE_DIRS "${RELEASE_DIR}")
elseif (DEBUG_DIR)
list (APPEND FOUND_DEBUG_DIRS "${DEBUG_DIR}")
list (APPEND FOUND_RELEASE_DIRS "${DEBUG_DIR}")
message (WARNING "Debug directory found but no release directory found. Using debug directory for both configurations.")
elseif (RELEASE_DIR)
list (APPEND FOUND_DEBUG_DIRS "${RELEASE_DIR}")
list (APPEND FOUND_RELEASE_DIRS "${RELEASE_DIR}")
elseif (BOTH_DIR)
list (APPEND FOUND_DEBUG_DIRS "${BOTH_DIR}")
list (APPEND FOUND_RELEASE_DIRS "${BOTH_DIR}")
endif()
endforeach()

# Cache the result
set_property(GLOBAL PROPERTY "CACHED_LIBS_${CACHE_KEY}" "${FOUND_LIBS}")
set_property(GLOBAL PROPERTY "CACHED_DEBUG_DIRS_${CACHE_KEY}" "${FOUND_DEBUG_DIRS}")
set_property(GLOBAL PROPERTY "CACHED_RELEASE_DIRS_${CACHE_KEY}" "${FOUND_RELEASE_DIRS}")
endif()

# Append found values to the external variable
list(APPEND ${LIST_NAME} ${FOUND_LIBS})
set(${LIST_NAME} "${${LIST_NAME}}" PARENT_SCOPE)

# Handle library directories for different build configurations
list (REMOVE_DUPLICATES FOUND_RELEASE_DIRS)
list (REMOVE_DUPLICATES FOUND_DEBUG_DIRS)

foreach (RELEASE_DIR ${FOUND_RELEASE_DIRS})
get_filename_component(RELEASE_DIR_ABS "${RELEASE_DIR}" ABSOLUTE)
target_link_directories(${TARGET_NAME} PUBLIC "$<$<CONFIG:RELEASE>:${RELEASE_DIR_ABS}>;$<$<CONFIG:RELWITHDEBINFO>:${RELEASE_DIR_ABS}>")
endforeach()

foreach (DEBUG_DIR ${FOUND_DEBUG_DIRS})
get_filename_component(DEBUG_DIR_ABS "${DEBUG_DIR}" ABSOLUTE)
target_link_directories(${TARGET_NAME} PUBLIC "$<$<CONFIG:DEBUG>:${DEBUG_DIR_ABS}>")
endforeach()
endfunction()
31 changes: 1 addition & 30 deletions adm/cmake/occt_toolkit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -243,36 +243,7 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlesLibs}")
add_definitions (-DHAVE_GLES2)
endif()
set (LIBRARY_FROM_CACHE 0)
separate_arguments (CURRENT_CSF)
foreach (CSF_LIBRARY ${CURRENT_CSF})
string (TOLOWER "${CSF_LIBRARY}" CSF_LIBRARY)
string (REPLACE "+" "[+]" CSF_LIBRARY "${CSF_LIBRARY}")
string (REPLACE "." "" CSF_LIBRARY "${CSF_LIBRARY}")
get_cmake_property(ALL_CACHE_VARIABLES CACHE_VARIABLES)
string (REGEX MATCHALL "(^|;)3RDPARTY_[^;]+_LIBRARY[^;]*" ALL_CACHE_VARIABLES "${ALL_CACHE_VARIABLES}")
foreach (CACHE_VARIABLE ${ALL_CACHE_VARIABLES})
set (CURRENT_CACHE_LIBRARY ${${CACHE_VARIABLE}})
string (TOLOWER "${CACHE_VARIABLE}" CACHE_VARIABLE)
if (EXISTS "${CURRENT_CACHE_LIBRARY}" AND NOT IS_DIRECTORY "${CURRENT_CACHE_LIBRARY}")
string (REGEX MATCH "_${CSF_LIBRARY}$" IS_ENDING "${CACHE_VARIABLE}")
string (REGEX MATCH "^([a-z]+)" CSF_WO_VERSION "${CSF_LIBRARY}")
string (REGEX MATCH "_${CSF_WO_VERSION}$" IS_ENDING_WO_VERSION "${CACHE_VARIABLE}")
if ("3rdparty_${CSF_LIBRARY}_library" STREQUAL "${CACHE_VARIABLE}" OR
"3rdparty_${CSF_WO_VERSION}_library" STREQUAL "${CACHE_VARIABLE}" OR
NOT "x${IS_ENDING}" STREQUAL "x" OR
NOT "x${IS_ENDING_WO_VERSION}" STREQUAL "x")
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT "${CURRENT_CACHE_LIBRARY}")
set (LIBRARY_FROM_CACHE 1)
endif()
endif()
endforeach()
endforeach()
if (NOT ${LIBRARY_FROM_CACHE} AND NOT "${CURRENT_CSF}" STREQUAL "")
# prepare a list from a string with whitespaces
separate_arguments (CURRENT_CSF)
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
endif()
PROCESS_CSF_LIBRARIES ("${CURRENT_CSF}" USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT "${PROJECT_NAME}")
endforeach()

if (APPLE)
Expand Down
4 changes: 0 additions & 4 deletions src/DRAWEXE/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit)
unset (EXECUTABLE_PROJECT)
unset (CUSTOM_EXTERNLIB)

if (NOT BUILD_SHARED_LIBS)
CONFIGURE_DRACO_DEPS()
endif()

if (EMSCRIPTEN)
# Look for Tcl version string from file tcl.h
set (TCL_MAJOR_VERSION 8)
Expand Down
3 changes: 0 additions & 3 deletions src/IGESData/IGESData_IGESModel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <Interface_Macros.hxx>
#include <Interface_Static.hxx>
#include <Message_Msg.hxx>
#include <ShapeBuild_ReShape.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
#include <TCollection_HAsciiString.hxx>
Expand All @@ -48,7 +47,6 @@ void IGESData_VerifyDate
IGESData_IGESModel::IGESData_IGESModel ()
{
thestart = new TColStd_HSequenceOfHAsciiString();
myReShape = new ShapeBuild_ReShape();
// thecheckstx = new Interface_Check;
// thechecksem = new Interface_Check;
}
Expand All @@ -64,7 +62,6 @@ void IGESData_IGESModel::ClearHeader ()
IGESData_GlobalSection newheader; // Un peu brutal, certes
theheader = newheader;
thestart = new TColStd_HSequenceOfHAsciiString();
myReShape = new ShapeBuild_ReShape();
}


Expand Down
8 changes: 0 additions & 8 deletions src/IGESData/IGESData_IGESModel.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

class IGESData_IGESEntity;
class Interface_Check;
class ShapeBuild_ReShape;
class Standard_Transient;
class TCollection_HAsciiString;

Expand Down Expand Up @@ -151,12 +150,6 @@ public:
//! i.e. a string "Dnn" with nn = directory entry number (2*N-1)
Standard_EXPORT Handle(TCollection_HAsciiString) StringLabel (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE;

//! Gets ReShape used to store a model's shapes changes
const Handle(ShapeBuild_ReShape)& ReShape() const { return myReShape; }

//! Sets ReShape used to store a history of changes of the model's shapes
void SetReShape(const Handle(ShapeBuild_ReShape)& theReShape) { myReShape = theReShape; }

DEFINE_STANDARD_RTTIEXT(IGESData_IGESModel,Interface_InterfaceModel)

protected:
Expand All @@ -169,7 +162,6 @@ private:

Handle(TColStd_HSequenceOfHAsciiString) thestart;
IGESData_GlobalSection theheader;
Handle(ShapeBuild_ReShape) myReShape;

};

Expand Down
4 changes: 2 additions & 2 deletions src/IGESToBRep/IGESToBRep_Actor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ Handle(Transfer_Binder) IGESToBRep_Actor::Transfer
shape = XSAlgo::AlgoContainer()->ProcessShape(shape, theeps, CAS.GetMaxTol(),
"read.iges.resource.name",
"read.iges.sequence",
info, mymodel->ReShape(),
aPS.Next(), false, TopAbs_EDGE);
info, aPS.Next(),
false, TopAbs_EDGE);
XSAlgo::AlgoContainer()->MergeTransferInfo(TP, info, nbTPitems);
}

Expand Down
2 changes: 1 addition & 1 deletion src/IVtkDraw/IVtkDraw_Interactor.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <tk.h>
#include <tcl.h>
#endif

// prevent disabling some MSVC warning messages by VTK headers
Expand Down
Loading
Loading