Skip to content
Snippets Groups Projects
Commit 06138b02 authored by Jean-Marie Favreau's avatar Jean-Marie Favreau
Browse files

Add a parameter to choose the method for subdivising cylinders

parent feb0234e
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,8 @@ Options:
in the sense of area/perimeter < VALUE
--split-cylinders=VALUE Split the cylinders into subcylinders using the given value as threshold for the
wanted ratio between perimeter and length
--sc-method=VALUE Method ussed for the cylindrical splitting (available values:
0: cylindrical parameterization, 1 (default): floater parameterization)
-d, --display Display the final mesh
-i, --infos Display information about final mesh
......@@ -73,7 +75,8 @@ def main():
"b-splines=", "bs-mesh=",
"flat-discs=",
"cylinder-param=", "param-choice=",
"skip-nloop", "split-cylinders="])
"skip-nloop", "split-cylinders=",
"sc-method="])
except getopt.GetoptError as msg:
# print help information and exit:
print("Error: " + msg)
......@@ -99,7 +102,16 @@ def main():
paramChoice = taglut.MeshPLCut.CPCByConformity
paramMethod = taglut.MeshPLCut.CPMFloater4IntegralLines
splitCylinders = -1
scMethod = "floater"
for o, a in opts:
if o == "--sc-method":
if a == "0":
scMethod = "cylinder"
elif a == "1":
scMethod = "floater"
else:
print("Unknown choice for cylindrical splitting")
sys.exit(1)
if o == "--split-cylinders":
splitCylinders = float(a)
if o == "--skip-nloop":
......@@ -220,12 +232,12 @@ def main():
if not cylinders:
print("Subdivise cylinders into quadrangles...")
if splitCylinders > 0:
if splitCylinders > 0 and scMethod == "cylinder":
m4 = plCut.cutMeshInQuadranglesFromCylindricalTiling(m3, splitCylinders, paramChoice, paramMethod)
else:
m4 = plCut.cutMeshInQuadranglesFromCylindricalTiling(m3, -1., paramChoice, paramMethod)
if splitCylinders > 0:
if splitCylinders > 0 and scMethod == "floater":
print("Subdivise cylinders into sub cylinders...")
m5 = plCut.cutCylinders(m4, splitCylinders)
m4 = m5
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment