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
cf25da1a
Commit
cf25da1a
authored
24 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
Added controls for -clscale, -meshscale, -rand in GUI
parent
5d7acb85
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Fltk/Callbacks.cpp
+10
-1
10 additions, 1 deletion
Fltk/Callbacks.cpp
Fltk/Callbacks.h
+3
-0
3 additions, 0 deletions
Fltk/Callbacks.h
Fltk/GUI.cpp
+27
-7
27 additions, 7 deletions
Fltk/GUI.cpp
with
40 additions
and
8 deletions
Fltk/Callbacks.cpp
+
10
−
1
View file @
cf25da1a
// $Id: Callbacks.cpp,v 1.2
6
2001-02-0
3
1
8:33:45
geuzaine Exp $
// $Id: Callbacks.cpp,v 1.2
7
2001-02-0
7
1
3:25:39
geuzaine Exp $
#include
"Gmsh.h"
#include
"Gmsh.h"
#include
"GmshUI.h"
#include
"GmshUI.h"
...
@@ -480,6 +480,15 @@ void opt_mesh_algo_cb(CALLBACK_ARGS){
...
@@ -480,6 +480,15 @@ void opt_mesh_algo_cb(CALLBACK_ARGS){
void
opt_mesh_smoothing_cb
(
CALLBACK_ARGS
){
void
opt_mesh_smoothing_cb
(
CALLBACK_ARGS
){
CTX
.
mesh
.
nb_smoothing
=
(
int
)((
Fl_Value_Input
*
)
w
)
->
value
();
CTX
.
mesh
.
nb_smoothing
=
(
int
)((
Fl_Value_Input
*
)
w
)
->
value
();
}
}
void
opt_mesh_scaling_factor_cb
(
CALLBACK_ARGS
){
CTX
.
mesh
.
scaling_factor
=
((
Fl_Value_Input
*
)
w
)
->
value
();
}
void
opt_mesh_lc_factor_cb
(
CALLBACK_ARGS
){
CTX
.
mesh
.
lc_factor
=
((
Fl_Value_Input
*
)
w
)
->
value
();
}
void
opt_mesh_rand_factor_cb
(
CALLBACK_ARGS
){
CTX
.
mesh
.
rand_factor
=
((
Fl_Value_Input
*
)
w
)
->
value
();
}
void
opt_mesh_interactive_cb
(
CALLBACK_ARGS
){
void
opt_mesh_interactive_cb
(
CALLBACK_ARGS
){
CTX
.
mesh
.
interactive
=
!
CTX
.
mesh
.
interactive
;
CTX
.
mesh
.
interactive
=
!
CTX
.
mesh
.
interactive
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Fltk/Callbacks.h
+
3
−
0
View file @
cf25da1a
...
@@ -75,6 +75,9 @@ void opt_mesh_normals_cb(CALLBACK_ARGS) ;
...
@@ -75,6 +75,9 @@ void opt_mesh_normals_cb(CALLBACK_ARGS) ;
void
opt_mesh_degree_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_degree_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_algo_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_algo_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_smoothing_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_smoothing_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_scaling_factor_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_lc_factor_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_rand_factor_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_interactive_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_interactive_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_explode_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_explode_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_aspect_cb
(
CALLBACK_ARGS
)
;
void
opt_mesh_aspect_cb
(
CALLBACK_ARGS
)
;
...
...
This diff is collapsed.
Click to expand it.
Fltk/GUI.cpp
+
27
−
7
View file @
cf25da1a
// $Id: GUI.cpp,v 1.4
0
2001-02-0
5
1
4
:2
0:14
geuzaine Exp $
// $Id: GUI.cpp,v 1.4
1
2001-02-0
7
1
3
:2
5:39
geuzaine Exp $
// To make the interface as visually consistent as possible, please:
// To make the interface as visually consistent as possible, please:
// - use the BH, BW, WB, IW values for button heights/widths, window borders, etc.
// - use the BH, BW, WB, IW values for button heights/widths, window borders, etc.
...
@@ -1132,7 +1132,7 @@ void GUI::create_mesh_options_window(){
...
@@ -1132,7 +1132,7 @@ void GUI::create_mesh_options_window(){
if
(
!
init_mesh_options_window
){
if
(
!
init_mesh_options_window
){
init_mesh_options_window
=
1
;
init_mesh_options_window
=
1
;
int
width
=
2
6
*
CTX
.
fontsize
;
int
width
=
2
9
*
CTX
.
fontsize
;
int
height
=
5
*
WB
+
9
*
BH
;
int
height
=
5
*
WB
+
9
*
BH
;
mesh_window
=
new
Fl_Window
(
width
,
height
);
mesh_window
=
new
Fl_Window
(
width
,
height
);
...
@@ -1159,16 +1159,36 @@ void GUI::create_mesh_options_window(){
...
@@ -1159,16 +1159,36 @@ void GUI::create_mesh_options_window(){
mesh_butt
[
i
]
->
labelsize
(
CTX
.
fontsize
);
mesh_butt
[
i
]
->
labelsize
(
CTX
.
fontsize
);
mesh_butt
[
i
]
->
selection_color
(
FL_YELLOW
);
mesh_butt
[
i
]
->
selection_color
(
FL_YELLOW
);
}
}
mesh_value
[
0
]
=
new
Fl_Value_Input
(
2
*
WB
,
2
*
WB
+
4
*
BH
,
IW
,
BH
,
mesh_value
[
0
]
=
new
Fl_Value_Input
(
2
*
WB
,
2
*
WB
+
4
*
BH
,
IW
,
BH
,
"Number of smoothing steps"
);
"Number of smoothing steps"
);
mesh_value
[
0
]
->
minimum
(
0
);
mesh_value
[
0
]
->
minimum
(
0
);
mesh_value
[
0
]
->
maximum
(
100
);
mesh_value
[
0
]
->
maximum
(
100
);
mesh_value
[
0
]
->
step
(
1
);
mesh_value
[
0
]
->
step
(
1
);
mesh_value
[
0
]
->
callback
(
opt_mesh_smoothing_cb
);
mesh_value
[
0
]
->
callback
(
opt_mesh_smoothing_cb
);
mesh_value
[
0
]
->
value
(
CTX
.
mesh
.
nb_smoothing
);
mesh_value
[
0
]
->
value
(
CTX
.
mesh
.
nb_smoothing
);
mesh_value
[
0
]
->
labelsize
(
CTX
.
fontsize
);
mesh_value
[
1
]
=
new
Fl_Value_Input
(
2
*
WB
,
2
*
WB
+
5
*
BH
,
IW
,
BH
,
"Mesh scaling factor"
);
mesh_value
[
0
]
->
type
(
FL_HORIZONTAL
);
mesh_value
[
1
]
->
minimum
(
0
);
mesh_value
[
0
]
->
align
(
FL_ALIGN_RIGHT
);
mesh_value
[
1
]
->
maximum
(
100
);
mesh_value
[
1
]
->
step
(
0.001
);
mesh_value
[
1
]
->
callback
(
opt_mesh_scaling_factor_cb
);
mesh_value
[
1
]
->
value
(
CTX
.
mesh
.
scaling_factor
);
mesh_value
[
2
]
=
new
Fl_Value_Input
(
2
*
WB
,
2
*
WB
+
6
*
BH
,
IW
,
BH
,
"Characteristic length scaling factor"
);
mesh_value
[
2
]
->
minimum
(
0
);
mesh_value
[
2
]
->
maximum
(
100
);
mesh_value
[
2
]
->
step
(
0.001
);
mesh_value
[
2
]
->
callback
(
opt_mesh_lc_factor_cb
);
mesh_value
[
2
]
->
value
(
CTX
.
mesh
.
lc_factor
);
mesh_value
[
3
]
=
new
Fl_Value_Input
(
2
*
WB
,
2
*
WB
+
7
*
BH
,
IW
,
BH
,
"Random perturbation factor"
);
mesh_value
[
3
]
->
minimum
(
1.e-6
);
mesh_value
[
3
]
->
maximum
(
1.e-1
);
mesh_value
[
3
]
->
step
(
1.e-6
);
mesh_value
[
3
]
->
callback
(
opt_mesh_rand_factor_cb
);
mesh_value
[
3
]
->
value
(
CTX
.
mesh
.
rand_factor
);
for
(
i
=
0
;
i
<
4
;
i
++
){
mesh_value
[
i
]
->
labelsize
(
CTX
.
fontsize
);
mesh_value
[
i
]
->
type
(
FL_HORIZONTAL
);
mesh_value
[
i
]
->
align
(
FL_ALIGN_RIGHT
);
}
o
->
end
();
o
->
end
();
}
}
...
...
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