Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
meshalyzer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openCARP
meshalyzer
Commits
80554f9c
Commit
80554f9c
authored
Nov 20, 2020
by
vigmond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected highlighting with element data
parent
da28aecf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
12 deletions
+26
-12
src/Model.cc
src/Model.cc
+15
-4
src/Model.h
src/Model.h
+1
-1
src/TBmeshWin.cc
src/TBmeshWin.cc
+6
-3
src/trimesh.fl
src/trimesh.fl
+4
-4
No files found.
src/Model.cc
View file @
80554f9c
...
...
@@ -1285,8 +1285,10 @@ Model::~Model()
*
* \param hinfo window in which to output text
* \param hilight list of highlighted objects
* @param data data values
* @param eledata data on elements, points o.w.
*/
void
Model
::
hilight_info
(
HiLiteInfoWin
*
hinfo
,
int
*
hilight
,
DATA_TYPE
*
data
)
void
Model
::
hilight_info
(
HiLiteInfoWin
*
hinfo
,
int
*
hilight
,
DATA_TYPE
*
data
,
bool
eledata
)
{
hinfo
->
clear
();
char
*
txt
=
new
char
[
256
];
...
...
@@ -1297,7 +1299,7 @@ void Model::hilight_info( HiLiteInfoWin* hinfo, int* hilight, DATA_TYPE* data )
sprintf
(
txt
,
"@b@C%6dVertex: %d of %d"
,
FL_DARK_GREEN
,
hilight
[
Vertex
],
pt
.
num
()
);
hinfo
->
add
(
txt
);
if
(
data
!=
NULL
)
{
if
(
data
&&
!
eledata
)
{
sprintf
(
txt
,
"value: %f"
,
data
[
hilight
[
Vertex
]]
);
hinfo
->
add
(
txt
);
}
...
...
@@ -1364,13 +1366,14 @@ void Model::hilight_info( HiLiteInfoWin* hinfo, int* hilight, DATA_TYPE* data )
hinfo
->
add
(
""
);
// data extrema
if
(
data
)
{
const
char
*
src
=
eledata
?
"element"
:
"vertex"
;
hinfo
->
add
(
"Data Extrema"
);
DATA_TYPE
*
mind
=
min_element
(
data
,
data
+
pt
.
num
()
);
sprintf
(
txt
,
"Minimum: %g @
"
,
*
mind
);
sprintf
(
txt
,
"Minimum: %g @
%s"
,
*
mind
,
src
);
hinfo
->
add
(
txt
);
hinfo
->
add
(
format_hilite
(
mind
-
data
,
mind
-
data
==
hilight
[
Vertex
])
);
DATA_TYPE
*
maxd
=
max_element
(
data
,
data
+
pt
.
num
()
);
sprintf
(
txt
,
"Maximum: %g @
"
,
*
maxd
);
sprintf
(
txt
,
"Maximum: %g @
%s"
,
*
maxd
,
src
);
hinfo
->
add
(
txt
);
hinfo
->
add
(
format_hilite
(
maxd
-
data
,
maxd
-
data
==
hilight
[
Vertex
])
);
hinfo
->
add
(
""
);
...
...
@@ -1396,6 +1399,10 @@ void Model::hilight_info( HiLiteInfoWin* hinfo, int* hilight, DATA_TYPE* data )
int
hivol
=
hilight
[
VolEle
];
sprintf
(
txt
,
"@b@C%6dVolume Element: %d of %lu"
,
FL_RED
,
hivol
,
_vol
.
size
()
);
hinfo
->
add
(
txt
);
if
(
eledata
)
{
sprintf
(
txt
,
"value: %f"
,
data
[
hilight
[
VolEle
]]
);
hinfo
->
add
(
txt
);
}
hinfo
->
add
(
"nodes:
\t
"
);
const
int
*
tet
=
_vol
[
hivol
]
->
obj
();
for
(
int
i
=
0
;
i
<
_vol
[
hivol
]
->
ptsPerObj
();
i
++
)
{
...
...
@@ -1415,6 +1422,10 @@ void Model::hilight_info( HiLiteInfoWin* hinfo, int* hilight, DATA_TYPE* data )
FL_BLUE
,
hilight
[
SurfEle
],
number
(
SurfEle
),
lele
,
surface
(
elesurf
)
->
num
(),
surface
(
elesurf
)
->
label
().
c_str
());
hinfo
->
add
(
txt
);
if
(
eledata
&&
!
_vol
.
size
()
)
{
sprintf
(
txt
,
"value: %f"
,
data
[
hilight
[
SurfEle
]]
);
hinfo
->
add
(
txt
);
}
hinfo
->
add
(
"nodes:
\t
"
);
for
(
int
i
=
0
;
i
<
surface
(
elesurf
)
->
ele
(
lele
)
->
ptsPerObj
();
i
++
)
{
int
node
=
surface
(
elesurf
)
->
ele
(
lele
)
->
obj
()[
i
];
...
...
src/Model.h
View file @
80554f9c
...
...
@@ -66,7 +66,7 @@ class Model
void
visibility
(
int
,
bool
a
);
void
opacity
(
int
s
,
float
opac
);
void
randomize_color
(
Object_t
obj
);
void
hilight_info
(
HiLiteInfoWin
*
,
int
*
,
DATA_TYPE
*
d
=
NULL
);
void
hilight_info
(
HiLiteInfoWin
*
,
int
*
,
DATA_TYPE
*
d
=
NULL
,
bool
eb
=
false
);
void
stride
(
Object_t
o
,
int
s
){
_outstride
[
o
]
=
s
;}
int
stride
(
Object_t
o
)
const
{
return
_outstride
[
o
];
}
const
GLfloat
*
pt_offset
()
const
{
return
pt
.
offset
();}
...
...
src/TBmeshWin.cc
View file @
80554f9c
...
...
@@ -145,8 +145,10 @@ void TBmeshWin::highlight( Object_t obj, int a )
if
(
obj
==
Vertex
)
{
if
(
timeplotter
->
window
->
shown
()
)
timeplot
();
if
(
timeplotter
->
graph
->
crvi_vis
()
)
static_curve_info_cb
(
timeplotter
->
graph
);
if
(
have_data
!=
NoData
)
contwin
->
vertvalout
->
value
(
data
[
a
]
);
}
if
(
have_data
==
NoData
)
return
;
Object_t
o
=!
dataBuffer
->
ele_based
()
?
Vertex
:
(
model
->
numVol
()
?
VolEle
:
SurfEle
);
if
(
obj
==
o
)
contwin
->
vertvalout
->
value
(
data
[
a
]
);
}
...
...
@@ -260,7 +262,8 @@ void TBmeshWin :: draw()
if
(
have_data
!=
NoData
)
{
if
(
(
data
=
dataBuffer
->
slice
(
tm
))
==
NULL
)
data
=
dataBuffer
->
slice
(
dataBuffer
->
max_tm
());
contwin
->
dispVertVal
(
data
[
hilight
[
Vertex
]]);
Object_t
o
=
!
dataBuffer
->
ele_based
()
?
Vertex
:
(
model
->
numVol
()
?
VolEle
:
SurfEle
);
contwin
->
dispVertVal
(
data
[
hilight
[
o
]]);
}
if
(
autocol
==
true
)
{
...
...
@@ -1306,7 +1309,7 @@ void TBmeshWin :: randomize_color( Object_t obj )
void
TBmeshWin
::
hiliteinfo
()
{
model
->
hilight_info
(
hinfo
,
hilight
,
data
);
model
->
hilight_info
(
hinfo
,
hilight
,
data
,
data
&&
dataBuffer
->
ele_based
()
);
}
...
...
src/trimesh.fl
View file @
80554f9c
# data file for the Fltk User Interface Designer (fluid)
version 1.0
400
version 1.0
305
header_name {.h}
code_name {.cc}
decl {\#include "Surfaces.h"} {public local
...
...
@@ -919,7 +919,7 @@ reglist->do_callback();}
xywh {10 270 330 260} align 0
} {
Fl_Group hilightgrp {
label Highlight
selected
label Highlight
open
xywh {10 305 330 225} color 11 labelfont 1 labelsize 12 labelcolor 121 align 4
} {
Fl_Value_Input tethi {
...
...
@@ -1003,8 +1003,8 @@ reglist->do_callback();}
tooltip {display info on highlighted objects} xywh {150 490 65 30} box ROUND_UP_BOX color 133 labelsize 18
}
Fl_Value_Output vertvalout {
label {:value}
tooltip {data value of highlighted vertex} xywh {190 420 85 25} color 174 align 8
label {:value}
selected
tooltip {data value of highlighted vertex
/element
} xywh {190 420 85 25} color 174 align 8
}
Fl_Choice hitettype {
tooltip {display style} xywh {15 355 85 25} down_box BORDER_BOX textsize 10
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment