MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / parse_args

Function parse_args

scripts/svg_to_mesh.py:15–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13from time import time
14
15def parse_args():
16 parser = argparse.ArgumentParser(__doc__);
17 parser.add_argument("--engine", help="Triangulation engine", choices=(
18 "triangle_conforming_delaunay",
19 "triangle_constrained_delaunay",
20 "cgal_constrained_delaunay",
21 "cgal_conforming_delaunay",
22 "geogram_delaunay",
23 "jigsaw_frontal_delaunay",
24 "mmg_delaunay", "triwild"),
25 default="triangle_conforming_delaunay");
26 parser.add_argument("--resolve-self-intersection", "-r", action="store_true");
27 parser.add_argument("--with-frame", '-f', action="store_true");
28 parser.add_argument("--with-cell-label", "-l", action="store_true");
29 parser.add_argument("--with-cleanup", "-c", action="store_true");
30 parser.add_argument("--with-triangulation", "-t", action="store_true");
31 parser.add_argument("--stage", type=int, default=1);
32 parser.add_argument("--epsilon", type=float, default=1e-3);
33 parser.add_argument("--log", type=str, help="Logging level",
34 choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
35 default="INFO");
36 parser.add_argument("--with-features", '-F', action="store_true",
37 help="TriWild specific option to preserve features");
38 parser.add_argument("input_svg");
39 parser.add_argument("output_mesh");
40 return parser.parse_args();
41
42def get_logger(level):
43 numeric_level = getattr(logging, level, None);

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected