Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
taglut
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jean-Marie Favreau
taglut
Commits
06138b02
Commit
06138b02
authored
13 years ago
by
Jean-Marie Favreau
Browse files
Options
Downloads
Patches
Plain Diff
Add a parameter to choose the method for subdivising cylinders
parent
feb0234e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/meshCutUsingNLoops.py
+15
-3
15 additions, 3 deletions
python/meshCutUsingNLoops.py
with
15 additions
and
3 deletions
python/meshCutUsingNLoops.py
+
15
−
3
View file @
06138b02
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment