| 16 | import scipy.sparse |
| 17 | |
| 18 | def parse_args(): |
| 19 | parser = argparse.ArgumentParser(__doc__); |
| 20 | parser.add_argument("--log", type=str, help="Logging level", |
| 21 | choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"], |
| 22 | default="INFO"); |
| 23 | parser.add_argument("--remove-holes", action="store_true", |
| 24 | help="Remove triangles on the outside of the shape"); |
| 25 | parser.add_argument("--repousse", action="store_true", |
| 26 | help="Inflate the surface in repoussé-like style"); |
| 27 | parser.add_argument("--bevel", type=float, default=0.0, |
| 28 | help="Bevel edges by this amount"); |
| 29 | parser.add_argument("--extrude", type=float, default=0.0, |
| 30 | help="Extrude input graphics"); |
| 31 | parser.add_argument("input_svg"); |
| 32 | parser.add_argument("output_mesh"); |
| 33 | return parser.parse_args(); |
| 34 | |
| 35 | def get_logger(level): |
| 36 | numeric_level = getattr(logging, level, None); |