Refactoring
This commit is contained in:
parent
266aca08c2
commit
158db04660
|
@ -23,26 +23,24 @@ file(MAKE_DIRECTORY ${EXTERNAL_DEPS_DIR})
|
|||
set(DRMSimulationModelDir "/home/iason/Coding/Libraries/DRMSimulationModel")
|
||||
set(DRMSimulationModelBuildDir ${CMAKE_BINARY_DIR}/_deps)
|
||||
add_subdirectory(${DRMSimulationModelDir} ${DRMSimulationModelBuildDir})
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC DRMSimulationModel)
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${DRMSimulationModelDir})
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC DRMSimulationModel_lib)
|
||||
#target_include_directories(${PROJECT_NAME} PUBLIC DRMSimulationModel_)
|
||||
|
||||
#target_sources(${PROJECT_NAME} PUBLIC ${DRMSimulationModelDir}/simulationmodel.hpp)
|
||||
##dlib
|
||||
#set(DLIB_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}/dlib)
|
||||
#download_project(PROJ DLIB
|
||||
# GIT_REPOSITORY https://github.com/davisking/dlib.git
|
||||
# GIT_TAG master
|
||||
# BINARY_DIR ${DLIB_BIN_DIR}
|
||||
# PREFIX ${EXTERNAL_DEPS_DIR}
|
||||
# ${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
||||
#)
|
||||
#add_subdirectory(${DLIB_SOURCE_DIR} ${DLIB_BIN_DIR})
|
||||
#if(${MYSOURCES_STATIC_LINK})
|
||||
# target_link_libraries(${PROJECT_NAME} PUBLIC -static dlib::dlib)
|
||||
#else()
|
||||
# target_link_libraries(${PROJECT_NAME} PUBLIC dlib::dlib)
|
||||
#endif()
|
||||
#add_compile_definitions(DLIB_DEFINED)
|
||||
if(${USE_DLIB})
|
||||
FetchContent_Declare(dlib
|
||||
GIT_REPOSITORY https://github.com/davisking/dlib.git
|
||||
GIT_TAG master
|
||||
)
|
||||
FetchContent_MakeAvailable(dlib)
|
||||
#add_subdirectory(${DLIB_SOURCE_DIR} ${DLIB_BIN_DIR})
|
||||
if(${MYSOURCES_STATIC_LINK})
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC -static dlib::dlib)
|
||||
else()
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC dlib::dlib)
|
||||
endif()
|
||||
add_compile_definitions(DLIB_DEFINED)
|
||||
endif()
|
||||
|
||||
## polyscope
|
||||
if(#[[NOT TARGET polyscope AND]] ${USE_POLYSCOPE})
|
||||
|
@ -89,15 +87,6 @@ FetchContent_Declare(matplot
|
|||
GIT_TAG master
|
||||
)
|
||||
FetchContent_MakeAvailable(matplot)
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${matplot_SOURCE_DIR})
|
||||
#set(MATPLOTPLUSPLUS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/matplot)
|
||||
#download_project(PROJ MATPLOTPLUSPLUS
|
||||
# GIT_TAG master
|
||||
# BINARY_DIR ${MATPLOTPLUSPLUS_BINARY_DIR}
|
||||
# PREFIX ${EXTERNAL_DEPS_DIR}
|
||||
# ${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
||||
# )
|
||||
#add_subdirectory(${MATPLOTPLUSPLUS_SOURCE_DIR} ${MATPLOTPLUSPLUS_BINARY_DIR})
|
||||
|
||||
##threed-beam-fea
|
||||
if(NOT TARGET ThreedBeamFEA)
|
||||
|
@ -130,9 +119,9 @@ if(${MYSOURCES_STATIC_LINK})
|
|||
endif()
|
||||
if(${MYSOURCES_STATIC_LINK})
|
||||
message("Linking statically here")
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC #[[-static]] Eigen3::Eigen matplot pthread gfortran quadmath)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC #[[-static]] Eigen3::Eigen pthread gfortran quadmath matplot)
|
||||
else()
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC Eigen3::Eigen matplot tbb pthread)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC Eigen3::Eigen tbb pthread matplot)
|
||||
endif()
|
||||
|
||||
target_link_directories(MySources PUBLIC ${CMAKE_CURRENT_LIST_DIR}/boost_graph/libs)
|
||||
|
@ -163,17 +152,8 @@ target_link_libraries(${PROJECT_NAME} PUBLIC "/home/iason/Coding/Libraries/armad
|
|||
#endif()
|
||||
#target_link_libraries(${PROJECT_NAME} PUBLIC "/home/iason/Coding/build/FormFInder/Debug/_deps/armadillo-build/libarmadillo.a")
|
||||
|
||||
###ENSMALLEN
|
||||
#FetchContent_Declare(ensmallen
|
||||
# GIT_REPOSITORY https://github.com/mlpack/ensmallen.git
|
||||
# GIT_TAG master
|
||||
# )
|
||||
#FetchContent_MakeAvailable(ensmallen)
|
||||
#target_link_libraries(${PROJECT_NAME} PRIVATE ensmallen)
|
||||
#target_include_directories(${PROJECT_NAME}
|
||||
#PUBLIC ${ensmallen_SOURCE_DIR}/include)
|
||||
#add_compile_definitions(USE_ENSMALLEN)
|
||||
|
||||
if(${USE_ENSMALLEN})
|
||||
set(ENSMALLEN_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/ensmallen)
|
||||
download_project(PROJ ENSMALLEN
|
||||
GIT_REPOSITORY https://github.com/mlpack/ensmallen.git
|
||||
|
@ -184,9 +164,18 @@ download_project(PROJ ENSMALLEN
|
|||
)
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC ${ENSMALLEN_SOURCE_DIR}/include)
|
||||
message("ens dir:" ${ENSMALLEN_SOURCE_DIR})
|
||||
add_compile_definitions(USE_ENSMALLEN)
|
||||
#endif()
|
||||
###ENSMALLEN
|
||||
#FetchContent_Declare(ensmallen
|
||||
# GIT_REPOSITORY https://github.com/mlpack/ensmallen.git
|
||||
# GIT_TAG master
|
||||
# )
|
||||
#FetchContent_MakeAvailable(ensmallen)
|
||||
#target_link_libraries(${PROJECT_NAME} PRIVATE ensmallen)
|
||||
#target_include_directories(${PROJECT_NAME}
|
||||
#PUBLIC ${ensmallen_SOURCE_DIR}/include)
|
||||
#add_compile_definitions(USE_ENSMALLEN)
|
||||
endif()
|
||||
|
||||
##Chrono
|
||||
##add_subdirectory("/home/iason/Coding/build/external dependencies/CHRONO-src" "/home/iason/Coding/build/external dependencies/CHRONO-src/build")
|
||||
|
|
128
csvfile.hpp
128
csvfile.hpp
|
@ -9,39 +9,43 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class csvFile;
|
||||
class CSVFile;
|
||||
|
||||
inline static csvFile &endrow(csvFile &file);
|
||||
inline static csvFile &flush(csvFile &file);
|
||||
inline static CSVFile& endrow(CSVFile& file);
|
||||
inline static CSVFile& flush(CSVFile& file);
|
||||
|
||||
class csvFile {
|
||||
class CSVFile {
|
||||
std::ofstream fs_;
|
||||
bool is_first_;
|
||||
const std::string separator_;
|
||||
const std::string escape_seq_;
|
||||
const std::string special_chars_;
|
||||
|
||||
public:
|
||||
csvFile(const std::filesystem::path &filename,
|
||||
const bool &overwrite,
|
||||
public:
|
||||
CSVFile(const std::filesystem::path& filename,
|
||||
const bool& overwrite,
|
||||
const std::string separator = ",")
|
||||
: fs_(), is_first_(true), separator_(separator), escape_seq_("\""), special_chars_("\"")
|
||||
{
|
||||
fs_.exceptions(std::ios::failbit | std::ios::badbit);
|
||||
if (filename.empty()) {
|
||||
fs_.copyfmt(std::cout);
|
||||
fs_.clear(std::cout.rdstate());
|
||||
fs_.basic_ios<char>::rdbuf(std::cout.rdbuf());
|
||||
} else {
|
||||
if (!std::filesystem::exists(filename)) {
|
||||
std::ofstream outfile(filename);
|
||||
outfile.close();
|
||||
}
|
||||
overwrite ? fs_.open(filename, std::ios::trunc) : fs_.open(filename, std::ios::app);
|
||||
: fs_(),
|
||||
is_first_(true),
|
||||
separator_(separator),
|
||||
escape_seq_("\""),
|
||||
special_chars_("\"") {
|
||||
fs_.exceptions(std::ios::failbit | std::ios::badbit);
|
||||
if (filename.empty()) {
|
||||
fs_.copyfmt(std::cout);
|
||||
fs_.clear(std::cout.rdstate());
|
||||
fs_.basic_ios<char>::rdbuf(std::cout.rdbuf());
|
||||
} else {
|
||||
if (!std::filesystem::exists(filename)) {
|
||||
std::ofstream outfile(filename);
|
||||
outfile.close();
|
||||
}
|
||||
overwrite ? fs_.open(filename, std::ios::trunc)
|
||||
: fs_.open(filename, std::ios::app);
|
||||
}
|
||||
}
|
||||
|
||||
~csvFile() {
|
||||
~CSVFile() {
|
||||
flush();
|
||||
fs_.close();
|
||||
}
|
||||
|
@ -53,50 +57,52 @@ class csvFile {
|
|||
is_first_ = true;
|
||||
}
|
||||
|
||||
csvFile &operator<<(csvFile &(*val)(csvFile &)) { return val(*this); }
|
||||
CSVFile& operator<<(CSVFile& (*val)(CSVFile&)) { return val(*this); }
|
||||
|
||||
csvFile &operator<<(const char *val) { return write(escape(val)); }
|
||||
CSVFile& operator<<(const char* val) { return write(escape(val)); }
|
||||
|
||||
csvFile &operator<<(const std::string &val) { return write(escape(val)); }
|
||||
CSVFile& operator<<(const std::string& val) { return write(escape(val)); }
|
||||
|
||||
template<typename T>
|
||||
csvFile &operator<<(const T &val)
|
||||
{
|
||||
return write(val);
|
||||
template <typename T>
|
||||
CSVFile& operator<<(const T& val) {
|
||||
return write(val);
|
||||
}
|
||||
|
||||
static std::vector<std::vector<std::string>> parse(const std::filesystem::path &csvFilepath)
|
||||
{
|
||||
std::vector<std::vector<std::string>> resultCSV;
|
||||
if (!std::filesystem::exists(csvFilepath)) {
|
||||
std::cerr << "The file does not exist:" << csvFilepath.string() << std::endl;
|
||||
return resultCSV;
|
||||
}
|
||||
|
||||
std::ifstream inputfile(csvFilepath.string().c_str());
|
||||
if (!inputfile.is_open()) {
|
||||
std::cerr << "Can't open file:" << csvFilepath.string() << std::endl;
|
||||
return resultCSV;
|
||||
}
|
||||
std::vector<std::string> row;
|
||||
std::string line;
|
||||
using Tokenizer = boost::tokenizer<boost::escaped_list_separator<char>>;
|
||||
while (std::getline(inputfile, line)) {
|
||||
Tokenizer tokenizer(line);
|
||||
const int numOfCols = std::distance(tokenizer.begin(), tokenizer.end());
|
||||
row.resize(numOfCols);
|
||||
std::copy(tokenizer.begin(), tokenizer.end(), row.begin());
|
||||
// std::transform(tokenizer.begin(), tokenizer.end(), row.begin(), [](const std::string &el) {
|
||||
// return boost::lexical_cast<T>(el);
|
||||
// });
|
||||
resultCSV.push_back(row);
|
||||
}
|
||||
|
||||
static std::vector<std::vector<std::string>> parse(
|
||||
const std::filesystem::path& csvFilepath) {
|
||||
std::vector<std::vector<std::string>> resultCSV;
|
||||
if (!std::filesystem::exists(csvFilepath)) {
|
||||
std::cerr << "The file does not exist:" << csvFilepath.string()
|
||||
<< std::endl;
|
||||
return resultCSV;
|
||||
}
|
||||
|
||||
std::ifstream inputfile(csvFilepath.string().c_str());
|
||||
if (!inputfile.is_open()) {
|
||||
std::cerr << "Can't open file:" << csvFilepath.string() << std::endl;
|
||||
return resultCSV;
|
||||
}
|
||||
std::vector<std::string> row;
|
||||
std::string line;
|
||||
using Tokenizer = boost::tokenizer<boost::escaped_list_separator<char>>;
|
||||
while (std::getline(inputfile, line)) {
|
||||
Tokenizer tokenizer(line);
|
||||
const int numOfCols = std::distance(tokenizer.begin(), tokenizer.end());
|
||||
row.resize(numOfCols);
|
||||
std::copy(tokenizer.begin(), tokenizer.end(), row.begin());
|
||||
// std::transform(tokenizer.begin(), tokenizer.end(),
|
||||
// row.begin(), [](const std::string &el) {
|
||||
// return boost::lexical_cast<T>(el);
|
||||
// });
|
||||
resultCSV.push_back(row);
|
||||
}
|
||||
|
||||
return resultCSV;
|
||||
}
|
||||
|
||||
private:
|
||||
template <typename T> csvFile &write(const T &val) {
|
||||
private:
|
||||
template <typename T>
|
||||
CSVFile& write(const T& val) {
|
||||
if (!is_first_) {
|
||||
fs_ << separator_;
|
||||
} else {
|
||||
|
@ -106,7 +112,7 @@ private:
|
|||
return *this;
|
||||
}
|
||||
|
||||
std::string escape(const std::string &val) {
|
||||
std::string escape(const std::string& val) {
|
||||
std::ostringstream result;
|
||||
result << '"';
|
||||
std::string::size_type to, from = 0u, len = val.length();
|
||||
|
@ -120,14 +126,14 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
inline static csvFile &endrow(csvFile &file) {
|
||||
inline static CSVFile& endrow(CSVFile& file) {
|
||||
file.endrow();
|
||||
return file;
|
||||
}
|
||||
|
||||
inline static csvFile &flush(csvFile &file) {
|
||||
inline static CSVFile& flush(CSVFile& file) {
|
||||
file.flush();
|
||||
return file;
|
||||
}
|
||||
|
||||
#endif // CSVFILE_HPP
|
||||
#endif // CSVFILE_HPP
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,374 @@
|
|||
ply
|
||||
format ascii 1.0
|
||||
comment nanoply generated
|
||||
element vertex 140
|
||||
property double x
|
||||
property double y
|
||||
property double z
|
||||
property double nx
|
||||
property double ny
|
||||
property double nz
|
||||
element edge 220
|
||||
property int vertex1
|
||||
property int vertex2
|
||||
end_header
|
||||
1.000000 0.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 0.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 0.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 0.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 0.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 0.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 0.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 0.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 0.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 0.000000 0.000000 0.000000 0.000000 1.000000
|
||||
0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
1.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
11.000000 1.000000 0.000000 0.000000 0.000000 1.000000
|
||||
0.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
1.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
11.000000 2.000000 0.000000 0.000000 0.000000 1.000000
|
||||
0.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
1.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
11.000000 3.000000 0.000000 0.000000 0.000000 1.000000
|
||||
0.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
1.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
11.000000 4.000000 0.000000 0.000000 0.000000 1.000000
|
||||
0.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
1.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
11.000000 5.000000 0.000000 0.000000 0.000000 1.000000
|
||||
0.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
1.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
11.000000 6.000000 0.000000 0.000000 0.000000 1.000000
|
||||
0.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
1.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
11.000000 7.000000 0.000000 0.000000 0.000000 1.000000
|
||||
0.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
1.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
11.000000 8.000000 0.000000 0.000000 0.000000 1.000000
|
||||
0.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
1.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
11.000000 9.000000 0.000000 0.000000 0.000000 1.000000
|
||||
0.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
1.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
11.000000 10.000000 0.000000 0.000000 0.000000 1.000000
|
||||
1.000000 11.000000 0.000000 0.000000 0.000000 1.000000
|
||||
2.000000 11.000000 0.000000 0.000000 0.000000 1.000000
|
||||
3.000000 11.000000 0.000000 0.000000 0.000000 1.000000
|
||||
4.000000 11.000000 0.000000 0.000000 0.000000 1.000000
|
||||
5.000000 11.000000 0.000000 0.000000 0.000000 1.000000
|
||||
6.000000 11.000000 0.000000 0.000000 0.000000 1.000000
|
||||
7.000000 11.000000 0.000000 0.000000 0.000000 1.000000
|
||||
8.000000 11.000000 0.000000 0.000000 0.000000 1.000000
|
||||
9.000000 11.000000 0.000000 0.000000 0.000000 1.000000
|
||||
10.000000 11.000000 0.000000 0.000000 0.000000 1.000000
|
||||
0 11
|
||||
1 12
|
||||
2 13
|
||||
3 14
|
||||
4 15
|
||||
5 16
|
||||
6 17
|
||||
7 18
|
||||
8 19
|
||||
9 20
|
||||
10 11
|
||||
11 23
|
||||
11 12
|
||||
12 24
|
||||
12 13
|
||||
13 25
|
||||
13 14
|
||||
14 26
|
||||
14 15
|
||||
15 27
|
||||
15 16
|
||||
16 28
|
||||
16 17
|
||||
17 29
|
||||
17 18
|
||||
18 30
|
||||
18 19
|
||||
19 31
|
||||
19 20
|
||||
20 32
|
||||
20 21
|
||||
22 23
|
||||
23 35
|
||||
23 24
|
||||
24 36
|
||||
24 25
|
||||
25 37
|
||||
25 26
|
||||
26 38
|
||||
26 27
|
||||
27 39
|
||||
27 28
|
||||
28 40
|
||||
28 29
|
||||
29 41
|
||||
29 30
|
||||
30 42
|
||||
30 31
|
||||
31 43
|
||||
31 32
|
||||
32 44
|
||||
32 33
|
||||
34 35
|
||||
35 47
|
||||
35 36
|
||||
36 48
|
||||
36 37
|
||||
37 49
|
||||
37 38
|
||||
38 50
|
||||
38 39
|
||||
39 51
|
||||
39 40
|
||||
40 52
|
||||
40 41
|
||||
41 53
|
||||
41 42
|
||||
42 54
|
||||
42 43
|
||||
43 55
|
||||
43 44
|
||||
44 56
|
||||
44 45
|
||||
46 47
|
||||
47 59
|
||||
47 48
|
||||
48 60
|
||||
48 49
|
||||
49 61
|
||||
49 50
|
||||
50 62
|
||||
50 51
|
||||
51 63
|
||||
51 52
|
||||
52 64
|
||||
52 53
|
||||
53 65
|
||||
53 54
|
||||
54 66
|
||||
54 55
|
||||
55 67
|
||||
55 56
|
||||
56 68
|
||||
56 57
|
||||
58 59
|
||||
59 71
|
||||
59 60
|
||||
60 72
|
||||
60 61
|
||||
61 73
|
||||
61 62
|
||||
62 74
|
||||
62 63
|
||||
63 75
|
||||
63 64
|
||||
64 76
|
||||
64 65
|
||||
65 77
|
||||
65 66
|
||||
66 78
|
||||
66 67
|
||||
67 79
|
||||
67 68
|
||||
68 80
|
||||
68 69
|
||||
70 71
|
||||
71 83
|
||||
71 72
|
||||
72 84
|
||||
72 73
|
||||
73 85
|
||||
73 74
|
||||
74 86
|
||||
74 75
|
||||
75 87
|
||||
75 76
|
||||
76 88
|
||||
76 77
|
||||
77 89
|
||||
77 78
|
||||
78 90
|
||||
78 79
|
||||
79 91
|
||||
79 80
|
||||
80 92
|
||||
80 81
|
||||
82 83
|
||||
83 95
|
||||
83 84
|
||||
84 96
|
||||
84 85
|
||||
85 97
|
||||
85 86
|
||||
86 98
|
||||
86 87
|
||||
87 99
|
||||
87 88
|
||||
88 100
|
||||
88 89
|
||||
89 101
|
||||
89 90
|
||||
90 102
|
||||
90 91
|
||||
91 103
|
||||
91 92
|
||||
92 104
|
||||
92 93
|
||||
94 95
|
||||
95 107
|
||||
95 96
|
||||
96 108
|
||||
96 97
|
||||
97 109
|
||||
97 98
|
||||
98 110
|
||||
98 99
|
||||
99 111
|
||||
99 100
|
||||
100 112
|
||||
100 101
|
||||
101 113
|
||||
101 102
|
||||
102 114
|
||||
102 103
|
||||
103 115
|
||||
103 104
|
||||
104 116
|
||||
104 105
|
||||
106 107
|
||||
107 119
|
||||
107 108
|
||||
108 120
|
||||
108 109
|
||||
109 121
|
||||
109 110
|
||||
110 122
|
||||
110 111
|
||||
111 123
|
||||
111 112
|
||||
112 124
|
||||
112 113
|
||||
113 125
|
||||
113 114
|
||||
114 126
|
||||
114 115
|
||||
115 127
|
||||
115 116
|
||||
116 128
|
||||
116 117
|
||||
118 119
|
||||
119 130
|
||||
119 120
|
||||
120 131
|
||||
120 121
|
||||
121 132
|
||||
121 122
|
||||
122 133
|
||||
122 123
|
||||
123 134
|
||||
123 124
|
||||
124 135
|
||||
124 125
|
||||
125 136
|
||||
125 126
|
||||
126 137
|
||||
126 127
|
||||
127 138
|
||||
127 128
|
||||
128 139
|
||||
128 129
|
|
@ -0,0 +1,69 @@
|
|||
ply
|
||||
format ascii 1.0
|
||||
element vertex 21 { define "vertex" element, 8 of them in file }
|
||||
property float x { vertex contains float "x" coordinate }
|
||||
property float y { y coordinate is also a vertex property }
|
||||
property float z { z coordinate, too }
|
||||
property float nx
|
||||
property float ny
|
||||
property float nz
|
||||
element edge 24 { there are 6 "face" elements in the file }
|
||||
property int vertex1
|
||||
property int vertex2
|
||||
property list uchar float beam_dimensions
|
||||
property list uchar float beam_material {poissons ratio , young's modulus in GPascal}
|
||||
end_header
|
||||
|
||||
0 0 0 0 0 1
|
||||
1 0 0 0 0 1
|
||||
2 0 0 0 0 1
|
||||
3 0 0 0 0 1
|
||||
4 0 0 0 0 1
|
||||
0 1 0 0 0 1
|
||||
2 1 0 0 0 1
|
||||
4 1 0 0 0 1
|
||||
0 2 0 0 0 1
|
||||
1 2 0 0 0 1
|
||||
2 2 0 0 0 1
|
||||
3 2 0 0 0 1
|
||||
4 2 0 0 0 1
|
||||
0 3 0 0 0 1
|
||||
2 3 0 0 0 1
|
||||
4 3 0 0 0 1
|
||||
0 4 0 0 0 1
|
||||
1 4 0 0 0 1
|
||||
2 4 0 0 0 1
|
||||
3 4 0 0 0 1
|
||||
4 4 0 0 0 1
|
||||
|
||||
0 1 2 0.03 0.026 2 0.3 200
|
||||
1 2 2 0.03 0.026 2 0.3 200
|
||||
2 3 2 0.03 0.026 2 0.3 200
|
||||
3 4 2 0.03 0.026 2 0.3 200
|
||||
|
||||
0 5 2 0.03 0.026 2 0.3 200
|
||||
2 6 2 0.03 0.026 2 0.3 200
|
||||
4 7 2 0.03 0.026 2 0.3 200
|
||||
|
||||
|
||||
8 9 2 0.03 0.026 2 0.3 200
|
||||
9 10 2 0.03 0.026 2 0.3 200
|
||||
10 11 2 0.03 0.026 2 0.3 200
|
||||
11 12 2 0.03 0.026 2 0.3 200
|
||||
|
||||
8 5 2 0.03 0.026 2 0.3 200
|
||||
10 6 2 0.03 0.026 2 0.3 200
|
||||
12 7 2 0.03 0.026 2 0.3 200
|
||||
|
||||
8 13 2 0.03 0.026 2 0.3 200
|
||||
10 14 2 0.03 0.026 2 0.3 200
|
||||
12 15 2 0.03 0.026 2 0.3 200
|
||||
|
||||
16 13 2 0.03 0.026 2 0.3 200
|
||||
18 14 2 0.03 0.026 2 0.3 200
|
||||
20 15 2 0.03 0.026 2 0.3 200
|
||||
|
||||
16 17 2 0.03 0.026 2 0.3 200
|
||||
17 18 2 0.03 0.026 2 0.3 200
|
||||
18 19 2 0.03 0.026 2 0.3 200
|
||||
19 20 2 0.03 0.026 2 0.3 200
|
|
@ -0,0 +1,26 @@
|
|||
ply
|
||||
format ascii 1.0
|
||||
element vertex 5 { define "vertex" element, 8 of them in file }
|
||||
property float x { vertex contains float "x" coordinate }
|
||||
property float y { y coordinate is also a vertex property }
|
||||
property float z { z coordinate, too }
|
||||
property float nx
|
||||
property float ny
|
||||
property float nz
|
||||
element edge 4 { there are 6 "face" elements in the file }
|
||||
property int vertex1
|
||||
property int vertex2
|
||||
property list uchar float beam_dimensions
|
||||
property list uchar float beam_material {poissons ratio , young's modulus in GPascal}
|
||||
end_header
|
||||
|
||||
0 0 0 0 0 1
|
||||
1 0 0 0 0 1
|
||||
2 0 0 0 0 1
|
||||
3 0 0 0 0 1
|
||||
4 0 0 0 0 1
|
||||
|
||||
0 1 2 0.03 0.026 2 0.3 200
|
||||
1 2 2 0.03 0.026 2 0.3 200
|
||||
2 3 2 0.03 0.026 2 0.3 200
|
||||
3 4 2 0.03 0.026 2 0.3 200
|
Loading…
Reference in New Issue