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
a08dd1e0
Commit
a08dd1e0
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fine tuning
parent
5fc69863
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Fltk/classificationEditor.cpp
+5
-3
5 additions, 3 deletions
Fltk/classificationEditor.cpp
Fltk/classificationEditor.h
+8
-9
8 additions, 9 deletions
Fltk/classificationEditor.h
with
13 additions
and
12 deletions
Fltk/classificationEditor.cpp
+
5
−
3
View file @
a08dd1e0
...
@@ -195,10 +195,10 @@ static void update_edges_cb(Fl_Widget *w, void *data)
...
@@ -195,10 +195,10 @@ static void update_edges_cb(Fl_Widget *w, void *data)
delete
e
->
selected
->
lines
[
i
];
delete
e
->
selected
->
lines
[
i
];
e
->
selected
->
lines
.
clear
();
e
->
selected
->
lines
.
clear
();
double
threshold
=
e
->
inputs
[
CLASS_VALUE_ANGLE
]
->
value
()
/
180.
*
M_PI
;
for
(
unsigned
int
i
=
0
;
i
<
e
->
edges_detected
.
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
e
->
edges_detected
.
size
();
i
++
){
edge_angle
ea
=
e
->
edges_detected
[
i
];
edge_angle
ea
=
e
->
edges_detected
[
i
];
if
(
ea
.
angle
<=
e
->
inputs
[
CLASS_VALUE_ANGLE
]
->
value
()
/
180
*
M_PI
)
if
(
ea
.
angle
<=
threshold
)
break
;
break
;
e
->
selected
->
lines
.
push_back
(
new
MLine
(
ea
.
v1
,
ea
.
v2
));
e
->
selected
->
lines
.
push_back
(
new
MLine
(
ea
.
v1
,
ea
.
v2
));
}
}
...
@@ -315,6 +315,8 @@ static void show_only_edges_cb(Fl_Widget *w, void *data)
...
@@ -315,6 +315,8 @@ static void show_only_edges_cb(Fl_Widget *w, void *data)
static
int
old_se
=
(
int
)
opt_mesh_surfaces_edges
(
0
,
GMSH_GET
,
0.
);
static
int
old_se
=
(
int
)
opt_mesh_surfaces_edges
(
0
,
GMSH_GET
,
0.
);
if
(
e
->
toggles
[
CLASS_TOGGLE_SHOW_ONLY_EDGES
]
->
value
()){
if
(
e
->
toggles
[
CLASS_TOGGLE_SHOW_ONLY_EDGES
]
->
value
()){
opt_mesh_lines
(
0
,
GMSH_SET
|
GMSH_GUI
,
1.
);
opt_mesh_lines
(
0
,
GMSH_SET
|
GMSH_GUI
,
1.
);
old_sf
=
(
int
)
opt_mesh_surfaces_faces
(
0
,
GMSH_GET
,
0.
);
old_se
=
(
int
)
opt_mesh_surfaces_edges
(
0
,
GMSH_GET
,
0.
);
opt_mesh_surfaces_faces
(
0
,
GMSH_SET
|
GMSH_GUI
,
0.
);
opt_mesh_surfaces_faces
(
0
,
GMSH_SET
|
GMSH_GUI
,
0.
);
opt_mesh_surfaces_edges
(
0
,
GMSH_SET
|
GMSH_GUI
,
0.
);
opt_mesh_surfaces_edges
(
0
,
GMSH_SET
|
GMSH_GUI
,
0.
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Fltk/classificationEditor.h
+
8
−
9
View file @
a08dd1e0
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
#define _CLASSIFICATION_EDITOR_H_
#define _CLASSIFICATION_EDITOR_H_
#include
<vector>
#include
<vector>
#include
<set>
#include
<FL/Fl_Window.H>
#include
<FL/Fl_Window.H>
#include
<FL/Fl_Check_Button.H>
#include
<FL/Fl_Check_Button.H>
#include
<FL/Fl_Value_Input.H>
#include
<FL/Fl_Value_Input.H>
#include
"GModel.h"
#include
"GModel.h"
#include
"MElement.h"
#include
"MElement.h"
#include
"ColorTable.h"
#define CLASS_BUTTON_SELECT_ELEMENTS 0
#define CLASS_BUTTON_SELECT_ELEMENTS 0
#define CLASS_BUTTON_SELECT_ALL_ELEMENTS 1
#define CLASS_BUTTON_SELECT_ALL_ELEMENTS 1
...
@@ -22,18 +22,18 @@
...
@@ -22,18 +22,18 @@
#define CLASS_BUTTON_SELECT_ALL_SURFACES 5
#define CLASS_BUTTON_SELECT_ALL_SURFACES 5
#define CLASS_BUTTON_CLASSIFY 6
#define CLASS_BUTTON_CLASSIFY 6
#define CLASS_TOGGLE_HIDE 0
#define CLASS_TOGGLE_HIDE
0
#define CLASS_TOGGLE_BOUNDARY 1
#define CLASS_TOGGLE_BOUNDARY
1
#define CLASS_TOGGLE_SHOW_ONLY_EDGES 2
#define CLASS_TOGGLE_SHOW_ONLY_EDGES
2
#define CLASS_VALUE_ANGLE 0
#define CLASS_VALUE_ANGLE
0
class
edge_angle
{
class
edge_angle
{
public
:
public
:
MVertex
*
v1
,
*
v2
;
MVertex
*
v1
,
*
v2
;
double
angle
;
double
angle
;
edge_angle
(
MVertex
*
_v1
,
MVertex
*
_v2
,
MElement
*
t1
,
MElement
*
t2
);
edge_angle
(
MVertex
*
_v1
,
MVertex
*
_v2
,
MElement
*
t1
,
MElement
*
t2
);
bool
operator
<
(
const
edge_angle
&
other
)
const
bool
operator
<
(
const
edge_angle
&
other
)
const
{
{
return
other
.
angle
<
angle
;
return
other
.
angle
<
angle
;
}
}
...
@@ -41,14 +41,13 @@ class edge_angle {
...
@@ -41,14 +41,13 @@ class edge_angle {
class
classificationEditor
{
class
classificationEditor
{
public:
public:
double
op
[
10
];
std
::
vector
<
MTriangle
*>
elements
;
std
::
vector
<
MTriangle
*>
elements
;
std
::
set
<
GFace
*>
faces
;
std
::
set
<
GFace
*>
faces
;
Fl_Window
*
window
;
Fl_Window
*
window
;
Fl_Button
*
buttons
[
10
];
Fl_Button
*
buttons
[
10
];
Fl_Check_Button
*
toggles
[
10
];
Fl_Check_Button
*
toggles
[
10
];
Fl_Value_Input
*
inputs
[
10
];
Fl_Value_Input
*
inputs
[
10
];
GEdge
*
selected
,
*
saved
;
GEdge
*
selected
;
std
::
vector
<
edge_angle
>
edges_detected
,
edges_lonly
;
std
::
vector
<
edge_angle
>
edges_detected
,
edges_lonly
;
classificationEditor
();
classificationEditor
();
void
show
(){
window
->
show
();
}
void
show
(){
window
->
show
();
}
...
...
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