* Optimisation of the face colour user interface

* Trivial change inside menu option "Special"
This commit is contained in:
Philippose Rajan 2009-07-22 23:00:46 +00:00
parent 6e65bbe80a
commit 99ad65f885
2 changed files with 22 additions and 3 deletions

View File

@ -777,8 +777,13 @@ menu .ngmenu.special
} }
.ngmenu.special add command -label "Helmholtz Mesh grading" \ .ngmenu.special add command -label "Helmholtz Mesh grading" \
-command { Ng_HelmholtzMesh; } -command { Ng_HelmholtzMesh; }
.ngmenu.special add command -label "Colour-based boundary conditions" \ .ngmenu.special add cascade -label "Colour-based boundary conditions" -menu .ngmenu.special.colbndcond
-command { Ng_AutoColourBcProps; redraw }
menu .ngmenu.special.colbndcond
.ngmenu.special.colbndcond add command -label "Automatic Assignment" \
-command { Ng_AutoColourBcProps auto; redraw }
.ngmenu.special.colbndcond add command -label "Profile based Assignment" \
-command { Ng_AutoColourBcProps profile netgen.ocf; redraw }
# menu .mbar.stl.menu # menu .mbar.stl.menu

View File

@ -1571,13 +1571,27 @@ namespace netgen
Tcl_Interp * interp, Tcl_Interp * interp,
int argc, tcl_const char *argv[]) int argc, tcl_const char *argv[])
{ {
if(argc < 1)
{
Tcl_SetResult (interp, (char *)"Ng_AutoColourBcProps needs arguments", TCL_STATIC);
return TCL_ERROR;
}
if(!mesh.Ptr()) if(!mesh.Ptr())
{ {
Tcl_SetResult (interp, (char *)"Ng_AutoColourBcProps: Valid netgen mesh required...please mesh the Geometry first", TCL_STATIC); Tcl_SetResult (interp, (char *)"Ng_AutoColourBcProps: Valid netgen mesh required...please mesh the Geometry first", TCL_STATIC);
return TCL_ERROR; return TCL_ERROR;
} }
AutoColourBcProps(*mesh, "netgen.ocf"); if(strcmp(argv[1], "auto") == 0)
{
AutoColourBcProps(*mesh, 0);
}
if(strcmp(argv[1], "profile") == 0)
{
AutoColourBcProps(*mesh, argv[2]);
}
return TCL_OK; return TCL_OK;
} }