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
acf46103
Commit
acf46103
authored
17 years ago
by
Akash Anand
Browse files
Options
Downloads
Patches
Plain Diff
patch type selection options to GUI
parent
dabfb319
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Fltk/GUI_Projection.cpp
+64
-49
64 additions, 49 deletions
Fltk/GUI_Projection.cpp
Fltk/GUI_Projection.h
+2
-1
2 additions, 1 deletion
Fltk/GUI_Projection.h
with
66 additions
and
50 deletions
Fltk/GUI_Projection.cpp
+
64
−
49
View file @
acf46103
...
@@ -223,7 +223,7 @@ projectionEditor::projectionEditor()
...
@@ -223,7 +223,7 @@ projectionEditor::projectionEditor()
{
{
// construct GUI in terms of standard sizes
// construct GUI in terms of standard sizes
const
int
BH
=
2
*
GetFontSize
()
+
1
,
BB
=
7
*
GetFontSize
(),
WB
=
7
;
const
int
BH
=
2
*
GetFontSize
()
+
1
,
BB
=
7
*
GetFontSize
(),
WB
=
7
;
const
int
width
=
(
int
)(
3.75
*
BB
),
height
=
2
4
*
BH
;
const
int
width
=
(
int
)(
3.75
*
BB
),
height
=
2
5
*
BH
;
// create all widgets (we construct this once, we never deallocate!)
// create all widgets (we construct this once, we never deallocate!)
_window
=
new
Dialog_Window
(
width
,
height
,
"Reparameterize"
);
_window
=
new
Dialog_Window
(
width
,
height
,
"Reparameterize"
);
...
@@ -273,7 +273,7 @@ projectionEditor::projectionEditor()
...
@@ -273,7 +273,7 @@ projectionEditor::projectionEditor()
int
hard
=
8
;
int
hard
=
8
;
int
uvw
=
width
-
2
*
WB
-
2
*
hard
-
3
*
WB
;
int
uvw
=
width
-
2
*
WB
-
2
*
hard
-
3
*
WB
;
int
uvh
=
height
-
8
*
WB
-
1
4
*
BH
-
2
*
hard
;
int
uvh
=
height
-
8
*
WB
-
1
5
*
BH
-
2
*
hard
;
_hardEdges
[
0
]
=
new
Fl_Toggle_Button
(
WB
,
3
*
WB
+
9
*
BH
+
hard
,
_hardEdges
[
0
]
=
new
Fl_Toggle_Button
(
WB
,
3
*
WB
+
9
*
BH
+
hard
,
hard
,
uvh
);
hard
,
uvh
);
...
@@ -281,7 +281,7 @@ projectionEditor::projectionEditor()
...
@@ -281,7 +281,7 @@ projectionEditor::projectionEditor()
hard
,
uvh
);
hard
,
uvh
);
_hardEdges
[
2
]
=
new
Fl_Toggle_Button
(
WB
+
hard
,
3
*
WB
+
9
*
BH
,
_hardEdges
[
2
]
=
new
Fl_Toggle_Button
(
WB
+
hard
,
3
*
WB
+
9
*
BH
,
uvw
,
hard
);
uvw
,
hard
);
_hardEdges
[
3
]
=
new
Fl_Toggle_Button
(
WB
+
hard
,
height
-
5
*
WB
-
5
*
BH
-
hard
,
_hardEdges
[
3
]
=
new
Fl_Toggle_Button
(
WB
+
hard
,
height
-
5
*
WB
-
6
*
BH
-
hard
,
uvw
,
hard
);
uvw
,
hard
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
for
(
int
i
=
0
;
i
<
4
;
i
++
)
_hardEdges
[
i
]
->
tooltip
(
"Push to mark edge as `hard'"
);
_hardEdges
[
i
]
->
tooltip
(
"Push to mark edge as `hard'"
);
...
@@ -296,11 +296,25 @@ projectionEditor::projectionEditor()
...
@@ -296,11 +296,25 @@ projectionEditor::projectionEditor()
_slider
->
callback
(
filter_cb
,
this
);
_slider
->
callback
(
filter_cb
,
this
);
_slider
->
tooltip
(
"Filter selection by distance to projection surface"
);
_slider
->
tooltip
(
"Filter selection by distance to projection surface"
);
_orientation
=
new
Fl_Toggle_Button
(
width
-
3
*
WB
,
height
-
5
*
WB
-
5
*
BH
-
hard
,
_orientation
=
new
Fl_Toggle_Button
(
width
-
3
*
WB
,
height
-
5
*
WB
-
6
*
BH
-
hard
,
2
*
WB
,
hard
);
2
*
WB
,
hard
);
_orientation
->
callback
(
filter_cb
,
this
);
_orientation
->
callback
(
filter_cb
,
this
);
_orientation
->
tooltip
(
"Filter elements using orientation"
);
_orientation
->
tooltip
(
"Filter elements using orientation"
);
new
Fl_Box
(
WB
,
height
-
4
*
WB
-
6
*
BH
,
BB
,
BH
,
"Patch Type:"
);
Fl_Group
*
oo
=
new
Fl_Group
(
WB
,
height
-
4
*
WB
-
6
*
BH
,
3
*
BB
,
BH
);
_pselect
[
0
]
=
new
Fl_Round_Button
(
2
*
WB
+
BB
,
height
-
4
*
WB
-
6
*
BH
,
BB
,
BH
,
"Continuation"
);
_pselect
[
1
]
=
new
Fl_Round_Button
(
3
*
WB
+
2
*
BB
,
height
-
4
*
WB
-
6
*
BH
,
BB
,
BH
,
"Windowing"
);
for
(
int
i
=
0
;
i
<
2
;
i
++
)
_pselect
[
i
]
->
type
(
FL_RADIO_BUTTON
);
_pselect
[
0
]
->
value
(
1
);
oo
->
end
();
_modes
[
0
]
=
new
Fl_Value_Input
(
WB
,
height
-
4
*
WB
-
5
*
BH
,
BB
/
2
,
BH
);
_modes
[
0
]
=
new
Fl_Value_Input
(
WB
,
height
-
4
*
WB
-
5
*
BH
,
BB
/
2
,
BH
);
_modes
[
0
]
->
tooltip
(
"Number of Fourier modes along u"
);
_modes
[
0
]
->
tooltip
(
"Number of Fourier modes along u"
);
_modes
[
1
]
=
new
Fl_Value_Input
(
WB
+
BB
/
2
,
height
-
4
*
WB
-
5
*
BH
,
BB
/
2
,
BH
,
_modes
[
1
]
=
new
Fl_Value_Input
(
WB
+
BB
/
2
,
height
-
4
*
WB
-
5
*
BH
,
BB
/
2
,
BH
,
...
@@ -388,6 +402,14 @@ int projectionEditor::getSelectionMode()
...
@@ -388,6 +402,14 @@ int projectionEditor::getSelectionMode()
return
ENT_ALL
;
return
ENT_ALL
;
}
}
int
projectionEditor
::
getPatchType
()
{
if
(
_pselect
[
0
]
->
value
())
return
0
;
else
return
1
;
}
projection
*
projectionEditor
::
getCurrentProjection
()
projection
*
projectionEditor
::
getCurrentProjection
()
{
{
for
(
int
i
=
1
;
i
<=
_browser
->
size
();
i
++
)
for
(
int
i
=
1
;
i
<=
_browser
->
size
();
i
++
)
...
@@ -898,8 +920,15 @@ void compute_cb(Fl_Widget *w, void *data)
...
@@ -898,8 +920,15 @@ void compute_cb(Fl_Widget *w, void *data)
int
h2
=
e
->
getHardEdge
(
2
);
int
h2
=
e
->
getHardEdge
(
2
);
int
h3
=
e
->
getHardEdge
(
3
);
int
h3
=
e
->
getHardEdge
(
3
);
// create the Fourier faces (with boundaries)
FM
::
ProjectionSurface
*
ps
=
p
->
face
->
GetProjectionSurface
();
FM
::
ProjectionSurface
*
ps
=
p
->
face
->
GetProjectionSurface
();
if
(
e
->
getPatchType
())
{
// create the US-FFT/Windowing faces (with boundaries)
FM
::
Patch
*
patch
=
new
FM
::
WFPatch
(
0
,
ps
->
clone
(),
u
,
v
,
f
,
3
,
uModes
,
vModes
);
makeGFace
(
patch
);
}
else
{
// create the Fourier faces (with boundaries)
if
(
ps
->
IsUPeriodic
())
{
if
(
ps
->
IsUPeriodic
())
{
FM
::
Patch
*
patchL
=
FM
::
Patch
*
patchL
=
new
FM
::
FPatch
(
0
,
ps
->
clone
(),
u
,
v
,
f
,
3
,
uModes
,
vModes
,
new
FM
::
FPatch
(
0
,
ps
->
clone
(),
u
,
v
,
f
,
3
,
uModes
,
vModes
,
...
@@ -913,11 +942,6 @@ void compute_cb(Fl_Widget *w, void *data)
...
@@ -913,11 +942,6 @@ void compute_cb(Fl_Widget *w, void *data)
patchR
->
SetMinU
(
0.15
);
patchR
->
SetMinU
(
0.15
);
patchR
->
SetMaxU
(
0.85
);
patchR
->
SetMaxU
(
0.85
);
makeGFace
(
patchR
);
makeGFace
(
patchR
);
/*
FM::Patch* patch =
new FM::WFPatch(0, ps->clone(), u, v, f, 3, uModes, vModes);
makeGFace(patch);
*/
}
}
else
if
(
ps
->
IsVPeriodic
())
{
else
if
(
ps
->
IsVPeriodic
())
{
FM
::
Patch
*
patchL
=
FM
::
Patch
*
patchL
=
...
@@ -932,22 +956,13 @@ void compute_cb(Fl_Widget *w, void *data)
...
@@ -932,22 +956,13 @@ void compute_cb(Fl_Widget *w, void *data)
patchR
->
SetMinV
(
0.15
);
patchR
->
SetMinV
(
0.15
);
patchR
->
SetMaxV
(
0.85
);
patchR
->
SetMaxV
(
0.85
);
makeGFace
(
patchR
);
makeGFace
(
patchR
);
/*
FM::Patch* patch =
new FM::WFPatch(0, ps->clone(), u, v, f, 3, uModes, vModes);
makeGFace(patch);
*/
}
}
else
{
else
{
FM
::
Patch
*
patch
=
FM
::
Patch
*
patch
=
new
FM
::
FPatch
(
0
,
ps
->
clone
(),
u
,
v
,
f
,
3
,
uModes
,
vModes
,
new
FM
::
FPatch
(
0
,
ps
->
clone
(),
u
,
v
,
f
,
3
,
uModes
,
vModes
,
uM
,
vM
,
h0
,
h1
,
h2
,
h3
);
uM
,
vM
,
h0
,
h1
,
h2
,
h3
);
makeGFace
(
patch
);
makeGFace
(
patch
);
/*
}
FM::Patch* patch =
new FM::WFPatch(0, ps->clone(), u, v, f, 3, uModes, vModes);
makeGFace(patch);
*/
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Fltk/GUI_Projection.h
+
2
−
1
View file @
acf46103
...
@@ -70,7 +70,7 @@ class projectionEditor {
...
@@ -70,7 +70,7 @@ class projectionEditor {
Fl_Window
*
_window
;
Fl_Window
*
_window
;
Fl_Hold_Browser
*
_browser
;
Fl_Hold_Browser
*
_browser
;
int
_paramWin
[
6
];
int
_paramWin
[
6
];
Fl_Round_Button
*
_select
[
3
];
Fl_Round_Button
*
_select
[
2
],
*
_pselect
[
2
];
uvPlot
*
_uvPlot
;
uvPlot
*
_uvPlot
;
Fl_Value_Input
*
_modes
[
4
];
Fl_Value_Input
*
_modes
[
4
];
Fl_Toggle_Button
*
_hardEdges
[
4
],
*
_orientation
;
Fl_Toggle_Button
*
_hardEdges
[
4
],
*
_orientation
;
...
@@ -86,6 +86,7 @@ class projectionEditor {
...
@@ -86,6 +86,7 @@ class projectionEditor {
projection
*
getCurrentProjection
();
projection
*
getCurrentProjection
();
projection
*
getLastProjection
();
projection
*
getLastProjection
();
int
getSelectionMode
();
int
getSelectionMode
();
int
getPatchType
();
int
getMode
(
int
i
){
return
(
int
)
_modes
[
i
]
->
value
();
}
int
getMode
(
int
i
){
return
(
int
)
_modes
[
i
]
->
value
();
}
int
getHardEdge
(
int
i
){
return
(
int
)
_hardEdges
[
i
]
->
value
();
}
int
getHardEdge
(
int
i
){
return
(
int
)
_hardEdges
[
i
]
->
value
();
}
int
getOrientation
(){
return
(
int
)
_orientation
->
value
();
}
int
getOrientation
(){
return
(
int
)
_orientation
->
value
();
}
...
...
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