Skip to content

Commit

Permalink
Minor ordering of things
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdoc committed May 16, 2024
1 parent 9663ee6 commit 55df628
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions make_headcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,17 +391,6 @@ def pipeline(
type=str,
help="output headcase model (*.zip)",
)
parser.add_argument(
"--expand-head-model",
type=float,
default=0.1,
help="Expand the head model by this amount (in mm) before generating the "
"headcase. The default (0.1 mm) should work for most cases. If the resulting "
"headcase is too tight, one can try increasing this value. If the resulting "
"headcase is too loose, one can try passing a negative value to shrink the head"
"model. It is not recommended to pass a value greater than 1 mm or less than "
"-1 mm.",
)
parser.add_argument(
"--headcoil",
"-c",
Expand All @@ -421,6 +410,18 @@ def pipeline(
help="Split the headcase model into 4 (default) or 2 parts. Four parts require "
"less support material when 3d printing the headcase.",
)
parser.add_argument(
"--workdir",
type=str,
required=False,
default=None,
help="Working directory to use. If this flag is not used, "
"then a temporary directory is created and deleted at the end. "
"If this flag is used, the intermediate models are stored "
"in the working directory and not deleted. "
"This option is useful for manual tuning of the alignment, "
"in combination with the flag --generated-headcase-only",
)
parser.add_argument(
"--generate-headcase-only",
action="store_true",
Expand All @@ -437,16 +438,15 @@ def pipeline(
f"to fine-tune the headcase. The default file is {DEFAULT_CUSTOMIZATIONS}",
)
parser.add_argument(
"--workdir",
type=str,
required=False,
default=None,
help="Working directory to use. If this flag is not used, "
"then a temporary directory is created and deleted at the end. "
"If this flag is used, the intermediate models are stored "
"in the working directory and not deleted. "
"This option is useful for manual tuning of the alignment, "
"in combination with the flag --generated-headcase-only",
"--expand-head-model",
type=float,
default=0.1,
help="Expand the head model by this amount (in mm) before generating the "
"headcase. The default (0.1 mm) should work for most cases. If the resulting "
"headcase is too tight, one can try increasing this value. If the resulting "
"headcase is too loose, one can try passing a negative value to shrink the head"
"model. It is not recommended to pass a value greater than 1 mm or less than "
"-1 mm.",
)
args = parser.parse_args()
infile = os.path.abspath(args.infile)
Expand All @@ -463,18 +463,19 @@ def pipeline(
gen_case(
infile,
outfile,
expand_head_model=expand_head_model,
casetype=casetype,
nparts=nparts,
workdir=workdir,
customizations=customizations,
expand_head_model=expand_head_model,
)
else:
pipeline(
infile,
outfile,
expand_head_model=expand_head_model,
casetype=casetype,
nparts=nparts,
workdir=workdir,
customizations=customizations,
expand_head_model=expand_head_model,
)

0 comments on commit 55df628

Please sign in to comment.