30 #include <boost/program_options.hpp> 32 namespace po = boost::program_options;
34 int main(
int argc,
char** argv)
36 po::options_description description(
"usage");
37 description.add_options()
38 (
"help,h",
"Display help message")
39 (
"input,i", po::value<std::string>()->default_value(
"./segments.dxf"),
"The path to the file")
40 (
"output,o", po::value<std::string>()->default_value(
"./graphs/segments"),
"The output directory")
41 (
"width,w", po::value<float>()->default_value(0.6),
"The width of a segments in meters")
42 (
"length,l", po::value<float>()->default_value(1.0),
"The length of a segment in meters");
45 po::store(po::command_line_parser(argc, argv).
options(description).run(), vm);
49 std::cout << description << std::endl;
53 std::string inpath = vm[
"input"].as<std::string>();
54 std::string outpath = vm[
"output"].as<std::string>();
55 if(outpath.back() !=
'/')
58 float length = vm[
"length"].as<
float>();
59 float width = vm[
"width"].as<
float>();
62 std::cout <<
"\tGenerating Graph from \"" << inpath <<
"\" with line_width: " << width <<
" and minimum line_length: " << length << std::endl;
68 std::cout <<
"\tSaving graph to \"" << outpath <<
"\"" << std::endl;
void serializeGraph(const std::string &_graphPath) const
serializes the graph and saves it to memory
int main(int argc, char **argv)
bool parseGraph(const std::string &_dxfPath, const float _segLength, const float _segWidth)
reads the graph from the dx file
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)