-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #377 from LIHPC-Computational-Geometry/medialaxis_…
…milp_components added medialaxis and milp components
- Loading branch information
Showing
18 changed files
with
374 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#============================================================================== | ||
# LIBRARY DEFINITION (SOURCE FILES) | ||
#============================================================================== | ||
# Explicitly used the name given in this preamble | ||
set(GMDS_LIB ${LIB_GMDS_MEDIALAXIS}) | ||
set(GMDS_LIB_PREFIX gmds/medialaxis) | ||
|
||
set(GMDS_INC | ||
${CMAKE_BINARY_DIR}/exports/${GMDS_LIB}_export.h | ||
inc/gmds/medialaxis/Medialaxis.h | ||
) | ||
set(GMDS_SRC | ||
src/Medialaxis.cpp | ||
) | ||
#============================================================================== | ||
add_library(${GMDS_LIB} ${GMDS_INC} ${GMDS_SRC}) | ||
#============================================================================== | ||
include(GenerateExportHeader) | ||
generate_export_header(${GMDS_LIB} | ||
EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/exports/${GMDS_LIB}_export.h | ||
EXPORT_MACRO_NAME ${GMDS_LIB}_API) | ||
#============================================================================== | ||
# TARGET DEFINITION | ||
#============================================================================== | ||
include(GNUInstallDirs) | ||
#LIBRARY TO INSTALL | ||
target_link_libraries(${GMDS_LIB} PUBLIC | ||
${LIB_GMDS_CAD} | ||
${LIB_GMDS_IG}) | ||
|
||
#============================================================================== | ||
# NOTHING TO UPDATE BELOW | ||
#============================================================================== | ||
|
||
target_compile_features(${GMDS_LIB} PUBLIC cxx_std_14) | ||
|
||
# INCLUDE TO INSTALL | ||
target_include_directories(${GMDS_LIB} PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include> | ||
) | ||
set_target_properties(${GMDS_LIB} PROPERTIES PUBLIC_HEADER "${GMDS_INC}") | ||
|
||
install(TARGETS ${GMDS_LIB} | ||
EXPORT GMDS_SUITE | ||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${GMDS_LIB_PREFIX} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gmds | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gmds) | ||
|
||
#============================================================================== | ||
if(WITH_TEST) | ||
add_subdirectory(tst) | ||
endif(WITH_TEST) | ||
#============================================================================== | ||
# EXECUTABLE | ||
#============================================================================== | ||
add_executable(medialaxis_exec src/main.cpp) | ||
target_link_libraries(medialaxis_exec PRIVATE ${GMDS_LIB}) | ||
target_compile_features(medialaxis_exec PUBLIC cxx_std_14) | ||
install(TARGETS medialaxis_exec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef GMDS_MEDIALAXIS_MEDIALAXIS_H | ||
#define GMDS_MEDIALAXIS_MEDIALAXIS_H | ||
/*----------------------------------------------------------------------------*/ | ||
#include "LIB_GMDS_MEDIALAXIS_export.h" | ||
#include <gmds/ig/Mesh.h> | ||
/*----------------------------------------------------------------------------*/ | ||
namespace gmds{ | ||
/*----------------------------------------------------------------------------*/ | ||
namespace medialaxis{ | ||
/*----------------------------------------------------------------------------*/ | ||
/** \class dummy | ||
* \brief dummy class. | ||
*/ | ||
class LIB_GMDS_MEDIALAXIS_API Medialaxis{ | ||
|
||
public: | ||
/*-------------------------------------------------------------------------*/ | ||
/** @enum Status code for executing algorithms | ||
*/ | ||
typedef enum { | ||
FAIL, | ||
SUCCESS | ||
} STATUS; | ||
/*-------------------------------------------------------------------------*/ | ||
/** @brief Constructor. | ||
* @param | ||
*/ | ||
explicit Medialaxis(); | ||
/*-------------------------------------------------------------------------*/ | ||
/** @brief Default destructor. | ||
* @param | ||
*/ | ||
virtual ~Medialaxis() =default; | ||
/*-------------------------------------------------------------------------*/ | ||
/** \brief | ||
*/ | ||
Medialaxis::STATUS execute(); | ||
}; | ||
/*----------------------------------------------------------------------------*/ | ||
} // end namespace medialaxis | ||
/*----------------------------------------------------------------------------*/ | ||
} // end namespace gmds | ||
/*----------------------------------------------------------------------------*/ | ||
#endif // GMDS_MEDIALAXIS_MEDIALAXIS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*----------------------------------------------------------------------------*/ | ||
#include "gmds/medialaxis/Medialaxis.h" | ||
/*----------------------------------------------------------------------------*/ | ||
namespace gmds { | ||
/*----------------------------------------------------------------------------*/ | ||
namespace medialaxis { | ||
/*----------------------------------------------------------------------------*/ | ||
Medialaxis::Medialaxis() {} | ||
/*----------------------------------------------------------------------------*/ | ||
Medialaxis::STATUS | ||
Medialaxis::execute() | ||
{ | ||
return Medialaxis::SUCCESS; | ||
} | ||
/*----------------------------------------------------------------------------*/ | ||
} // end namespace medialaxis | ||
/*----------------------------------------------------------------------------*/ | ||
} // end namespace gmds | ||
/*----------------------------------------------------------------------------*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <iostream> | ||
#include "gmds/medialaxis/Medialaxis.h" | ||
|
||
int main() { | ||
std::cout<<"hello world"<<std::endl; | ||
|
||
gmds::medialaxis::Medialaxis qf; | ||
gmds::medialaxis::Medialaxis::STATUS st = qf.execute(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
add_executable(GMDS_MEDIALAXIS_TEST | ||
DummyTestSuite.h | ||
main_test.cpp | ||
) | ||
#============================================================================== | ||
target_link_libraries(GMDS_MEDIALAXIS_TEST PUBLIC | ||
${GMDS_LIB} | ||
GTest::gtest) | ||
#============================================================================== | ||
gtest_discover_tests(GMDS_MEDIALAXIS_TEST | ||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) | ||
#============================================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <gtest/gtest.h> | ||
#include <gmds/medialaxis/Medialaxis.h> | ||
#include <gmds/ig/Mesh.h> | ||
#include <gmds/io/IGMeshIOService.h> | ||
#include <gmds/io/VTKWriter.h> | ||
#include <gmds/io/VTKReader.h> | ||
#include <iostream> | ||
#include <unit_test_config.h> | ||
/*----------------------------------------------------------------------------*/ | ||
using namespace gmds; | ||
/*----------------------------------------------------------------------------*/ | ||
|
||
TEST(DummyTestClass, aaa) | ||
{ | ||
gmds::medialaxis::Medialaxis md; | ||
ASSERT_EQ(0,0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/*----------------------------------------------------------------------------*/ | ||
#include <gtest/gtest.h> | ||
/*----------------------------------------------------------------------------*/ | ||
// Files containing the different test suites to launch | ||
|
||
#include "DummyTestSuite.h" | ||
/*----------------------------------------------------------------------------*/ | ||
int main(int argc, char ** argv) { | ||
::testing::InitGoogleTest(&argc, argv); | ||
return RUN_ALL_TESTS(); | ||
} | ||
/*----------------------------------------------------------------------------*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#============================================================================== | ||
# LIBRARY DEFINITION (SOURCE FILES) | ||
#============================================================================== | ||
# Explicitly used the name given in this preamble | ||
set(GMDS_LIB ${LIB_GMDS_MILP}) | ||
set(GMDS_LIB_PREFIX gmds/milp) | ||
|
||
set(GMDS_INC | ||
${CMAKE_BINARY_DIR}/exports/${GMDS_LIB}_export.h | ||
inc/gmds/milp/milp.h | ||
) | ||
set(GMDS_SRC | ||
src/milp.cpp | ||
) | ||
#============================================================================== | ||
add_library(${GMDS_LIB} ${GMDS_INC} ${GMDS_SRC}) | ||
#============================================================================== | ||
include(GenerateExportHeader) | ||
generate_export_header(${GMDS_LIB} | ||
EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/exports/${GMDS_LIB}_export.h | ||
EXPORT_MACRO_NAME ${GMDS_LIB}_API) | ||
#============================================================================== | ||
# TARGET DEFINITION | ||
#============================================================================== | ||
include(GNUInstallDirs) | ||
#LIBRARY TO INSTALL | ||
target_link_libraries(${GMDS_LIB} PUBLIC | ||
${LIB_GMDS_CAD} | ||
${LIB_GMDS_IG}) | ||
|
||
#============================================================================== | ||
# NOTHING TO UPDATE BELOW | ||
#============================================================================== | ||
|
||
target_compile_features(${GMDS_LIB} PUBLIC cxx_std_14) | ||
|
||
# INCLUDE TO INSTALL | ||
target_include_directories(${GMDS_LIB} PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include> | ||
) | ||
set_target_properties(${GMDS_LIB} PROPERTIES PUBLIC_HEADER "${GMDS_INC}") | ||
|
||
install(TARGETS ${GMDS_LIB} | ||
EXPORT GMDS_SUITE | ||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${GMDS_LIB_PREFIX} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gmds | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gmds) | ||
|
||
#============================================================================== | ||
if(WITH_TEST) | ||
add_subdirectory(tst) | ||
endif(WITH_TEST) | ||
#============================================================================== | ||
# EXECUTABLE | ||
#============================================================================== | ||
add_executable(milp_exec src/main.cpp) | ||
target_link_libraries(milp_exec PRIVATE ${GMDS_LIB}) | ||
target_compile_features(milp_exec PUBLIC cxx_std_14) | ||
install(TARGETS milp_exec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef GMDS_MILP_MILP_H | ||
#define GMDS_MILP_MILP_H | ||
/*----------------------------------------------------------------------------*/ | ||
#include "LIB_GMDS_MILP_export.h" | ||
#include <gmds/ig/Mesh.h> | ||
/*----------------------------------------------------------------------------*/ | ||
namespace gmds{ | ||
/*----------------------------------------------------------------------------*/ | ||
namespace milp{ | ||
/*----------------------------------------------------------------------------*/ | ||
/** \class dummy | ||
* \brief dummy class. | ||
*/ | ||
class LIB_GMDS_MILP_API milp{ | ||
|
||
public: | ||
/*-------------------------------------------------------------------------*/ | ||
/** @enum Status code for executing algorithms | ||
*/ | ||
typedef enum { | ||
FAIL, | ||
SUCCESS | ||
} STATUS; | ||
/*-------------------------------------------------------------------------*/ | ||
/** @brief Constructor. | ||
* @param | ||
*/ | ||
explicit milp(); | ||
/*-------------------------------------------------------------------------*/ | ||
/** @brief Default destructor. | ||
* @param | ||
*/ | ||
virtual ~milp() =default; | ||
/*-------------------------------------------------------------------------*/ | ||
/** \brief | ||
*/ | ||
milp::STATUS execute(); | ||
}; | ||
/*----------------------------------------------------------------------------*/ | ||
} // end namespace milp | ||
/*----------------------------------------------------------------------------*/ | ||
} // end namespace gmds | ||
/*----------------------------------------------------------------------------*/ | ||
#endif // GMDS_MILP_MILP_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <iostream> | ||
#include "gmds/milp/milp.h" | ||
|
||
int main() { | ||
std::cout<<"hello world"<<std::endl; | ||
|
||
gmds::milp::milp qf; | ||
gmds::milp::milp::STATUS st = qf.execute(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*----------------------------------------------------------------------------*/ | ||
#include "gmds/milp/milp.h" | ||
/*----------------------------------------------------------------------------*/ | ||
namespace gmds { | ||
/*----------------------------------------------------------------------------*/ | ||
namespace milp { | ||
/*----------------------------------------------------------------------------*/ | ||
milp::milp() {} | ||
/*----------------------------------------------------------------------------*/ | ||
milp::STATUS | ||
milp::execute() | ||
{ | ||
return milp::SUCCESS; | ||
} | ||
/*----------------------------------------------------------------------------*/ | ||
} // end namespace milp | ||
/*----------------------------------------------------------------------------*/ | ||
} // end namespace gmds | ||
/*----------------------------------------------------------------------------*/ |
Oops, something went wrong.