Changeset 3279 in Sophya


Ignore:
Timestamp:
Jul 6, 2007, 6:22:05 PM (18 years ago)
Author:
ansari
Message:

correction commandes nt2dcn nt2dci et ajout commande plot2dc - Reza 05/07/2007

Location:
trunk/SophyaPI/PIext
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/basexecut.cc

    r3123 r3279  
    622622  }
    623623
    624 else if (kw == "plot2dw" ) {   // Plot2d avec poids
     624else if ((kw == "plot2dw")||(kw == "plot2dc")) {   // Plot2d avec poids
    625625  if (tokens.size() < 4) {
    626     cout << "Usage: plot2dw nomobj expx expy expwt [expcut opt loop_par]" << endl;
     626    cout << "Usage: plot2dw/c nomobj expx expy expwt/expcolidx [expcut opt loop_par]" << endl;
    627627    return(0);
    628628    }
    629629  if (tokens.size() < 5) tokens.push_back("1");
    630630  while (tokens.size() < 7) tokens.push_back("");
    631   srvo->DisplayPoints2DW(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], tokens[6]);
     631  bool fgcolidx = false;
     632  if (kw == "plot2dc") fgcolidx = true;
     633  srvo->DisplayPoints2DW(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4],
     634                         fgcolidx, tokens[5], tokens[6]);
    632635  }
    633636else if (kw == "plot3d" ) { 
     
    11831186usage = "Plots (2D) Y=g(Object) vs. X=f(Object) with Weight W=h(Object) ";
    11841187usage += "\n Usage: plot2dw nameobj f_X() g_Y() h_Wt() [Cut() graphic_attributes loop_param]";
     1188usage += "\n  Related commands: plot2d plot2dc plot3d ObjectExpressions ...";
     1189mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
     1190kw = "plot2dc";
     1191usage = "Plots (2D) Y=g(Object) vs. X=f(Object) with Color ColIndex=h(Object) ";
     1192usage += "\n Usage: plot2dc nameobj f_X() g_Y() h_Col() [Cut() graphic_attributes loop_param]";
    11851193usage += "\n  Related commands: plot2d plot2dw plot3d ObjectExpressions ...";
    11861194mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
  • trunk/SophyaPI/PIext/graphexecut.cc

    r3269 r3279  
    287287                     tokens[5], tokens[6], ph, false, tokens[7], false);
    288288  }
    289 else if (kw == "nt2dcn") {
     289else if ((kw == "nt2dcn")||(kw == "nt2dci")) {
    290290  if (tokens.size() < 4) {
    291291    cout << "Usage: nt2dcn nameobj color varx vary [errx erry wt label opt]" << endl;
     
    294294  while (tokens.size() < 9) tokens.push_back("");
    295295  string ph = "";
    296   mObjMgr->DisplayNT(tokens[1], tokens[2], tokens[3], ph, tokens[4], tokens[5], ph,
    297                      tokens[6], tokens[7], tokens[0], false, tokens[8], false);
    298   }
    299 else if (kw == "nt2dci") {
    300   if (tokens.size() < 4) {
    301     cout << "Usage: nt2dci nameobj color varx vary [errx erry wt label opt]" << endl;
    302     return(0);
    303   }
    304   while (tokens.size() < 9) tokens.push_back("");
    305   string ph = "";
    306   mObjMgr->DisplayNT(tokens[1], tokens[2], tokens[3], ph, tokens[4], tokens[5], ph,
    307                      tokens[6], tokens[7], tokens[0], true, tokens[8], false);
     296  bool colidx = false;
     297  if (kw == "nt2dci")  colidx = true;
     298  mObjMgr->DisplayNT(tokens[0], tokens[2], tokens[3], ph, tokens[4], tokens[5], ph,
     299                     tokens[6], tokens[7], tokens[1], colidx, tokens[8], false);
    308300  }
    309301else if (kw == "nt3d") {
     
    313305  }
    314306  while (tokens.size() < 10) tokens.push_back("");
     307  string ph = "";
    315308  mObjMgr->DisplayNT(tokens[0], tokens[1], tokens[2], tokens[3], tokens[4], tokens[5],
    316                      tokens[6], tokens[7], tokens[8], tokens[9], true);
     309                     tokens[6], tokens[7], tokens[8], ph, false, tokens[9], true);
    317310  }
    318311else if (kw == "vecplot") {
  • trunk/SophyaPI/PIext/piaversion.h

    r3125 r3279  
    22#define PIAPPVERSION_H_SEEN
    33
    4 #define PIAPP_VERSIONNUMBER  4.1
     4#define PIAPP_VERSIONNUMBER  4.15
    55
    66#endif
  • trunk/SophyaPI/PIext/servnobjm.cc

    r2999 r3279  
    477477/* --Methode-- */
    478478void Services2NObjMgr::DisplayPoints2DW(string& nom, string& expx, string& expy,
    479                                         string& expwt, string& expcut, string dopt, string loop)
     479                                        string& expwt, string& expcut, bool fgcolidx, string dopt, string loop)
    480480{
    481481NObjMgrAdapter* obja=NULL;
     
    501501PINTuple* pin = new PINTuple(nt, true);
    502502pin->SelectXY(ntn[0], ntn[1]);
    503 pin->SelectWt(ntn[2]);
     503if (fgcolidx) pin->SelectColorByIndex(ntn[2]);  // Use the weight expression as a color index
     504else pin->SelectWt(ntn[2]);
    504505
    505506string titre =  nom + ":" + expwt + "_" + expy + "%" + expx ;
  • trunk/SophyaPI/PIext/servnobjm.h

    r2999 r3279  
    7979                                        string& expcut, string dopt="", string loop="");
    8080  virtual void          DisplayPoints2DW(string & nom, string& expx, string& expy,
    81                                          string& expwt, string& expcut, string dopt="", string loop="");
     81                                         string& expwt, string& expcut,
     82                                         bool fgcolidx=false, string dopt="", string loop="");
    8283  virtual void          DisplayPoints3DW(string & nom, string& expx, string& expy, string& expz,
    8384                                         string& expwt, string& expcut, string dopt="", string loop="");
Note: See TracChangeset for help on using the changeset viewer.