mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
Merge branch 'master' into codim2integrals
This commit is contained in:
commit
3d80b48a7a
@ -60,6 +60,7 @@ namespace netgen
|
||||
T operator*() const { return ar[ind]; }
|
||||
T & operator*() { return ar[ind]; }
|
||||
bool operator != (ArrayIterator d2) { return ind != d2.ind; }
|
||||
bool operator == (ArrayIterator d2) { return ind == d2.ind; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -16,17 +16,17 @@ namespace netgen
|
||||
|
||||
void MyMPI_SendCmd (const char * cmd)
|
||||
{
|
||||
char buf[100];
|
||||
char buf[10000];
|
||||
strcpy (buf, cmd);
|
||||
// MPI_Bcast (&buf, 100, MPI_CHAR, 0, MPI_COMM_WORLD);
|
||||
|
||||
for (int dest = 1; dest < ntasks; dest++)
|
||||
MPI_Bsend( &buf, 100, MPI_CHAR, dest, MPI_TAG_CMD, MPI_COMM_WORLD);
|
||||
MPI_Send( &buf, 10000, MPI_CHAR, dest, MPI_TAG_CMD, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
string MyMPI_RecvCmd ()
|
||||
{
|
||||
char buf[100];
|
||||
char buf[10000];
|
||||
// MPI_Bcast (&buf, 100, MPI_CHAR, 0, MPI_COMM_WORLD);
|
||||
|
||||
// VT_OFF();
|
||||
@ -44,7 +44,7 @@ namespace netgen
|
||||
while (!flag);
|
||||
// VT_ON();
|
||||
|
||||
MPI_Recv( &buf, 100, MPI_CHAR, 0, MPI_TAG_CMD, MPI_COMM_WORLD, &status);
|
||||
MPI_Recv( &buf, 10000, MPI_CHAR, 0, MPI_TAG_CMD, MPI_COMM_WORLD, &status);
|
||||
|
||||
return string(buf);
|
||||
}
|
||||
|
@ -9,7 +9,9 @@
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef WIN32
|
||||
#ifndef AVX_OPERATORS_DEFINED
|
||||
#define AVX_OPERATORS_DEFINED
|
||||
inline __m128d operator- (__m128d a) { return _mm_xor_pd(a, _mm_set1_pd(-0.0)); }
|
||||
inline __m128d operator+ (__m128d a, __m128d b) { return _mm_add_pd(a,b); }
|
||||
inline __m128d operator- (__m128d a, __m128d b) { return _mm_sub_pd(a,b); }
|
||||
@ -36,6 +38,7 @@ inline __m256d operator-= (__m256d &a, __m256d b) { return a = a-b; }
|
||||
inline __m256d operator*= (__m256d &a, __m256d b) { return a = a*b; }
|
||||
inline __m256d operator/= (__m256d &a, __m256d b) { return a = a/b; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -20,6 +20,7 @@ namespace netgen
|
||||
template <typename T, int BASE = 0, typename TIND = int>
|
||||
void ExportArray (py::module &m)
|
||||
{
|
||||
using TA = Array<T,BASE,TIND>;
|
||||
string name = string("Array_") + typeid(T).name();
|
||||
py::class_<Array<T,BASE,TIND>>(m, name.c_str())
|
||||
.def ("__len__", [] ( Array<T,BASE,TIND> &self ) { return self.Size(); } )
|
||||
@ -31,6 +32,9 @@ void ExportArray (py::module &m)
|
||||
return self[i];
|
||||
}),
|
||||
py::return_value_policy::reference)
|
||||
.def("__iter__", [] ( TA & self) {
|
||||
return py::make_iterator (self.begin(),self.end());
|
||||
}, py::keep_alive<0,1>()) // keep array alive while iterator is used
|
||||
|
||||
;
|
||||
}
|
||||
|
@ -776,13 +776,16 @@ namespace netgen
|
||||
{
|
||||
string displname;
|
||||
|
||||
// Display * dpy = glXGetCurrentDisplay();
|
||||
Display * dpy = glXGetCurrentDisplay();
|
||||
GLXDrawable drawable = glXGetCurrentDrawable();
|
||||
GLXContext ctx = glXGetCurrentContext();
|
||||
GLXContextID xid = glXGetContextIDEXT (ctx);
|
||||
|
||||
displname = XDisplayName (0);
|
||||
|
||||
if( glXIsDirect ( dpy, ctx ) )
|
||||
cout << "WARNING: direct rendering enabled; this might break mpi-parallel netgen (especially if X-forwarding is used! (to disable, change -indirect to true in ng/drawing.tcl)" << endl;
|
||||
|
||||
/*
|
||||
cout << "Init Parallel GL" << endl;
|
||||
cout << "DisplayName = " << displname << endl;
|
||||
|
647
ng/dialog.tcl
647
ng/dialog.tcl
@ -893,7 +893,6 @@ proc viewingoptionsdialog { } {
|
||||
|
||||
# stl geometry
|
||||
set f $w.nb.stl
|
||||
|
||||
ttk::labelframe $f.show -relief groove -borderwidth 3 -text "STL viewing options"
|
||||
pack $f.show -fill x -pady 15
|
||||
ttk::checkbutton $f.show.showtrias -text "Show STL-Triangles" \
|
||||
@ -935,7 +934,7 @@ proc viewingoptionsdialog { } {
|
||||
-validatecommand "Ng_SetVisParameters; redraw;my_validate %W [$f.fn.scale3 cget -from] [$f.fn.scale3 cget -to] %P 0" \
|
||||
-invalidcommand "my_invalid %W;Ng_SetVisParameters; redraw;"
|
||||
|
||||
grid $f.fn.scale3 $f.fn.ent3 $f.fn.lab3 -stick nw -padx 4
|
||||
grid $f.fn.scale3 $f.fn.ent3 $f.fn.lab3 -sticky nw -padx 4
|
||||
|
||||
|
||||
#frame $f.fo -relief groove -borderwidth 3
|
||||
@ -1576,7 +1575,6 @@ proc clippingdialog { } {
|
||||
|
||||
|
||||
proc my_Press {w x y} {
|
||||
puts [$w identify $x $y]
|
||||
set inc [expr {([$w get $x $y] <= [$w get]) ? -1 : 1}]
|
||||
ttk::Repeatedly ttk::scale::Increment $w [expr 0.001*$inc]
|
||||
|
||||
@ -1687,27 +1685,46 @@ proc refinementdialog { } {
|
||||
#ttk::labelframe $w.main -text "Refinement options" -relief groove -borderwidth 3
|
||||
#pack $w.main -fill x -pady 15
|
||||
#set w $w.main
|
||||
tixControl $w.meshsize -label "max mesh-size: " -integer false \
|
||||
-variable options.meshsize -min 1e-6 -max 1e6 \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 25
|
||||
label.anchor e
|
||||
}
|
||||
# tixControl $w.meshsize -label "max mesh-size: " -integer false \
|
||||
# -variable options.meshize -min 1e-6 -max 1e6 \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 25
|
||||
# label.anchor e
|
||||
# }
|
||||
|
||||
pack $w.meshsize -anchor e
|
||||
# pack $w.meshsize -anchor e
|
||||
|
||||
global localh
|
||||
set localh 1
|
||||
tixControl $w.loch -label "local mesh-size: " -integer false \
|
||||
-variable localh -min 1e-6 -max 1e6 \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 25
|
||||
label.anchor e
|
||||
}
|
||||
# tixControl $w.loch -label "local mesh-size: " -integer false \
|
||||
# -variable localh -min 1e-6 -max 1e6 \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 25
|
||||
# label.anchor e
|
||||
# }
|
||||
|
||||
pack $w.loch -anchor e
|
||||
# pack $w.loch -anchor e
|
||||
|
||||
ttk::frame $w.meshsize
|
||||
|
||||
ttk::label $w.meshsize.l1 -text "max mesh-size: "
|
||||
ttk::spinbox $w.meshsize.sp1 -from 1e-6 -to 1e6 -textvariable options.meshsize -validate focus -validatecommand "my_validatespinbox %W %P 4" \
|
||||
-invalidcommand "my_invalidspinbox %W" -width 6 -increment 0.1
|
||||
#pack $w.meshsize.l1 $w.meshsize.sp1 -fill x -side left
|
||||
|
||||
ttk::frame $w.meshsizeloc
|
||||
#pack $w.meshsize -anchor e
|
||||
#pack $w.meshsizeloc -anchor e
|
||||
ttk::label $w.meshsizeloc.l1 -text "local mesh-size: "
|
||||
ttk::spinbox $w.meshsizeloc.sp1 -from 1e-6 -to 1e6 -textvariable localh -validate focus -validatecommand "my_validatespinbox %W %P 4" \
|
||||
-invalidcommand "my_invalidspinbox %W" -width 6 -increment 0.1
|
||||
#pack $w.meshsizeloc.l1 $w.meshsizeloc.sp1 -expand yes -fill x
|
||||
pack $w.meshsize
|
||||
pack $w.meshsizeloc
|
||||
grid $w.meshsize.l1 $w.meshsize.sp1
|
||||
grid $w.meshsizeloc.l1 $w.meshsizeloc.sp1
|
||||
|
||||
|
||||
ttk::button $w.restface -text "Restrict H at face" \
|
||||
@ -1736,7 +1753,7 @@ proc refinementdialog { } {
|
||||
}
|
||||
|
||||
|
||||
pack $w.restface $w.restedge $w.restelement $w.restpoint -anchor e
|
||||
pack $w.restface $w.restedge $w.restelement $w.restpoint
|
||||
|
||||
|
||||
|
||||
@ -2211,17 +2228,17 @@ proc stloptionsdialog { } {
|
||||
}
|
||||
|
||||
proc stldoctordialog { } {
|
||||
|
||||
Ng_STLDoctor 0 0
|
||||
set wd .stldoctor_dlg
|
||||
|
||||
if {[winfo exists .stldoctor_dlg] == 1} {
|
||||
|
||||
wm withdraw $wd
|
||||
wm deiconify $wd
|
||||
focus $wd
|
||||
} {
|
||||
|
||||
toplevel $wd
|
||||
|
||||
pack [ttk::notebook $wd.nb] -fill both -fill both -side top
|
||||
$wd.nb add [ttk::frame $wd.nb.general] -text "General" -underline 0
|
||||
$wd.nb add [ttk::frame $wd.nb.topology] -text "Edit Topology" -underline 5
|
||||
@ -2241,16 +2258,16 @@ proc stldoctordialog { } {
|
||||
# GENERAL *****************************
|
||||
|
||||
set f $wd.nb.general
|
||||
|
||||
frame $f.show
|
||||
pack $f.show -fill x
|
||||
checkbutton $f.show.showtrias -text "Show STL-Triangles" \
|
||||
ttk::frame $f.selectframe -borderwidth 0
|
||||
#ttk::frame $f.show
|
||||
#pack $f.show -fill x
|
||||
ttk::checkbutton $f.selectframe.showtrias -text "Show STL-Triangles" \
|
||||
-variable stloptions.showtrias -command { Ng_SetVisParameters; redraw }
|
||||
pack $f.show.showtrias -anchor w
|
||||
#pack $f.selectframe.showtrias -anchor w
|
||||
|
||||
checkbutton $f.show.showfilledtrias -text "Show Filled Triangles" \
|
||||
ttk::checkbutton $f.selectframe.showfilledtrias -text "Show Filled Triangles" \
|
||||
-variable stloptions.showfilledtrias -command { Ng_SetVisParameters; redraw }
|
||||
pack $f.show.showfilledtrias -anchor w
|
||||
#pack $f.show.showfilledtrias -anchor w
|
||||
|
||||
set selmodevals { 0 1 2 3 4 }
|
||||
set selmodelabs(0) "triangle"
|
||||
@ -2259,72 +2276,104 @@ proc stldoctordialog { } {
|
||||
set selmodelabs(3) "line"
|
||||
set selmodelabs(4) "line cluster"
|
||||
|
||||
tixOptionMenu $f.selmode -label "Double Click selects :" \
|
||||
-options {
|
||||
label.width 19
|
||||
label.anchor e
|
||||
menubutton.width 15
|
||||
}
|
||||
# tixOptionMenu $f.selmode -label "Double Click selects :" \
|
||||
# -options {
|
||||
# label.width 19
|
||||
# label.anchor e
|
||||
# menubutton.width 15
|
||||
# }
|
||||
|
||||
foreach selmodev $selmodevals {
|
||||
$f.selmode add command $selmodev -label $selmodelabs($selmodev)
|
||||
}
|
||||
$f.selmode config -variable stldoctor.selectmode
|
||||
$f.selmode config -command { Ng_STLDoctor }
|
||||
# foreach selmodev $selmodevals {
|
||||
# $f.selmode add command $selmodev -label $selmodelabs($selmodev)
|
||||
# }
|
||||
# $f.selmode config -variable stldoctor.selectmode
|
||||
# $f.selmode config -command { Ng_STLDoctor }
|
||||
global stldoctor.selectmode
|
||||
pack $f.selmode
|
||||
|
||||
frame $f.sm
|
||||
# pack $f.selmode
|
||||
|
||||
ttk::label $f.selectframe.dblcsellab -text "Double Click selects : "
|
||||
ttk::menubutton $f.selectframe.dblcselbut -menu $f.selectframe.dblcselmen -text "triangle" -width 16
|
||||
menu $f.selectframe.dblcselmen -tearoff 0
|
||||
foreach selmode { 0 1 2 3 4 } {
|
||||
$f.selectframe.dblcselmen add command -label $selmodelabs($selmode) \
|
||||
-command "set stldoctor.selectmode $selmode ; Ng_STLDoctor ; $f.selectframe.dblcselbut configure -text \"$selmodelabs($selmode)\""
|
||||
}
|
||||
$f.selectframe.dblcselmen invoke $selmodelabs(${stldoctor.selectmode})
|
||||
pack $f.selectframe
|
||||
grid $f.selectframe.showtrias -sticky nw
|
||||
grid $f.selectframe.showfilledtrias -sticky nw
|
||||
grid $f.selectframe.dblcsellab $f.selectframe.dblcselbut -sticky nw
|
||||
|
||||
|
||||
|
||||
|
||||
ttk::frame $f.sm
|
||||
pack $f.sm -fill x
|
||||
checkbutton $f.sm.bu -text "select with mouse" \
|
||||
ttk::checkbutton $f.sm.bu -text "select with mouse" \
|
||||
-variable stldoctor.selectwithmouse
|
||||
pack $f.sm.bu
|
||||
|
||||
frame $f.st -relief groove -borderwidth 3
|
||||
ttk::frame $f.st -relief groove -borderwidth 3
|
||||
pack $f.st -fill x
|
||||
label $f.st.lab -text "Select triangle by number";
|
||||
entry $f.st.ent -width 5 -relief sunken \
|
||||
ttk::label $f.st.lab -text "Select triangle by number";
|
||||
ttk::entry $f.st.ent -width 5 \
|
||||
-textvariable stldoctor.selecttrig
|
||||
pack $f.st.ent $f.st.lab -side left -expand yes
|
||||
|
||||
frame $f.vc -relief groove -borderwidth 3
|
||||
ttk::frame $f.vc -relief groove -borderwidth 3
|
||||
pack $f.vc -fill x
|
||||
checkbutton $f.vc.bu -text "show vicinity" \
|
||||
ttk::checkbutton $f.vc.bu -text "show vicinity" \
|
||||
-variable stldoctor.showvicinity \
|
||||
-command {Ng_STLDoctor vicinity; redraw}
|
||||
label $f.vc.lab -text "vicinity size";
|
||||
scale $f.vc.sc -orient horizontal -length 200 -from 0 -to 200 \
|
||||
ttk::label $f.vc.lab -text "vicinity size";
|
||||
|
||||
#scale $f.vc.sc -orient horizontal -length 200 -from 0 -to 200 \
|
||||
-resolution 1 -variable stldoctor.vicinity \
|
||||
-command { Ng_STLDoctor vicinity; redraw }
|
||||
ttk::frame $f.vc.sc
|
||||
ttk::scale $f.vc.sc.scale -orient horizontal -length 200 -from 0 -to 200 \
|
||||
-variable stldoctor.vicinity -takefocus 0 -command "Ng_STLDoctor vicinity; redraw; roundscale $f.vc.sc.scale 0"
|
||||
ttk::entry $f.vc.sc.entry -textvariable stldoctor.vicinity -width 3 \
|
||||
-validatecommand "Ng_STLDoctor vicinity; redraw; my_validate %W [$f.vc.sc.scale cget -from] [$f.vc.sc.scale cget -to] %P 0" \
|
||||
-invalidcommand "my_invalid %W;Ng_STLDoctor vicinity; redraw;" -validate focus
|
||||
ttk::label $f.vc.sc.lab -text "vicinity size"
|
||||
grid $f.vc.sc.scale $f.vc.sc.entry $f.vc.sc.lab -sticky nw -padx 4
|
||||
pack $f.vc.bu $f.vc.lab $f.vc.sc -expand yes
|
||||
|
||||
frame $f.ge -relief groove -borderwidth 3
|
||||
pack $f.ge -fill x
|
||||
button $f.ge.neighbourangles -text "calc neighbourangles" -command {Ng_STLDoctor neighbourangles}
|
||||
button $f.ge.showcoords -text "show coords of touched triangle" -command {Ng_STLDoctor showcoords}
|
||||
button $f.ge.moveptm -text "move point to middle of trianglepoints" -command {Ng_STLDoctor movepointtomiddle; redraw}
|
||||
button $f.ge.destroy0trigs -text "destroy 0-volume triangles" -command {Ng_STLDoctor destroy0trigs}
|
||||
pack $f.ge.neighbourangles $f.ge.showcoords $f.ge.moveptm $f.ge.destroy0trigs -expand yes
|
||||
ttk::frame $f.ge -relief groove -borderwidth 0
|
||||
pack $f.ge -expand yes
|
||||
ttk::button $f.ge.neighbourangles -text "calc neighbourangles" -command {Ng_STLDoctor neighbourangles}
|
||||
ttk::button $f.ge.showcoords -text "show coords of touched triangle" -command {Ng_STLDoctor showcoords}
|
||||
ttk::button $f.ge.moveptm -text "move point to middle of trianglepoints" -command {Ng_STLDoctor movepointtomiddle; redraw}
|
||||
ttk::button $f.ge.destroy0trigs -text "destroy 0-volume triangles" -command {Ng_STLDoctor destroy0trigs}
|
||||
grid $f.ge.neighbourangles -sticky nw -padx 4 -pady 4
|
||||
grid $f.ge.showcoords -sticky nw -padx 4 -pady 4
|
||||
grid $f.ge.moveptm -sticky nw -padx 4 -pady 4
|
||||
grid $f.ge.destroy0trigs -sticky nw -padx 4 -pady 4
|
||||
|
||||
|
||||
button $f.ge.cancle -text "Done" -command {destroy .stldoctor_dlg }
|
||||
pack $f.ge.cancle -expand yes
|
||||
ttk::button $f.ge.cancle -text "Done" -command {destroy .stldoctor_dlg }
|
||||
grid $f.ge.cancle -sticky nw
|
||||
|
||||
# TOPOLOGY ********************
|
||||
set f $wd.nb.topology
|
||||
|
||||
frame $f.oc -relief groove -borderwidth 3
|
||||
pack $f.oc -fill x
|
||||
button $f.oc.bu -text "invert orientation of selected trig" -command {Ng_STLDoctor invertselectedtrig; redraw }
|
||||
button $f.oc.bu2 -text "orient after selected trig" -command {Ng_STLDoctor orientafterselectedtrig; redraw }
|
||||
pack $f.oc.bu $f.oc.bu2 -side left -expand yes
|
||||
ttk::frame $f.oc -relief groove -borderwidth 3
|
||||
pack $f.oc -pady 3 -ipady 3 -fill y -fill x
|
||||
ttk::frame $f.oc.oc1 -borderwidth 0
|
||||
pack $f.oc.oc1
|
||||
ttk::button $f.oc.oc1.bu -text "invert orientation \n of selected trig" -command {Ng_STLDoctor invertselectedtrig; redraw }
|
||||
ttk::button $f.oc.oc1.bu2 -text "orient after \n selected trig" -command {Ng_STLDoctor orientafterselectedtrig; redraw }
|
||||
|
||||
|
||||
button $f.toperr -text "mark inconsistent triangles" -command {Ng_STLDoctor marktoperrortrigs; redraw }
|
||||
|
||||
button $f.deltrig -text "delete selected triangle" -command {Ng_STLDoctor deleteselectedtrig; redraw }
|
||||
button $f.geosmooth -text "geometric smoothing" -command {Ng_STLDoctor smoothgeometry; redraw }
|
||||
|
||||
pack $f.toperr $f.deltrig $f.geosmooth
|
||||
ttk::button $f.oc.oc1.toperr -text "mark inconsistent triangles" -command {Ng_STLDoctor marktoperrortrigs; redraw }
|
||||
ttk::button $f.oc.oc1.deltrig -text "delete selected triangle" -command {Ng_STLDoctor deleteselectedtrig; redraw }
|
||||
ttk::button $f.oc.oc1.geosmooth -text "geometric smoothing" -command {Ng_STLDoctor smoothgeometry; redraw }
|
||||
|
||||
grid $f.oc.oc1.bu x $f.oc.oc1.bu2 -sticky nw -padx 4 -pady 4
|
||||
grid $f.oc.oc1.toperr - x -sticky nw -padx 4 -pady 4
|
||||
grid $f.oc.oc1.deltrig - x -sticky nw -padx 4 -pady 4
|
||||
grid $f.oc.oc1.geosmooth - x -sticky nw -padx 4 -pady 4
|
||||
|
||||
|
||||
|
||||
@ -2334,27 +2383,50 @@ proc stldoctordialog { } {
|
||||
set f $wd.nb.edges
|
||||
|
||||
|
||||
frame $f.be -relief groove -borderwidth 3
|
||||
ttk::frame $f.be -relief groove -borderwidth 3
|
||||
pack $f.be -fill x
|
||||
label $f.be.lab -text "build edges with yellow angle:";
|
||||
scale $f.be.sc -orient horizontal -length 200 -from 0 -to 100 \
|
||||
|
||||
#scale $f.be.sc -orient horizontal -length 200 -from 0 -to 100 \
|
||||
#-resolution 0.5
|
||||
ttk::frame $f.be.frame
|
||||
pack $f.be.frame -ipady 4 -pady 4
|
||||
ttk::label $f.be.frame.lab -text "build edges with yellow angle:";
|
||||
ttk::scale $f.be.frame.scale -orient horizontal -length 200 -from 0 -to 200 \
|
||||
-variable stloptions.yangle -takefocus 0 -command "roundscale $f.be.frame.scale 1; Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw"
|
||||
ttk::entry $f.be.frame.entry -textvariable stloptions.yangle -width 5 \
|
||||
-validatecommand "Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw;my_validate %W [$f.be.frame.scale cget -from] [$f.be.frame.scale cget -to] %P 1" \
|
||||
-invalidcommand "my_invalid %W;Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw" -validate focus
|
||||
grid $f.be.frame.lab - -sticky nw -padx 4
|
||||
grid $f.be.frame.scale $f.be.frame.entry -sticky nw -padx 4
|
||||
|
||||
|
||||
|
||||
#$f.be.sc config -variable stloptions.yangle
|
||||
#$f.be.sc config -command { Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw }
|
||||
ttk::label $f.be.frame.lab2 -text "continue edges with yellow angle:";
|
||||
# scale $f.be.sc2 -orient horizontal -length 200 -from 0 -to 100 \
|
||||
-resolution 0.5
|
||||
$f.be.sc config -variable stloptions.yangle
|
||||
$f.be.sc config -command { Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw }
|
||||
label $f.be.lab2 -text "continue edges with yellow angle:";
|
||||
scale $f.be.sc2 -orient horizontal -length 200 -from 0 -to 100 \
|
||||
-resolution 0.5
|
||||
$f.be.sc2 config -variable stloptions.contyangle
|
||||
$f.be.sc2 config -command { Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw }
|
||||
ttk::scale $f.be.frame.scale2 -orient horizontal -length 200 -from 0 -to 100 \
|
||||
-variable stloptions.contyangle -takefocus 0 -command "roundscale $f.be.frame.scale2 1; Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw"
|
||||
ttk::entry $f.be.frame.entry2 -textvariable stloptions.contyangle -width 5 \
|
||||
-validatecommand "Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw;my_validate %W [$f.be.frame.scale2 cget -from] [$f.be.frame.scale2 cget -to] %P 1" \
|
||||
-invalidcommand "my_invalid %W;Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw" -validate focus
|
||||
|
||||
grid $f.be.frame.lab2 - -sticky nw -padx 4
|
||||
grid $f.be.frame.scale2 $f.be.frame.entry2 -sticky nw -padx 4
|
||||
|
||||
#$f.be.sc2 config -variable stloptions.contyangle
|
||||
#$f.be.sc2 config -command { Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw }
|
||||
|
||||
|
||||
|
||||
button $f.be.buildedges -text "Build Edges" -command {Ng_STLDoctor buildedges; redraw}
|
||||
pack $f.be.lab $f.be.sc $f.be.lab2 $f.be.sc2 $f.be.buildedges -expand yes
|
||||
ttk::button $f.be.frame.buildedges -text "Build Edges" -command {Ng_STLDoctor buildedges; redraw}
|
||||
grid $f.be.frame.buildedges - -sticky n -padx 4 -pady 4
|
||||
#pack $f.be.lab $f.be.sc $f.be.lab2 $f.be.sc2 $f.be.buildedges -expand yes
|
||||
|
||||
frame $f.se
|
||||
ttk::frame $f.se -relief groove -borderwidth 3
|
||||
pack $f.se -fill x
|
||||
checkbutton $f.se.bu -text "show excluded" \
|
||||
ttk::checkbutton $f.se.bu -text "show excluded" \
|
||||
-variable stldoctor.showexcluded \
|
||||
-command {Ng_STLDoctor; redraw}
|
||||
pack $f.se.bu
|
||||
@ -2368,25 +2440,41 @@ proc stldoctordialog { } {
|
||||
set edgeselmodelabs(3) "candidate"
|
||||
set edgeselmodelabs(4) "excluded"
|
||||
|
||||
tixOptionMenu $f.edgeselmode -label "Double Click sets edge :" \
|
||||
-options {
|
||||
label.width 19
|
||||
label.anchor e
|
||||
menubutton.width 15
|
||||
}
|
||||
# tixOptionMenu $f.edgeselmode -label "Double Click sets edge :" \
|
||||
# -options {
|
||||
# label.width 19
|
||||
# label.anchor e
|
||||
# menubutton.width 15
|
||||
# }
|
||||
|
||||
foreach edgeselmodev $edgeselmodevals {
|
||||
$f.edgeselmode add command $edgeselmodev -label $edgeselmodelabs($edgeselmodev)
|
||||
}
|
||||
$f.edgeselmode config -variable stldoctor.edgeselectmode
|
||||
$f.edgeselmode config -command { Ng_STLDoctor }
|
||||
global stldoctor.edgeselectmode
|
||||
pack $f.edgeselmode
|
||||
# foreach edgeselmodev $edgeselmodevals {
|
||||
# $f.edgeselmode add command $edgeselmodev -label $edgeselmodelabs($edgeselmodev)
|
||||
# }
|
||||
# $f.edgeselmode config -variable stldoctor.edgeselectmode
|
||||
# $f.edgeselmode config -command { Ng_STLDoctor }
|
||||
global stldoctor.edgeselectmode
|
||||
# pack $f.edgeselmode
|
||||
|
||||
ttk::frame $f.scaleframe -relief groove -borderwidth 0
|
||||
pack $f.scaleframe -ipadx 4 -pady 4 -expand yes
|
||||
ttk::label $f.scaleframe.dblcedgelab -text "Double Click sets edge :"
|
||||
ttk::menubutton $f.scaleframe.dblcledgebut -menu $f.scaleframe.dblcledgem -text "coarse" -width 16
|
||||
|
||||
menu $f.scaleframe.dblcledgem -tearoff 0
|
||||
foreach selectmode { 0 1 2 3 4 } {
|
||||
$f.scaleframe.dblcledgem add command -label $edgeselmodelabs($selectmode) \
|
||||
-command "set stldoctor.edgeselectmode $selectmode ; $f.scaleframe.dblcledgebut configure -text \"$edgeselmodelabs($selectmode)\""
|
||||
}
|
||||
$f.scaleframe.dblcledgem invoke $edgeselmodelabs(${stldoctor.edgeselectmode})
|
||||
grid $f.scaleframe.dblcedgelab $f.scaleframe.dblcledgebut -sticky n -ipadx 4
|
||||
|
||||
|
||||
|
||||
|
||||
# edge buttons
|
||||
|
||||
frame $f.edg -relief groove -borderwidth 3
|
||||
pack $f.edg -fill x
|
||||
ttk::frame $f.edg -relief groove -borderwidth 3
|
||||
pack $f.edg -fill x -ipadx 4 -ipady 4
|
||||
|
||||
# checkbutton $f.edg.bu -text "use external edges" \
|
||||
# -variable stldoctor.useexternaledges \
|
||||
@ -2394,36 +2482,36 @@ proc stldoctordialog { } {
|
||||
# pack $f.edg.bu -expand yes
|
||||
|
||||
|
||||
frame $f.edg.f0
|
||||
ttk::frame $f.edg.f0
|
||||
pack $f.edg.f0
|
||||
button $f.edg.f0.confirmedge -text "confirm" -command {Ng_STLDoctor confirmedge; redraw}
|
||||
button $f.edg.f0.candidateedge -text "candidate" -command {Ng_STLDoctor candidateedge; redraw}
|
||||
button $f.edg.f0.excludeedge -text "exclude" -command {Ng_STLDoctor excludeedge; redraw}
|
||||
button $f.edg.f0.undefinededge -text "undefined" -command {Ng_STLDoctor undefinededge; redraw}
|
||||
ttk::button $f.edg.f0.confirmedge -text "confirm" -command {Ng_STLDoctor confirmedge; redraw}
|
||||
ttk::button $f.edg.f0.candidateedge -text "candidate" -command {Ng_STLDoctor candidateedge; redraw}
|
||||
ttk::button $f.edg.f0.excludeedge -text "exclude" -command {Ng_STLDoctor excludeedge; redraw}
|
||||
ttk::button $f.edg.f0.undefinededge -text "undefined" -command {Ng_STLDoctor undefinededge; redraw}
|
||||
pack $f.edg.f0.confirmedge $f.edg.f0.candidateedge $f.edg.f0.excludeedge $f.edg.f0.undefinededge -side left
|
||||
|
||||
frame $f.edg.fa
|
||||
ttk::frame $f.edg.fa
|
||||
pack $f.edg.fa
|
||||
button $f.edg.fa.setallundefined -text "all undefined" -command {Ng_STLDoctor setallundefinededges; redraw}
|
||||
button $f.edg.fa.erasecandidates -text "candidates to undefined" -command {Ng_STLDoctor erasecandidateedges; redraw}
|
||||
ttk::button $f.edg.fa.setallundefined -text "all undefined" -command {Ng_STLDoctor setallundefinededges; redraw}
|
||||
ttk::button $f.edg.fa.erasecandidates -text "candidates to undefined" -command {Ng_STLDoctor erasecandidateedges; redraw}
|
||||
pack $f.edg.fa.setallundefined $f.edg.fa.erasecandidates -side left
|
||||
|
||||
|
||||
frame $f.edg.fb
|
||||
ttk::frame $f.edg.fb
|
||||
pack $f.edg.fb
|
||||
button $f.edg.fb.confirmcandidates -text "candidates to confirmed" -command {Ng_STLDoctor confirmcandidateedges; redraw}
|
||||
button $f.edg.fb.confirmedtocandidates -text "confirmed to candidates" -command {Ng_STLDoctor confirmedtocandidateedges; redraw}
|
||||
ttk::button $f.edg.fb.confirmcandidates -text "candidates to confirmed" -command {Ng_STLDoctor confirmcandidateedges; redraw}
|
||||
ttk::button $f.edg.fb.confirmedtocandidates -text "confirmed to candidates" -command {Ng_STLDoctor confirmedtocandidateedges; redraw}
|
||||
pack $f.edg.fb.confirmcandidates $f.edg.fb.confirmedtocandidates -side left
|
||||
|
||||
frame $f.edg.f1
|
||||
frame $f.edg.f2
|
||||
frame $f.edg.f3
|
||||
frame $f.edg.f4
|
||||
ttk::frame $f.edg.f1
|
||||
ttk::frame $f.edg.f2
|
||||
ttk::frame $f.edg.f3
|
||||
ttk::frame $f.edg.f4
|
||||
pack $f.edg.f1 $f.edg.f2 $f.edg.f3 $f.edg.f4
|
||||
|
||||
button $f.edg.f1.exportedges -text "export edges" -command {Ng_STLDoctor exportedges}
|
||||
button $f.edg.f1.importedges -text "import edges" -command {Ng_STLDoctor importedges; redraw}
|
||||
button $f.edg.f1.saveedgedata -text "save edgedata" \
|
||||
ttk::button $f.edg.f1.exportedges -text "export edges" -command {Ng_STLDoctor exportedges}
|
||||
ttk::button $f.edg.f1.importedges -text "import edges" -command {Ng_STLDoctor importedges; redraw}
|
||||
ttk::button $f.edg.f1.saveedgedata -text "save edgedata" \
|
||||
-command {
|
||||
set types {
|
||||
{"Netgen Edgedata" {.ned} }
|
||||
@ -2434,7 +2522,7 @@ proc stldoctordialog { } {
|
||||
}
|
||||
}
|
||||
|
||||
button $f.edg.f1.loadedgedata -text "load edgedata" \
|
||||
ttk::button $f.edg.f1.loadedgedata -text "load edgedata" \
|
||||
-command {
|
||||
set types {
|
||||
{"Netgen Edgedata" {.ned} }
|
||||
@ -2450,7 +2538,7 @@ proc stldoctordialog { } {
|
||||
}
|
||||
}
|
||||
|
||||
button $f.edg.f1.importAVLedges -text "import AVL edges" \
|
||||
ttk::button $f.edg.f1.importAVLedges -text "import AVL edges" \
|
||||
-command {
|
||||
set types {{"Edge file" {.edg }}}
|
||||
|
||||
@ -2463,7 +2551,7 @@ proc stldoctordialog { } {
|
||||
pack $f.edg.f1.importAVLedges $f.edg.f1.loadedgedata $f.edg.f1.saveedgedata -side left
|
||||
|
||||
# button $f.edg.f1.buildedges -text "build external edges" -command {Ng_STLDoctor buildexternaledges; redraw}
|
||||
frame $f.edg2 -relief groove -borderwidth 3
|
||||
ttk::frame $f.edg2 -relief groove -borderwidth 3
|
||||
pack $f.edg2 -fill x
|
||||
|
||||
|
||||
@ -2485,75 +2573,85 @@ proc stldoctordialog { } {
|
||||
# NORMALS ***********************
|
||||
set f $wd.nb.normals
|
||||
|
||||
frame $f.dt -relief groove -borderwidth 3
|
||||
ttk::frame $f.dt -relief groove -borderwidth 3
|
||||
pack $f.dt -fill x
|
||||
label $f.dt.lab -text "dirty triangle factor";
|
||||
entry $f.dt.ent -width 5 -relief sunken \
|
||||
-textvariable stldoctor.dirtytrigfact
|
||||
pack $f.dt.ent $f.dt.lab -side left -expand yes
|
||||
ttk::label $f.dt.lab -text "dirty triangle factor";
|
||||
ttk::entry $f.dt.ent -width 5 \
|
||||
-textvariable stldoctor.dirtytrigfact -validatecommand "Ng_SetSTLParameters;my_validate %W -1e9 1e9 %P 3" \
|
||||
-invalidcommand "my_invalid %W;Ng_SetSTLParameters" -validate focus
|
||||
pack $f.dt.ent $f.dt.lab -side left -expand yes -pady 8
|
||||
|
||||
frame $f.srt -relief groove -borderwidth 3
|
||||
ttk::frame $f.srt -relief groove -borderwidth 3
|
||||
pack $f.srt -fill x
|
||||
button $f.srt.bu -text "smooth reverted triangles geometric" -command {Ng_STLDoctor smoothrevertedtrigs; redraw }
|
||||
entry $f.srt.ent -width 5 -relief sunken \
|
||||
-textvariable stldoctor.smoothangle
|
||||
pack $f.srt.ent $f.srt.bu -side left -expand yes
|
||||
ttk::button $f.srt.bu -text "smooth reverted triangles geometric" -command {Ng_STLDoctor smoothrevertedtrigs; redraw }
|
||||
ttk::entry $f.srt.ent -width 5 \
|
||||
-textvariable stldoctor.smoothangle -validatecommand "Ng_SetSTLParameters;my_validate %W -1e9 1e9 %P 2" \
|
||||
-invalidcommand "my_invalid %W;Ng_SetSTLParameters" -validate focus
|
||||
pack $f.srt.ent $f.srt.bu -side left -expand yes -pady 8
|
||||
|
||||
frame $f.bdt -relief groove -borderwidth 3
|
||||
ttk::frame $f.bdt -relief groove -borderwidth 3
|
||||
pack $f.bdt -fill x
|
||||
button $f.bdt.bu -text "mark dirty triangles" -command {Ng_STLDoctor markdirtytrigs; redraw }
|
||||
button $f.bdt.bu2 -text "smooth dirty triangles normal" -command {Ng_STLDoctor smoothdirtytrigs; redraw }
|
||||
pack $f.bdt.bu $f.bdt.bu2 -side left -expand yes
|
||||
ttk::button $f.bdt.bu -text "mark dirty triangles" -command {Ng_STLDoctor markdirtytrigs; redraw }
|
||||
ttk::button $f.bdt.bu2 -text "smooth dirty triangles normal" -command {Ng_STLDoctor smoothdirtytrigs; redraw }
|
||||
pack $f.bdt.bu $f.bdt.bu2 -side left -expand yes -pady 8
|
||||
|
||||
|
||||
frame $f.sno -relief groove -borderwidth 3
|
||||
pack $f.sno
|
||||
|
||||
label $f.sno.labrough -text "rough"
|
||||
scale $f.sno.scsmooth -orient horizontal -length 100 -from 0 -to 0.8 \
|
||||
ttk::frame $f.sno -relief groove -borderwidth 3
|
||||
pack $f.sno -fill x
|
||||
ttk::frame $f.sno.snoframe -borderwidth 0
|
||||
#ttk::label $f.sno.labrough -text "rough"
|
||||
#scale $f.sno.scsmooth -orient horizontal -length 100 -from 0 -to 0.8 \
|
||||
-resolution 0.01 -variable stldoctor.smoothnormalsweight \
|
||||
-command { Ng_SetSTLParameters }
|
||||
label $f.sno.labsmooth -text "smooth"
|
||||
button $f.sno.smoothnormals -text "smooth normals" -command { Ng_STLDoctor smoothnormals; redraw}
|
||||
#ttk::label $f.sno.labsmooth -text "smooth"
|
||||
ttk::button $f.sno.smoothnormals -text "smooth normals" -command { Ng_STLDoctor smoothnormals; redraw}
|
||||
|
||||
|
||||
|
||||
pack $f.sno.labrough $f.sno.scsmooth $f.sno.labsmooth $f.sno.smoothnormals -side left -padx 5
|
||||
|
||||
frame $f.no -relief groove -borderwidth 3
|
||||
ttk::scale $f.sno.snoframe.scale -orient horizontal -length 100 -from 0.0 -to 0.8 \
|
||||
-variable stldoctor.smoothnormalsweight -takefocus 0 -command "roundscale $f.sno.snoframe.scale 2;Ng_SetSTLParameters"
|
||||
ttk::entry $f.sno.snoframe.entry -textvariable stldoctor.smoothnormalsweight -width 4 \
|
||||
-validatecommand "Ng_SetSTLParameters;my_validate %W [$f.sno.snoframe.scale cget -from] [$f.sno.snoframe.scale cget -to] %P 2" \
|
||||
-invalidcommand "my_invalid %W;Ng_SetSTLParameters" -validate focus
|
||||
ttk::label $f.sno.snoframe.labrough -text "rough"
|
||||
ttk::label $f.sno.snoframe.labsmooth -text "smooth"
|
||||
grid $f.sno.snoframe.labrough $f.sno.snoframe.scale $f.sno.snoframe.labsmooth $f.sno.snoframe.entry -sticky nw -padx 4
|
||||
|
||||
#pack $f.sno.labrough $f.sno.scsmooth $f.sno.labsmooth $f.sno.smoothnormals -side left -padx 5
|
||||
pack $f.sno.snoframe $f.sno.smoothnormals -side left -padx 5 -pady 8
|
||||
ttk::frame $f.no -relief groove -borderwidth 3
|
||||
pack $f.no -fill x
|
||||
|
||||
button $f.no.marknonsmoothnormals -text "mark non-smooth triangles" -command {Ng_STLDoctor marknonsmoothnormals; redraw}
|
||||
button $f.no.calcnormals -text "calculate normals from geometry" -command {Ng_STLDoctor calcnormals; redraw}
|
||||
ttk::button $f.no.marknonsmoothnormals -text "mark non-smooth triangles" -command {Ng_STLDoctor marknonsmoothnormals; redraw}
|
||||
ttk::button $f.no.calcnormals -text "calculate normals from geometry" -command {Ng_STLDoctor calcnormals; redraw}
|
||||
|
||||
pack $f.no.marknonsmoothnormals $f.no.calcnormals -expand yes
|
||||
pack $f.no.marknonsmoothnormals $f.no.calcnormals -expand yes -pady 8
|
||||
|
||||
|
||||
# ADVANCED **************************
|
||||
set f $wd.nb.advanced
|
||||
|
||||
|
||||
frame $f.sc
|
||||
ttk::frame $f.sc
|
||||
pack $f.sc -fill x
|
||||
checkbutton $f.sc.bu -text "spiral check" \
|
||||
ttk::checkbutton $f.sc.bu -text "spiral check" \
|
||||
-variable stldoctor.spiralcheck \
|
||||
-command {Ng_STLDoctor;}
|
||||
checkbutton $f.sc.bu2 -text "cone check" \
|
||||
ttk::checkbutton $f.sc.bu2 -text "cone check" \
|
||||
-variable stldoctor.conecheck \
|
||||
-command {Ng_STLDoctor;}
|
||||
pack $f.sc.bu $f.sc.bu2
|
||||
|
||||
|
||||
tixControl $f.gtol -label "load-geometry tolerance factor" -integer false \
|
||||
|
||||
#tixControl $f.gtol -label "load-geometry tolerance factor" -integer false \
|
||||
-variable stldoctor.geom_tol_fact \
|
||||
-options {
|
||||
entry.width 8
|
||||
label.width 30
|
||||
label.anchor e
|
||||
}
|
||||
# entry.width 8
|
||||
# label.width 30
|
||||
# label.anchor e
|
||||
#}
|
||||
ttk::spinbox $f.gtol -from 1 -to 20 -textvariable stldoctor.geom_tol_fact -width 8
|
||||
pack $f.gtol
|
||||
|
||||
button $f.adap -text "Apply" -command {
|
||||
ttk::button $f.adap -text "Apply" -command {
|
||||
.stldoctor_dlg.nb.advanced.gtol invoke
|
||||
Ng_STLDoctor;
|
||||
}
|
||||
@ -2596,45 +2694,52 @@ proc meshdoctordialog { } {
|
||||
Ng_MeshDoctor;
|
||||
|
||||
|
||||
frame $w.vis -relief groove -borderwidth 3
|
||||
ttk::frame $w.vis -relief groove -borderwidth 3
|
||||
pack $w.vis
|
||||
|
||||
checkbutton $w.vis.showfilledtrigs -text "Show filled triangles" \
|
||||
ttk::checkbutton $w.vis.showfilledtrigs -text "Show filled triangles" \
|
||||
-variable viewoptions.drawfilledtrigs \
|
||||
-command { Ng_SetVisParameters; redraw }
|
||||
|
||||
checkbutton $w.vis.showedges -text "Show edges" \
|
||||
ttk::checkbutton $w.vis.showedges -text "Show edges" \
|
||||
-variable viewoptions.drawedges \
|
||||
-command { Ng_SetVisParameters; redraw }
|
||||
|
||||
|
||||
checkbutton $w.vis.showoutline -text "Show Triangle Outline" \
|
||||
ttk::checkbutton $w.vis.showoutline -text "Show Triangle Outline" \
|
||||
-variable viewoptions.drawoutline \
|
||||
-command { Ng_SetVisParameters; redraw }
|
||||
|
||||
pack $w.vis.showfilledtrigs $w.vis.showoutline $w.vis.showedges
|
||||
|
||||
tixControl $w.markedgedist -label "Mark edge dist: " -integer true \
|
||||
-min 0 -max 999 \
|
||||
-variable meshdoc.markedgedist \
|
||||
-options {
|
||||
entry.width 3
|
||||
label.width 20
|
||||
label.anchor e
|
||||
} \
|
||||
-command {
|
||||
Ng_MeshDoctor markedgedist ${meshdoc.markedgedist}
|
||||
redraw
|
||||
}
|
||||
ttk::frame $w.markedgedist
|
||||
ttk::label $w.markedgedist.l -text "Mark edge dist: "
|
||||
ttk::spinbox $w.markedgedist.s -from 0 -to 999 -width 5 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \
|
||||
-invalidcommand "my_invalidspinbox %W" -command {Ng_MeshDoctor markedgedist ${meshdoc.markedgedist};redraw} -textvariable meshdoc.markedgedist
|
||||
#pack $f.grading -fill x
|
||||
pack $w.markedgedist.l $w.markedgedist.s -side left
|
||||
|
||||
# tixControl $w.markedgedist -label "Mark edge dist: " -integer true \
|
||||
# -min 0 -max 999 \
|
||||
# -variable meshdoc.markedgedist \
|
||||
# -options {
|
||||
# entry.width 3
|
||||
# label.width 20
|
||||
# label.anchor e
|
||||
# } \
|
||||
# -command {
|
||||
# Ng_MeshDoctor markedgedist ${meshdoc.markedgedist}
|
||||
# redraw
|
||||
# }
|
||||
pack $w.markedgedist
|
||||
|
||||
button $w.deledge -text "Delete marked segments" -command {
|
||||
ttk::button $w.deledge -text "Delete marked segments" -command {
|
||||
Ng_MeshDoctor deletemarkedsegments
|
||||
redraw
|
||||
}
|
||||
pack $w.deledge
|
||||
|
||||
button $w.close -text "Close" -command {
|
||||
ttk::button $w.close -text "Close" -command {
|
||||
set meshdoctor.active 0;
|
||||
Ng_MeshDoctor;
|
||||
destroy .meshdoc_dlg
|
||||
@ -2961,117 +3066,117 @@ proc printlatestwarning { } {
|
||||
|
||||
|
||||
|
||||
proc runtestdialog { } {
|
||||
source $::ngdir/ngshell.tcl
|
||||
set w .runtest_dlg
|
||||
# proc runtestdialog { } {
|
||||
# source $::ngdir/ngshell.tcl
|
||||
# set w .runtest_dlg
|
||||
|
||||
if {[winfo exists .runtest_dlg] == 1} {
|
||||
wm withdraw $w
|
||||
wm deiconify $w
|
||||
# if {[winfo exists .runtest_dlg] == 1} {
|
||||
# wm withdraw $w
|
||||
# wm deiconify $w
|
||||
|
||||
focus $w
|
||||
} {
|
||||
toplevel $w
|
||||
# focus $w
|
||||
# } {
|
||||
# toplevel $w
|
||||
|
||||
# in2d testing #
|
||||
frame $w.in2dframe
|
||||
pack $w.in2dframe
|
||||
# # in2d testing #
|
||||
# frame $w.in2dframe
|
||||
# pack $w.in2dframe
|
||||
|
||||
set in2dlogfile ""
|
||||
tixLabelEntry $w.in2dframe.ent -label "in2d log-file: console if empty" \
|
||||
-labelside top \
|
||||
-options {
|
||||
entry.textVariable in2dlogfile
|
||||
entry.width 35
|
||||
label.width 25
|
||||
label.anchor w
|
||||
}
|
||||
button $w.in2dframe.btn -text "Browse" -command {
|
||||
set types { { "Log file" {.log} } }
|
||||
set in2dlogfile [tk_getOpenFile -filetypes $types -initialfile $in2dlogfile]
|
||||
}
|
||||
button $w.in2dframe.test -text "Test in2d meshing" -command { ngtest in2d $in2dlogfile }
|
||||
# set in2dlogfile ""
|
||||
# tixLabelEntry $w.in2dframe.ent -label "in2d log-file: console if empty" \
|
||||
# -labelside top \
|
||||
# -options {
|
||||
# entry.textVariable in2dlogfile
|
||||
# entry.width 35
|
||||
# label.width 25
|
||||
# label.anchor w
|
||||
# }
|
||||
# button $w.in2dframe.btn -text "Browse" -command {
|
||||
# set types { { "Log file" {.log} } }
|
||||
# set in2dlogfile [tk_getOpenFile -filetypes $types -initialfile $in2dlogfile]
|
||||
# }
|
||||
# button $w.in2dframe.test -text "Test in2d meshing" -command { ngtest in2d $in2dlogfile }
|
||||
|
||||
|
||||
pack $w.in2dframe.test -side left -anchor s -padx 4 -pady 4
|
||||
pack $w.in2dframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4
|
||||
pack $w.in2dframe.btn -side left -anchor s -padx 4 -pady 4
|
||||
# pack $w.in2dframe.test -side left -anchor s -padx 4 -pady 4
|
||||
# pack $w.in2dframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4
|
||||
# pack $w.in2dframe.btn -side left -anchor s -padx 4 -pady 4
|
||||
|
||||
|
||||
# geo testing #
|
||||
frame $w.geoframe
|
||||
pack $w.geoframe
|
||||
# # geo testing #
|
||||
# frame $w.geoframe
|
||||
# pack $w.geoframe
|
||||
|
||||
set geologfile ""
|
||||
tixLabelEntry $w.geoframe.ent -label "geo log-file: console if empty" \
|
||||
-labelside top \
|
||||
-options {
|
||||
entry.textVariable geologfile
|
||||
entry.width 35
|
||||
label.width 25
|
||||
label.anchor w
|
||||
}
|
||||
button $w.geoframe.btn -text "Browse" -command {
|
||||
set types { { "Log file" {.log} } }
|
||||
set geologfile [tk_getOpenFile -filetypes $types -initialfile $geologfile]
|
||||
}
|
||||
button $w.geoframe.test -text "Test geo meshing" -command { ngtest geo $geologfile }
|
||||
# set geologfile ""
|
||||
# tixLabelEntry $w.geoframe.ent -label "geo log-file: console if empty" \
|
||||
# -labelside top \
|
||||
# -options {
|
||||
# entry.textVariable geologfile
|
||||
# entry.width 35
|
||||
# label.width 25
|
||||
# label.anchor w
|
||||
# }
|
||||
# button $w.geoframe.btn -text "Browse" -command {
|
||||
# set types { { "Log file" {.log} } }
|
||||
# set geologfile [tk_getOpenFile -filetypes $types -initialfile $geologfile]
|
||||
# }
|
||||
# button $w.geoframe.test -text "Test geo meshing" -command { ngtest geo $geologfile }
|
||||
|
||||
|
||||
pack $w.geoframe.test -side left -anchor s -padx 4 -pady 4
|
||||
pack $w.geoframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4
|
||||
pack $w.geoframe.btn -side left -anchor s -padx 4 -pady 4
|
||||
# pack $w.geoframe.test -side left -anchor s -padx 4 -pady 4
|
||||
# pack $w.geoframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4
|
||||
# pack $w.geoframe.btn -side left -anchor s -padx 4 -pady 4
|
||||
|
||||
# stl testing #
|
||||
frame $w.stlframe
|
||||
pack $w.stlframe
|
||||
# # stl testing #
|
||||
# frame $w.stlframe
|
||||
# pack $w.stlframe
|
||||
|
||||
set stllogfile ""
|
||||
tixLabelEntry $w.stlframe.ent -label "stl log-file: console if empty" \
|
||||
-labelside top \
|
||||
-options {
|
||||
entry.textVariable stllogfile
|
||||
entry.width 35
|
||||
label.width 25
|
||||
label.anchor w
|
||||
}
|
||||
button $w.stlframe.btn -text "Browse" -command {
|
||||
set types { { "Log file" {.log} } }
|
||||
set stllogfile [tk_getOpenFile -filetypes $types -initialfile $stllogfile]
|
||||
}
|
||||
button $w.stlframe.test -text "Test stl meshing" -command { ngtest stl $stllogfile }
|
||||
# set stllogfile ""
|
||||
# tixLabelEntry $w.stlframe.ent -label "stl log-file: console if empty" \
|
||||
# -labelside top \
|
||||
# -options {
|
||||
# entry.textVariable stllogfile
|
||||
# entry.width 35
|
||||
# label.width 25
|
||||
# label.anchor w
|
||||
# }
|
||||
# button $w.stlframe.btn -text "Browse" -command {
|
||||
# set types { { "Log file" {.log} } }
|
||||
# set stllogfile [tk_getOpenFile -filetypes $types -initialfile $stllogfile]
|
||||
# }
|
||||
# button $w.stlframe.test -text "Test stl meshing" -command { ngtest stl $stllogfile }
|
||||
|
||||
|
||||
pack $w.stlframe.test -side left -anchor s -padx 4 -pady 4
|
||||
pack $w.stlframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4
|
||||
pack $w.stlframe.btn -side left -anchor s -padx 4 -pady 4
|
||||
# pack $w.stlframe.test -side left -anchor s -padx 4 -pady 4
|
||||
# pack $w.stlframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4
|
||||
# pack $w.stlframe.btn -side left -anchor s -padx 4 -pady 4
|
||||
|
||||
# pde testing #
|
||||
frame $w.pdeframe
|
||||
pack $w.pdeframe
|
||||
# # pde testing #
|
||||
# frame $w.pdeframe
|
||||
# pack $w.pdeframe
|
||||
|
||||
set pdelogfile ""
|
||||
tixLabelEntry $w.pdeframe.ent -label "pde log-file: console if empty" \
|
||||
-labelside top \
|
||||
-options {
|
||||
entry.textVariable pdelogfile
|
||||
entry.width 35
|
||||
label.width 25
|
||||
label.anchor w
|
||||
}
|
||||
button $w.pdeframe.btn -text "Browse" -command {
|
||||
set types { { "Log file" {.log} } }
|
||||
set pdelogfile [tk_getOpenFile -filetypes $types -initialfile $pdelogfile]
|
||||
}
|
||||
button $w.pdeframe.test -text "Test ngsolve pde's" -command { ngtest pde $pdelogfile }
|
||||
# set pdelogfile ""
|
||||
# tixLabelEntry $w.pdeframe.ent -label "pde log-file: console if empty" \
|
||||
# -labelside top \
|
||||
# -options {
|
||||
# entry.textVariable pdelogfile
|
||||
# entry.width 35
|
||||
# label.width 25
|
||||
# label.anchor w
|
||||
# }
|
||||
# button $w.pdeframe.btn -text "Browse" -command {
|
||||
# set types { { "Log file" {.log} } }
|
||||
# set pdelogfile [tk_getOpenFile -filetypes $types -initialfile $pdelogfile]
|
||||
# }
|
||||
# button $w.pdeframe.test -text "Test ngsolve pde's" -command { ngtest pde $pdelogfile }
|
||||
|
||||
|
||||
pack $w.pdeframe.test -side left -anchor s -padx 4 -pady 4
|
||||
pack $w.pdeframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4
|
||||
pack $w.pdeframe.btn -side left -anchor s -padx 4 -pady 4
|
||||
# pack $w.pdeframe.test -side left -anchor s -padx 4 -pady 4
|
||||
# pack $w.pdeframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4
|
||||
# pack $w.pdeframe.btn -side left -anchor s -padx 4 -pady 4
|
||||
|
||||
wm title $w "Testing"
|
||||
focus .runtest_dlg
|
||||
}
|
||||
}
|
||||
# wm title $w "Testing"
|
||||
# focus .runtest_dlg
|
||||
# }
|
||||
# }
|
||||
|
||||
|
@ -854,20 +854,31 @@ ttk::button .bubar.center -text "Center" \
|
||||
-command { Ng_Center; redraw }
|
||||
|
||||
# tk_optionMenu .bubar.modesel drawmode "rotate" "move " "zoom "
|
||||
tixOptionMenu .bubar.modesel \
|
||||
-options {
|
||||
label.width 0
|
||||
label.anchor e
|
||||
menubutton.width 6
|
||||
} \
|
||||
-variable drawmode
|
||||
# tixOptionMenu .bubar.modesel \
|
||||
# -options {
|
||||
# label.width 0
|
||||
# label.anchor e
|
||||
# menubutton.width 6
|
||||
# } \
|
||||
# -variable drawmode
|
||||
|
||||
.bubar.modesel add command rotate -label Rotate
|
||||
.bubar.modesel add command move -label Move
|
||||
.bubar.modesel add command zoom -label Zoom
|
||||
# .bubar.modesel add command rotate -label Rotate
|
||||
# .bubar.modesel add command move -label Move
|
||||
# .bubar.modesel add command zoom -label Zoom
|
||||
|
||||
ttk::menubutton .bubar.modesel -menu .bubar.modesel.menu -text "" -width 6
|
||||
|
||||
menu .bubar.modesel.menu -tearoff 0
|
||||
|
||||
.bubar.modesel.menu add command -label "Rotate" -command "set drawmode \"rotate\" ;.bubar.modesel configure -text \"Rotate\""
|
||||
.bubar.modesel.menu add command -label "Move" -command "set drawmode \"move\" ;.bubar.modesel configure -text \"Move\""
|
||||
.bubar.modesel.menu add command -label "Zoom" -command "set drawmode \"zoom\" ;.bubar.modesel configure -text \"Zoom\""
|
||||
|
||||
.bubar.modesel.menu invoke "Rotate"
|
||||
|
||||
|
||||
|
||||
|
||||
set viewvals { geometry specpoints mesh solution}
|
||||
if { $userlevel == 3} {
|
||||
set viewvals { geometry mesh specpoints surfmeshing modelview solution}
|
||||
@ -881,19 +892,20 @@ set viewvallabs(surfmeshing) "Mesh Gen"
|
||||
set viewvallabs(modelview) "Modeller"
|
||||
set viewvallabs(solution) "Solution"
|
||||
|
||||
tixOptionMenu .bubar.selview \
|
||||
-options {
|
||||
label.width 0
|
||||
label.anchor e
|
||||
menubutton.width 10
|
||||
} \
|
||||
# tixOptionMenu .bubar.selview \
|
||||
# -options {
|
||||
# label.width 0
|
||||
# label.anchor e
|
||||
# menubutton.width 10
|
||||
# } \
|
||||
|
||||
foreach viewv $viewvals {
|
||||
.bubar.selview add command $viewv -label $viewvallabs($viewv)
|
||||
}
|
||||
# foreach viewv $viewvals {
|
||||
# .bubar.selview add command $viewv -label $viewvallabs($viewv)
|
||||
# }
|
||||
|
||||
# .bubar.selview config -variable selectvisual
|
||||
# .bubar.selview config -command { Ng_SetVisParameters; redraw }
|
||||
|
||||
.bubar.selview config -variable selectvisual
|
||||
.bubar.selview config -command { Ng_SetVisParameters; redraw }
|
||||
|
||||
|
||||
# pack .bubar.modesel -side right
|
||||
@ -961,8 +973,9 @@ pack .statbar.selslabel .statbar.selsval -side left -ipady 3p
|
||||
# }
|
||||
|
||||
|
||||
tixMeter .statbar.per -value 0 -text 0%
|
||||
.statbar.per configure -fillcolor blue
|
||||
#tixMeter .statbar.per -value 0 -text 0%
|
||||
ttk::progressbar .statbar.per -value 0 -maximum 1
|
||||
#.statbar.per configure -fillcolor blue
|
||||
|
||||
pack .statbar.per -side right
|
||||
pack .statbar.task -side right -ipady 4
|
||||
@ -1017,7 +1030,8 @@ proc timer2 { } {
|
||||
# set mem_moveable [Ng_MemInfo moveable]
|
||||
|
||||
|
||||
.statbar.per config -value [expr $status_percent/100] -text [format %2.1f [expr 0.1*int(10*$status_percent)]]%
|
||||
.statbar.per configure -value [expr $status_percent/100]
|
||||
# -text [format %2.1f [expr 0.1*int(10*$status_percent)]]%
|
||||
|
||||
|
||||
if { $multithread_running } {
|
||||
|
@ -54,7 +54,7 @@ proc show_menu_help { entry } {
|
||||
}
|
||||
|
||||
|
||||
tixBalloon .balloon -statusbar .helpline
|
||||
#tixBalloon .balloon -statusbar .helpline
|
||||
|
||||
proc set_control_help { control helpmsg } {
|
||||
bind $control <Enter> "show_control_help {$helpmsg}"
|
||||
|
776
ng/ngvisual.tcl
776
ng/ngvisual.tcl
@ -227,35 +227,48 @@ proc lineplotdialog { } {
|
||||
}
|
||||
|
||||
|
||||
tixOptionMenu $w.filesettings.latestevals -label "Use Evaluate Results: " \
|
||||
-options {
|
||||
label.width 25
|
||||
label.anchor e
|
||||
menubutton.width 40
|
||||
}
|
||||
# tixOptionMenu $w.filesettings.latestevals -label "Use Evaluate Results: " \
|
||||
# -options {
|
||||
# label.width 25
|
||||
# label.anchor e
|
||||
# menubutton.width 40
|
||||
# }
|
||||
|
||||
# for {set i 0} {$i < [llength ${visoptions.evaluatefilenames}]} {incr i} {
|
||||
# $w.filesettings.latestevals add command $i \
|
||||
# -label "[lindex ${visoptions.evaluatefiledescriptions} $i] ([lindex ${visoptions.evaluatefilenames} $i])"
|
||||
# }
|
||||
# $w.filesettings.latestevals config -variable visoptions.lineplotselectedeval
|
||||
|
||||
# pack $w.filesettings.latestevals
|
||||
ttk::frame $w.filesettings.latestevals
|
||||
ttk::label $w.filesettings.latestevals.lab -text "Use Evaluate Results: "
|
||||
ttk::menubutton $w.filesettings.latestevals.but -menu $w.filesettings.latestevals.menu -text "coarse" -width 40
|
||||
|
||||
menu $w.filesettings.latestevals.menu -tearoff 0
|
||||
for {set i 0} {$i < [llength ${visoptions.evaluatefilenames}]} {incr i} {
|
||||
$w.filesettings.latestevals add command $i \
|
||||
-label "[lindex ${visoptions.evaluatefiledescriptions} $i] ([lindex ${visoptions.evaluatefilenames} $i])"
|
||||
$w.filesettings.latestevals.menu add command -label $i\
|
||||
-command "set visoptions.lineplotselectedeval $i ; $w.filesettings.latestevals.but configure -text \"[lindex ${visoptions.evaluatefiledescriptions} $i] ([lindex ${visoptions.evaluatefilenames} $i])\""
|
||||
}
|
||||
$w.filesettings.latestevals config -variable visoptions.lineplotselectedeval
|
||||
$w.filesettings.latestevals.menu invoke ${visoptions.lineplotselectedeval}
|
||||
|
||||
|
||||
grid $w.filesettings.latestevals.lab $w.filesettings.latestevals.but -sticky nw
|
||||
pack $w.filesettings.latestevals
|
||||
|
||||
frame $w.filesettings.sfn
|
||||
ttk::frame $w.filesettings.sfn
|
||||
|
||||
button $w.filesettings.sfn.bb -text "Browse" \
|
||||
ttk::button $w.filesettings.sfn.bb -text "Browse" \
|
||||
-command { set visoptions.lineplotfile [tk_getOpenFile] }
|
||||
|
||||
|
||||
entry $w.filesettings.sfn.fn -width 50 -relief sunken \
|
||||
ttk::entry $w.filesettings.sfn.fn -width 50 \
|
||||
-textvariable visoptions.lineplotfile
|
||||
|
||||
pack $w.filesettings.sfn.bb $w.filesettings.sfn.fn -side left
|
||||
|
||||
pack $w.filesettings.sfn
|
||||
|
||||
button $w.filesettings.refresh -text "Refresh" -command {
|
||||
ttk::button $w.filesettings.refresh -text "Refresh" -command {
|
||||
if { ${visoptions.lineplotselectedeval} != 0} {
|
||||
set visoptions.lineplotfile [lindex ${visoptions.evaluatefilenames} ${visoptions.lineplotselectedeval}]
|
||||
}
|
||||
@ -308,32 +321,61 @@ proc lineplotdialog { } {
|
||||
pack $w.filesettings.refresh
|
||||
|
||||
|
||||
frame $w.filesettings.using
|
||||
ttk::frame $w.filesettings.using
|
||||
|
||||
global visoptions.lineplotdatadescr
|
||||
|
||||
tixOptionMenu $w.filesettings.using.xco -label "X-Coord:"\
|
||||
-options {
|
||||
label.width 8
|
||||
label.anchor e
|
||||
menubutton.width 15
|
||||
}
|
||||
for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } {
|
||||
$w.filesettings.using.xco add command $i -label [lindex ${visoptions.lineplotdatadescr} $i]
|
||||
}
|
||||
$w.filesettings.using.xco config -variable visoptions.lineplotusingx
|
||||
|
||||
tixOptionMenu $w.filesettings.using.yco -label "Y-Coord:"\
|
||||
-options {
|
||||
label.width 8
|
||||
label.anchor e
|
||||
menubutton.width 15
|
||||
}
|
||||
for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } {
|
||||
$w.filesettings.using.yco add command $i -label [lindex ${visoptions.lineplotdatadescr} $i]
|
||||
}
|
||||
$w.filesettings.using.yco config -variable visoptions.lineplotusingy
|
||||
|
||||
# tixOptionMenu $w.filesettings.using.xco -label "X-Coord:"\
|
||||
# -options {
|
||||
# label.width 8
|
||||
# label.anchor e
|
||||
# menubutton.width 15
|
||||
# }
|
||||
# for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } {
|
||||
# $w.filesettings.using.xco add command $i -label [lindex ${visoptions.lineplotdatadescr} $i]
|
||||
# }
|
||||
|
||||
ttk::frame $w.filesettings.using.xco
|
||||
ttk::label $w.filesettings.using.xco.lab -text "X-Coord:"
|
||||
ttk::menubutton $w.filesettings.using.xco.but -menu $w.filesettings.using.xco.menu -text "" -width 15
|
||||
|
||||
menu $w.filesettings.using.xco.menu -tearoff 0
|
||||
for {set i 0} {$i < [llength ${visoptions.lineplotdatadescr}]} {incr i} {
|
||||
$w.filesettings.using.xco.menu add command -label [lindex ${visoptions.lineplotdatadescr} $i]\
|
||||
-command "set visoptions.lineplotusingx $i ; $w.filesettings.using.xco.but configure -text \"[lindex ${visoptions.lineplotdatadescr} $i]\""
|
||||
}
|
||||
$w.filesettings.using.xco.menu invoke [lindex ${visoptions.lineplotdatadescr} 0]
|
||||
|
||||
|
||||
grid $w.filesettings.using.xco.lab $w.filesettings.using.xco.but -sticky nw
|
||||
#pack $w.filesettings.using.xco
|
||||
|
||||
|
||||
|
||||
# $w.filesettings.using.xco config -variable visoptions.lineplotusingx
|
||||
|
||||
# tixOptionMenu $w.filesettings.using.yco -label "Y-Coord:"\
|
||||
# -options {
|
||||
# label.width 8
|
||||
# label.anchor e
|
||||
# menubutton.width 15
|
||||
# }
|
||||
# for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } {
|
||||
# $w.filesettings.using.yco add command $i -label [lindex ${visoptions.lineplotdatadescr} $i]
|
||||
# }
|
||||
# $w.filesettings.using.yco config -variable visoptions.lineplotusingy
|
||||
ttk::frame $w.filesettings.using.yco
|
||||
ttk::label $w.filesettings.using.yco.lab -text "Y-Coord:"
|
||||
ttk::menubutton $w.filesettings.using.yco.but -menu $w.filesettings.using.yco.menu -text "" -width 15
|
||||
|
||||
menu $w.filesettings.using.yco.menu -tearoff 0
|
||||
for {set i 0} {$i < [llength ${visoptions.lineplotdatadescr}]} {incr i} {
|
||||
$w.filesettings.using.yco.menu add command -label [lindex ${visoptions.lineplotdatadescr} $i]\
|
||||
-command "set visoptions.lineplotusingy $i ; $w.filesettings.using.yco.but configure -text \"[lindex ${visoptions.lineplotdatadescr} $i]\""
|
||||
}
|
||||
$w.filesettings.using.yco.menu invoke [lindex ${visoptions.lineplotdatadescr} 0]
|
||||
grid $w.filesettings.using.yco.lab $w.filesettings.using.yco.but -sticky nw
|
||||
|
||||
global visoptions.lineplotxcoordselector
|
||||
global visoptions.lineplotycoordselector
|
||||
set visoptions.lineplotxcoordselector $w.filesettings.using.xco
|
||||
@ -347,89 +389,136 @@ proc lineplotdialog { } {
|
||||
|
||||
ttk::frame $w.settings -relief groove -borderwidth 3
|
||||
ttk::label $w.settings.title -text "\nSettings\n"
|
||||
pack $w.settings.title
|
||||
pack $w.settings.title
|
||||
|
||||
ttk::frame $w.settings.minmax
|
||||
ttk::checkbutton $w.settings.minmax.autoscale -text "Autoscale" -variable visoptions.lineplotautoscale
|
||||
tixControl $w.settings.minmax.xmin -label "Min. x: " \
|
||||
-integer false -variable visoptions.lineplotxmin \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 8
|
||||
label.anchor e
|
||||
}
|
||||
tixControl $w.settings.minmax.xmax -label "Max. x: " \
|
||||
-integer false -variable visoptions.lineplotxmax \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 8
|
||||
label.anchor e
|
||||
}
|
||||
tixControl $w.settings.minmax.ymin -label "Min. y: " \
|
||||
-integer false -variable visoptions.lineplotymin \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 8
|
||||
label.anchor e
|
||||
}
|
||||
tixControl $w.settings.minmax.ymax -label "Max. y: " \
|
||||
-integer false -variable visoptions.lineplotymax \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 8
|
||||
label.anchor e
|
||||
}
|
||||
|
||||
# tixControl $w.settings.minmax.xmin -label "Min. x: " \
|
||||
# -integer false -variable visoptions.lineplotxmin \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 8
|
||||
# label.anchor e
|
||||
# }
|
||||
ttk::frame $w.settings.minmax.xmin
|
||||
ttk::label $w.settings.minmax.xmin.label -text "Min. x: "
|
||||
ttk::spinbox $w.settings.minmax.xmin.sp -textvariable visoptions.lineplotxmin -width 6 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 3" \
|
||||
-invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9
|
||||
|
||||
# tixControl $w.settings.minmax.xmax -label "Max. x: " \
|
||||
# -integer false -variable visoptions.lineplotxmax \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 8
|
||||
# label.anchor e
|
||||
# }
|
||||
ttk::frame $w.settings.minmax.xmax
|
||||
ttk::label $w.settings.minmax.xmax.label -text "Max. x: "
|
||||
ttk::spinbox $w.settings.minmax.xmax.sp -textvariable visoptions.lineplotxmax -width 6 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 3" \
|
||||
-invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9
|
||||
|
||||
# tixControl $w.settings.minmax.ymin -label "Min. y: " \
|
||||
# -integer false -variable visoptions.lineplotymin \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 8
|
||||
# label.anchor e
|
||||
# }
|
||||
ttk::frame $w.settings.minmax.ymin
|
||||
ttk::label $w.settings.minmax.ymin.label -text "Min. y: "
|
||||
ttk::spinbox $w.settings.minmax.ymin.sp -textvariable visoptions.lineplotymin -width 6 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 3" \
|
||||
-invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9
|
||||
|
||||
# tixControl $w.settings.minmax.ymax -label "Max. y: " \
|
||||
# -integer false -variable visoptions.lineplotymax \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 8
|
||||
# label.anchor e
|
||||
# }
|
||||
ttk::frame $w.settings.minmax.ymax
|
||||
ttk::label $w.settings.minmax.ymax.label -text "Max. y: "
|
||||
ttk::spinbox $w.settings.minmax.ymax.sp -textvariable visoptions.lineplotymax -width 6 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 3" \
|
||||
-invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9
|
||||
pack $w.settings.minmax.xmin.label $w.settings.minmax.xmin.sp
|
||||
pack $w.settings.minmax.xmax.label $w.settings.minmax.xmax.sp
|
||||
pack $w.settings.minmax.ymin.label $w.settings.minmax.ymin.sp
|
||||
pack $w.settings.minmax.ymax.label $w.settings.minmax.ymax.sp
|
||||
pack $w.settings.minmax.autoscale $w.settings.minmax.xmin $w.settings.minmax.xmax \
|
||||
$w.settings.minmax.ymin $w.settings.minmax.ymax -side left
|
||||
|
||||
pack $w.settings.minmax
|
||||
|
||||
|
||||
label $w.settings.empty1 -text ""
|
||||
ttk::label $w.settings.empty1 -text ""
|
||||
pack $w.settings.empty1
|
||||
|
||||
frame $w.settings.plotsize
|
||||
ttk::frame $w.settings.plotsize
|
||||
|
||||
tixControl $w.settings.plotsize.xsize -label "Plotsize x: "\
|
||||
-integer true -variable visoptions.lineplotsizex \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 13
|
||||
label.anchor e
|
||||
}
|
||||
tixControl $w.settings.plotsize.ysize -label "y: "\
|
||||
-integer true -variable visoptions.lineplotsizey \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 3
|
||||
label.anchor e
|
||||
}
|
||||
# tixControl $w.settings.plotsize.xsize -label "Plotsize x: "\
|
||||
# -integer true -variable visoptions.lineplotsizex \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 13
|
||||
# label.anchor e
|
||||
# }
|
||||
|
||||
ttk::frame $w.settings.plotsize.xsize
|
||||
ttk::label $w.settings.plotsize.xsize.label -text "Plotsize x: "
|
||||
ttk::spinbox $w.settings.plotsize.xsize.sp -textvariable visoptions.lineplotsizex -width 6 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \
|
||||
-invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9
|
||||
pack $w.settings.plotsize.xsize.label $w.settings.plotsize.xsize.sp
|
||||
|
||||
# tixControl $w.settings.plotsize.ysize -label "y: "\
|
||||
# -integer true -variable visoptions.lineplotsizey \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 3
|
||||
# label.anchor e
|
||||
# }
|
||||
|
||||
ttk::frame $w.settings.plotsize.ysize
|
||||
ttk::label $w.settings.plotsize.ysize.label -text "Plotsize y: "
|
||||
ttk::spinbox $w.settings.plotsize.ysize.sp -textvariable visoptions.lineplotsizey -width 6 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \
|
||||
-invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9
|
||||
pack $w.settings.plotsize.ysize.label $w.settings.plotsize.ysize.sp
|
||||
|
||||
pack $w.settings.plotsize.xsize $w.settings.plotsize.ysize -side left
|
||||
|
||||
pack $w.settings.plotsize
|
||||
|
||||
label $w.settings.empty2 -text ""
|
||||
ttk::label $w.settings.empty2 -text ""
|
||||
pack $w.settings.empty2
|
||||
|
||||
# tixOptionMenu $w.settings.color -label "Linecolor: " \
|
||||
# -options {
|
||||
# label.width 19
|
||||
# label.anchor e
|
||||
# menubutton.width 15
|
||||
# }
|
||||
# foreach step { red black blue green yellow } {
|
||||
# $w.settings.color add command $step -label $step
|
||||
# }
|
||||
# $w.settings.color config -variable visoptions.lineplotcolor
|
||||
ttk::frame $w.settings.color
|
||||
ttk::label $w.settings.color.lab -text "Linecolor: "
|
||||
ttk::menubutton $w.settings.color.but -menu $w.settings.color.menu -text "" -width 15
|
||||
|
||||
tixOptionMenu $w.settings.color -label "Linecolor: " \
|
||||
-options {
|
||||
label.width 19
|
||||
label.anchor e
|
||||
menubutton.width 15
|
||||
}
|
||||
menu $w.settings.color.menu -tearoff 0
|
||||
foreach step { red black blue green yellow } {
|
||||
$w.settings.color add command $step -label $step
|
||||
}
|
||||
$w.settings.color config -variable visoptions.lineplotcolor
|
||||
|
||||
$w.settings.color.menu add command -label $step -command "set visoptions.lineplotcolor $step; $w.settings.color.but configure -text \"$step\""
|
||||
}
|
||||
# for {set i 0} {$i < [llength ${visoptions.lineplotdatadescr}]} {incr i} {
|
||||
# $w.filesettings.using.yco.menu add command -label [lindex ${visoptions.lineplotdatadescr} $i]\
|
||||
# -command "set visoptions.lineplotusingy $i ; $w.filesettings.using.yco.but configure -text \"[lindex ${visoptions.lineplotdatadescr} $i]\""
|
||||
# }
|
||||
$w.settings.color.menu invoke "red"
|
||||
grid $w.settings.color.lab $w.settings.color.but -sticky nw
|
||||
|
||||
pack $w.settings.color
|
||||
|
||||
|
||||
pack $w.settings
|
||||
pack $w.settings -fill x
|
||||
|
||||
set datax ""
|
||||
set datay ""
|
||||
@ -438,24 +527,33 @@ proc lineplotdialog { } {
|
||||
set ymin 0
|
||||
set ymax 0
|
||||
|
||||
frame $w.plots -relief groove -borderwidth 3
|
||||
ttk::frame $w.plots -relief groove -borderwidth 3
|
||||
|
||||
tixOptionMenu $w.plots.selplot -label "Selected Plot: " \
|
||||
-options {
|
||||
label.width 19
|
||||
label.anchor e
|
||||
menubutton.width 15
|
||||
}
|
||||
$w.plots.selplot add command none -label "None"
|
||||
# tixOptionMenu $w.plots.selplot -label "Selected Plot: " \
|
||||
# -options {
|
||||
# label.width 19
|
||||
# label.anchor e
|
||||
# menubutton.width 15
|
||||
# }
|
||||
# $w.plots.selplot add command none -label "None"
|
||||
|
||||
$w.plots.selplot config -variable visoptions.lineplotselected
|
||||
# $w.plots.selplot config -variable visoptions.lineplotselected
|
||||
|
||||
ttk::frame $w.plots.selplot
|
||||
ttk::label $w.plots.selplot.lab -text "Linecolor: "
|
||||
ttk::menubutton $w.plots.selplot.but -menu $w.plots.selplot.menu -text "" -width 15
|
||||
|
||||
menu $w.plots.selplot.menu -tearoff 0
|
||||
$w.plots.selplot.menu add command -label "None" -command "set visoptions.lineplotselected \"None\"; $w.plots.selplot.but configure -text \"None\""
|
||||
grid $w.plots.selplot.lab $w.plots.selplot.but -sticky nw
|
||||
$w.plots.selplot.menu invoke "None"
|
||||
|
||||
global visoptions.lineplotselector
|
||||
set visoptions.lineplotselector $w.plots.selplot
|
||||
set visoptions.lineplotselector $w.plots.selplot.menu
|
||||
|
||||
|
||||
|
||||
button $w.plots.new -text "Generate New Plot" -command {
|
||||
ttk::button $w.plots.new -text "Generate New Plot" -command {
|
||||
if { ${visoptions.lineplotselectedeval} != 0} {
|
||||
set visoptions.lineplotfile [lindex ${visoptions.evaluatefilenames} ${visoptions.lineplotselectedeval}]
|
||||
}
|
||||
@ -491,7 +589,7 @@ proc lineplotdialog { } {
|
||||
addplotline $ident $datax $datay $plotinfo ${visoptions.lineplotcolor}
|
||||
}
|
||||
|
||||
button $w.plots.addto -text "Add to Selected Plot" -command {
|
||||
ttk::button $w.plots.addto -text "Add to Selected Plot" -command {
|
||||
if { ${visoptions.lineplotselectedeval} != 0} {
|
||||
set visoptions.lineplotfile [lindex ${visoptions.evaluatefilenames} ${visoptions.lineplotselectedeval}]
|
||||
}
|
||||
@ -516,7 +614,7 @@ proc lineplotdialog { } {
|
||||
|
||||
|
||||
|
||||
button $w.close -text "Close" -command "destroy $w"
|
||||
ttk::button $w.close -text "Close" -command "destroy $w"
|
||||
pack $w.close
|
||||
|
||||
wm withdraw $w
|
||||
@ -629,26 +727,43 @@ proc fieldlinesdialog { } {
|
||||
|
||||
|
||||
|
||||
tixOptionMenu $f.vecfun -label "Vector Function: " \
|
||||
-options {
|
||||
label.width 18
|
||||
label.anchor e
|
||||
menubutton.width 12
|
||||
}
|
||||
$f.vecfun add command none -label None
|
||||
for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
|
||||
set fname [Ng_Vis_Field getfieldname $i]
|
||||
set fcomp [Ng_Vis_Field getfieldcomponents $i]
|
||||
set iscomplex [Ng_Vis_Field iscomplex $i]
|
||||
set sdim [Ng_Vis_Field getdimension]
|
||||
if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }
|
||||
if { ($fcomp == $sdim) || ($fcomp == 3) } {
|
||||
$f.vecfun add command $fname -label $fname
|
||||
}
|
||||
}
|
||||
$f.vecfun configure -variable visoptions.fieldlinesvecfunction
|
||||
$f.vecfun configure -command { Ng_Vis_Set parameters; redraw }
|
||||
|
||||
# tixOptionMenu $f.vecfun -label "Vector Function: " \
|
||||
# -options {
|
||||
# label.width 18
|
||||
# label.anchor e
|
||||
# menubutton.width 12
|
||||
# }
|
||||
# $f.vecfun add command none -label None
|
||||
# for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
|
||||
# set fname [Ng_Vis_Field getfieldname $i]
|
||||
# set fcomp [Ng_Vis_Field getfieldcomponents $i]
|
||||
# set iscomplex [Ng_Vis_Field iscomplex $i]
|
||||
# set sdim [Ng_Vis_Field getdimension]
|
||||
# if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }
|
||||
# if { ($fcomp == $sdim) || ($fcomp == 3) } {
|
||||
# $f.vecfun add command $fname -label $fname
|
||||
# }
|
||||
# }
|
||||
# $f.vecfun configure -variable visoptions.fieldlinesvecfunction
|
||||
# $f.vecfun configure -command { Ng_Vis_Set parameters; redraw }
|
||||
ttk::frame $f.vecfun
|
||||
ttk::label $f.vecfun.lab -text "Vector Function: "
|
||||
ttk::menubutton $f.vecfun.but -menu $f.vecfun.menu -text "" -width 12
|
||||
menu $f.vecfun.menu -tearoff 0
|
||||
# for {set i 0} {$i < [llength ${visoptions.evaluatefilenames}]} {incr i} {
|
||||
# $w.filesettings.latestevals.menu add command -label $i\
|
||||
# -command "set visoptions.lineplotselectedeval $i ; $w.filesettings.latestevals.but configure -text \"[lindex ${visoptions.evaluatefiledescriptions} $i] ([lindex ${visoptions.evaluatefilenames} $i])\""
|
||||
# }
|
||||
for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
|
||||
set fname [Ng_Vis_Field getfieldname $i]
|
||||
set fcomp [Ng_Vis_Field getfieldcomponents $i]
|
||||
set iscomplex [Ng_Vis_Field iscomplex $i]
|
||||
set sdim [Ng_Vis_Field getdimension]
|
||||
if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }
|
||||
if { ($fcomp == $sdim) || ($fcomp == 3) } {
|
||||
$f.vecfun.menu add command -label $fname -command "set visoptions.fieldlinesvecfunction $fname;Ng_Vis_Set parameters; redraw;$f.vecfun.but configure -text \"$fname\" " }
|
||||
}
|
||||
grid $f.vecfun.lab $f.vecfun.but -sticky nw
|
||||
pack $f.vecfun
|
||||
|
||||
|
||||
@ -660,12 +775,20 @@ proc fieldlinesdialog { } {
|
||||
ttk::frame $f.phasesettings
|
||||
|
||||
ttk::checkbutton $f.phasesettings.onephase -text "Fix Phase" -variable visoptions.fieldlinesonlyonephase
|
||||
scale $f.phasesettings.phase -orient horizontal -length 300 -from 0 -to 360 \
|
||||
-label "phi" \
|
||||
-resolution 1 \
|
||||
-variable visoptions.fieldlinesphase \
|
||||
-command { popupcheckredraw3 fieldlinesdialog_pop1 }
|
||||
# scale $f.phasesettings.phase -orient horizontal -length 300 -from 0 -to 360 \
|
||||
# -label "phi" \
|
||||
# -resolution 1 \
|
||||
# -variable visoptions.fieldlinesphase \
|
||||
# -command { popupcheckredraw3 fieldlinesdialog_pop1 }
|
||||
|
||||
ttk::frame $f.phasesettings.phase
|
||||
ttk::label $f.phasesettings.phase.lab -text "phi"
|
||||
ttk::scale $f.phasesettings.phase.sc -orient horizontal -length 100 -from 0 -to 360 -variable visoptions.fieldlinesphase \
|
||||
-command "roundscale $f.phasesettings.phase.sc 0; popupcheckredraw3 fieldlinesdialog_pop1"
|
||||
ttk::entry $f.phasesettings.phase.ent -width 4 -textvariable visoptions.fieldlinesphase -validate focus -takefocus 0 \
|
||||
-validatecommand "popupcheckredraw3 fieldlinesdialog_pop1;my_validate %W 0 1 %P 0" \
|
||||
-invalidcommand "my_invalid %W;popupcheckredraw3 fieldlinesdialog_pop1"
|
||||
grid $f.phasesettings.phase.lab $f.phasesettings.phase.sc $f.phasesettings.phase.ent -sticky nw -ipadx 4
|
||||
pack $f.phasesettings.onephase $f.phasesettings.phase -side left
|
||||
|
||||
pack $f.phasesettings
|
||||
@ -782,32 +905,50 @@ proc fieldlinesdialog { } {
|
||||
|
||||
set g $w.nb.settings
|
||||
|
||||
frame $g.linesettings -relief groove -borderwidth 3
|
||||
label $g.linesettings.title -text "\nLine Settings\n"
|
||||
tixControl $g.linesettings.length -label "rel. Length: " -integer false \
|
||||
-variable visoptions.fieldlineslength -min 0.00001 -max 10000 -step 0.1 \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 25
|
||||
label.anchor e
|
||||
}
|
||||
ttk::frame $g.linesettings -relief groove -borderwidth 3
|
||||
ttk::label $g.linesettings.title -text "\nLine Settings\n"
|
||||
# tixControl $g.linesettings.length -label "rel. Length: " -integer false \
|
||||
# -variable visoptions.fieldlineslength -min 0.00001 -max 10000 -step 0.1 \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 25
|
||||
# label.anchor e
|
||||
# }
|
||||
|
||||
tixControl $g.linesettings.maxpoints -label "max. Points: " -integer true \
|
||||
-variable visoptions.fieldlinesmaxpoints -min 0 -max 10000 -step 1 \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 25
|
||||
label.anchor e
|
||||
}
|
||||
|
||||
tixControl $g.linesettings.thick -label "rel. Thickness: " -integer false \
|
||||
-variable visoptions.fieldlinesthickness -min 1e-10 -max 0.5 -step 0.001 \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 25
|
||||
label.anchor e
|
||||
}
|
||||
ttk::frame $g.linesettings.length
|
||||
ttk::label $g.linesettings.length.lab -text "rel. Length: "
|
||||
ttk::spinbox $g.linesettings.length.sp -textvariable visoptions.fieldlineslength -width 6 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 5" \
|
||||
-invalidcommand "my_invalidspinbox %W" -from 0.00001 -to 10000
|
||||
grid $g.linesettings.length.lab $g.linesettings.length.sp -sticky nw
|
||||
|
||||
# tixControl $g.linesettings.maxpoints -label "max. Points: " -integer true \
|
||||
# -variable visoptions.fieldlinesmaxpoints -min 0 -max 10000 -step 1 \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 25
|
||||
# label.anchor e
|
||||
# }
|
||||
ttk::frame $g.linesettings.maxpoints
|
||||
ttk::label $g.linesettings.maxpoints.lab -text "max. Points: "
|
||||
ttk::spinbox $g.linesettings.maxpoints.sp -textvariable visoptions.fieldlinesmaxpoints -width 6 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \
|
||||
-invalidcommand "my_invalidspinbox %W" -from 0 -to 10000
|
||||
grid $g.linesettings.maxpoints.lab $g.linesettings.maxpoints.sp -sticky nw
|
||||
|
||||
|
||||
# tixControl $g.linesettings.thick -label "rel. Thickness: " -integer false \
|
||||
# -variable visoptions.fieldlinesthickness -min 1e-10 -max 0.5 -step 0.001 \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 25
|
||||
# label.anchor e
|
||||
# }
|
||||
|
||||
ttk::frame $g.linesettings.thick
|
||||
ttk::label $g.linesettings.thick.lab -text "rel. Thickness: "
|
||||
ttk::spinbox $g.linesettings.thick.sp -textvariable visoptions.fieldlinesthickness -width 6 -increment 0.001 -validate focus -validatecommand "my_validatespinbox %W %P 6" \
|
||||
-invalidcommand "my_invalidspinbox %W" -from 1e-10 -to 0.5
|
||||
grid $g.linesettings.thick.lab $g.linesettings.thick.sp -stick nw
|
||||
|
||||
pack $g.linesettings.title $g.linesettings.length $g.linesettings.maxpoints $g.linesettings.thick
|
||||
|
||||
pack $g.linesettings -fill x -ipady 3
|
||||
@ -818,29 +959,46 @@ proc fieldlinesdialog { } {
|
||||
|
||||
global visoptions.fieldlinestolerance
|
||||
|
||||
frame $g.odesettings -relief groove -borderwidth 3
|
||||
label $g.odesettings.title -text "\nODE Settings\n"
|
||||
tixControl $g.odesettings.tol -label "rel. Tolerance: " -integer false \
|
||||
-variable visoptions.fieldlinestolerance -min 0.00001 -max 1 -step 0.01 \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 25
|
||||
label.anchor e
|
||||
}
|
||||
ttk::frame $g.odesettings -relief groove -borderwidth 3
|
||||
ttk::label $g.odesettings.title -text "\nODE Settings\n"
|
||||
# tixControl $g.odesettings.tol -label "rel. Tolerance: " -integer false \
|
||||
# -variable visoptions.fieldlinestolerance -min 0.00001 -max 1 -step 0.01 \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 25
|
||||
# label.anchor e
|
||||
# }
|
||||
|
||||
ttk::frame $g.odesettings.tol
|
||||
ttk::label $g.odesettings.tol.lab -text "rel. Thickness: "
|
||||
ttk::spinbox $g.odesettings.tol.sp -textvariable visoptions.fieldlinestolerance -width 6 -increment 0.01 -validate focus -validatecommand "my_validatespinbox %W %P 5" \
|
||||
-invalidcommand "my_invalidspinbox %W" -from 0.00001 -to 1
|
||||
grid $g.odesettings.tol.lab $g.odesettings.tol.sp -stick nw
|
||||
|
||||
|
||||
tixOptionMenu $g.odesettings.rktype -label "RK-Type " \
|
||||
-options {
|
||||
label.width 20
|
||||
label.anchor e
|
||||
menubutton.width 25
|
||||
}
|
||||
$g.odesettings.rktype add command euler -label "Euler, order 1"
|
||||
$g.odesettings.rktype add command eulercauchy -label "Euler-Cauchy, order 2"
|
||||
$g.odesettings.rktype add command simpson -label "Simpson, order 3"
|
||||
$g.odesettings.rktype add command crungekutta -label "classical Runge-Kutta, order 4"
|
||||
$g.odesettings.rktype configure -variable visoptions.fieldlinesrktype
|
||||
$g.odesettings.rktype configure -command { Ng_Vis_Set parameters; redraw }
|
||||
|
||||
# tixOptionMenu $g.odesettings.rktype -label "RK-Type " \
|
||||
# -options {
|
||||
# label.width 20
|
||||
# label.anchor e
|
||||
# menubutton.width 25
|
||||
# }
|
||||
# $g.odesettings.rktype add command euler -label "Euler, order 1"
|
||||
# $g.odesettings.rktype add command eulercauchy -label "Euler-Cauchy, order 2"
|
||||
# $g.odesettings.rktype add command simpson -label "Simpson, order 3"
|
||||
# $g.odesettings.rktype add command crungekutta -label "classical Runge-Kutta, order 4"
|
||||
# $g.odesettings.rktype configure -variable visoptions.fieldlinesrktype
|
||||
# $g.odesettings.rktype configure -command { Ng_Vis_Set parameters; redraw }
|
||||
ttk::frame $g.odesettings.rktype
|
||||
ttk::label $g.odesettings.rktype.lab -text "RK-Type "
|
||||
ttk::menubutton $g.odesettings.rktype.but -menu $g.odesettings.rktype.menu -text "" -width 25
|
||||
menu $g.odesettings.rktype.menu -tearoff 0
|
||||
$g.odesettings.rktype.menu add command -label "Euler, order 1" -command "set visoptions.fieldlinesrktype \"euler\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \"Euler,order 1\" "
|
||||
$g.odesettings.rktype.menu add command -label "Euler-Cauchy, order 2" -command "set visoptions.fieldlinesrktype \"eulercauchy\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \"Euler-Cauchy,order 2\" "
|
||||
$g.odesettings.rktype.menu add command -label "Simpson, order 3" -command "set visoptions.fieldlinesrktype \"simpson\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \"Simpson,order 3\""
|
||||
$g.odesettings.rktype.menu add command -label "classical Runge-Kutta, order 4" -command "set visoptions.fieldlinesrktype \"crungekutta\" ;Ng_Vis_Set parameters; redraw; $g.odesettings.rktype.but configure -text \"classical Runge-Kutta,order 4\""
|
||||
$g.odesettings.rktype.menu invoke "classical Runge-Kutta, order 4"
|
||||
|
||||
grid $g.odesettings.rktype.lab $g.odesettings.rktype.but -sticky nw
|
||||
|
||||
pack $g.odesettings.title $g.odesettings.tol $g.odesettings.rktype
|
||||
|
||||
@ -873,8 +1031,16 @@ proc fieldlinesdialog { } {
|
||||
} {
|
||||
toplevel .fieldlines_help
|
||||
|
||||
tixScrolledText .fieldlines_help.ht -scrollbar y
|
||||
set text .fieldlines_help.ht.text
|
||||
set f [frame .fieldlines_help.ht]
|
||||
#ttk::scrollbar $f.hsb -orient horizontal -command [list $f.t xview]
|
||||
ttk::scrollbar $f.vsb -orient vertical -command [list $f.t yview]
|
||||
text $f.t -yscrollcommand [list $f.vsb set]
|
||||
grid $f.t -row 0 -column 0 -sticky nsew
|
||||
grid $f.vsb -row 0 -column 1 -sticky nsew
|
||||
grid columnconfigure $f 0 -weight 1
|
||||
grid rowconfigure $f 0 -weight 1
|
||||
#tixScrolledText .fieldlines_help.ht -scrollbar y
|
||||
set text $f.t
|
||||
|
||||
$text configure -setgrid true -wrap word
|
||||
|
||||
@ -1496,177 +1662,177 @@ proc visual_dialog { } {
|
||||
|
||||
|
||||
|
||||
proc reset_visual_dialog { } {
|
||||
# proc reset_visual_dialog { } {
|
||||
|
||||
set w .visoptions_dlg
|
||||
# set w .visoptions_dlg
|
||||
|
||||
if {[winfo exists .visoptions_dlg] == 1} {
|
||||
# if {[winfo exists .visoptions_dlg] == 1} {
|
||||
|
||||
|
||||
destroy $w.scalfun $w.vecfun $w.evaluate $w.multidimcomp
|
||||
destroy $w.imaginary $w.logscale $w.texframe.usetexture $w.texframe.lintexture
|
||||
destroy $w.texframe
|
||||
destroy $w.invcolor $w.redrawperiodic
|
||||
destroy $w.bu -pady 5
|
||||
destroy $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes
|
||||
# destroy $w.scalfun $w.vecfun $w.evaluate $w.multidimcomp
|
||||
# destroy $w.imaginary $w.logscale $w.texframe.usetexture $w.texframe.lintexture
|
||||
# destroy $w.texframe
|
||||
# destroy $w.invcolor $w.redrawperiodic
|
||||
# destroy $w.bu -pady 5
|
||||
# destroy $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes
|
||||
|
||||
|
||||
checkbutton $w.imaginary -text "Imaginary Part" \
|
||||
-variable visoptions.imaginary \
|
||||
-command { Ng_Vis_Set parameters; redraw }
|
||||
# checkbutton $w.imaginary -text "Imaginary Part" \
|
||||
# -variable visoptions.imaginary \
|
||||
# -command { Ng_Vis_Set parameters; redraw }
|
||||
|
||||
frame $w.texframe
|
||||
# frame $w.texframe
|
||||
|
||||
checkbutton $w.texframe.usetexture -text "Use Textures (" \
|
||||
-variable visoptions.usetexture \
|
||||
-command { Ng_Vis_Set parameters; redraw }
|
||||
# checkbutton $w.texframe.usetexture -text "Use Textures (" \
|
||||
# -variable visoptions.usetexture \
|
||||
# -command { Ng_Vis_Set parameters; redraw }
|
||||
|
||||
checkbutton $w.texframe.lintexture -text "Linear )" \
|
||||
-variable visoptions.lineartexture \
|
||||
-command { Ng_Vis_Set parameters; redraw }
|
||||
# checkbutton $w.texframe.lintexture -text "Linear )" \
|
||||
# -variable visoptions.lineartexture \
|
||||
# -command { Ng_Vis_Set parameters; redraw }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
checkbutton $w.invcolor -text "Inverse Color" \
|
||||
-variable visoptions.invcolor \
|
||||
-command { Ng_Vis_Set parameters; redraw }
|
||||
# checkbutton $w.invcolor -text "Inverse Color" \
|
||||
# -variable visoptions.invcolor \
|
||||
# -command { Ng_Vis_Set parameters; redraw }
|
||||
|
||||
checkbutton $w.logscale -text "Log Scale" \
|
||||
-variable visoptions.logscale \
|
||||
-command { Ng_Vis_Set parameters; redraw }
|
||||
# checkbutton $w.logscale -text "Log Scale" \
|
||||
# -variable visoptions.logscale \
|
||||
# -command { Ng_Vis_Set parameters; redraw }
|
||||
|
||||
|
||||
|
||||
checkbutton $w.redrawperiodic -text "Animate periodic" \
|
||||
-variable visoptions.redrawperiodic \
|
||||
-command {
|
||||
redrawperiodic
|
||||
Ng_Vis_Set parameters;
|
||||
redraw
|
||||
}
|
||||
# checkbutton $w.redrawperiodic -text "Animate periodic" \
|
||||
# -variable visoptions.redrawperiodic \
|
||||
# -command {
|
||||
# redrawperiodic
|
||||
# Ng_Vis_Set parameters;
|
||||
# redraw
|
||||
# }
|
||||
|
||||
|
||||
tixOptionMenu $w.scalfun -label "Scalar Function: " \
|
||||
-options {
|
||||
label.width 18
|
||||
label.anchor e
|
||||
menubutton.width 12
|
||||
}
|
||||
# tixOptionMenu $w.scalfun -label "Scalar Function: " \
|
||||
# -options {
|
||||
# label.width 18
|
||||
# label.anchor e
|
||||
# menubutton.width 12
|
||||
# }
|
||||
|
||||
tixOptionMenu $w.vecfun -label "Vector Function: " \
|
||||
-options {
|
||||
label.width 18
|
||||
label.anchor e
|
||||
menubutton.width 12
|
||||
}
|
||||
# tixOptionMenu $w.vecfun -label "Vector Function: " \
|
||||
# -options {
|
||||
# label.width 18
|
||||
# label.anchor e
|
||||
# menubutton.width 12
|
||||
# }
|
||||
|
||||
|
||||
|
||||
$w.scalfun add command none -label None
|
||||
for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
|
||||
set fname [Ng_Vis_Field getfieldname $i]
|
||||
set fcomp [Ng_Vis_Field getfieldcomponents $i]
|
||||
if { $fcomp == 1 } {
|
||||
$w.scalfun add command $fname.1 -label $fname
|
||||
} {
|
||||
for { set j 1 } { $j <= $fcomp } { incr j } {
|
||||
$w.scalfun add command $fname.$j -label "$fname ($j)"
|
||||
}
|
||||
$w.scalfun add command $fname.0 -label "func ($fname)"
|
||||
}
|
||||
}
|
||||
# $w.scalfun add command none -label None
|
||||
# for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
|
||||
# set fname [Ng_Vis_Field getfieldname $i]
|
||||
# set fcomp [Ng_Vis_Field getfieldcomponents $i]
|
||||
# if { $fcomp == 1 } {
|
||||
# $w.scalfun add command $fname.1 -label $fname
|
||||
# } {
|
||||
# for { set j 1 } { $j <= $fcomp } { incr j } {
|
||||
# $w.scalfun add command $fname.$j -label "$fname ($j)"
|
||||
# }
|
||||
# $w.scalfun add command $fname.0 -label "func ($fname)"
|
||||
# }
|
||||
# }
|
||||
|
||||
$w.vecfun add command none -label None
|
||||
for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
|
||||
set fname [Ng_Vis_Field getfieldname $i]
|
||||
set fcomp [Ng_Vis_Field getfieldcomponents $i]
|
||||
set iscomplex [Ng_Vis_Field iscomplex $i]
|
||||
set sdim [Ng_Vis_Field getdimension]
|
||||
if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }
|
||||
if { ($fcomp == $sdim) || ($fcomp == 3) } {
|
||||
$w.vecfun add command $fname -label $fname
|
||||
}
|
||||
}
|
||||
# $w.vecfun add command none -label None
|
||||
# for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
|
||||
# set fname [Ng_Vis_Field getfieldname $i]
|
||||
# set fcomp [Ng_Vis_Field getfieldcomponents $i]
|
||||
# set iscomplex [Ng_Vis_Field iscomplex $i]
|
||||
# set sdim [Ng_Vis_Field getdimension]
|
||||
# if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }
|
||||
# if { ($fcomp == $sdim) || ($fcomp == 3) } {
|
||||
# $w.vecfun add command $fname -label $fname
|
||||
# }
|
||||
# }
|
||||
|
||||
|
||||
|
||||
$w.scalfun configure -variable visoptions.scalfunction
|
||||
$w.scalfun configure -command { Ng_Vis_Set parameters; redraw }
|
||||
$w.vecfun configure -variable visoptions.vecfunction
|
||||
$w.vecfun configure -command { Ng_Vis_Set parameters; redraw }
|
||||
# $w.scalfun configure -variable visoptions.scalfunction
|
||||
# $w.scalfun configure -command { Ng_Vis_Set parameters; redraw }
|
||||
# $w.vecfun configure -variable visoptions.vecfunction
|
||||
# $w.vecfun configure -command { Ng_Vis_Set parameters; redraw }
|
||||
|
||||
|
||||
# puts "sclfunction = ${visoptions.scalfunction}"
|
||||
# # puts "sclfunction = ${visoptions.scalfunction}"
|
||||
|
||||
|
||||
tixOptionMenu $w.evaluate -label "Evaluate: " \
|
||||
-options {
|
||||
label.width 18
|
||||
label.anchor e
|
||||
menubutton.width 12
|
||||
}
|
||||
$w.evaluate add command abs -label "|.|"
|
||||
$w.evaluate add command abstens -label "|tensor|"
|
||||
$w.evaluate add command mises -label "Mises"
|
||||
$w.evaluate add command main -label "Main"
|
||||
$w.evaluate configure -variable visoptions.evaluate
|
||||
$w.evaluate configure -command {
|
||||
Ng_Vis_Set parameters;
|
||||
redraw
|
||||
}
|
||||
# tixOptionMenu $w.evaluate -label "Evaluate: " \
|
||||
# -options {
|
||||
# label.width 18
|
||||
# label.anchor e
|
||||
# menubutton.width 12
|
||||
# }
|
||||
# $w.evaluate add command abs -label "|.|"
|
||||
# $w.evaluate add command abstens -label "|tensor|"
|
||||
# $w.evaluate add command mises -label "Mises"
|
||||
# $w.evaluate add command main -label "Main"
|
||||
# $w.evaluate configure -variable visoptions.evaluate
|
||||
# $w.evaluate configure -command {
|
||||
# Ng_Vis_Set parameters;
|
||||
# redraw
|
||||
# }
|
||||
|
||||
pack $w.scalfun $w.vecfun $w.evaluate
|
||||
# pack $w.scalfun $w.vecfun $w.evaluate
|
||||
|
||||
tixControl $w.multidimcomp -label "multidim-component: " -integer true \
|
||||
-variable visoptions.multidimcomponent -min 0 \
|
||||
-command { Ng_Vis_Set parameters; redraw } \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 18
|
||||
label.anchor e
|
||||
}
|
||||
# tixControl $w.multidimcomp -label "multidim-component: " -integer true \
|
||||
# -variable visoptions.multidimcomponent -min 0 \
|
||||
# -command { Ng_Vis_Set parameters; redraw } \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 18
|
||||
# label.anchor e
|
||||
# }
|
||||
|
||||
|
||||
pack $w.multidimcomp
|
||||
# pack $w.multidimcomp
|
||||
|
||||
pack $w.imaginary $w.logscale $w.texframe $w.invcolor $w.redrawperiodic
|
||||
pack $w.texframe.usetexture $w.texframe.lintexture -side left -expand yes
|
||||
# pack $w.imaginary $w.logscale $w.texframe $w.invcolor $w.redrawperiodic
|
||||
# pack $w.texframe.usetexture $w.texframe.lintexture -side left -expand yes
|
||||
|
||||
|
||||
frame $w.bu
|
||||
pack $w.bu -pady 5
|
||||
# frame $w.bu
|
||||
# pack $w.bu -pady 5
|
||||
|
||||
button $w.bu.showsol -text "Show Solution" -command {
|
||||
set selectvisual solution
|
||||
Ng_SetVisParameters
|
||||
redraw
|
||||
}
|
||||
button $w.bu.clipping -text "Clipping" -command {
|
||||
clippingdialog;
|
||||
}
|
||||
button $w.bu.fieldlines -text "Fieldlines" -command {
|
||||
fieldlinesdialog;
|
||||
}
|
||||
# button $w.bu.showsol -text "Show Solution" -command {
|
||||
# set selectvisual solution
|
||||
# Ng_SetVisParameters
|
||||
# redraw
|
||||
# }
|
||||
# button $w.bu.clipping -text "Clipping" -command {
|
||||
# clippingdialog;
|
||||
# }
|
||||
# button $w.bu.fieldlines -text "Fieldlines" -command {
|
||||
# fieldlinesdialog;
|
||||
# }
|
||||
|
||||
button $w.bu.lineplot -text "2D Lineplot" -command {
|
||||
lineplotdialog;
|
||||
}
|
||||
# button $w.bu.lineplot -text "2D Lineplot" -command {
|
||||
# lineplotdialog;
|
||||
# }
|
||||
|
||||
button $w.bu.done -text "Close" -command {
|
||||
destroy .visoptions_dlg
|
||||
}
|
||||
# button $w.bu.done -text "Close" -command {
|
||||
# destroy .visoptions_dlg
|
||||
# }
|
||||
|
||||
pack $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes
|
||||
# pack $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes
|
||||
|
||||
wm withdraw $w
|
||||
wm deiconify $w
|
||||
# wm withdraw $w
|
||||
# wm deiconify $w
|
||||
|
||||
|
||||
}
|
||||
# }
|
||||
|
||||
}
|
||||
# }
|
||||
|
||||
|
||||
|
||||
|
291
ng/occgeom.tcl
291
ng/occgeom.tcl
@ -39,65 +39,82 @@ proc occdialogbuildtree {} {
|
||||
global entities
|
||||
|
||||
set w .occ_dlg
|
||||
set hlist [$w.mtre subwidget hlist]
|
||||
#set hlist [$w.mtre subwidget hlist]
|
||||
|
||||
set entities [Ng_GetOCCData getentities]
|
||||
set nrentities [expr [llength $entities]]
|
||||
|
||||
|
||||
if {$nrentities != 0} {
|
||||
|
||||
$hlist add Topology -itemtype text -text "Topology"
|
||||
|
||||
#$hlist add Topology -itemtype text -text "Topology"
|
||||
|
||||
$hlist add Topology/CompSolids -itemtype text -text "Composite Solids" -data "Composite Solids"
|
||||
$hlist add Topology/FreeSolids -itemtype text -text "Free Solids" -data "Free Solids"
|
||||
$hlist add Topology/FreeShells -itemtype text -text "Free Shells" -data "Free Shells"
|
||||
$hlist add Topology/FreeFaces -itemtype text -text "Free Faces" -data "Free Faces"
|
||||
$hlist add Topology/FreeWires -itemtype text -text "Free Wires" -data "Free Wires"
|
||||
$hlist add Topology/FreeEdges -itemtype text -text "Free Edges" -data "Free Edges"
|
||||
$hlist add Topology/FreeVertices -itemtype text -text "Free Vertices" -data "Free Vertices"
|
||||
|
||||
#$hlist add Topology/CompSolids -itemtype text -text "Composite Solids" -data "Composite Solids"
|
||||
#$hlist add Topology/FreeSolids -itemtype text -text "Free Solids" -data "Free Solids"
|
||||
#$hlist add Topology/FreeShells -itemtype text -text "Free Shells" -data "Free Shells"
|
||||
#$hlist add Topology/FreeFaces -itemtype text -text "Free Faces" -data "Free Faces"
|
||||
#$hlist add Topology/FreeWires -itemtype text -text "Free Wires" -data "Free Wires"
|
||||
#$hlist add Topology/FreeEdges -itemtype text -text "Free Edges" -data "Free Edges"
|
||||
#$hlist add Topology/FreeVertices -itemtype text -text "Free Vertices" -data "Free Vertices"
|
||||
$w.tree insert {Topology} end -id "CompSolids" -text "Composite Solids"
|
||||
$w.tree insert {Topology} end -id "FreeSolids" -text "Free Solids"
|
||||
$w.tree insert {Topology} end -id "FreeShells" -text "Free Shells"
|
||||
$w.tree insert {Topology} end -id "FreeFaces" -text "Free Faces"
|
||||
$w.tree insert {Topology} end -id "FreeWires" -text "Free Wires"
|
||||
$w.tree insert {Topology} end -id "FreeEdges" -text "Free Edges"
|
||||
$w.tree insert {Topology} end -id "FreeVertices" -text "Free Vertices"
|
||||
|
||||
# $hlist add SingularEntities -itemtype text -text "Entities marked as singular"
|
||||
|
||||
$w.tree item "Topology" -open true
|
||||
set i [expr 0]
|
||||
while {$i < $nrentities} {
|
||||
set entity [lindex $entities [expr $i]]
|
||||
incr i 1
|
||||
set entityname [lindex $entities [expr $i]]
|
||||
$hlist add Topology/$entity -text $entityname -data $entityname
|
||||
#$hlist add Topology/$entity -text $entityname -data $entityname
|
||||
set myroot [string range $entity 0 [string last / $entity]-1]
|
||||
$w.tree insert $myroot end -id $entity -text $entityname -value 1
|
||||
incr i 1
|
||||
$w.mtre close Topology/$entity
|
||||
#$w.mtre close Topology/$entity
|
||||
}
|
||||
|
||||
$w.mtre autosetmode
|
||||
#$w.mtre autosetmode
|
||||
|
||||
$w.mtre open Topology
|
||||
$w.mtre close Topology/CompSolids
|
||||
$w.mtre close Topology/FreeSolids
|
||||
$w.mtre close Topology/FreeShells
|
||||
$w.mtre close Topology/FreeFaces
|
||||
$w.mtre close Topology/FreeWires
|
||||
$w.mtre close Topology/FreeEdges
|
||||
$w.mtre close Topology/FreeVertices
|
||||
#$w.mtre open Topology
|
||||
#$w.mtre close Topology/CompSolids
|
||||
#$w.mtre close Topology/FreeSolids
|
||||
#$w.mtre close Topology/FreeShells
|
||||
#$w.mtre close Topology/FreeFaces
|
||||
#$w.mtre close Topology/FreeWires
|
||||
#$w.mtre close Topology/FreeEdges
|
||||
#$w.mtre close Topology/FreeVertices
|
||||
|
||||
set i [expr 0]
|
||||
while {$i < $nrentities} {
|
||||
set entity [lindex $entities [expr $i]]
|
||||
$w.mtre close Topology/$entity
|
||||
#$w.mtre close Topology/$entity
|
||||
$w.tree item $entity -open false
|
||||
incr i 2
|
||||
}
|
||||
|
||||
set faces [Ng_OCCCommand getunmeshedfaceinfo]
|
||||
set nrfaces [expr [llength $faces]]
|
||||
if {$nrfaces >= 2} {
|
||||
$hlist add ErrorFaces -itemtype text -text "Faces with surface meshing error"
|
||||
$w.mtre open ErrorFaces
|
||||
#$hlist add ErrorFaces -itemtype text -text "Faces with surface meshing error"
|
||||
$w.tree insert {} -id ErrorFaces -text "Faces with surface meshing error"
|
||||
#$w.mtre open ErrorFaces
|
||||
$w.tree item ErrorFaces -open true
|
||||
set i [expr 0]
|
||||
while {$i < $nrfaces} {
|
||||
set entity [lindex $faces [expr $i]]
|
||||
set myroot [string range $entity 0 [string last / $entity]-1]
|
||||
if { [string length $myroot] == 0 } {
|
||||
set myroot ErrorFaces
|
||||
}
|
||||
incr i 1
|
||||
set entityname [lindex $faces [expr $i]]
|
||||
$hlist add ErrorFaces/$entity -text $entityname -data $entityname
|
||||
#$hlist add ErrorFaces/$entity -text $entityname -data $entityname
|
||||
$w.tree insert {myroot} end -id $entity -text $entityname -value 0
|
||||
incr i 1
|
||||
}
|
||||
}
|
||||
@ -106,20 +123,27 @@ proc occdialogbuildtree {} {
|
||||
set faces [Ng_OCCCommand getnotdrawablefaces]
|
||||
set nrfaces [expr [llength $faces]]
|
||||
if {$nrfaces >= 2} {
|
||||
$hlist add NotDrawableFaces -itemtype text -text "Faces impossible to visualize"
|
||||
$w.mtre open NotDrawableFaces
|
||||
#$hlist add NotDrawableFaces -itemtype text -text "Faces impossible to visualize"
|
||||
$w.tree insert {} -id NotDrawableFaces -text "Faces impossible to visualize"
|
||||
#$w.mtre open NotDrawableFaces
|
||||
$w.tree item NotDrawableFaces -open true
|
||||
set i [expr 0]
|
||||
while {$i < $nrfaces} {
|
||||
set entity [lindex $faces [expr $i]]
|
||||
set myroot [string range $entity 0 [string last / $entity]-1]
|
||||
if { [string length $myroot ] == 0 } {
|
||||
set myroot NotDrawableFaces
|
||||
}
|
||||
incr i 1
|
||||
set entityname [lindex $faces [expr $i]]
|
||||
$hlist add NotDrawableFaces/$entity -text $entityname -data $entityname
|
||||
#$hlist add NotDrawableFaces/$entity -text $entityname -data $entityname
|
||||
$w.tree insert $myroot end -id $entity -text $entityname -value 0
|
||||
incr i 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$w.mtre autosetmode
|
||||
#$w.mtre autosetmode
|
||||
|
||||
puts "done"
|
||||
}
|
||||
@ -128,7 +152,8 @@ proc occdialogbuildtree {} {
|
||||
|
||||
proc rebuildoccdialog {} {
|
||||
if {[winfo exists .occ_dlg] == 1} {
|
||||
[.occ_dlg.mtre subwidget hlist] delete all
|
||||
.occ_dlg.tree delete [.occ_dlg.tree children Topology]
|
||||
#[.occ_dlg.mtre subwidget hlist] delete all
|
||||
occdialogbuildtree
|
||||
}
|
||||
}
|
||||
@ -152,27 +177,28 @@ proc selectentity { entityname } {
|
||||
set i [expr 0]
|
||||
while {$i < $nrentities} {
|
||||
set entitylength []
|
||||
|
||||
set entity2 [lindex $entities [expr $i]]
|
||||
incr i 1
|
||||
set entityname2 [lindex $entities [expr $i]]
|
||||
incr i 1
|
||||
set entityname2 [string range $entityname2 0 [expr [string length $entityname]-1]]
|
||||
|
||||
if {$entityname == $entityname2} {
|
||||
set hlist [.occ_dlg.mtre subwidget hlist]
|
||||
.occ_dlg.mtre open Topology
|
||||
set slashpos [string last "/" $entity2]
|
||||
set entity3 [string range $entity2 0 [expr $slashpos-1]]
|
||||
while {$slashpos != -1} {
|
||||
.occ_dlg.mtre open Topology/$entity3
|
||||
|
||||
set slashpos [string last "/" $entity3]
|
||||
set entity3 [string range $entity3 0 [expr $slashpos-1]]
|
||||
}
|
||||
$hlist selection clear
|
||||
$hlist see Topology/$entity2
|
||||
$hlist selection set Topology/$entity2
|
||||
# #set hlist [.occ_dlg.mtre subwidget hlist]
|
||||
# #.occ_dlg.mtre open Topology
|
||||
# .occ_dlg.tree item Topology -open true
|
||||
# puts $entity2
|
||||
# set slashpos [string last "/" $entity2]
|
||||
# set entity3 [string range $entity2 0 [expr $slashpos-1]]
|
||||
# while {$slashpos != -1} {
|
||||
# #.occ_dlg.mtre open Topology/$entity3
|
||||
# .occ_dlg.tree item $entity3 -open true
|
||||
# puts $entity3
|
||||
# set slashpos [string last "/" $entity3]
|
||||
# set entity3 [string range $entity3 0 [expr $slashpos-1]]
|
||||
# }
|
||||
#$hlist selection clear
|
||||
.occ_dlg.tree see $entity2
|
||||
.occ_dlg.tree selection set $entity2
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -197,31 +223,22 @@ proc occdialog { } {
|
||||
} {
|
||||
toplevel $w
|
||||
|
||||
tixTree $w.mtre -options { separator "/" }
|
||||
pack $w.mtre -fill both -expand yes
|
||||
|
||||
ttk::treeview $w.tree
|
||||
$w.tree insert {} end -id "Topology" -text "Topology"
|
||||
pack $w.tree -fill both -expand yes
|
||||
occdialogbuildtree
|
||||
|
||||
set hlist [$w.mtre subwidget hlist]
|
||||
$hlist configure -selectforeground black
|
||||
$hlist configure -selectbackground grey
|
||||
|
||||
set solname {""}
|
||||
|
||||
|
||||
bind $hlist <Double-1> {
|
||||
set oldsolname {$solname}
|
||||
set solname [[.occ_dlg.mtre subwidget hlist] info selection]
|
||||
if {$solname != "" && $oldsolname != $solname } {
|
||||
set seppos [string first "/" $solname]
|
||||
set rootname [string range $solname 0 [expr $seppos-1]]
|
||||
|
||||
set entityname [[.occ_dlg.mtre subwidget hlist] info data $solname]
|
||||
|
||||
bind $w.tree <Double-1> {
|
||||
set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ]
|
||||
set rootname ""
|
||||
if {[.occ_dlg.tree item [.occ_dlg.tree selection] -value] == 1 } {
|
||||
set rootname "Topology"
|
||||
}
|
||||
set spacepos [string first " " $entityname]
|
||||
set entitytype [string range $entityname 0 [expr $spacepos-1]]
|
||||
set entitytype [string range $entityname 0 [expr $spacepos-1]]
|
||||
set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]]
|
||||
set spacepos2 [string first " " $helpstring]
|
||||
set entitynumber [string range $helpstring 0 [expr $spacepos2-1]]
|
||||
set entitynumber [string range $helpstring 0 [expr $spacepos2-1]]
|
||||
if {$rootname == "Topology"} {
|
||||
Ng_OCCCommand highlightentity $entitytype $entitynumber
|
||||
set selectvisual geometry
|
||||
@ -231,19 +248,15 @@ proc occdialog { } {
|
||||
if {$brackpos != -1} {
|
||||
set entityname [string range $entityname 0 $brackpos]
|
||||
}
|
||||
|
||||
selectentity $entityname
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button $w.cl -text "Close" -command {
|
||||
}
|
||||
ttk::button $w.cl -text "Close" -command {
|
||||
destroy .occ_dlg
|
||||
}
|
||||
|
||||
button $w.show -text "Show" -command {
|
||||
set solname [[.occ_dlg.mtre subwidget hlist] info selection]
|
||||
set entityname [[.occ_dlg.mtre subwidget hlist] info data $solname]
|
||||
ttk::button $w.show -text "Show" -command {
|
||||
set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ]
|
||||
set spacepos [string first " " $entityname]
|
||||
set entitytype [string range $entityname 0 [expr $spacepos-1]]
|
||||
set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]]
|
||||
@ -255,9 +268,8 @@ proc occdialog { } {
|
||||
# Ng_SetVisParameters
|
||||
redraw
|
||||
}
|
||||
button $w.hide -text "Hide" -command {
|
||||
set solname [[.occ_dlg.mtre subwidget hlist] info selection]
|
||||
set entityname [[.occ_dlg.mtre subwidget hlist] info data $solname]
|
||||
ttk::button $w.hide -text "Hide" -command {
|
||||
set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ]
|
||||
set spacepos [string first " " $entityname]
|
||||
set entitytype [string range $entityname 0 [expr $spacepos-1]]
|
||||
set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]]
|
||||
@ -270,9 +282,8 @@ proc occdialog { } {
|
||||
redraw
|
||||
}
|
||||
|
||||
button $w.swaporientation -text "Swap orientation" -command {
|
||||
set solname [[.occ_dlg.mtre subwidget hlist] info selection]
|
||||
set entityname [[.occ_dlg.mtre subwidget hlist] info data $solname]
|
||||
ttk::button $w.swaporientation -text "Swap orientation" -command {
|
||||
set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ]
|
||||
set spacepos [string first " " $entityname]
|
||||
set entitytype [string range $entityname 0 [expr $spacepos-1]]
|
||||
set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]]
|
||||
@ -283,14 +294,13 @@ proc occdialog { } {
|
||||
set selectvisual geometry
|
||||
# Ng_SetVisParameters
|
||||
redraw
|
||||
|
||||
[.occ_dlg.mtre subwidget hlist] delete all
|
||||
.occ_dlg.tree delete [.occ_dlg.tree children Topology]
|
||||
#[.occ_dlg.mtre subwidget hlist] delete all
|
||||
occdialogbuildtree
|
||||
}
|
||||
|
||||
button $w.marksingular -text "Mark/Unmark as singular" -command {
|
||||
set solname [[.occ_dlg.mtre subwidget hlist] info selection]
|
||||
set entityname [[.occ_dlg.mtre subwidget hlist] info data $solname]
|
||||
ttk::button $w.marksingular -text "Mark/Unmark as singular" -command {
|
||||
set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ]
|
||||
set spacepos [string first " " $entityname]
|
||||
if { $spacepos != 0 } {
|
||||
set entitytype [string range $entityname 0 [expr $spacepos-1]]
|
||||
@ -298,46 +308,23 @@ proc occdialog { } {
|
||||
set spacepos2 [string first " " $helpstring]
|
||||
if { $spacepos2 != 0 } {
|
||||
set entitynumber [string range $helpstring 0 [expr $spacepos2-1]]
|
||||
|
||||
puts $entitytype
|
||||
puts $entitynumber
|
||||
global ismarkedsingular
|
||||
Ng_OCCCommand marksingular $entitytype $entitynumber
|
||||
|
||||
set hlist [$w.mtre subwidget hlist]
|
||||
|
||||
# $hlist entryconfigure $solname -text "hallo"
|
||||
# set style1 [tixDisplayStyle imagetext -font 8x13]
|
||||
set style1 [tixDisplayStyle imagetext -foreground black -background white -selectforeground white -selectbackground blue]
|
||||
set style2 [tixDisplayStyle imagetext -foreground red -background white -selectforeground red -selectbackground blue]
|
||||
|
||||
|
||||
if { $ismarkedsingular == 0 } {
|
||||
$hlist entryconfigure $solname -style $style1
|
||||
.occ_dlg.tree tag remove "Color" [.occ_dlg.tree selection]
|
||||
} {
|
||||
$hlist entryconfigure $solname -style $style2
|
||||
.occ_dlg.tree tag add "Color" [.occ_dlg.tree selection]
|
||||
.occ_dlg.tree tag configure "Color" -foreground "red"
|
||||
.occ_dlg.tree tag configure "Color" -background "blue"
|
||||
}
|
||||
|
||||
# set hlist [$w.mtre subwidget hlist]
|
||||
# foreach solname2 $hlist {
|
||||
# if { $ismarkedsingular == 0 } {
|
||||
# $hlist entryconfigure $solname2 -style $style1
|
||||
# } {
|
||||
# $hlist entryconfigure $solname2 -style $style2
|
||||
# }
|
||||
# }
|
||||
}
|
||||
}
|
||||
# $hlist add test -after $solname
|
||||
|
||||
# $hlist add SingularEntities/$entityname -text $entityname
|
||||
# set selectvisual geometry
|
||||
# Ng_SetVisParameters
|
||||
# redraw
|
||||
|
||||
# [.occ_dlg.mtre subwidget hlist] delete all
|
||||
# occdialogbuildtree
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
checkbutton $w.zoomtohighlightedentity -text "Zoom to highlighted entity" \
|
||||
ttk::checkbutton $w.zoomtohighlightedentity -text "Zoom to highlighted entity" \
|
||||
-variable occoptions.zoomtohighlightedentity \
|
||||
-command {
|
||||
Ng_SetOCCVisParameters
|
||||
@ -353,58 +340,70 @@ proc occdialog { } {
|
||||
|
||||
|
||||
|
||||
frame $w.healing -relief groove -borderwidth 3
|
||||
ttk::frame $w.healing -relief groove -borderwidth 3
|
||||
|
||||
button $w.healing.checkentities -text "Analyze geometry" -command {
|
||||
ttk::button $w.healing.checkentities -text "Analyze geometry" -command {
|
||||
set irregent [Ng_OCCCommand findsmallentities]
|
||||
|
||||
set w .occ_dlg
|
||||
set hlist [$w.mtre subwidget hlist]
|
||||
|
||||
$hlist add ProblematicEntities -text "Problematic Entities"
|
||||
$hlist delete offsprings ProblematicEntities
|
||||
|
||||
set nritems [expr [llength $irregent]]
|
||||
set i [expr 0]
|
||||
if {$nritems > 0 } {
|
||||
if { [.occ_dlg.tree exists ProblematicEntities] == 1 } {
|
||||
$w.tree delete ProblematicEntities
|
||||
}
|
||||
$w.tree insert {} end -id ProblematicEntities -text "Problematic Entities"
|
||||
}
|
||||
while {$i < $nritems} {
|
||||
set entity [lindex $irregent [expr $i]]
|
||||
incr i 1
|
||||
set entityname [lindex $irregent [expr $i]]
|
||||
$hlist add ProblematicEntities/$entity -text $entityname -data $entityname
|
||||
#puts $entity
|
||||
#puts $entityname
|
||||
set myroot [string range $entity 0 [string last / $entity]-1]
|
||||
if { [string length $myroot] == 0 } {
|
||||
set myroot ProblematicEntities
|
||||
}
|
||||
$w.tree insert $myroot end -id $entity -text $entityname
|
||||
incr i 1
|
||||
}
|
||||
$w.mtre open ProblematicEntities
|
||||
$w.mtre autosetmode
|
||||
$w.tree item ProblematicEntities -open true
|
||||
}
|
||||
|
||||
tixControl $w.healing.tolerance -label "Healing tolerance: " -integer false \
|
||||
-variable occoptions.tolerance -min 1e-9 -max 1e6 \
|
||||
-options {
|
||||
entry.width 6
|
||||
label.width 25
|
||||
label.anchor e
|
||||
}
|
||||
|
||||
checkbutton $w.healing.fixsmalledges -text "Fix small edges" \
|
||||
# tixControl $w.healing.tolerance -label "Healing tolerance: " -integer false \
|
||||
# -variable occoptions.tolerance -min 1e-9 -max 1e6 \
|
||||
# -options {
|
||||
# entry.width 6
|
||||
# label.width 25
|
||||
# label.anchor e
|
||||
# }
|
||||
|
||||
ttk::frame $w.healing.tolerance
|
||||
ttk::label $w.healing.tolerance.label -text "Healing tolerance: "
|
||||
ttk::spinbox $w.healing.tolerance.sp -textvariable occoptions.tolerance -width 6 -increment 0.01 -validate focus -validatecommand "my_validatespinbox %W %P 12" \
|
||||
-invalidcommand "my_invalidspinbox %W" -from -1e-9 -to 1e6
|
||||
grid $w.healing.tolerance.label $w.healing.tolerance.sp
|
||||
|
||||
ttk::checkbutton $w.healing.fixsmalledges -text "Fix small edges" \
|
||||
-variable occoptions.fixsmalledges
|
||||
|
||||
checkbutton $w.healing.fixspotstripfaces -text "Fix spot/strip faces" \
|
||||
ttk::checkbutton $w.healing.fixspotstripfaces -text "Fix spot/strip faces" \
|
||||
-variable occoptions.fixspotstripfaces
|
||||
|
||||
checkbutton $w.healing.sewfaces -text "Sew faces" \
|
||||
ttk::checkbutton $w.healing.sewfaces -text "Sew faces" \
|
||||
-variable occoptions.sewfaces
|
||||
|
||||
checkbutton $w.healing.makesolids -text "Make solids" \
|
||||
ttk::checkbutton $w.healing.makesolids -text "Make solids" \
|
||||
-variable occoptions.makesolids
|
||||
|
||||
checkbutton $w.healing.splitpartitions -text "Split partitions" \
|
||||
ttk::checkbutton $w.healing.splitpartitions -text "Split partitions" \
|
||||
-variable occoptions.splitpartitions
|
||||
|
||||
button $w.healing.heal -text "Heal geometry" -command {
|
||||
.occ_dlg.healing.tolerance invoke
|
||||
ttk::button $w.healing.heal -text "Heal geometry" -command {
|
||||
#.occ_dlg.healing.tolerance.sp invoke
|
||||
Ng_OCCCommand shapehealing
|
||||
redraw
|
||||
[.occ_dlg.mtre subwidget hlist] delete all
|
||||
.occ_dlg.tree delete [.occ_dlg.tree children Topology]
|
||||
#[.occ_dlg.mtre subwidget hlist] delete all
|
||||
occdialogbuildtree
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ void ParallelRun()
|
||||
string redraw_cmd;
|
||||
// MyMPI_Recv (redraw_cmd, 0, MPI_TAG_VIS);
|
||||
redraw_cmd = MyMPI_RecvCmd();
|
||||
|
||||
|
||||
// PrintMessage (1, "Redraw - ", redraw_cmd);
|
||||
|
||||
static string displname;
|
||||
@ -147,17 +147,17 @@ void ParallelRun()
|
||||
static Display * display = NULL;
|
||||
static GLXContext context;
|
||||
static XVisualInfo * visinfo = 0;
|
||||
|
||||
|
||||
// if (!display)
|
||||
if (redraw_cmd == "init")
|
||||
{
|
||||
MyMPI_Recv (displname, 0, MPI_TAG_VIS);
|
||||
MyMPI_Recv (curDrawable, 0, MPI_TAG_VIS);
|
||||
MyMPI_Recv (contextid, 0, MPI_TAG_VIS);
|
||||
|
||||
|
||||
display = XOpenDisplay (displname.c_str());
|
||||
|
||||
|
||||
|
||||
/*
|
||||
PrintMessage (3, "displ - name = ", displname);
|
||||
PrintMessage (3, "display = ", display,
|
||||
@ -166,23 +166,27 @@ void ParallelRun()
|
||||
" , h = ", XDisplayHeight (display, 0));
|
||||
*/
|
||||
|
||||
Window win;
|
||||
int wx, wy;
|
||||
unsigned int ww, wh, bw, depth;
|
||||
// cout << "got drawable: " << curDrawable << endl;
|
||||
|
||||
XGetGeometry(display, curDrawable, &win,
|
||||
&wx, &wy, &ww, &wh,
|
||||
&bw, &depth);
|
||||
|
||||
/*
|
||||
Window win;
|
||||
int wx, wy;
|
||||
unsigned int ww, wh, bw, depth;
|
||||
cout << "got drawable: " << curDrawable << ", contextid: " << contextid << endl;
|
||||
|
||||
cout << "get geometriy..." << endl;
|
||||
XGetGeometry(display, curDrawable, &win,
|
||||
&wx, &wy, &ww, &wh,
|
||||
&bw, &depth);
|
||||
cout << "have!" << endl;
|
||||
|
||||
cout << "P" << id << ": window-props: x = " << wx << ", y = " << wy
|
||||
<< ", w = " << ww << ", h = " << wh << ", depth = " << depth << endl;
|
||||
*/
|
||||
|
||||
|
||||
#define VISUAL
|
||||
#ifdef VISUAL
|
||||
|
||||
|
||||
#ifdef VISINFO_OLD
|
||||
//this does not seem to work anymore (but might still be with togl1.7?)
|
||||
// make a new GLXContext
|
||||
// first, generate a visual (copied from togl)
|
||||
|
||||
@ -221,51 +225,68 @@ void ParallelRun()
|
||||
attrib_list[attrib_count++] = GLX_DOUBLEBUFFER;
|
||||
|
||||
attrib_list[attrib_count++] = None;
|
||||
|
||||
|
||||
visinfo = glXChooseVisual(display, 0,
|
||||
attrib_list);
|
||||
cout << "have vis?" << endl;
|
||||
|
||||
if (visinfo) {
|
||||
/* found a GLX visual! */
|
||||
// cout << "found VISINFO !!!" << endl;
|
||||
cout << "found VISINFO !!!" << endl;
|
||||
|
||||
/*
|
||||
int hi = 0;
|
||||
std::cout << "attribs = ";
|
||||
while (attrib_list[hi] != None)
|
||||
int hi = 0;
|
||||
std::cout << "attribs = ";
|
||||
while (attrib_list[hi] != None)
|
||||
std::cout << attrib_list[hi++] << " ";
|
||||
std::cout << std::endl;
|
||||
std::cout << std::endl;
|
||||
*/
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!visinfo)
|
||||
cerr << "no VISINFO found" << endl;
|
||||
|
||||
#else
|
||||
//get all possible confs
|
||||
int nconfs;
|
||||
auto cptr = glXGetFBConfigs (display,0, &nconfs);
|
||||
Array<int> conf_ids(nconfs);
|
||||
for(int k=0;k<nconfs;k++)
|
||||
glXGetFBConfigAttrib(display, cptr[k], GLX_FBCONFIG_ID, &(conf_ids[k]));
|
||||
|
||||
//get drawable->FBConfig->visual
|
||||
unsigned int d_fbc_id;
|
||||
glXQueryDrawable( display, curDrawable, GLX_FBCONFIG_ID, &d_fbc_id);
|
||||
GLXFBConfig d_fbc;
|
||||
for(int k=0;k<nconfs;k++)
|
||||
if(d_fbc_id==conf_ids[k])
|
||||
d_fbc = cptr[k];
|
||||
visinfo = glXGetVisualFromFBConfig(display,d_fbc);
|
||||
#endif
|
||||
|
||||
// context = glXCreateContext( display, visinfo, 0, /* curContext, */ False );
|
||||
context = glXCreateContext( display, visinfo, glXImportContextEXT ( display, contextid ), False);
|
||||
// cout << "context = " << context << endl;
|
||||
|
||||
glXMakeCurrent (display, curDrawable, context);
|
||||
|
||||
|
||||
#else
|
||||
// try to get GLXcontext from the master.
|
||||
// this needs an indirect context (BUT DOES NOT WORK ????)
|
||||
|
||||
context = glXImportContextEXT ( display, contextid );
|
||||
|
||||
context = glXImportContextEXT ( display, contextid );
|
||||
|
||||
PrintMessage (1, "GLX-contextid = " , contextid,
|
||||
" imported context ", context);
|
||||
|
||||
|
||||
glXMakeCurrent (display, curDrawable, context);
|
||||
#endif
|
||||
|
||||
// PrintMessage (1, "redraw - init complete");
|
||||
}
|
||||
|
||||
|
||||
if (redraw_cmd == "broadcast")
|
||||
{
|
||||
vsmesh.Broadcast ();
|
||||
@ -283,7 +304,6 @@ void ParallelRun()
|
||||
vsmesh.BuildFilledList (false);
|
||||
}
|
||||
|
||||
|
||||
if (redraw_cmd == "solsurfellist")
|
||||
{
|
||||
vssolution.DrawSurfaceElements();
|
||||
|
@ -33,24 +33,24 @@ proc clientsocketdialog { } {
|
||||
global sockets.serverhost
|
||||
global sockets.serverport
|
||||
|
||||
frame $w.general
|
||||
frame $w.host
|
||||
label $w.host.lab -text "Serverhost: "
|
||||
entry $w.host.name -width 30 -relief sunken -textvariable sockets.serverhost
|
||||
ttk::frame $w.general
|
||||
ttk::frame $w.host
|
||||
ttk::label $w.host.lab -text "Serverhost: "
|
||||
ttk::entry $w.host.name -width 30 -textvariable sockets.serverhost
|
||||
|
||||
pack $w.host.lab $w.host.name -side left
|
||||
pack $w.host
|
||||
|
||||
frame $w.ports
|
||||
label $w.ports.lab1 -text "Serverport: "
|
||||
entry $w.ports.statport -width 6 -relief sunken -textvariable sockets.serverport
|
||||
ttk::frame $w.ports
|
||||
ttk::label $w.ports.lab1 -text "Serverport: "
|
||||
ttk::entry $w.ports.statport -width 6 -textvariable sockets.serverport
|
||||
|
||||
pack $w.ports.lab1 $w.ports.statport -side left
|
||||
pack $w.ports
|
||||
|
||||
frame $w.listboxes
|
||||
ttk::frame $w.listboxes
|
||||
|
||||
frame $w.listboxes.choosesocketframe
|
||||
ttk::frame $w.listboxes.choosesocketframe
|
||||
|
||||
tixScrolledListBox $w.listboxes.choosesocketframe.choosesocket -scrollbar auto
|
||||
|
||||
@ -62,21 +62,21 @@ proc clientsocketdialog { } {
|
||||
${sockets.serverlistbox} configure -selectmode browse
|
||||
${sockets.serverlistbox} configure -exportselection false
|
||||
|
||||
button $w.addserver -text "Add ServerSocket" -command {
|
||||
ttk::button $w.addserver -text "Add ServerSocket" -command {
|
||||
Ng_Socket addserver ${sockets.serverport} ${sockets.serverhost}
|
||||
updateserverlist
|
||||
}
|
||||
|
||||
pack $w.addserver
|
||||
|
||||
label $w.linefeed -text "\n"
|
||||
ttk::label $w.linefeed -text "\n"
|
||||
pack $w.linefeed
|
||||
|
||||
frame $w.clientidframe
|
||||
label $w.clientidframe.lab -text "Client ID: ";
|
||||
ttk::frame $w.clientidframe
|
||||
ttk::label $w.clientidframe.lab -text "Client ID: ";
|
||||
global sockets.myidlabel
|
||||
entry $w.clientidframe.val -width 5 -relief sunken -textvariable sockets.myidlabel
|
||||
button $w.clientidframe.but -text "Set" -command {
|
||||
ttk::entry $w.clientidframe.val -width 5 -textvariable sockets.myidlabel
|
||||
ttk::button $w.clientidframe.but -text "Set" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
set opserver [lindex $opsel 0]
|
||||
@ -95,13 +95,13 @@ proc clientsocketdialog { } {
|
||||
# pack $w.clientidlabel
|
||||
|
||||
|
||||
label $w.listboxes.choosesocketframe.chooselab -text [format "\n\n%-16s %6s %6s " Host Socket MyID ]
|
||||
ttk::label $w.listboxes.choosesocketframe.chooselab -text [format "\n\n%-16s %6s %6s " Host Socket MyID ]
|
||||
pack $w.listboxes.choosesocketframe.chooselab
|
||||
pack $w.listboxes.choosesocketframe.choosesocket
|
||||
|
||||
frame $w.listboxes.choosesocketframe.serverbuttons
|
||||
ttk::frame $w.listboxes.choosesocketframe.serverbuttons
|
||||
|
||||
button $w.listboxes.choosesocketframe.serverbuttons.save -text "Save" -command {
|
||||
ttk::button $w.listboxes.choosesocketframe.serverbuttons.save -text "Save" -command {
|
||||
Ng_Socket saveserverlist
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ proc clientsocketdialog { } {
|
||||
Ng_Socket loadserverlist
|
||||
updateserverlist
|
||||
|
||||
button $w.listboxes.choosesocketframe.serverbuttons.delete -text "Delete" -command {
|
||||
ttk::button $w.listboxes.choosesocketframe.serverbuttons.delete -text "Delete" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
Ng_Socket deletesocket [lindex $opsel 0]
|
||||
@ -120,17 +120,17 @@ proc clientsocketdialog { } {
|
||||
pack $w.listboxes.choosesocketframe.serverbuttons.save $w.listboxes.choosesocketframe.serverbuttons.delete -side left
|
||||
pack $w.listboxes.choosesocketframe.serverbuttons
|
||||
|
||||
frame $w.listboxes.statusframe
|
||||
ttk::frame $w.listboxes.statusframe
|
||||
|
||||
label $w.listboxes.statusframe.statuslabel1 -text "\n\njobqueue"
|
||||
ttk::label $w.listboxes.statusframe.statuslabel1 -text "\n\njobqueue"
|
||||
|
||||
tixScrolledListBox $w.listboxes.statusframe.queuestatus -scrollbar auto
|
||||
|
||||
label $w.listboxes.statusframe.statuslabel2 -text "\ncurrent job"
|
||||
ttk::label $w.listboxes.statusframe.statuslabel2 -text "\ncurrent job"
|
||||
|
||||
tixScrolledListBox $w.listboxes.statusframe.currentjobstatus -scrollbar auto
|
||||
|
||||
label $w.listboxes.statusframe.statuslabel3 -text "\nanswers"
|
||||
ttk::label $w.listboxes.statusframe.statuslabel3 -text "\nanswers"
|
||||
|
||||
tixScrolledListBox $w.listboxes.statusframe.answers -scrollbar auto
|
||||
|
||||
@ -157,7 +157,7 @@ proc clientsocketdialog { } {
|
||||
${sockets.answerlistbox} configure -selectmode browse
|
||||
${sockets.answerlistbox} configure -exportselection false
|
||||
|
||||
button $w.listboxes.statusframe.updatebutton -text "Update" -command {
|
||||
ttk::button $w.listboxes.statusframe.updatebutton -text "Update" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
set opserver [lindex $opsel 0]
|
||||
@ -199,14 +199,14 @@ proc clientsocketdialog { } {
|
||||
|
||||
pack $w.listboxes
|
||||
|
||||
label $w.lab1 -text "\n"
|
||||
ttk::label $w.lab1 -text "\n"
|
||||
pack $w.lab1
|
||||
|
||||
|
||||
frame $w.buttons1
|
||||
frame $w.buttons2
|
||||
ttk::frame $w.buttons1
|
||||
ttk::frame $w.buttons2
|
||||
|
||||
button $w.buttons1.getid -text "Get ID" -command {
|
||||
ttk::button $w.buttons1.getid -text "Get ID" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
set opserver [lindex $opsel 0]
|
||||
@ -216,7 +216,7 @@ proc clientsocketdialog { } {
|
||||
}
|
||||
}
|
||||
|
||||
button $w.buttons1.killjob -text "Kill Cur. Job" -command {
|
||||
ttk::button $w.buttons1.killjob -text "Kill Cur. Job" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
set opserver [lindex $opsel 0]
|
||||
@ -224,7 +224,7 @@ proc clientsocketdialog { } {
|
||||
}
|
||||
}
|
||||
|
||||
button $w.buttons2.sendmesh -text "Send Mesh" -command {
|
||||
ttk::button $w.buttons2.sendmesh -text "Send Mesh" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
set opserver [lindex $opsel 0]
|
||||
@ -233,7 +233,7 @@ proc clientsocketdialog { } {
|
||||
}
|
||||
}
|
||||
|
||||
button $w.buttons2.sendpde -text "Send PDE" -command {
|
||||
ttk::button $w.buttons2.sendpde -text "Send PDE" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
set opserver [lindex $opsel 0]
|
||||
@ -241,7 +241,7 @@ proc clientsocketdialog { } {
|
||||
}
|
||||
}
|
||||
|
||||
button $w.buttons2.solvepde -text "Solve PDE" -command {
|
||||
ttk::button $w.buttons2.solvepde -text "Solve PDE" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
set opserver [lindex $opsel 0]
|
||||
@ -249,7 +249,7 @@ proc clientsocketdialog { } {
|
||||
}
|
||||
}
|
||||
|
||||
button $w.buttons2.writesol -text "Write Solution" -command {
|
||||
ttk::button $w.buttons2.writesol -text "Write Solution" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
set opserver [lindex $opsel 0]
|
||||
@ -257,7 +257,7 @@ proc clientsocketdialog { } {
|
||||
}
|
||||
}
|
||||
|
||||
button $w.buttons2.sendsol -text "Receive Solution" -command {
|
||||
ttk::button $w.buttons2.sendsol -text "Receive Solution" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
set opserver [lindex $opsel 0]
|
||||
@ -265,7 +265,7 @@ proc clientsocketdialog { } {
|
||||
}
|
||||
}
|
||||
|
||||
button $w.buttons1.blockserver -text "Block Server" -command {
|
||||
ttk::button $w.buttons1.blockserver -text "Block Server" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
set opserver [lindex $opsel 0]
|
||||
@ -273,7 +273,7 @@ proc clientsocketdialog { } {
|
||||
}
|
||||
}
|
||||
|
||||
button $w.buttons1.unblockserver -text "UnBlock Server" -command {
|
||||
ttk::button $w.buttons1.unblockserver -text "UnBlock Server" -command {
|
||||
set opsel [${sockets.serverlistbox} curselection]
|
||||
if {[llength $opsel] > 0} {
|
||||
set opserver [lindex $opsel 0]
|
||||
@ -299,5 +299,5 @@ proc clientsocketdialog { } {
|
||||
|
||||
}
|
||||
|
||||
.ngmenu.special add command -label "Client Socket" \
|
||||
#.ngmenu.special add command -label "Client Socket" \
|
||||
-command { clientsocketdialog }
|
||||
|
Loading…
Reference in New Issue
Block a user