[brlcad-commits] SF.net SVN: brlcad:[69720] brlcad/branches/brep-debug
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <n_...@us...> - 2017-04-26 19:31:41
|
Revision: 69720 http://sourceforge.net/p/brlcad/code/69720 Author: n_reed Date: 2017-04-26 19:31:36 +0000 (Wed, 26 Apr 2017) Log Message: ----------- sync r69629 through r69673 changes from trunk Modified Paths: -------------- brlcad/branches/brep-debug/AUTHORS brlcad/branches/brep-debug/src/CMakeLists.txt brlcad/branches/brep-debug/src/external/CREO/CMakeLists.txt brlcad/branches/brep-debug/src/external/CREO/README.txt brlcad/branches/brep-debug/src/external/CREO/assembly.cpp brlcad/branches/brep-debug/src/external/CREO/creo-brl.h brlcad/branches/brep-debug/src/external/CREO/csg.cpp brlcad/branches/brep-debug/src/external/CREO/main.cpp brlcad/branches/brep-debug/src/external/CREO/part.cpp brlcad/branches/brep-debug/src/external/CREO/resources/creo_brl.res brlcad/branches/brep-debug/src/external/CREO/util.cpp brlcad/branches/brep-debug/src/libbu/namegen.c brlcad/branches/brep-debug/src/librt/CMakeLists.txt brlcad/branches/brep-debug/src/librt/primitives/ehy/ehy.c brlcad/branches/brep-debug/src/librt/primitives/table.c brlcad/branches/brep-debug/src/librt/primitives/tgc/tgc.c brlcad/branches/brep-debug/src/tclscripts/checker/check.tcl Added Paths: ----------- brlcad/branches/brep-debug/src/external/CMakeLists.txt brlcad/branches/brep-debug/src/external/CREO/shim.h Property Changed: ---------------- brlcad/branches/brep-debug/ brlcad/branches/brep-debug/NEWS brlcad/branches/brep-debug/src/libged/polyclip.cpp Index: brlcad/branches/brep-debug =================================================================== --- brlcad/branches/brep-debug 2017-04-26 19:26:13 UTC (rev 69719) +++ brlcad/branches/brep-debug 2017-04-26 19:31:36 UTC (rev 69720) Property changes on: brlcad/branches/brep-debug ___________________________________________________________________ Modified: svn:mergeinfo ## -5,4 +5,4 ## /brlcad/branches/opencl:65867-66137 /brlcad/branches/osg:62110-62113 /brlcad/branches/prep-cache:68236-68933 -/brlcad/trunk:61364-69459,69462-69581,69584-69628 \ No newline at end of property +/brlcad/trunk:61364-69459,69462-69581,69584-69673 \ No newline at end of property Modified: brlcad/branches/brep-debug/AUTHORS =================================================================== --- brlcad/branches/brep-debug/AUTHORS 2017-04-26 19:26:13 UTC (rev 69719) +++ brlcad/branches/brep-debug/AUTHORS 2017-04-26 19:31:36 UTC (rev 69720) @@ -852,11 +852,21 @@ 2016 March Open Source (GSoC) +Bagavathy, Rakshika +nicknames tandoorichick +2016 October +Open Source (GSoC) + Gao, Tianyue 2016 December Open Source (GCI) +Rathore, Shubham +nicknames gabbar1947 +2017 April +Open Source + SPECIAL THANKS -------------- Index: brlcad/branches/brep-debug/NEWS =================================================================== --- brlcad/branches/brep-debug/NEWS 2017-04-26 19:26:13 UTC (rev 69719) +++ brlcad/branches/brep-debug/NEWS 2017-04-26 19:31:36 UTC (rev 69720) Property changes on: brlcad/branches/brep-debug/NEWS ___________________________________________________________________ Modified: svn:mergeinfo ## -5,4 +5,4 ## /brlcad/branches/opencl/NEWS:65867-66137 /brlcad/branches/osg/NEWS:62110-62113 /brlcad/branches/prep-cache/NEWS:68236-68933 -/brlcad/trunk/NEWS:61364-69459,69462-69581,69584-69628 \ No newline at end of property +/brlcad/trunk/NEWS:61364-69459,69462-69581,69584-69673 \ No newline at end of property Modified: brlcad/branches/brep-debug/src/CMakeLists.txt =================================================================== --- brlcad/branches/brep-debug/src/CMakeLists.txt 2017-04-26 19:26:13 UTC (rev 69719) +++ brlcad/branches/brep-debug/src/CMakeLists.txt 2017-04-26 19:31:36 UTC (rev 69720) @@ -93,6 +93,7 @@ sig tab util + external ${non_win32_dirs} # tclscripts must come before applications like # mged and archer that need the scripts in place to @@ -164,7 +165,7 @@ # target_link_libraries(libbrlcad ${OPENNURBS_LIBRARIES} ${TCL_LIBRARY}) #endif(${HIGHEST_TARGET_LEVEL} GREATER 1) -CMAKEFILES(README external) +CMAKEFILES(README) # Add a convenience directory that is only added to the # build if it exists. This directory is ignored by svn, Copied: brlcad/branches/brep-debug/src/external/CMakeLists.txt (from rev 69673, brlcad/trunk/src/external/CMakeLists.txt) =================================================================== --- brlcad/branches/brep-debug/src/external/CMakeLists.txt (rev 0) +++ brlcad/branches/brep-debug/src/external/CMakeLists.txt 2017-04-26 19:31:36 UTC (rev 69720) @@ -0,0 +1,17 @@ +# This setting tells the subdirectory CMake logic to +# build using the integrated logic, rather than the +# stand-along build logic used for the primary product +# builds. +set(BRLCAD_BUILDTEST_EXTERNALS 1) + +add_subdirectory(CREO) + +CMAKEFILES(README CREO Cubit ProEngineer Unigraphics) + +# Local Variables: +# tab-width: 8 +# mode: cmake +# indent-tabs-mode: t +# End: +# ex: shiftwidth=2 tabstop=8 + Modified: brlcad/branches/brep-debug/src/external/CREO/CMakeLists.txt =================================================================== --- brlcad/branches/brep-debug/src/external/CREO/CMakeLists.txt 2017-04-26 19:26:13 UTC (rev 69719) +++ brlcad/branches/brep-debug/src/external/CREO/CMakeLists.txt 2017-04-26 19:31:36 UTC (rev 69720) @@ -1,237 +1,239 @@ -# Minimum required version of CMake -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -if(COMMAND CMAKE_POLICY) - CMAKE_POLICY(SET CMP0003 NEW) - if ("${CMAKE_VERSION}" VERSION_GREATER 2.99) - CMAKE_POLICY(SET CMP0026 OLD) - endif ("${CMAKE_VERSION}" VERSION_GREATER 2.99) -endif(COMMAND CMAKE_POLICY) -# Set CMake project name -project(CREO2G) +if(NOT DEFINED BRLCAD_BUILDTEST_EXTERNALS) + # Minimum required version of CMake + cmake_minimum_required(VERSION 2.8) + if(COMMAND CMAKE_POLICY) + CMAKE_POLICY(SET CMP0003 NEW) + if ("${CMAKE_VERSION}" VERSION_GREATER 2.99) + CMAKE_POLICY(SET CMP0026 OLD) + endif ("${CMAKE_VERSION}" VERSION_GREATER 2.99) + endif(COMMAND CMAKE_POLICY) -# Tweak compiler flags - we *must* use /MT for this to work -set(flaglists - CMAKE_C_FLAGS - CMAKE_CXX_FLAGS - ) -foreach(bflag ${flaglists}) - set(${bflag} "" CACHE STRING "" FORCE) - foreach(BTYPE ${CMAKE_CONFIGURATION_TYPES}) - string(TOUPPER "${BTYPE}" BTYPE_UPPER) - string(REPLACE "/MD" "/MT" ${bflag}_${BTYPE_UPPER} "${${bflag}_${BTYPE_UPPER}}") - string(REPLACE "/MTd" "/MT" ${bflag}_${BTYPE_UPPER} "${${bflag}_${BTYPE_UPPER}}") - # _DEBUG pulls in the wrong runtime for linking with CREO libs - string(REPLACE "/D_DEBUG" "" ${bflag}_${BTYPE_UPPER} "${${bflag}_${BTYPE_UPPER}}") - string(REPLACE "/D _DEBUG" "" ${bflag}_${BTYPE_UPPER} "${${bflag}_${BTYPE_UPPER}}") - set(${bflag}_${BTYPE_UPPER} "${${bflag}_${BTYPE_UPPER}}" CACHE STRING "" FORCE) - endforeach(BTYPE ${CMAKE_CONFIGURATION_TYPES}) -endforeach(bflag ${flaglists}) -mark_as_advanced(CMAKE_CONFIGURATION_TYPES) + # Set CMake project name + project(CREO2G) -# Install dir is a function of the CREO dir. -mark_as_advanced(CMAKE_INSTALL_PREFIX) + # Tweak compiler flags - we *must* use /MT for this to work + set(flaglists + CMAKE_C_FLAGS + CMAKE_CXX_FLAGS + ) + foreach(bflag ${flaglists}) + set(${bflag} "" CACHE STRING "" FORCE) + foreach(BTYPE ${CMAKE_CONFIGURATION_TYPES}) + string(TOUPPER "${BTYPE}" BTYPE_UPPER) + string(REPLACE "/MD" "/MT" ${bflag}_${BTYPE_UPPER} "${${bflag}_${BTYPE_UPPER}}") + string(REPLACE "/MTd" "/MT" ${bflag}_${BTYPE_UPPER} "${${bflag}_${BTYPE_UPPER}}") + # _DEBUG pulls in the wrong runtime for linking with CREO libs + string(REPLACE "/D_DEBUG" "" ${bflag}_${BTYPE_UPPER} "${${bflag}_${BTYPE_UPPER}}") + string(REPLACE "/D _DEBUG" "" ${bflag}_${BTYPE_UPPER} "${${bflag}_${BTYPE_UPPER}}") + set(${bflag}_${BTYPE_UPPER} "${${bflag}_${BTYPE_UPPER}}" CACHE STRING "" FORCE) + endforeach(BTYPE ${CMAKE_CONFIGURATION_TYPES}) + endforeach(bflag ${flaglists}) + mark_as_advanced(CMAKE_CONFIGURATION_TYPES) -# CREO Definitions (see example nmake file in your CREO install to -# double check these and modify if needed) -set(CREO_DEFS "-DPRO_MACHINE=36 -DPRO_OS=4 -DPRO_USE_VAR_ARGS -D_USING_V100_SDK71_") + # Install dir is a function of the CREO dir. + mark_as_advanced(CMAKE_INSTALL_PREFIX) -# BRL-CAD definitions -set(BRLCAD_DEFS "-DHAVE_CONFIG_H -DBRLCAD_DLL -DBRLCADBUILD -DBU_DLL_IMPORTS -DBN_DLL_IMPORTS -DRT_DLL_IMPORTS -DTIE_DLL_IMPORTS -DDB5_DLL_IMPORTS -DVDS_DLL_IMPORTS -DGDIAM_DLL_IMPORTS -DTINYCTHREAD_DLL_IMPORTS -DLZ4_DLL_IMPORT=1") + # CREO Definitions (see example nmake file in your CREO install to + # double check these and modify if needed) + set(CREO_DEFS "-DPRO_MACHINE=36 -DPRO_OS=4 -DPRO_USE_VAR_ARGS -D_USING_V100_SDK71_") -# These settings are global to all the configs. -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CREO_DEFS} ${BRLCAD_DEFS}" CACHE STRING "" FORCE) -set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "" FORCE) -set(CMAKE_SHARED_LINKER_FLAGS "/subsystem:console /machine:amd64" CACHE STRING "" FORCE) -set(CMAKE_EXE_LINKER_FLAGS "/subsystem:console /machine:amd64" CACHE STRING "" FORCE) + # BRL-CAD definitions + set(BRLCAD_DEFS "-DHAVE_CONFIG_H -DBRLCAD_DLL -DBRLCADBUILD -DBU_DLL_IMPORTS -DBN_DLL_IMPORTS -DRT_DLL_IMPORTS -DTIE_DLL_IMPORTS -DDB5_DLL_IMPORTS -DVDS_DLL_IMPORTS -DGDIAM_DLL_IMPORTS -DTINYCTHREAD_DLL_IMPORTS -DLZ4_DLL_IMPORT=1") -# User must locate CREO and BRL-CAD -if(NOT DEFINED BRLCAD_ROOT_DIR) - set(BRLCAD_ROOT_DIR "C:/Program Files/BRLCAD X.XX.X" CACHE PATH "BRL-CAD root directory") -endif(NOT DEFINED BRLCAD_ROOT_DIR) -if(NOT DEFINED CREO_ROOT_DIR) - set(CREO_ROOT_DIR "C:/Program Files/PTC/Creo XXX" CACHE PATH "CREO root directory") -endif(NOT DEFINED CREO_ROOT_DIR) + # These settings are global to all the configs. + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CREO_DEFS} ${BRLCAD_DEFS}" CACHE STRING "" FORCE) + set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "" FORCE) + set(CMAKE_SHARED_LINKER_FLAGS "/subsystem:console /machine:amd64" CACHE STRING "" FORCE) + set(CMAKE_EXE_LINKER_FLAGS "/subsystem:console /machine:amd64" CACHE STRING "" FORCE) -# If paths haven't been set, hault configure immediately so the user -# can set them. We need this information for subsequent steps. -set(have_paths 1) -if(NOT EXISTS "${BRLCAD_ROOT_DIR}") - set(have_paths 0) - message(WARNING "${BRLCAD_ROOT_DIR} doesn't exist - set BRLCAD_ROOT_DIR to the location of your BRL-CAD installation.") -endif(NOT EXISTS "${BRLCAD_ROOT_DIR}") -if(NOT EXISTS "${CREO_ROOT_DIR}") - set(have_paths 0) - message(WARNING "${CREO_ROOT_DIR} doesn't exist - set CREO_ROOT_DIR to the location of your CREO installation.") -endif(NOT EXISTS "${CREO_ROOT_DIR}") -if(NOT have_paths) - message(FATAL_ERROR "Correct path settings to continue with configure") -endif(NOT have_paths) + # User must locate CREO and BRL-CAD + if(NOT DEFINED BRLCAD_ROOT_DIR) + set(BRLCAD_ROOT_DIR "C:/Program Files/BRLCAD X.XX.X" CACHE PATH "BRL-CAD root directory") + endif(NOT DEFINED BRLCAD_ROOT_DIR) + if(NOT DEFINED CREO_ROOT_DIR) + set(CREO_ROOT_DIR "C:/Program Files/PTC/Creo XXX" CACHE PATH "CREO root directory") + endif(NOT DEFINED CREO_ROOT_DIR) -# Install dir is a function of the CREO dir. -set(CMAKE_INSTALL_PREFIX "${CREO_ROOT_DIR}" CACHE PATH "Installation path" FORCE) + # If paths haven't been set, hault configure immediately so the user + # can set them. We need this information for subsequent steps. + set(have_paths 1) + if(NOT EXISTS "${BRLCAD_ROOT_DIR}") + set(have_paths 0) + message(WARNING "${BRLCAD_ROOT_DIR} doesn't exist - set BRLCAD_ROOT_DIR to the location of your BRL-CAD installation.") + endif(NOT EXISTS "${BRLCAD_ROOT_DIR}") + if(NOT EXISTS "${CREO_ROOT_DIR}") + set(have_paths 0) + message(WARNING "${CREO_ROOT_DIR} doesn't exist - set CREO_ROOT_DIR to the location of your CREO installation.") + endif(NOT EXISTS "${CREO_ROOT_DIR}") + if(NOT have_paths) + message(FATAL_ERROR "Correct path settings to continue with configure") + endif(NOT have_paths) -# CREO supports a specific toolset. Based on the version, check -# if we are using the supported toolset and warn if we aren't. -string(REGEX REPLACE "[A-Za-z:/ ]*([0-9.]+).*" "\\1" CREO_VERSION "${CREO_ROOT_DIR}") -if("${CREO_VERSION}" VERSION_GREATER "2.9999" AND "${CREO_VERSION}" VERSION_LESS "4.0") - if(NOT "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "v110_xp") - message(WARNING "CREO version is ${CREO_VERSION}, but supplied generator toolset is not set to v110_xp. To use v110_xp, specify it as the -T option in the inital CMake GUI dialog thrown up by \"Configure\" below the dropdown menu where the Visual Studio version is chosen") - endif(NOT "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "v110_xp") -endif("${CREO_VERSION}" VERSION_GREATER "2.9999" AND "${CREO_VERSION}" VERSION_LESS "4.0") + # Install dir is a function of the CREO dir. + set(CMAKE_INSTALL_PREFIX "${CREO_ROOT_DIR}" CACHE PATH "Installation path" FORCE) -# There will be a sub-directory that is specific to the installed -# version of CREO - find it -file(GLOB MDIR RELATIVE "${CREO_ROOT_DIR}" "${CREO_ROOT_DIR}/M*" ) -if(NOT MDIR) - message(FATAL_ERROR "No directory matching the pattern M* found in ${CREO_ROOT_DIR}. This may indicate the CREO installation directory conventions have changed - if so, the CMakeLists.txt file will need to be updated to reflect the new path structures.") -endif(NOT MDIR) + # CREO supports a specific toolset. Based on the version, check + # if we are using the supported toolset and warn if we aren't. + string(REGEX REPLACE "[A-Za-z:/ ]*([0-9.]+).*" "\\1" CREO_VERSION "${CREO_ROOT_DIR}") + if("${CREO_VERSION}" VERSION_GREATER "2.9999" AND "${CREO_VERSION}" VERSION_LESS "4.0") + if(NOT "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "v110_xp") + message(WARNING "CREO version is ${CREO_VERSION}, but supplied generator toolset is not set to v110_xp. To use v110_xp, specify it as the -T option in the inital CMake GUI dialog thrown up by \"Configure\" below the dropdown menu where the Visual Studio version is chosen") + endif(NOT "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "v110_xp") + endif("${CREO_VERSION}" VERSION_GREATER "2.9999" AND "${CREO_VERSION}" VERSION_LESS "4.0") -# Define a variable for the current CREO platform -set(CREO_OS_VERSION x86e_win64) + # There will be a sub-directory that is specific to the installed + # version of CREO - find it + file(GLOB MDIR RELATIVE "${CREO_ROOT_DIR}" "${CREO_ROOT_DIR}/M*" ) + if(NOT MDIR) + message(FATAL_ERROR "No directory matching the pattern M* found in ${CREO_ROOT_DIR}. This may indicate the CREO installation directory conventions have changed - if so, the CMakeLists.txt file will need to be updated to reflect the new path structures.") + endif(NOT MDIR) -# Unlocker script -set(CREO_PTK_UNLOCKER "${CREO_ROOT_DIR}/${MDIR}/Parametric/bin/protk_unlock.bat") + # Define a variable for the current CREO platform + set(CREO_OS_VERSION x86e_win64) -# CREO libraries -set(CREO_PTK_EXE_LIBS "${CREO_ROOT_DIR}/${MDIR}/Common Files/protoolkit/${CREO_OS_VERSION}/obj/protoolkit.lib") -set(CREO_PTK_DLL_LIBS "${CREO_ROOT_DIR}/${MDIR}/Common Files/protoolkit/${CREO_OS_VERSION}/obj/protk_dll.lib") + # Unlocker script + set(CREO_PTK_UNLOCKER "${CREO_ROOT_DIR}/${MDIR}/Parametric/bin/protk_unlock.bat") -# CREO include directories -set(CREO_PTK_INCDIR "${CREO_ROOT_DIR}/${MDIR}/Common Files/protoolkit/includes") -set(CREO_PTK_APPLS_INCDIR "${CREO_ROOT_DIR}/${MDIR}/Common Files/protoolkit/protk_appls/includes") + # CREO libraries + set(CREO_PTK_EXE_LIBS "${CREO_ROOT_DIR}/${MDIR}/Common Files/protoolkit/${CREO_OS_VERSION}/obj/protoolkit.lib") + set(CREO_PTK_DLL_LIBS "${CREO_ROOT_DIR}/${MDIR}/Common Files/protoolkit/${CREO_OS_VERSION}/obj/protk_dll.lib") + # CREO include directories + set(CREO_PTK_INCDIR "${CREO_ROOT_DIR}/${MDIR}/Common Files/protoolkit/includes") + set(CREO_PTK_APPLS_INCDIR "${CREO_ROOT_DIR}/${MDIR}/Common Files/protoolkit/protk_appls/includes") -# Check that the expected directories and files in the CREO installation -# are present. If not, these paths need to be updated for the current CREO -# layout. -set(have_creo_paths 1) -set(CREO_REQUIRED_PATHS_ABS - CREO_PTK_UNLOCKER - CREO_PTK_EXE_LIBS - CREO_PTK_DLL_LIBS - CREO_PTK_INCDIR - CREO_PTK_APPLS_INCDIR - ) -foreach(reqpath ${CREO_REQUIRED_PATHS_ABS}) - if(NOT EXISTS "${${reqpath}}") - set(have_creo_paths 0) - message(WARNING "Required CREO path variable ${reqpath} has non-existant path ${${reqpath}} - update ${reqpath} to reflect the correct path for this installation of CREO.") - endif(NOT EXISTS "${${reqpath}}") -endforeach(reqpath ${CREO_REQUIRED_PATHS_ABS}) -# CREO resource paths -set(CREO_RESOURCE_DIR "Common Files/text/resource") -set(CREO_MSG_DIR "Common Files/text/usascii") -set(CREO_OBJ_DIR "Common Files/${CREO_OS_VERSION}/obj") -set(CREO_DAT_DIR "Common Files/protoolkit") + # Check that the expected directories and files in the CREO installation + # are present. If not, these paths need to be updated for the current CREO + # layout. + set(have_creo_paths 1) + set(CREO_REQUIRED_PATHS_ABS + CREO_PTK_UNLOCKER + CREO_PTK_EXE_LIBS + CREO_PTK_DLL_LIBS + CREO_PTK_INCDIR + CREO_PTK_APPLS_INCDIR + ) + foreach(reqpath ${CREO_REQUIRED_PATHS_ABS}) + if(NOT EXISTS "${${reqpath}}") + set(have_creo_paths 0) + message(WARNING "Required CREO path variable ${reqpath} has non-existant path ${${reqpath}} - update ${reqpath} to reflect the correct path for this installation of CREO.") + endif(NOT EXISTS "${${reqpath}}") + endforeach(reqpath ${CREO_REQUIRED_PATHS_ABS}) -set(CREO_REQUIRED_PATHS_REL - CREO_RESOURCE_DIR - CREO_MSG_DIR - CREO_OBJ_DIR - CREO_DAT_DIR -) -foreach(reqpath ${CREO_REQUIRED_PATHS_REL}) - if(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${${reqpath}}") - set(have_creo_paths 0) - message(WARNING "Required CREO path variable ${reqpath} contains ${${reqpath}}, which is not found at ${CREO_ROOT_DIR}/${MDIR}/${${reqpath}} - update ${reqpath} to reflect the correct path for this installation of CREO.") - endif(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${${reqpath}}") -endforeach(reqpath ${CREO_REQUIRED_PATHS_REL}) + # CREO resource paths + set(CREO_RESOURCE_DIR "Common Files/text/resource") + set(CREO_MSG_DIR "Common Files/text/usascii") + set(CREO_OBJ_DIR "Common Files/${CREO_OS_VERSION}/obj") + set(CREO_DAT_DIR "Common Files/protoolkit") -if(NOT have_creo_paths) - message(FATAL_ERROR "Update the above variables to reflect correct CREO paths to continue with configure. If paths containing \"protoolkit\" are consistently not found, you may need to re-run your CREO installer and add the development frameworks - they are not installed as part of a \"standard\" CREO installation.") -endif(NOT have_creo_paths) + set(CREO_REQUIRED_PATHS_REL + CREO_RESOURCE_DIR + CREO_MSG_DIR + CREO_OBJ_DIR + CREO_DAT_DIR + ) + foreach(reqpath ${CREO_REQUIRED_PATHS_REL}) + if(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${${reqpath}}") + set(have_creo_paths 0) + message(WARNING "Required CREO path variable ${reqpath} contains ${${reqpath}}, which is not found at ${CREO_ROOT_DIR}/${MDIR}/${${reqpath}} - update ${reqpath} to reflect the correct path for this installation of CREO.") + endif(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${${reqpath}}") + endforeach(reqpath ${CREO_REQUIRED_PATHS_REL}) -# When doing development, to avoid the need to unlock dlls and exes every -# time for testing, you need to configure your parametric.psf file - see -# https://www.ptcusercommunity.com/message/399253#399253 -# -# This is necessary only for iterative development: for compilation the -# program can just be built and unlocked (the latter step being necessary -# prior to distribution in any case.) Since it is not always needed, -# we will check and print a warning to alert developers but will not -# hault the configure process. -if(EXISTS "${CREO_ROOT_DIR}/${MDIR}/Parametric/bin/parametric.psf") - file(STRINGS "${CREO_ROOT_DIR}/${MDIR}/Parametric/bin/parametric.psf" psf_strs) - foreach(pstr ${psf_strs}) - if("${pstr}" MATCHES ".*CREOPMA_FEATURE_NAME.*") - set(CFN_STR "${pstr}") - string(REGEX REPLACE ".*CREOPMA_FEATURE_NAME.*[(]" "" CFN_STR "${CFN_STR}") - string(REGEX REPLACE "[)].*" "" CFN_STR "${CFN_STR}") - string(STRIP "${CFN_STR}" CFN_STR) - if("${CFN_STR}" STREQUAL "") - message(WARNING "The CREOPMA_FEATURE_NAME variable in ${CREO_ROOT_DIR}/${MDIR}/Parametric/bin/parametric.psf has no arguments. This means it is not set up to load a Pro/Toolkit license when started, and the plugin built by this project must be unlocked before it can be tested. See https://www.ptcusercommunity.com/message/399253#399253 for more info. This is a concern only for developers wanting to do iterative development without repeating the unlock step every time. If you are only looking to compile and use the plugin, this warning may be safely ignored as long as the UNLOCK step is performed.") - endif("${CFN_STR}" STREQUAL "") - endif("${pstr}" MATCHES ".*CREOPMA_FEATURE_NAME.*") - endforeach(pstr ${psf_strs}) -endif(EXISTS "${CREO_ROOT_DIR}/${MDIR}/Parametric/bin/parametric.psf") + if(NOT have_creo_paths) + message(FATAL_ERROR "Update the above variables to reflect correct CREO paths to continue with configure. If paths containing \"protoolkit\" are consistently not found, you may need to re-run your CREO installer and add the development frameworks - they are not installed as part of a \"standard\" CREO installation.") + endif(NOT have_creo_paths) + # When doing development, to avoid the need to unlock dlls and exes every + # time for testing, you need to configure your parametric.psf file - see + # https://www.ptcusercommunity.com/message/399253#399253 + # + # This is necessary only for iterative development: for compilation the + # program can just be built and unlocked (the latter step being necessary + # prior to distribution in any case.) Since it is not always needed, + # we will check and print a warning to alert developers but will not + # hault the configure process. + if(EXISTS "${CREO_ROOT_DIR}/${MDIR}/Parametric/bin/parametric.psf") + file(STRINGS "${CREO_ROOT_DIR}/${MDIR}/Parametric/bin/parametric.psf" psf_strs) + foreach(pstr ${psf_strs}) + if("${pstr}" MATCHES ".*CREOPMA_FEATURE_NAME.*") + set(CFN_STR "${pstr}") + string(REGEX REPLACE ".*CREOPMA_FEATURE_NAME.*[(]" "" CFN_STR "${CFN_STR}") + string(REGEX REPLACE "[)].*" "" CFN_STR "${CFN_STR}") + string(STRIP "${CFN_STR}" CFN_STR) + if("${CFN_STR}" STREQUAL "") + message(WARNING "The CREOPMA_FEATURE_NAME variable in ${CREO_ROOT_DIR}/${MDIR}/Parametric/bin/parametric.psf has no arguments. This means it is not set up to load a Pro/Toolkit license when started, and the plugin built by this project must be unlocked before it can be tested. See https://www.ptcusercommunity.com/message/399253#399253 for more info. This is a concern only for developers wanting to do iterative development without repeating the unlock step every time. If you are only looking to compile and use the plugin, this warning may be safely ignored as long as the UNLOCK step is performed.") + endif("${CFN_STR}" STREQUAL "") + endif("${pstr}" MATCHES ".*CREOPMA_FEATURE_NAME.*") + endforeach(pstr ${psf_strs}) + endif(EXISTS "${CREO_ROOT_DIR}/${MDIR}/Parametric/bin/parametric.psf") -# Win32 libraries -set(WIN_LIBS - #libcmt.lib - kernel32.lib - user32.lib - wsock32.lib - advapi32.lib - mpr.lib - winspool.lib - netapi32.lib - psapi.lib - gdi32.lib - shell32.lib - comdlg32.lib - ole32.lib - ws2_32.lib - ) -# We will need copies of the BRL-CAD dlls along with the creo-brl.dll to make -# a stand-alone package, and we want the dlls in the same directories as our -# build target dirs for the .exe version to find. We'll link against the -#.lib files so build that list at the same time. -set(BRLCAD_LIBS - libbg - libbn - libbrep - libbu - libgdiam - liblz4 - libnmg - libp2t - librt - libtinycthread - libvds - libwdb - openNURBS - regex - y2038 - zlib1 - ) -set(BRLCAD_STATIC_LIBS) -set(brlcadlibs_notinstalled) -foreach(blib ${BRLCAD_LIBS}) - foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) - string(TOUPPER "${CFG_TYPE}" CFG_TYPE_UPPER) - configure_file(${BRLCAD_ROOT_DIR}/bin/${blib}.dll ${CMAKE_CURRENT_BINARY_DIR}/${CFG_TYPE}/${blib}.dll COPYONLY) - endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) - configure_file(${BRLCAD_ROOT_DIR}/bin/${blib}.dll ${CMAKE_CURRENT_BINARY_DIR}/${blib}.dll COPYONLY) - # Sigh - zlib doesn't follow the general pattern - if("${blib}" STREQUAL "zlib1") - set(BRLCAD_STATIC_LIBS ${BRLCAD_STATIC_LIBS} "${BRLCAD_ROOT_DIR}/lib/zlib.lib") - else("${blib}" STREQUAL "zlib1") - set(BRLCAD_STATIC_LIBS ${BRLCAD_STATIC_LIBS} "${BRLCAD_ROOT_DIR}/lib/${blib}.lib") - endif("${blib}" STREQUAL "zlib1") - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${blib}.dll DESTINATION "${MDIR}/${CREO_OBJ_DIR}") - if(NOT EXISTS ${CREO_ROOT_DIR}/${MDIR}/${CREO_OBJ_DIR}/${blib}.dll) - set(brlcadlibs_notinstalled "${brlcadlibs_notinstalled}\n ${blib}.dll") - endif(NOT EXISTS ${CREO_ROOT_DIR}/${MDIR}/${CREO_OBJ_DIR}/${blib}.dll) -endforeach(blib ${BRLCAD_LIBS}) -if(brlcadlibs_notinstalled) - message("Note: The following BRL-CAD dll(s) is/are not present in ${CREO_ROOT_DIR}/${MDIR}/${CREO_OBJ_DIR}:\n${brlcadlibs_notinstalled}\n\nBe aware that attempting to load the DLL version of the plugin without these files in place will\ncause the loading process to silently fail: *NO* messages indicating why the loading failed will\nbe generated. Be sure to run the INSTALL command after building but before testing.\n") -endif(brlcadlibs_notinstalled) + # Win32 libraries + set(WIN_LIBS + #libcmt.lib + kernel32.lib + user32.lib + wsock32.lib + advapi32.lib + mpr.lib + winspool.lib + netapi32.lib + psapi.lib + gdi32.lib + shell32.lib + comdlg32.lib + ole32.lib + ws2_32.lib + ) + # We will need copies of the BRL-CAD dlls along with the creo-brl.dll to make + # a stand-alone package, and we want the dlls in the same directories as our + # build target dirs for the .exe version to find. We'll link against the + #.lib files so build that list at the same time. + set(BRLCAD_LIBS + libbg + libbn + libbrep + libbu + libgdiam + liblz4 + libnmg + libp2t + librt + libtinycthread + libvds + libwdb + openNURBS + regex + y2038 + zlib1 + ) + set(BRLCAD_STATIC_LIBS) + set(brlcadlibs_notinstalled) + foreach(blib ${BRLCAD_LIBS}) + foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) + string(TOUPPER "${CFG_TYPE}" CFG_TYPE_UPPER) + configure_file(${BRLCAD_ROOT_DIR}/bin/${blib}.dll ${CMAKE_CURRENT_BINARY_DIR}/${CFG_TYPE}/${blib}.dll COPYONLY) + endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) + configure_file(${BRLCAD_ROOT_DIR}/bin/${blib}.dll ${CMAKE_CURRENT_BINARY_DIR}/${blib}.dll COPYONLY) + # Sigh - zlib doesn't follow the general pattern + if("${blib}" STREQUAL "zlib1") + set(BRLCAD_STATIC_LIBS ${BRLCAD_STATIC_LIBS} "${BRLCAD_ROOT_DIR}/lib/zlib.lib") + else("${blib}" STREQUAL "zlib1") + set(BRLCAD_STATIC_LIBS ${BRLCAD_STATIC_LIBS} "${BRLCAD_ROOT_DIR}/lib/${blib}.lib") + endif("${blib}" STREQUAL "zlib1") + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${blib}.dll DESTINATION "${MDIR}/${CREO_OBJ_DIR}") + if(NOT EXISTS ${CREO_ROOT_DIR}/${MDIR}/${CREO_OBJ_DIR}/${blib}.dll) + set(brlcadlibs_notinstalled "${brlcadlibs_notinstalled}\n ${blib}.dll") + endif(NOT EXISTS ${CREO_ROOT_DIR}/${MDIR}/${CREO_OBJ_DIR}/${blib}.dll) + endforeach(blib ${BRLCAD_LIBS}) + if(brlcadlibs_notinstalled) + message("Note: The following BRL-CAD dll(s) is/are not present in ${CREO_ROOT_DIR}/${MDIR}/${CREO_OBJ_DIR}:\n${brlcadlibs_notinstalled}\n\nBe aware that attempting to load the DLL version of the plugin without these files in place will\ncause the loading process to silently fail: *NO* messages indicating why the loading failed will\nbe generated. Be sure to run the INSTALL command after building but before testing.\n") + endif(brlcadlibs_notinstalled) + # Set the relevant include directories include_directories( "${BRLCAD_ROOT_DIR}/include/brlcad" @@ -241,6 +243,8 @@ "${CREO_PTK_APPLS_INCDIR}" ) +endif(NOT DEFINED BRLCAD_BUILDTEST_EXTERNALS) + set(creo_brl_srcs assembly.cpp csg.cpp @@ -249,75 +253,91 @@ util.cpp ) -# Primary (DLL) version of plugin -# Note that for successful running of the DLL version of this plugin, -# the BRL-CAD dlls need to be present in Common Files/${CREO_OS_VERSION}/obj. Also, -# the resource files need to be present in Common Files/text/resource and -# creo-brl-msg.txt present in Common Files/text/usascii before this will be -# usable. The simplest thing to do is build a package and install it in the -# CREO root directory. *** Any attempt run this plugin without the correct -# DLLs in place will result in silent failure of the loading step. *** -add_library(creo-brl SHARED ${creo_brl_srcs}) -target_link_libraries(creo-brl ${WIN_LIBS} ${CREO_PTK_DLL_LIBS} ${BRLCAD_STATIC_LIBS}) -install(TARGETS creo-brl - RUNTIME DESTINATION "${MDIR}/${CREO_OBJ_DIR}" - ) -set(DAT_STARTUP "dll") -set(DAT_EXEC_FILE "${CREO_ROOT_DIR}/${MDIR}/${CREO_OBJ_DIR}/creo-brl.dll") -set(DAT_TEXT_DIR "${CREO_ROOT_DIR}/${MDIR}/${CREO_MSG_DIR}") -configure_file(creo-brl.dat.in ${CMAKE_CURRENT_BINARY_DIR}/creo-brl.dat @ONLY) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/creo-brl.dat DESTINATION "${MDIR}/${CREO_DAT_DIR}") - -# Debugging executable version of plugin -add_executable(creo-g ${creo_brl_srcs}) -target_link_libraries(creo-g ${WIN_LIBS} ${CREO_PTK_EXE_LIBS} ${BRLCAD_STATIC_LIBS}) -foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) - string(TOUPPER "${CFG_TYPE}" CFG_TYPE_UPPER) - set(DAT_STARTUP "spawn") - set(DAT_EXEC_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CFG_TYPE}/creo-g.exe") +if(NOT DEFINED BRLCAD_BUILDTEST_EXTERNALS) + # Primary (DLL) version of plugin + # Note that for successful running of the DLL version of this plugin, + # the BRL-CAD dlls need to be present in Common Files/${CREO_OS_VERSION}/obj. Also, + # the resource files need to be present in Common Files/text/resource and + # creo-brl-msg.txt present in Common Files/text/usascii before this will be + # usable. The simplest thing to do is build a package and install it in the + # CREO root directory. *** Any attempt run this plugin without the correct + # DLLs in place will result in silent failure of the loading step. *** + add_library(creo-brl SHARED ${creo_brl_srcs}) + target_link_libraries(creo-brl ${WIN_LIBS} ${CREO_PTK_DLL_LIBS} ${BRLCAD_STATIC_LIBS}) + install(TARGETS creo-brl + RUNTIME DESTINATION "${MDIR}/${CREO_OBJ_DIR}" + ) + set(DAT_STARTUP "dll") + set(DAT_EXEC_FILE "${CREO_ROOT_DIR}/${MDIR}/${CREO_OBJ_DIR}/creo-brl.dll") set(DAT_TEXT_DIR "${CREO_ROOT_DIR}/${MDIR}/${CREO_MSG_DIR}") - configure_file(creo-brl.dat.in ${CMAKE_CURRENT_BINARY_DIR}/${CFG_TYPE}/creo-brl-debug.dat @ONLY) -endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) + configure_file(creo-brl.dat.in ${CMAKE_CURRENT_BINARY_DIR}/creo-brl.dat @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/creo-brl.dat DESTINATION "${MDIR}/${CREO_DAT_DIR}") -# Install the resource files -file(GLOB RESOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/*.res) -set(rfiles_installed 1) -foreach(rfile ${RESOURCE_FILES}) - install(FILES ${rfile} DESTINATION "${MDIR}/${CREO_RESOURCE_DIR}") - get_filename_component(rfilename "${rfile}" NAME) - if(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${CREO_RESOURCE_DIR}/${rfilename}") - set(rfiles_installed 0) - endif(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${CREO_RESOURCE_DIR}/${rfilename}") -endforeach(rfile ${RESOURCE_FILES}) + # Debugging executable version of plugin + add_executable(creo-g ${creo_brl_srcs}) + target_link_libraries(creo-g ${WIN_LIBS} ${CREO_PTK_EXE_LIBS} ${BRLCAD_STATIC_LIBS}) + foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) + string(TOUPPER "${CFG_TYPE}" CFG_TYPE_UPPER) + set(DAT_STARTUP "spawn") + set(DAT_EXEC_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CFG_TYPE}/creo-g.exe") + set(DAT_TEXT_DIR "${CREO_ROOT_DIR}/${MDIR}/${CREO_MSG_DIR}") + configure_file(creo-brl.dat.in ${CMAKE_CURRENT_BINARY_DIR}/${CFG_TYPE}/creo-brl-debug.dat @ONLY) + endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) -# Install the messages file -install(FILES resources/creo-brl-msg.txt DESTINATION "${MDIR}/${CREO_MSG_DIR}") + # Install the resource files + file(GLOB RESOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/*.res) + set(rfiles_installed 1) + foreach(rfile ${RESOURCE_FILES}) + install(FILES ${rfile} DESTINATION "${MDIR}/${CREO_RESOURCE_DIR}") + get_filename_component(rfilename "${rfile}" NAME) + if(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${CREO_RESOURCE_DIR}/${rfilename}") + set(rfiles_installed 0) + endif(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${CREO_RESOURCE_DIR}/${rfilename}") + endforeach(rfile ${RESOURCE_FILES}) -if(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${CREO_MSG_DIR}/creo-brl-msg.txt" OR NOT rfiles_installed) - message("\nNote that even with the exe version of the plugin, the resource files\nmust be present in the correct locations within the CREO tree in order\nto successfully run the plugin. Be sure to run the INSTALL target\nbefore starting a testing session.\n") -endif(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${CREO_MSG_DIR}/creo-brl-msg.txt" OR NOT rfiles_installed) + # Install the messages file + install(FILES resources/creo-brl-msg.txt DESTINATION "${MDIR}/${CREO_MSG_DIR}") -add_custom_target(UNLOCK - COMMAND "${CREO_PTK_UNLOCKER}" ${CMAKE_CURRENT_BINARY_DIR}/$(Configuration)/creo-brl.dll - DEPENDS CREO-G - COMMENT "Unlocking CREO-G dll..." - ) + if(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${CREO_MSG_DIR}/creo-brl-msg.txt" OR NOT rfiles_installed) + message("\nNote that even with the exe version of the plugin, the resource files\nmust be present in the correct locations within the CREO tree in order\nto successfully run the plugin. Be sure to run the INSTALL target\nbefore starting a testing session.\n") + endif(NOT EXISTS "${CREO_ROOT_DIR}/${MDIR}/${CREO_MSG_DIR}/creo-brl-msg.txt" OR NOT rfiles_installed) -# Since we need to run "INSTALL" as part of normal development, it is -# worthwhile to provide an "UNINSTALL" target to automate the cleanup. -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) -add_custom_target(UNINSTALL - COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - COMMENT "Removing installed CREO-BRL components..." - ) + add_custom_target(UNLOCK + COMMAND "${CREO_PTK_UNLOCKER}" ${CMAKE_CURRENT_BINARY_DIR}/$(Configuration)/creo-brl.dll + DEPENDS CREO-G + COMMENT "Unlocking CREO-G dll..." + ) -set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0) -set(CPACK_GENERATOR NSIS ZIP) -include(CPack) + # Since we need to run "INSTALL" as part of normal development, it is + # worthwhile to provide an "UNINSTALL" target to automate the cleanup. + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) + add_custom_target(UNINSTALL + COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + COMMENT "Removing installed CREO-BRL components..." + ) + set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0) + set(CPACK_GENERATOR NSIS ZIP) + include(CPack) + +else(NOT DEFINED BRLCAD_BUILDTEST_EXTERNALS) + + include_directories( + ${CMAKE_CURRENT_BINARY_DIR}/../../../include + ${CMAKE_CURRENT_SOURCE_DIR}/../../../include + ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/other/openNURBS + "${ZLIB_INCLUDE_DIR}" + ) + + add_definitions(-DTEST_BUILD) + add_library(creo-g ${creo_brl_srcs}) + target_link_libraries(creo-g librt libbrep libbg libnmg libbn libbu) + +endif(NOT DEFINED BRLCAD_BUILDTEST_EXTERNALS) + # Local Variables: # tab-width: 8 # mode: cmake Modified: brlcad/branches/brep-debug/src/external/CREO/README.txt =================================================================== --- brlcad/branches/brep-debug/src/external/CREO/README.txt 2017-04-26 19:26:13 UTC (rev 69719) +++ brlcad/branches/brep-debug/src/external/CREO/README.txt 2017-04-26 19:31:36 UTC (rev 69720) @@ -3,10 +3,6 @@ the development toolkits installed and proper licenses available, as well as a BRL-CAD install built with the same compiler as that used to build CREO. -The CMake superstructure manages files and creates the installer, but it is -the nmake file (creo-brl-nmake.in) the contains the core of the compilation -logic. - Misc Notes: When installing CREO 3, the development libraries are *not* part of the Modified: brlcad/branches/brep-debug/src/external/CREO/assembly.cpp =================================================================== --- brlcad/branches/brep-debug/src/external/CREO/assembly.cpp 2017-04-26 19:26:13 UTC (rev 69719) +++ brlcad/branches/brep-debug/src/external/CREO/assembly.cpp 2017-04-26 19:31:36 UTC (rev 69720) @@ -33,8 +33,8 @@ }; /* Callback function used only for find_empty_assemblies */ -extern "C" static ProError -assembly_check_empty( ProFeature *feat, ProError status, ProAppData app_data ) +extern "C" ProError +assembly_check_empty( ProFeature *feat, ProError UNUSED(status), ProAppData app_data ) { ProError lstatus; ProMdlType type; @@ -47,9 +47,9 @@ return PRO_TK_NO_ERROR; } -/* Run this only *after* output_parts - that is where empty "part" objects will - * be identified. Without knowing which parts are empty, we can't know if a - * combination of parts is empty. */ +/* Run this only *after* output_parts - that is where empty "assembly" objects will + * be identified. Without knowing which parts are empty, we can't know if an + * assembly of parts is empty. */ extern "C" void find_empty_assemblies(struct creo_conv_info *cinfo) { @@ -90,10 +90,10 @@ for ( i=0; i<4; i++ ) { for ( j=0; j<4; j++ ) { if ( i == j ) { - if ( xform[i][j] != 1.0 ) + if ( !NEAR_EQUAL(xform[i][j], 1.0, SMALL_FASTF) ) return 1; } else { - if ( xform[i][j] != 0.0 ) + if ( !NEAR_EQUAL(xform[i][j], 0.0, SMALL_FASTF) ) return 1; } } @@ -106,12 +106,13 @@ * this call is creating a path from the assembly to this particular member * (assembly/member) */ -extern "C" static ProError +extern "C" ProError assembly_entry_matrix(struct creo_conv_info *cinfo, ProMdl parent, ProFeature *feat, mat_t *mat) { if(!feat || !mat) return PRO_TK_GENERAL_ERROR; /* Get strings in case we need to log */ + ProError status; ProMdlType type; wchar_t wpname[CREO_NAME_MAX]; char pname[CREO_NAME_MAX]; @@ -141,8 +142,6 @@ } /*** Write the matrix to BRL-CAD form ***/ - /* TODO - digest this to avoid the string bit. Doing this for expedience to - * use the original CREO plugin logic. */ if (is_non_identity(xform)) { struct bu_vls mstr = BU_VLS_INIT_ZERO; for (int j=0; j<4; j++) { @@ -162,8 +161,8 @@ return PRO_TK_GENERAL_ERROR; } -extern "C" static ProError -assembly_write_entry(ProFeature *feat, ProError status, ProAppData app_data) +extern "C" ProError +assembly_write_entry(ProFeature *feat, ProError UNUSED(status), ProAppData app_data) { ProError lstatus; ProMdlType type; @@ -177,10 +176,10 @@ if ((lstatus = ProAsmcompMdlNameGet(feat, &type, wname)) != PRO_TK_NO_ERROR ) return lstatus; /* Skip this member if the object it refers to is empty */ - if (creo->empty->find(wname) != creo->empty->end()) return PRO_TK_NO_ERROR; + if (ainfo->cinfo->empty->find(wname) != ainfo->cinfo->empty->end()) return PRO_TK_NO_ERROR; /* get BRL-CAD name */ - entry_name = get_brlcad_name(ainfo->cinfo, wname, type, NULL) + entry_name = get_brlcad_name(ainfo->cinfo, wname, type, NULL, 0); /* Get matrix relative to current parent (if any) and create the comb entry */ if ((lstatus = assembly_entry_matrix(ainfo->cinfo, ainfo->curr_parent, feat, &xform)) == PRO_TK_NO_ERROR ) { @@ -194,11 +193,12 @@ } /* Only run this *after* find_empty_assemblies has been run */ -extern "C" static ProError +extern "C" ProError output_assembly(struct creo_conv_info *cinfo, ProMdl model) { ProBoolean is_exploded = false; struct bu_vls *comb_name; + struct bu_vls *obj_name; wchar_t wname[CREO_NAME_MAX]; struct assem_conv_info *ainfo; BU_GET(ainfo, struct assem_conv_info); @@ -227,21 +227,40 @@ ProSolidFeatVisit( ProMdlToPart(model), assembly_write_entry, (ProFeatureFilterAction)component_filter, (ProAppData)ainfo); /* Get BRL-CAD name */ - comb_name = get_brlcad_name(cinfo, wname, type, NULL); + comb_name = get_brlcad_name(cinfo, wname, PRO_MDL_ASSEMBLY, NULL, 0); /* Data sufficient - write the comb */ mk_lcomb(cinfo->wdbp, bu_vls_addr(comb_name), &wcomb, 0, NULL, NULL, NULL, 0); /* Set attributes, if the CREO object has any of the ones the user listed as of interest */ - struct directory *dp = db_lookup(cinfo->wdbp->dbip, bu_vls_addr(&comb_name), LOOKUP_QUIET); + struct directory *dp = db_lookup(cinfo->wdbp->dbip, bu_vls_addr(comb_name), LOOKUP_QUIET); struct bu_attribute_value_set avs; db5_get_attributes(cinfo->wdbp->dbip, &avs, dp); + + /* Write the object ID as an attribute, if it isn't already being used as the object name */ + obj_name = get_brlcad_name(cinfo, wname, PRO_MDL_ASSEMBLY, NULL, NG_OBJID); + if (!BU_STR_EQUAL(bu_vls_addr(obj_name), bu_vls_addr(comb_name))) { + bu_avs_add(&avs, "CREO_NAME", bu_vls_addr(obj_name)); + } + + ProWVerstamp cstamp; + if (ProMdlVerstampGet(model, &cstamp) == PRO_TK_NO_ERROR) { + char *vstr; + if (ProVerstampStringGet(cstamp, &vstr) == PRO_TK_NO_ERROR) { + bu_avs_add(&avs, "CREO_VERSION_STAMP", vstr); + } + ProVerstampStringFree(&vstr); + } + + + /* If we have a user supplied list of attributes to save, do it */ if (cinfo->attrs->size() > 0) { - for (int i = 0; int i < cinfo->attrs->size(); i++) { + for (unsigned int i = 0; i < cinfo->attrs->size(); i++) { char *attr_val = NULL; - creo_attribute_val(&attr_val, cinfo->attrs[i], model); + const char *arg = cinfo->attrs->at(i); + creo_attribute_val(&attr_val, arg, model); if (attr_val) { - bu_avs_add(&avs, cinfo->attrs[i], attr_val); + bu_avs_add(&avs, arg, attr_val); bu_free(attr_val, "value string"); } } @@ -255,8 +274,8 @@ bu_avs_add(&avs, "density", bu_vls_addr(&mpval)); } if (mass_prop.mass > 0.0) { - bu_vls_sprintf(&mpval, "%g", mass_prop.mass) - bu_avs_add(&avs, "mass", bu_vls_addr(&mpval)); + bu_vls_sprintf(&mpval, "%g", mass_prop.mass); + bu_avs_add(&avs, "mass", bu_vls_addr(&mpval)); } if (mass_prop.volume > 0.0) { Modified: brlcad/branches/brep-debug/src/external/CREO/creo-brl.h =================================================================== --- brlcad/branches/brep-debug/src/external/CREO/creo-brl.h 2017-04-26 19:26:13 UTC (rev 69719) +++ brlcad/branches/brep-debug/src/external/CREO/creo-brl.h 2017-04-26 19:31:36 UTC (rev 69720) @@ -37,6 +37,9 @@ #ifndef _WSTUDIO_DEFINED # define _WSTUDIO_DEFINED #endif + +#ifndef TEST_BUILD + extern "C" { #include <ProToolkit.h> #include <ProArray.h> @@ -69,7 +72,15 @@ #include <ProWindows.h> #include <PtApplsUnicodeUtils.h> #include <pd_proto.h> +} +#else +extern "C" { +#include "shim.h" +} +#endif + +extern "C" { #include "vmath.h" #include "bu.h" #include "bn.h" @@ -96,12 +107,17 @@ #define FEAT_TYPE_OFFSET 910 #define CREO_NAME_MAX 100000 -#define CREO_MSG_MAX 100000 +#define CREO_MSG_MAX 1000000 #define MSG_FAIL 0 #define MSG_OK 1 #define MSG_DEBUG 2 +/* Name generation flags */ +#define NG_DEFAULT 0x0 /* Default */ +#define NG_OBJID 0x1 /* Return CREO id as a bu_vls, rather than the BRL-CAD name */ +#define NG_NPARAM 0x2 /* Generate the BRL-CAD name using the CREO name */ + struct StrCmp { bool operator()(struct bu_vls *str1, struct bu_vls *str2) const { return (bu_strcmp(bu_vls_addr(str1), bu_vls_addr(str2)) < 0); @@ -136,6 +152,9 @@ }; struct creo_conv_info { + /* Output file */ + struct bu_vls *output_file; + /* Region ID */ long int reg_id; /* region ident number (incremented with each part) */ @@ -175,14 +194,34 @@ struct rt_wdb *wdbp; std::set<wchar_t *, WStrCmp> *parts; /* list of all parts in CREO hierarchy */ std::set<wchar_t *, WStrCmp> *assems; /* list of all assemblies in CREO hierarchy */ - std::map<wchar_t *, int, WStrCmp> *assem_child_cnts; /* number of solid children in a given assembly */ std::set<wchar_t *, WStrCmp> *empty; /* list of all parts and assemblies in CREO that have no shape */ std::map<wchar_t *, struct bu_vls *, WStrCmp> *name_map; /* CREO names to BRL-CAD names */ + std::map<wchar_t *, struct bu_vls *, WStrCmp> *creo_id_map; /* wchar CREO names to char versions */ std::set<struct bu_vls *, StrCmp> *brlcad_names; /* set of active .g object names */ + std::set<struct bu_vls *, StrCmp> *creo_ids; /* set of creo id strings */ std::vector<char *> *model_parameters; /* model parameters to use when generating .g names */ std::vector<char *> *attrs; /* attributes to preserve when transferring objects */ }; +/* Part processing container */ +struct part_conv_info { + struct creo_conv_info *cinfo; /* global state */ + int csg_holes_supported; + ProMdl model; + std::vector<int> *suppressed_features; /* list of features to suppress when generating output. */ + std::vector<struct directory *> *subtractions; /* objects to subtract from primary shape. */ + + /* generic feature suppression processing parameters */ + ProFeature *feat; + ProFeattype type; + double radius; + double diameter; + double distance1; + double distance2; + int got_diameter; + int got_distance1; +}; + /* Generic container used when we need to pass around something in addition to creo_conv_info */ struct adata { struct creo_conv_info *cinfo; @@ -191,29 +230,27 @@ /* assembly */ extern "C" void find_empty_assemblies(struct creo_conv_info *); -extern "C" void output_assembly(struct creo_conv_info *, ProMdl model); +extern "C" ProError output_assembly(struct creo_conv_info *, ProMdl model); /* part */ -extern "C" int output_part(struct creo_conv_info *, ProMdl model); +extern "C" ProError output_part(struct creo_conv_info *, ProMdl model); /* util */ extern "C" ProError component_filter(ProFeature *, ProAppData *); -extern "C" ProError creo_attribute_val(const char **val, const char *key, ProMdl m); +extern "C" ProError creo_attribute_val(char **val, const char *key, ProMdl m); extern "C" ProError creo_log(struct creo_conv_info *, int, ProError, const char *, ...); -extern "C" struct bu_vls *get_brlcad_name(struct creo_conv_info *, wchar_t *, ProType type, const char *); +extern "C" struct bu_vls *get_brlcad_name(struct creo_conv_info *, wchar_t *, ProType type, const char *, int); extern "C" double wstr_to_double(struct creo_conv_info *, wchar_t *); extern "C" long int wstr_to_long(struct creo_conv_info *, wchar_t *); extern "C" void kill_error_dialog(char *dialog, char *component, ProAppData appdata); extern "C" void kill_gen_error_dialog(char *dialog, char *component, ProAppData appdata); +extern "C" ProError PopupMsg(const char *, const char *); /* csg */ -extern "C" ProError do_feature_visit(ProFeature *feat, ProError status, ProAppData data); -extern "C" void free_csg_ops(struct creo_conv_info *); +extern "C" int subtract_hole(struct part_conv_info *pinfo); -extern "C" ProError ShowMsg(); - #endif /*CREO_BRL_H*/ /* Modified: brlcad/branches/brep-debug/src/external/CREO/csg.cpp =================================================================== --- brlcad/branches/brep-debug/src/external/CREO/csg.cpp 2017-04-26 19:26:13 UTC (rev 69719) +++ brlcad/branches/brep-debug/src/external/CREO/csg.cpp 2017-04-26 19:31:36 UTC (rev 69720) @@ -23,80 +23,43 @@ #include "common.h" #include "creo-brl.h" -#if 0 -/* global variables for dimension visits */ -static double radius=0.0, diameter=0.0, distance1=0.0, distance2=0.0; -static int got_diameter=0, got_distance1=0; -static int hole_type; -static int add_cbore; -static int add_csink; -static int hole_depth_type; -static double cb_depth=0.0; /* counter-bore depth */ -static double cb_diam=0.0; /* counter-bore diam */ -static double cs_diam=0.0; /* counter-sink diam */ -static double cs_angle=0.0; /* counter-sink angle */ -static double hole_diam=0.0; /* drilled hle diameter */ -static double hole_depth=0.0; /* drilled hole depth */ -static double drill_angle=0.0; /* drill tip angle */ #define MIN_RADIUS 1.0e-7 /* BRL-CAD does not allow tgc's with zero radius */ -static Pro3dPnt end1, end2; /* axis endpoints for holes */ -static int hole_no=0; /* hole counter for unique names */ -static char *tgc_format="tgc V {%.25G %.25G %.25G} H {%.25G %.25G %.25G} A {%.25G %.25G %.25G} B {%.25G %.25G %.25G} C {%.25G %.25G %.25G} D {%.25G %.25G %.25G}\n"; +const char *tgc_format="tgc V {%.25G %.25G %.25G} H {%.25G %.25G %.25G} A {%.25G %.25G %.25G} B {%.25G %.25G %.25G} C {%.25G %.25G %.25G} D {%.25G %.25G %.25G}\n"; -extern "C" void -Add_to_feature_delete_list(struct creo_conv_info *cinfo, int id ) -{ - if ( cinfo->feat_id_count >= cinfo->feat_id_len ) { - cinfo->feat_id_len += FEAT_ID_BLOCK; - cinfo->feat_ids_to_delete = (int *)bu_realloc( (char *)cinfo->feat_ids_to_delete, - cinfo->feat_id_len * sizeof( int ), - "feature ids to delete"); +/* Information needed to replace holes with CSG */ +struct hole_info { + ProFeature *feat; + double radius; + double diameter; + int hole_type; + int add_cbore; + int add_csink; + int hole_depth_type; + double cb_depth; /* counter-bore depth */ + double cb_diam; /* counter-bore diam */ + double cs_diam; /* counter-sink diam */ + double cs_angle; /* counter-sink angle */ + double hole_diam; /* drilled hle diameter */ + double hole_depth; /* drilled hole depth */ + double drill_angle; /* drill tip angle */ + Pro3dPnt end1, end2; /* axis endpoints for holes */ +}; - } - cinfo->feat_ids_to_delete[cinfo->feat_id_count++] = id; - - if (cinfo->logger_type == LOGGER_TYPE_ALL ) { - fprintf(cinfo->logger, "Adding feature %d to list of features to delete (list length = %d)\n", - id, cinfo->feat_id_count ); - } -} - extern "C" ProError -geomitem_visit( ProGeomitem *item, ProError status, ProAppData data ) +hole_elem_filter(ProElement UNUSED(elem_tree), ProElement UNUSED(elem), ProElempath UNUSED(elem_path), ProAppData UNUSED(data)) { - ProGeomitemdata *geom; - ProCurvedata *crv; - ProError ret; - - if ( (ret=ProGeomitemdataGet( item, &geom )) != PRO_TK_NO_ERROR ) { - fprintf( stderr, "Failed to get geomitem for type %d\n", - item->type ); - return ret; - } - - crv = PRO_CURVE_DATA( geom ); - if ( (ret=ProLinedataGet( crv, end1, end2 ) ) != PRO_TK_NO_ERROR ) { - fprintf( stderr, "Failed to get line data for axis\n" ); - return ret; - } - return PRO_TK_NO_ERROR; } extern "C" ProError -geomitem_filter( ProGeomitem *item, ProAppData data ) +hole_elem_visit(ProElement UNUSED(elem_tree), ProElement elem, ProElempath UNUSED(elem_path), ProAppData data) { - return PRO_TK_NO_ERROR; -} - -extern "C" ProError -hole_elem_visit( ProElement elem_tree, ProElement elem, ProElempath elem_path, ProAppData data ) -{ ProError ret; ProElemId elem_id; ProValue val_junk; ProValueData val; + struct hole_info *hinfo = (struct hole_info *)data; if ( (ret=ProElementIdGet( elem, &elem_id ) ) != PRO_TK_NO_ERROR ) { fprintf( stderr, "Failed to get element id!!!\n" ); @@ -113,7 +76,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - add_cbore = val.v.i; + hinfo->add_cbore = val.v.i; break; case PRO_E_HLE_ADD_CSINK: if ( (ret=ProElementValueGet( elem, &val_junk )) != PRO_TK_NO_ERROR ) { @@ -124,7 +87,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - add_csink = val.v.i; + hinfo->add_csink = val.v.i; break; case PRO_E_DIAMETER: /* diameter of straight hole */ @@ -136,7 +99,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - hole_diam = val.v.d; + hinfo->hole_diam = val.v.d; break; case PRO_E_HLE_HOLEDIAM: /* diameter of main portion of standard drilled hole */ @@ -148,7 +111,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - hole_diam = val.v.d; + hinfo->hole_diam = val.v.d; break; case PRO_E_HLE_CBOREDEPTH: /* depth of counterbore */ @@ -160,7 +123,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - cb_depth = val.v.d; + hinfo->cb_depth = val.v.d; break; case PRO_E_HLE_CBOREDIAM: /* diameter of counterbore */ @@ -172,7 +135,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - cb_diam = val.v.d; + hinfo->cb_diam = val.v.d; break; case PRO_E_HLE_CSINKANGLE: /* angle of countersink (degrees ) */ @@ -184,7 +147,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - cs_angle = val.v.d; + hinfo->cs_angle = val.v.d; break; case PRO_E_HLE_CSINKDIAM: /* diameter of countersink */ @@ -196,7 +159,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - cs_diam = val.v.d; + hinfo->cs_diam = val.v.d; break; case PRO_E_HLE_DRILLDEPTH: /* overall depth of standard drilled hole without drill tip */ @@ -208,7 +171,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - hole_depth = val.v.d; + hinfo->hole_depth = val.v.d; break; case PRO_E_HLE_DRILLANGLE: /* drill tip angle (degrees) */ @@ -220,7 +183,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - drill_angle = val.v.d; + hinfo->drill_angle = val.v.d; break; case PRO_E_HLE_DEPTH: if ( (ret=ProElementValueGet( elem, &val_junk )) != PRO_TK_NO_ERROR ) { @@ -231,7 +194,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - hole_depth_type = val.v.i; + hinfo->hole_depth_type = val.v.i; break; case PRO_E_HLE_TYPE_NEW: if ( (ret=ProElementValueGet( elem, &val_junk )) != PRO_TK_NO_ERROR ) { @@ -242,7 +205,7 @@ fprintf( stderr, "Failed to get value data\n" ); return ret; } - hole_type = val.v.i; + hinfo->hole_type = val.v.i; break; case PRO_E_HLE_STAN_TYPE: if ( (ret=ProElementValueGet( elem, &val_junk )) != PRO_TK_NO_ERROR ) { @@ -329,9 +292,23 @@ return PRO_TK_NO_ERROR; } + extern "C" ProError -hole_elem_filter( ProElement elem_tree, ProElement elem, ProElempath elem_path, ProAppData data ) +geomitem_filter(ProDimension *UNUSED(dim), ProAppData UNUSED(data)) { + return PRO_TK_NO_ERROR; +} + +extern "C" ProError +geomitem_visit(ProGeomitem *item, ProError UNUSED(status), ProAppData data) { + ProGeomitemdata *geom; + ProCurvedata *crv; + ProError ret; + struct hole_info *hinfo = (struct hole_info *)data; + + if ((ret=ProGeomitemdataGet(item, &geom)) != PRO_TK_NO_ERROR) return ret; + crv = PRO_CURVE_DATA(geom); + if ((ret=ProLinedataGet(crv, hinfo->end1, hinfo->end2)) != PRO_TK_NO_ERROR) return ret; return PRO_TK_NO_ERROR; } @@ -343,77 +320,97 @@ * 1 - delete this hole feature before tessellating */ extern "C" int -Subtract_hole(struct creo_conv_info *cinfo) +subtract_hole(struct part_conv_info *pinfo) { - struct csg_ops *csg; + ProError ret; + ProElement elem_tree; + ProElempath elem_path=NULL; + struct creo_conv_info *cinfo = pinfo->cinfo; + int hole_no = 1; /* TODO - do this right */ + + struct bu_vls hname = BU_VLS_INIT_ZERO; vect_t a, b, c, d, h; - if ( cinfo->do_facets_only ) { - if ( diameter < cinfo->min_hole_diameter ) + if ( pinfo->cinfo->do_facets_only ) { + if ( pinfo->diameter < cinfo->min_hole_diameter ) return 1; else return 0; } + /* TODO - restructure for easier memory cleanup */ + struct hole_info *hinfo; + BU_GET(hinfo, struct hole_info); + hinfo->feat = pinfo->feat; + hinfo->radius = pinfo->radius; + hinfo->diameter = pinfo->diameter; + + /* Do a more detailed characterization of the hole elements */ + if ( (ret=ProFeatureElemtreeCreate(hinfo->feat, &elem_tree ) ) == PRO_TK_NO_ERROR ) { + if ( (ret=ProElemtreeElementVisit( elem_tree, elem_path, hole_elem_filter, hole_elem_visit, (ProAppData)hinfo) ) != PRO_TK_NO_ERROR ) { + if ( ProElementFree( &elem_tree ) != PRO_TK_NO_ERROR ) {fprintf( stderr, "Error freeing element tree\n" );} + BU_PUT(hinfo, struct hole_info); + return ret; + } + if ( ProElementFree( &elem_tree ) != PRO_TK_NO_ERROR ) { + fprintf( stderr, "Error freeing element tree\n" ); + } + } + + /* need more info to recreate holes - TODO - make necessary solids in these routines and write them to the .g file */ + if ((ret=ProFeatureGeomitemVisit(pinfo->feat, PRO_AXIS, geomitem_visit, geomitem_filter, (ProAppData)pinfo) ) != PRO_TK_NO_ERROR) return ret; + if (cinfo->logger_type == LOGGER_TYPE_ALL ) { fprintf(cinfo->logger, "Doing a CSG hole subtraction\n" ); } /* make a replacement hole using CSG */ - if ( hole_type == PRO_HLE_NEW_TYPE_STRAIGHT ) { + if ( hinfo->hole_type == PRO_HLE_NEW_TYPE_STRAIGHT ) { /* plain old straight hole */ - if ( diameter < cinfo->min_hole_diameter ) + if ( hinfo->diameter < cinfo->min_hole_diameter ) return 1; - if ( !cinfo->csg_root ) { - BU_ALLOC(cinfo->csg_root, struct csg_ops); - csg = cinfo->csg_root; - csg->next = NULL; - } else { - BU_ALLOC(csg, struct csg_ops); - csg->next = cinfo->csg_root; - cinfo->csg_root = csg; - } - bu_vls_init( &csg->name ); - bu_vls_init( &csg->dbput ); - csg->op = '-'; - hole_no++; - bu_vls_printf( &csg->name, "hole.%d ", hole_no ); - VSUB2( h, end1, end2 ); + /* TODO - do this naming right */ + bu_vls_printf(&hname, "hole.%d ", hole_no ); + + VSUB2( h, hinfo->end1, hinfo->end2 ); bn_vec_ortho( a, h ); VCROSS( b, a, h ); VUNITIZE( b ); - VSCALE( end2, end2, cinfo->creo_to_brl_conv ); - VSCALE( a, a, radius*cinfo->creo_to_brl_conv ); - VSCALE( b, b, radius*cinfo->creo_to_brl_conv ); + VSCALE( hinfo->end2, hinfo->end2, cinfo->creo_to_brl_conv ); + VSCALE( a, a, pinfo->radius*cinfo->creo_to_brl_conv ); + VSCALE( b, b, pinfo->radius*cinfo->creo_to_brl_conv ); VSCALE( h, h, cinfo->creo_to_brl_conv ); +#if 0 bu_vls_printf( &csg->dbput, tgc_format, - V3ARGS( end2 ), + V3ARGS( hinfo->end2 ), V3ARGS( h ), V3ARGS( a ), V3ARGS( b ), V3ARGS( a ), V3ARGS( b ) ); - } else if ( hole_type == PRO_HLE_NEW_TYPE_STANDARD ) { +#endif + } else if ( hinfo->hole_type == PRO_HLE_NEW_TYPE_STANDARD ) { /* drilled hole with possible countersink and counterbore */ point_t start; vect_t dir; double cb_radius; double accum_depth=0.0; - double hole_radius=hole_diam / 2.0; + double hole_radius=hinfo->hole_diam / 2.0; - if ( hole_diam < cinfo->min_hole_diameter ) + if ( hinfo->hole_diam < cinfo->min_hole_diameter ) return 1; - VSUB2( dir, end1, end2 ); + VSUB2( dir, hinfo->end1, hinfo->end2 ); VUNITIZE( dir ); - VMOVE( start, end2 ); + VMOVE( start, hinfo->end2 ); VSCALE( start, start, cinfo->creo_to_brl_conv ); - if ( add_cbore == PRO_HLE_ADD_CBORE ) { + if ( hinfo->add_cbore == PRO_HLE_ADD_CBORE ) { +#if 0 if ( !cinfo->csg_root ) { BU_ALLOC(cinfo->csg_root, struct csg_ops); csg = cinfo->csg_root; @@ -427,15 +424,17 @@ bu_vls_init( &csg->dbput ); csg->op = '-'; +#endif hole_no++; - bu_vls_printf( &csg->name, "hole.%d... [truncated message content] |