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

Add a parameter to skip the cylinder splitting

parent 36bae174
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@
Options:
-a, --angles Adjust using angles
-c, --cylinders Do not cut the cylinders after the n-loop computation
-d, --display Display the final mesh
-i, --infos Display information about final mesh
-o, --output=FILE Save the mesh using the file FILE
......@@ -49,7 +50,7 @@ def usage():
def main():
try:
opts, args = my_getopt(sys.argv[1:], "hdio:x:y:a", ["help", "infos", "display", "output=", "x=", "y=", "angles"])
opts, args = my_getopt(sys.argv[1:], "hdio:x:y:ac", ["help", "infos", "display", "output=", "x=", "y=", "angles", "cylinders"])
except getopt.GetoptError, msg:
# print help information and exit:
print "Error: ", msg
......@@ -65,6 +66,7 @@ def main():
nLoops = False
plnLoops = False
angles = False
cylinders = False
for o, a in opts:
if o in ("-i", "--infos"):
infos = True
......@@ -76,6 +78,8 @@ def main():
sizey = int(a)
if o in ("-o", "--output"):
outputFile = a
if o in ("-c", "--cylinders"):
cylinders = True
if o in ("-a", "--angles"):
angles = True
if o in ("-h", "--help"):
......@@ -123,8 +127,11 @@ def main():
plCut = taglut.MeshPLCut()
m2 = plCut.cutMesh(m, nl)
print "Split cylinders..."
m3 = plCut.cutMeshInQuadranglesFromCylindricalTiling(m2)
if not cylinders:
print "Split cylinders..."
m3 = plCut.cutMeshInQuadranglesFromCylindricalTiling(m2)
else:
m3 = m2
if (infos):
print m3.getInfos()
......
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