Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
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
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gmsh
gmsh
Commits
0ce99336
Commit
0ce99336
authored
1 year ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
update example to show how multiple entities can be selected in a loop
parent
78eb2005
No related branches found
No related tags found
No related merge requests found
Pipeline
#11083
passed
1 year ago
Stage: test
Stage: .post
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/api/prepro.py
+6
-2
6 additions, 2 deletions
examples/api/prepro.py
with
6 additions
and
2 deletions
examples/api/prepro.py
+
6
−
2
View file @
0ce99336
...
@@ -199,8 +199,12 @@ def checkForEvent():
...
@@ -199,8 +199,12 @@ def checkForEvent():
# user clicked on "Some action"
# user clicked on "Some action"
gmsh
.
onelab
.
setString
(
"
ONELAB/Action
"
,
[
""
])
gmsh
.
onelab
.
setString
(
"
ONELAB/Action
"
,
[
""
])
gmsh
.
fltk
.
setStatusMessage
(
gmsh
.
fltk
.
setStatusMessage
(
"
Please select an entity (or press
'
q
'
to quit)
"
,
True
)
"
Please select one or more curves (or press
'
q
'
to quit)
"
,
True
)
r
,
ent
=
gmsh
.
fltk
.
selectEntities
()
while
1
:
r
,
ent
=
gmsh
.
fltk
.
selectEntities
(
dim
=
1
)
print
(
"
select returned
"
,
r
)
print
(
"
selected curves
"
,
ent
)
if
r
==
0
:
break
if
gmsh
.
fltk
.
isAvailable
()
==
0
:
return
0
if
gmsh
.
fltk
.
isAvailable
()
==
0
:
return
0
if
r
and
len
(
ent
):
if
r
and
len
(
ent
):
gmsh
.
fltk
.
showContextWindow
(
ent
[
0
][
0
],
ent
[
0
][
1
])
gmsh
.
fltk
.
showContextWindow
(
ent
[
0
][
0
],
ent
[
0
][
1
])
...
...
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