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
ba8acbeb
Commit
ba8acbeb
authored
24 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
some color cleaning
parent
b19c15f3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Common/DefaultOptions.h
+32
-32
32 additions, 32 deletions
Common/DefaultOptions.h
Geo/Verif.cpp
+1
-25
1 addition, 25 deletions
Geo/Verif.cpp
Graphics/Mesh.cpp
+11
-12
11 additions, 12 deletions
Graphics/Mesh.cpp
with
44 additions
and
69 deletions
Common/DefaultOptions.h
+
32
−
32
View file @
ba8acbeb
...
...
@@ -626,33 +626,33 @@ StringXColor MeshOptions_Color[] = {
PACK_COLOR
(
0
,
0
,
0
,
255
),
"Mesh line color"
},
{
F
|
O
,
"Triangles"
,
opt_mesh_color_triangles
,
PACK_COLOR
(
153
,
143
,
255
,
255
),
PACK_COLOR
(
153
,
143
,
255
,
255
),
PACK_COLOR
(
60
,
116
,
164
,
255
),
PACK_COLOR
(
60
,
116
,
164
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Mesh triangle color (if ColorCarousel=0)"
},
{
F
|
O
,
"Quadrangles"
,
opt_mesh_color_quadrangles
,
PACK_COLOR
(
1
8
2
,
92
,
255
,
255
),
PACK_COLOR
(
1
8
2
,
92
,
255
,
255
),
PACK_COLOR
(
1
1
2
,
136
,
188
,
255
),
PACK_COLOR
(
1
1
2
,
136
,
188
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Mesh quadrangle color (if ColorCarousel=0)"
},
{
F
|
O
,
"Tetrahedra"
,
opt_mesh_color_tetrahedra
,
PACK_COLOR
(
0
,
255
,
0
,
255
),
PACK_COLOR
(
0
,
255
,
0
,
255
),
PACK_COLOR
(
164
,
160
,
212
,
255
),
PACK_COLOR
(
164
,
160
,
212
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Mesh tetrahedron color (if ColorCarousel=0)"
},
{
F
|
O
,
"Hexahedra"
,
opt_mesh_color_hexahedra
,
PACK_COLOR
(
128
,
255
,
0
,
255
),
PACK_COLOR
(
128
,
255
,
0
,
255
),
PACK_COLOR
(
220
,
184
,
240
,
255
),
PACK_COLOR
(
220
,
184
,
240
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Mesh hexahedron color (if ColorCarousel=0)"
},
{
F
|
O
,
"Prisms"
,
opt_mesh_color_prisms
,
PACK_COLOR
(
0
,
255
,
128
,
255
),
PACK_COLOR
(
0
,
255
,
128
,
255
),
PACK_COLOR
(
108
,
88
,
128
,
255
),
PACK_COLOR
(
108
,
88
,
128
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Mesh prism color (if ColorCarousel=0)"
},
{
F
|
O
,
"Pyramids"
,
opt_mesh_color_pyramid
,
PACK_COLOR
(
128
,
255
,
1
28
,
255
),
PACK_COLOR
(
128
,
255
,
1
28
,
255
),
PACK_COLOR
(
80
,
100
,
1
40
,
255
),
PACK_COLOR
(
80
,
100
,
1
40
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Mesh pyramid color (if ColorCarousel=0)"
},
{
F
|
O
,
"Normals"
,
opt_mesh_color_normals
,
...
...
@@ -666,53 +666,53 @@ StringXColor MeshOptions_Color[] = {
PACK_COLOR
(
0
,
0
,
0
,
255
),
"Tangent mesh vector color"
},
{
F
|
O
,
"One"
,
opt_mesh_color_1
,
PACK_COLOR
(
0
,
82
,
138
,
255
),
PACK_COLOR
(
0
,
82
,
138
,
255
),
PACK_COLOR
(
0
,
0
,
255
,
255
),
PACK_COLOR
(
0
,
0
,
255
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"First color in color carousel"
},
{
F
|
O
,
"Two"
,
opt_mesh_color_2
,
PACK_COLOR
(
255
,
0
,
0
,
255
),
PACK_COLOR
(
255
,
0
,
0
,
255
),
PACK_COLOR
(
0
,
142
,
255
,
255
),
PACK_COLOR
(
0
,
142
,
255
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Second color in color carousel"
},
{
F
|
O
,
"Three"
,
opt_mesh_color_3
,
PACK_COLOR
(
31
,
110
,
171
,
255
),
PACK_COLOR
(
31
,
110
,
171
,
255
),
PACK_COLOR
(
0
,
213
,
255
,
255
),
PACK_COLOR
(
0
,
213
,
255
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Third color in color carousel"
},
{
F
|
O
,
"Four"
,
opt_mesh_color_4
,
PACK_COLOR
(
255
,
255
,
0
,
255
),
PACK_COLOR
(
255
,
255
,
0
,
255
),
PACK_COLOR
(
0
,
255
,
226
,
255
),
PACK_COLOR
(
0
,
255
,
226
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Fourth color in color carousel"
},
{
F
|
O
,
"Five"
,
opt_mesh_color_5
,
PACK_COLOR
(
255
,
0
,
255
,
255
),
PACK_COLOR
(
255
,
0
,
255
,
255
),
PACK_COLOR
(
0
,
255
,
117
,
255
),
PACK_COLOR
(
0
,
255
,
117
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Fifth color in color carousel"
},
{
F
|
O
,
"Six"
,
opt_mesh_color_6
,
PACK_COLOR
(
1
28
,
128
,
0
,
255
),
PACK_COLOR
(
1
28
,
128
,
0
,
255
),
PACK_COLOR
(
1
17
,
255
,
0
,
255
),
PACK_COLOR
(
1
17
,
255
,
0
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Sixth color in color carousel"
},
{
F
|
O
,
"Seven"
,
opt_mesh_color_7
,
PACK_COLOR
(
128
,
0
,
255
,
255
),
PACK_COLOR
(
128
,
0
,
255
,
255
),
PACK_COLOR
(
226
,
255
,
0
,
255
),
PACK_COLOR
(
226
,
255
,
0
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Seventh color in color carousel"
},
{
F
|
O
,
"Eight"
,
opt_mesh_color_8
,
PACK_COLOR
(
128
,
128
,
255
,
255
),
PACK_COLOR
(
128
,
128
,
255
,
255
),
PACK_COLOR
(
255
,
211
,
0
,
255
),
PACK_COLOR
(
255
,
211
,
0
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Eighth color in color carousel"
},
{
F
|
O
,
"Nine"
,
opt_mesh_color_9
,
PACK_COLOR
(
128
,
128
,
255
,
255
),
PACK_COLOR
(
128
,
128
,
255
,
255
),
PACK_COLOR
(
255
,
139
,
0
,
255
),
PACK_COLOR
(
255
,
139
,
0
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"Nitnth color in color carousel"
},
{
F
|
O
,
"Ten"
,
opt_mesh_color_10
,
PACK_COLOR
(
0
,
0
,
255
,
255
),
PACK_COLOR
(
0
,
0
,
255
,
255
),
PACK_COLOR
(
255
,
0
,
0
,
255
),
PACK_COLOR
(
255
,
0
,
0
,
255
),
PACK_COLOR
(
255
,
255
,
255
,
255
),
"tenth color in color carousel"
},
{
0
,
NULL
,
NULL
,
0
,
0
,
0
,
NULL
}
...
...
This diff is collapsed.
Click to expand it.
Geo/Verif.cpp
+
1
−
25
View file @
ba8acbeb
// $Id: Verif.cpp,v 1.
7
2001-0
1-09 14:24
:0
8
geuzaine Exp $
// $Id: Verif.cpp,v 1.
8
2001-0
5-21 20:19
:0
7
geuzaine Exp $
#include
"Gmsh.h"
#include
"Geo.h"
...
...
@@ -258,27 +258,3 @@ int allfaceslinked (int iz , List_T *Liste , List_T *old){
return
(
CONTOUR_TROUVE
);
}
void
PremierVolume
(
int
iSurf
,
int
*
iVol
){
int
i
,
j
;
Surface
*
sur
;
Volume
*
vol
;
*
iVol
=
0
;
List_T
*
temp
=
Tree2List
(
THEM
->
Volumes
);
for
(
i
=
0
;
i
<
List_Nbr
(
temp
);
i
++
){
List_Read
(
temp
,
i
,
&
vol
);
for
(
j
=
0
;
j
<
List_Nbr
(
vol
->
Surfaces
);
j
++
){
List_Read
(
vol
->
Surfaces
,
j
,
&
sur
);
if
(
abs
(
sur
->
Num
)
==
iSurf
){
List_Delete
(
temp
);
*
iVol
=
i
+
1
;
return
;
}
}
}
if
(
*
iVol
==
0
)
*
iVol
=
iSurf
;
List_Delete
(
temp
);
}
This diff is collapsed.
Click to expand it.
Graphics/Mesh.cpp
+
11
−
12
View file @
ba8acbeb
// $Id: Mesh.cpp,v 1.2
5
2001-05-2
0 19:24:53
geuzaine Exp $
// $Id: Mesh.cpp,v 1.2
6
2001-05-2
1 20:19:08
geuzaine Exp $
#include
"Gmsh.h"
#include
"GmshUI.h"
...
...
@@ -15,8 +15,6 @@
extern
Mesh
*
THEM
;
extern
Context_T
CTX
;
static
int
iVolume
;
/* ------------------------------------------------------------------------ */
/* D r a w _ M e s h */
/* ------------------------------------------------------------------------ */
...
...
@@ -44,6 +42,8 @@ void draw_polygon_2d (double r, double g, double b, int n,
}
static
int
iColor
;
void
ColorSwitch
(
int
i
){
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
mesh
.
carousel
[
i
%
10
]);
}
...
...
@@ -70,6 +70,7 @@ void Draw_Mesh (Mesh *M) {
glPointSize
(
2
);
glLineWidth
(
1
);
iColor
=
0
;
if
(
CTX
.
mesh
.
hidden
)
glEnable
(
GL_POLYGON_OFFSET_FILL
);
...
...
@@ -122,26 +123,24 @@ void Draw_Mesh (Mesh *M) {
void
Draw_Mesh_Volumes
(
void
*
a
,
void
*
b
){
Volume
**
v
;
v
=
(
Volume
**
)
a
;
iColor
++
;
Tree_Action
((
*
v
)
->
Simplexes
,
Draw_Simplex_Volume
);
Tree_Action
((
*
v
)
->
Hexahedra
,
Draw_Hexahedron_Volume
);
Tree_Action
((
*
v
)
->
Prisms
,
Draw_Prism_Volume
);
}
void
PremierVolume
(
int
iSurf
,
int
*
iVol
);
void
Draw_Mesh_Surfaces
(
void
*
a
,
void
*
b
){
Surface
**
s
;
s
=
(
Surface
**
)
a
;
PremierVolume
(
abs
((
*
s
)
->
Num
),
&
iVolume
);
iVolume
=
-
iVolume
;
iColor
++
;
Tree_Action
((
*
s
)
->
Simplexes
,
Draw_Simplex_Surfaces
);
}
void
Draw_Mesh_Curves
(
void
*
a
,
void
*
b
){
Curve
**
c
;
c
=
(
Curve
**
)
a
;
if
((
*
c
)
->
Num
<
0
)
return
;
iColor
++
;
Tree_Action
((
*
c
)
->
Simplexes
,
Draw_Simplex_Points
);
}
...
...
@@ -226,7 +225,7 @@ void Draw_Simplex_Volume (void *a, void *b){
}
if
(
CTX
.
mesh
.
color_carousel
)
ColorSwitch
((
*
s
)
->
iEnt
+
1
);
ColorSwitch
((
*
s
)
->
iEnt
);
else
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
mesh
.
tetrahedron
);
...
...
@@ -458,7 +457,7 @@ void Draw_Simplex_Surfaces (void *a, void *b){
}
if
(
CTX
.
mesh
.
color_carousel
)
ColorSwitch
(
(
*
s
)
->
iEnt
);
ColorSwitch
(
iColor
);
else
{
if
(
K
==
3
)
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
mesh
.
triangle
);
...
...
@@ -565,7 +564,7 @@ void Draw_Hexahedron_Volume (void *a, void *b){
}
if
(
CTX
.
mesh
.
color_carousel
)
ColorSwitch
((
*
h
)
->
iEnt
+
1
);
ColorSwitch
((
*
h
)
->
iEnt
);
else
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
mesh
.
hexahedron
);
...
...
@@ -658,7 +657,7 @@ void Draw_Prism_Volume (void *a, void *b){
if
(
!
EntiteEstElleVisible
((
*
p
)
->
iEnt
))
return
;
if
(
CTX
.
mesh
.
color_carousel
)
ColorSwitch
((
*
p
)
->
iEnt
+
1
);
ColorSwitch
((
*
p
)
->
iEnt
);
else
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
mesh
.
prism
);
...
...
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