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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
4ac3cc6b
Commit
4ac3cc6b
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
make Show/Hide work with GModel entities
parent
f9841901
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Geo/Geo.cpp
+56
-12
56 additions, 12 deletions
Geo/Geo.cpp
with
56 additions
and
12 deletions
Geo/Geo.cpp
+
56
−
12
View file @
4ac3cc6b
...
@@ -1236,10 +1236,16 @@ void VisibilityShape(int Type, int Num, int Mode)
...
@@ -1236,10 +1236,16 @@ void VisibilityShape(int Type, int Num, int Mode)
switch
(
Type
)
{
switch
(
Type
)
{
case
MSH_POINT
:
case
MSH_POINT
:
case
MSH_POINT_FROM_GMODEL
:
if
((
v
=
FindPoint
(
Num
)))
if
((
v
=
FindPoint
(
Num
)))
v
->
Visible
=
Mode
;
v
->
Visible
=
Mode
;
else
{
GVertex
*
gv
=
GModel
::
current
()
->
getVertexByTag
(
Num
);
if
(
gv
)
gv
->
setVisibility
(
Mode
);
else
else
Msg
::
Warning
(
"Unknown point %d (use '*' to hide/show all points)"
,
Num
);
Msg
::
Warning
(
"Unknown point %d (use '*' to hide/show all points)"
,
Num
);
}
break
;
break
;
case
MSH_SEGM_LINE
:
case
MSH_SEGM_LINE
:
case
MSH_SEGM_SPLN
:
case
MSH_SEGM_SPLN
:
...
@@ -1251,26 +1257,44 @@ void VisibilityShape(int Type, int Num, int Mode)
...
@@ -1251,26 +1257,44 @@ void VisibilityShape(int Type, int Num, int Mode)
case
MSH_SEGM_ELLI_INV
:
case
MSH_SEGM_ELLI_INV
:
case
MSH_SEGM_NURBS
:
case
MSH_SEGM_NURBS
:
case
MSH_SEGM_DISCRETE
:
case
MSH_SEGM_DISCRETE
:
case
MSH_SEGM_FROM_GMODEL
:
if
((
c
=
FindCurve
(
Num
)))
if
((
c
=
FindCurve
(
Num
)))
c
->
Visible
=
Mode
;
c
->
Visible
=
Mode
;
else
{
GEdge
*
ge
=
GModel
::
current
()
->
getEdgeByTag
(
Num
);
if
(
ge
)
ge
->
setVisibility
(
Mode
);
else
else
Msg
::
Warning
(
"Unknown line %d (use '*' to hide/show all lines)"
,
Num
);
Msg
::
Warning
(
"Unknown line %d (use '*' to hide/show all lines)"
,
Num
);
}
break
;
break
;
case
MSH_SURF_TRIC
:
case
MSH_SURF_TRIC
:
case
MSH_SURF_REGL
:
case
MSH_SURF_REGL
:
case
MSH_SURF_PLAN
:
case
MSH_SURF_PLAN
:
case
MSH_SURF_DISCRETE
:
case
MSH_SURF_DISCRETE
:
case
MSH_SURF_FROM_GMODEL
:
if
((
s
=
FindSurface
(
Num
)))
if
((
s
=
FindSurface
(
Num
)))
s
->
Visible
=
Mode
;
s
->
Visible
=
Mode
;
else
{
GFace
*
gf
=
GModel
::
current
()
->
getFaceByTag
(
Num
);
if
(
gf
)
gf
->
setVisibility
(
Mode
);
else
else
Msg
::
Warning
(
"Unknown surface %d (use '*' to hide/show all surfaces)"
,
Num
);
Msg
::
Warning
(
"Unknown surface %d (use '*' to hide/show all surfaces)"
,
Num
);
}
break
;
break
;
case
MSH_VOLUME
:
case
MSH_VOLUME
:
case
MSH_VOLUME_DISCRETE
:
case
MSH_VOLUME_DISCRETE
:
case
MSH_VOLUME_FROM_GMODEL
:
if
((
V
=
FindVolume
(
Num
)))
if
((
V
=
FindVolume
(
Num
)))
V
->
Visible
=
Mode
;
V
->
Visible
=
Mode
;
else
{
GRegion
*
gr
=
GModel
::
current
()
->
getRegionByTag
(
Num
);
if
(
gr
)
gr
->
setVisibility
(
Mode
);
else
else
Msg
::
Warning
(
"Unknown volume %d (use '*' to hide/show all volumes)"
,
Num
);
Msg
::
Warning
(
"Unknown volume %d (use '*' to hide/show all volumes)"
,
Num
);
}
break
;
break
;
default
:
default
:
break
;
break
;
...
@@ -1289,10 +1313,30 @@ void VisibilityShape(char *str, int Type, int Mode)
...
@@ -1289,10 +1313,30 @@ void VisibilityShape(char *str, int Type, int Mode)
if
(
!
strcmp
(
str
,
"all"
)
||
!
strcmp
(
str
,
"*"
))
{
if
(
!
strcmp
(
str
,
"all"
)
||
!
strcmp
(
str
,
"*"
))
{
switch
(
Type
)
{
switch
(
Type
)
{
case
0
:
Tree_Action
(
GModel
::
current
()
->
getGEOInternals
()
->
Points
,
vis_nod
);
break
;
case
0
:
case
1
:
Tree_Action
(
GModel
::
current
()
->
getGEOInternals
()
->
Curves
,
vis_cur
);
break
;
Tree_Action
(
GModel
::
current
()
->
getGEOInternals
()
->
Points
,
vis_nod
);
case
2
:
Tree_Action
(
GModel
::
current
()
->
getGEOInternals
()
->
Surfaces
,
vis_sur
);
break
;
for
(
GModel
::
viter
it
=
GModel
::
current
()
->
firstVertex
();
case
3
:
Tree_Action
(
GModel
::
current
()
->
getGEOInternals
()
->
Volumes
,
vis_vol
);
break
;
it
!=
GModel
::
current
()
->
lastVertex
();
it
++
)
(
*
it
)
->
setVisibility
(
Mode
);
break
;
case
1
:
Tree_Action
(
GModel
::
current
()
->
getGEOInternals
()
->
Curves
,
vis_cur
);
for
(
GModel
::
eiter
it
=
GModel
::
current
()
->
firstEdge
();
it
!=
GModel
::
current
()
->
lastEdge
();
it
++
)
(
*
it
)
->
setVisibility
(
Mode
);
break
;
case
2
:
Tree_Action
(
GModel
::
current
()
->
getGEOInternals
()
->
Surfaces
,
vis_sur
);
for
(
GModel
::
fiter
it
=
GModel
::
current
()
->
firstFace
();
it
!=
GModel
::
current
()
->
lastFace
();
it
++
)
(
*
it
)
->
setVisibility
(
Mode
);
break
;
case
3
:
Tree_Action
(
GModel
::
current
()
->
getGEOInternals
()
->
Volumes
,
vis_vol
);
for
(
GModel
::
riter
it
=
GModel
::
current
()
->
firstRegion
();
it
!=
GModel
::
current
()
->
lastRegion
();
it
++
)
(
*
it
)
->
setVisibility
(
Mode
);
break
;
}
}
}
}
else
{
else
{
...
...
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