// Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. //#58 rln 28.12.98 Versioning #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // Decomposition of a file name in its parts : prefix, root, suffix static void SplitFileName (const Standard_CString filename, TCollection_AsciiString& prefix, TCollection_AsciiString& fileroot, TCollection_AsciiString& suffix) { Standard_Integer nomdeb, nomfin, nomlon; TCollection_AsciiString resfile (filename); nomlon = resfile.Length(); nomdeb = resfile.SearchFromEnd ("/"); if (nomdeb <= 0) nomdeb = resfile.SearchFromEnd("\\"); // pour NT if (nomdeb < 0) nomdeb = 0; nomfin = resfile.SearchFromEnd ("."); if (nomfin < nomdeb) nomfin = nomlon + 1; if (nomdeb > 0) prefix = resfile.SubString (1,nomdeb); fileroot = resfile.SubString(nomdeb+1,nomfin-1); if (nomfin <= nomlon) suffix = resfile.SubString (nomfin,nomlon); } // Functions definit un certain nombre de commandes // enregistrees dans le Dictionnaire de Activator (par des Act unitaires) // Les actions elles-memes sont regroupees en fin de fichier // Les definitions static IFSelect_ReturnStatus funstatus (const Handle(IFSelect_SessionPilot)& ) { // **** Version & cie **** //#58 rln Message_Messenger::StreamBuffer sout = Message::SendInfo(); sout<<"Processor Version : "<Session(); // **** ToggleHandler **** Standard_Boolean hand = !WS->ErrorHandle(); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (hand) sout << " -- Mode Catch Error now Active" <SetErrorHandle(hand); return IFSelect_RetDone; } static IFSelect_ReturnStatus fun3 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** XRead / Load **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Read/Load : give file name !"<Protocol().IsNull()) { sout<<"Protocol not defined"<WorkLibrary().IsNull()) { sout<<"WorkLibrary not defined"<ReadFile (arg1); // status : 0 OK, 1 erreur lecture, 2 Fail(try/catch), // -1 fichier non trouve, -2 lecture faite mais resultat vide switch (status) { case IFSelect_RetVoid : sout<<"file:"<BeginSentFiles(Standard_True); return status; } static IFSelect_ReturnStatus fun4 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Write All **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Write All : give file name !"<SendAll (arg1); } static IFSelect_ReturnStatus fun5 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // const Standard_CString arg2 = pilot->Arg(2); // **** Write Selected **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Write Selected : give file name + givelist !"<CommandPart( 2)); if (result.IsNull()) { sout<<"No entity selected"<Length()<SetList (result); return WS->SendSelected (arg1,sp); } static IFSelect_ReturnStatus fun6 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Write Entite(s) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Write Entitie(s) : give file name + n0s entitie(s)!"<Number(pilot->Arg(ia)); if (id > 0) { Handle(Standard_Transient) item = WS->StartingEntity(id); if (sp->Add(item)) sout<<"Added:no."<Arg(ia)< 0) { sout<SendSelected (arg1,sp); } static IFSelect_ReturnStatus fun7 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Entity Label **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Give entity number"<HasModel()) { sout<<"No loaded model, abandon"<NumberFromLabel (arg1); if (nument <= 0 || nument > WS->NbStartingEntities()) { sout<<"Not a suitable number: "<Label in Model : "; WS->Model()->PrintLabel(WS->StartingEntity(nument), sout); sout<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Entity Number **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Give label to search"<HasModel()) { sout<<"No loaded model, abandon"<Model(); Standard_Integer i, cnt = 0; Standard_Boolean exact = Standard_False; sout<<" ** Search Entity Number for Label : "<NextNumberForLabel (arg1, 0, exact) ; i != 0; i = model->NextNumberForLabel (arg1, i, exact)) { cnt ++; sout<<" ** Found n0/id:"; model->Print (model->Value(i), sout); sout<Session(); Handle(IFSelect_Signature) signtype = WS->SignType(); if (signtype.IsNull()) signtype = new IFSelect_SignType; Handle(IFSelect_SignCounter) counter = new IFSelect_SignCounter(signtype,Standard_False); return pilot->ExecuteCounter (counter,1); } static IFSelect_ReturnStatus funcount (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg0 = pilot->Arg(0); const Standard_CString arg1 = pilot->Arg(1); Standard_Boolean listmode = (arg0[0] == 'l'); // **** List Counter **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Designer signature ou compteur, + facultatif selection + facultatif entite"< tout le modele"< cette selection, evaluation normale"< cette selection evaluee sur entite n0 num"<NamedItem(arg1)); if (counter.IsNull()) { DeclareAndCast(IFSelect_Signature,signa,WS->NamedItem(arg1)); if (!signa.IsNull()) counter = new IFSelect_SignCounter(signa,Standard_False,listmode); } // Handle(IFSelect_Selection) sel; // Standard_Integer n3 = 0; if (argc > 3) n3 = WS->NumberFromLabel(arg3); // if (argc > 2) sel = GetCasted(IFSelect_Selection,WS->NamedItem(arg2)); // if (counter.IsNull() || (argc > 2 && n3 <= 0 && sel.IsNull()) ) { // sout<<"Nom:"< 2) sout<<" et/ou "<Arg(i),"on")) { onflag = i; break; } } Handle(IFSelect_Selection) sel = WS->GiveSelection(arg1); DeclareAndCast(IFSelect_SelectDeduct,seld,sel); if (!seld.IsNull()) { // Si onflag, faire une SelectSuite if (onflag > 2) { Handle(IFSelect_SelectSuite) suite = new IFSelect_SelectSuite; for (i = 1; i < onflag; i ++) { sel = WS->GiveSelection(pilot->Arg(i)); if (!suite->AddInput(sel)) { sout<<"Incorrect definition for applied selection"<SetApplied (seld); counter = gc; } if (counter.IsNull()) { sout<<"Neither Counter nor Signature : "<ExecuteCounter (counter,onflag+1, pcm); } static IFSelect_ReturnStatus funsigntype (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Sign Type **** Handle(IFSelect_Signature) signtype = WS->SignType(); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (signtype.IsNull()) sout<<"signtype actually undefined"<Name (signtype); Standard_Integer id = WS->ItemIdent (signtype); sout<Label()< 0) sout<<"signtype : item n0 "<ToCString()<NamedItem(arg1)); if (signtype.IsNull()) { sout<<"Not a Signature : "<SetSignType(signtype); return IFSelect_RetDone; } return IFSelect_RetVoid; } static IFSelect_ReturnStatus funsigncase (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); const Standard_CString arg1 = pilot->Arg(1); // **** Sign Case **** Handle(IFSelect_Signature) signcase = GetCasted(IFSelect_Signature,WS->NamedItem(arg1)); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (signcase.IsNull()) sout<<"Not a Signature : "<IsIntCase(hasmin,valmin,hasmax,valmax)) { sout<<"Signature "<CaseList(); if (caselist.IsNull()) sout<<"Signature "<Length(); sout<<"Signature "<Value(i); sout<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Entity Status **** Standard_Integer i,nb; Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { nb = Interface_Category::NbCategories(); sout<<" Categories defined :"<Number(arg1); if (num <= 0 || num > WS->NbStartingEntities()) { sout<<"Not a suitable entity number : "<StartingEntity(num); WS->PrintEntityStatus (ent, sout); return IFSelect_RetVoid; } static IFSelect_ReturnStatus fun11 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** DumpModel (Data) **** Standard_Integer niv = 0; // char arg10 = arg1[0]; // if (argc < 2) arg10 = '?'; Message_Messenger::StreamBuffer sout = Message::SendInfo(); switch (arg1[0]) { case '?' : sout<<"? for this help, else give a listing mode (first letter suffices) :\n" <<" general General Statistics\n roots Roots\n" <<" entities All Entities\n" <<" listfails CheckList (fails) per entity\n" <<" messages CheckList (complete) per entity\n" <<" fails CheckList (fails) per message (counting)\n" <<" check CheckList (complete) per message (counting)\n" <<" totalcheck CheckList (complete) per message (listing n0 ents)\n" <<" FAILS CheckList (fails) per message (listing complete)\n" <<" TOTALCHECK CheckList (complete) per message (listing complete)"<TraceDumpModel(niv); return IFSelect_RetVoid; } static IFSelect_ReturnStatus fundumpent (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); Handle(IFSelect_WorkLibrary) WL = WS->WorkLibrary(); Standard_Integer levdef=0,levmax=10,level; WL->DumpLevels (levdef,levmax); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2 || (argc == 2 && levmax < 0)) { sout<<"Give n0 or id of entity"; if (levmax < 0) sout<<" and dump level"<Arg(1); const Standard_CString arg2 = pilot->Arg(2); Standard_Integer num = pilot->Number(arg1); if (num == 0) return IFSelect_RetError; level = levdef; if (argc > 2) level = atoi(arg2); Handle(Standard_Transient) ent = WS->StartingEntity(num); if ( ent.IsNull() ) { sout << "No entity with given id " << arg1 << " (" << num << ") is found in the current model" << std::endl; } else { sout << " -- DUMP Entity n0 " << num << " level " << level << std::endl; WL->DumpEntity (WS->Model(),WS->Protocol(),ent,sout,level); Interface_CheckIterator chl = WS->CheckOne (ent); if (!chl.IsEmpty(Standard_False)) chl.Print(sout,WS->Model(),Standard_False); } // sout << std::flush; return IFSelect_RetVoid; } static IFSelect_ReturnStatus funsign (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<" Give signature name + n0 or id of entity"<NamedItem(arg1)); if (sign.IsNull()) { sout<<"Not a signature : "<Number(arg2); Handle(Standard_Transient) ent = WS->StartingEntity (num); if (num == 0) return IFSelect_RetError; sout<<"Entity n0 "<SignValue(sign,ent)<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<" Give 2 numeros or labels : dad son"<NumberFromLabel(arg1); Standard_Integer n2 = WS->NumberFromLabel(arg2); sout<<"QueryParent for dad:"<QueryParent(WS->StartingEntity(n1),WS->StartingEntity(n2)); if (qp < 0) sout<Session(); // **** DumpShare **** WS->DumpShare(); return IFSelect_RetVoid; } static IFSelect_ReturnStatus fun13 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** ListItems **** WS->ListItems(pilot->Arg(1)); return IFSelect_RetVoid; } static IFSelect_ReturnStatus fun14 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** NewInt **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 1) { sout<<"Donner la valeur entiere pour IntParam"<= 1) intpar->SetValue(atoi(arg1)); return pilot->RecordItem (intpar); } static IFSelect_ReturnStatus fun15 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** SetInt **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Donner 2 arguments : nom Parametre et Valeur"<NamedItem(arg1)); if (!WS->SetIntValue(par,val)) return IFSelect_RetFail; return IFSelect_RetDone; } static IFSelect_ReturnStatus fun16 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** NewText **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 1) { sout<<"Donner la valeur texte pour TextParam"<= 1) textpar->AssignCat(arg1); return pilot->RecordItem (textpar); } static IFSelect_ReturnStatus fun17 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** SetText **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Donner 2 arguments : nom Parametre et Valeur"<NamedItem(arg1)); if (!WS->SetTextValue(par,arg2)) return IFSelect_RetFail; return IFSelect_RetDone; } static IFSelect_ReturnStatus fun19 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** DumpSel **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Give 1 argument : Selection Name"<DumpSelection (GetCasted(IFSelect_Selection,WS->NamedItem(arg1))); return IFSelect_RetVoid; } static IFSelect_ReturnStatus fun20 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); // **** EvalSel **** // **** GiveList **** // **** GiveShort GivePointed **** // **** MakeList **** char mode = pilot->Arg(0)[0]; // givelist/makelist if (mode == 'g') mode = pilot->Arg(0)[4]; // l list s short p pointed Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Give Entity ID, or Selection Name [+ optional other selection or entity]"<Arg(1); Handle(Standard_Transient) item = WS->NamedItem (arg1); pnt = GetCasted(IFSelect_SelectPointed,item); if (!pnt.IsNull()) { sout<Clear(); } else if (!item.IsNull()) { sout<AddNamedItem (arg1,pnt); } } Handle(TColStd_HSequenceOfTransient) result = IFSelect_Functions::GiveList (WS,pilot->CommandPart( (mode == 'm' ? 2 : 1) )); if (result.IsNull()) return IFSelect_RetError; Interface_EntityIterator iter (result); sout<CommandPart( (mode == 'm' ? 2 : 1) )<<" : "; if (mode == 'l') WS->ListEntities (iter, 0, sout); else if (mode == 's' || mode == 'm') WS->ListEntities (iter, 2, sout); else if (mode == 'p') { sout<StartingNumber (iter.Value()); sout<SetList (result); sout<<"List set to a SelectPointed : "<Arg(1)<Session(); Standard_Integer argc = pilot->NbWords(); // **** GiveCount **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Give Entity ID, or Selection Name [+ optional other selection or entity]"<EvaluateSelection(GetCasted(IFSelect_Selection,WS->NamedItem(arg1))); Handle(TColStd_HSequenceOfTransient) result = IFSelect_Functions::GiveList (WS,pilot->CommandPart(1)); if (result.IsNull()) return IFSelect_RetError; sout<CommandPart(1)<<" : List of "<Length()<<" Entities"<Session(); Standard_Integer argc = pilot->NbWords(); // **** SelSuite **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Give Entity ID, or Selection Name [+ optional other selection or entity]"<EvaluateSelection(GetCasted(IFSelect_Selection,WS->NamedItem(arg1))); Handle(IFSelect_SelectSuite) selsuite = new IFSelect_SelectSuite; for (Standard_Integer i = 1; i < argc; i ++) { Handle(IFSelect_Selection) sel = WS->GiveSelection(pilot->Arg(i)); if (!selsuite->AddInput(sel)) { sout<Arg(i-1)<<" : not a SelectDeduct, no more can be added. Abandon"<SetLabel (pilot->CommandPart(1)); return pilot->RecordItem (selsuite); } static IFSelect_ReturnStatus fun21 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** ClearItems **** WS->ClearItems(); WS->ClearFinalModifiers(); WS->ClearShareOut(Standard_False); return IFSelect_RetDone; } static IFSelect_ReturnStatus fun22 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** ClearData **** Standard_Integer mode = -1; if (argc >= 2) { if (arg1[0] == 'a') mode = 1; if (arg1[0] == 'g') mode = 2; if (arg1[0] == 'c') mode = 3; if (arg1[0] == 'p') mode = 4; if (arg1[0] == '?') mode = -1; } else mode = 0; Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (mode <= 0) { if (mode < 0) sout<<"Give a suitable mode"; sout<<" Available Modes :\n" <<" a : all data g : graph+check c : check p : selectpointed"<ClearData (mode); return IFSelect_RetDone; } static IFSelect_ReturnStatus fun24 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); // **** Item Label **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); TCollection_AsciiString label; if (argc < 2) { sout<<" Give label to search"<Arg(i)); if (i < argc-1) label.AssignCat(" "); } for (int mode = 0; mode <= 2; mode ++) { int nbitems = 0; int id; sout<<"Searching label : "<NextIdentForLabel(label.ToCString(), 0,mode) ; id != 0; id = WS->NextIdentForLabel(label.ToCString(),id,mode)) { sout<<" "<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Save (Dump) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner nom du Fichier"<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Restore (Dump) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner nom du Fichier"< 0) sout << "-- Erreur Lecture Fichier "<NbWords(); Handle(IFSelect_WorkSession) WS = pilot->Session(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** Param(Value) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { Handle(TColStd_HSequenceOfHAsciiString) li = Interface_Static::Items(); Standard_Integer i,nb = li->Length(); sout<<" List of parameters : "<Value(i)->String(); sout<<" : "<Value(i)->ToCString())< 0) { Standard_Integer use = atoi (arg1); WS->TraceStatics (use); } else { if (argc > 2) sout<<" FORMER STATUS of Static Parameter "< Print (sout); else sout<<" Value : "<Session(); // **** SentFiles **** Handle(TColStd_HSequenceOfHAsciiString) list = WS->SentFiles(); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (list.IsNull()) { sout<<"List of Sent Files not enabled"<Length(); sout<<" Sent Files : "<Value(i)->ToCString()<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** FilePrefix **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { if (WS->FilePrefix().IsNull()) sout<<"Pas de prefixe defini"<FilePrefix()->ToCString()<SetFilePrefix(arg1); return IFSelect_RetDone; } static IFSelect_ReturnStatus fun31 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** FileExtension **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { if (WS->FileExtension().IsNull()) sout<<"Pas d extension definie"<FileExtension()->ToCString()<SetFileExtension(arg1); return IFSelect_RetDone; } static IFSelect_ReturnStatus fun32 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** FileRoot **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner Dispatch et nom de Root"<NamedItem(arg1)); if (argc < 3) { if (WS->FileRoot(disp).IsNull()) sout<<"Pas de racine definie pour "<FileRoot(disp)->ToCString()<SetFileRoot(disp,arg2)) return IFSelect_RetFail; return IFSelect_RetDone; } static IFSelect_ReturnStatus fun33 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Default File Root **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { if (WS->DefaultFileRoot().IsNull()) sout<<"Pas de racine par defaut definie"<DefaultFileRoot()->ToCString()<SetDefaultFileRoot(arg1); return IFSelect_RetDone; } static IFSelect_ReturnStatus fun34 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** EvalFile **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (!WS->HasModel()) { sout<<"Pas de Modele charge, abandon"<EvaluateFile(); Standard_Integer nbf = WS->NbFiles(); for (Standard_Integer i = 1; i <= nbf; i ++) { Handle(Interface_InterfaceModel) mod = WS->FileModel(i); if (mod.IsNull()) { sout<<"Modele "<FileName(i); sout<<"Fichier n0 "<NbEntities()<<" Nom: "; sout<Session(); // **** ClearFile **** WS->ClearFile(); return IFSelect_RetDone; } static IFSelect_ReturnStatus fun36 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); // **** Split **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); IFSelect_ReturnStatus stat = IFSelect_RetVoid; if (argc < 2) sout<<"Split : derniere liste de dispatches definie"<ClearShareOut(Standard_True); for (Standard_Integer i = 1; i < argc; i ++) { DeclareAndCast(IFSelect_Dispatch,disp,WS->NamedItem(pilot->Arg(i))); if (disp.IsNull()) { sout<<"Pas un dispatch:"<Arg(i)<<", Splitt abandonne"<SetActive(disp,Standard_True); } } if (stat == IFSelect_RetError) return stat; WS->BeginSentFiles(Standard_True); if (!WS->SendSplit()) return IFSelect_RetFail; return IFSelect_RetDone; } static IFSelect_ReturnStatus fun37 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Remaining Data **** char mode = '?'; IFSelect_RemainMode numod = IFSelect_RemainDisplay; if (argc >= 2) mode = arg1[0]; if (mode == 'u') numod = IFSelect_RemainUndo; else if (mode == 'l') numod = IFSelect_RemainDisplay; else if (mode == 'c') numod = IFSelect_RemainCompute; else if (mode == 'f') numod = IFSelect_RemainForget; else { Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc<2) sout<<"Donner un Mode - "; sout<<"Modes possibles : l list, c compute, u undo, f forget"<SetRemaining(numod)) return IFSelect_RetVoid; return IFSelect_RetDone; } static IFSelect_ReturnStatus fun38 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** SetModelContent **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Donner nom selection et mode (k=keep,r=remove)"<NamedItem(arg1)); if (sel.IsNull()) { sout<<"Pas de Selection de Nom : "<SetModelContent(sel,keepmode)) sout<<" Done"<Session(); // **** ListModif **** WS->ListFinalModifiers(Standard_True); WS->ListFinalModifiers(Standard_False); return IFSelect_RetVoid; } static IFSelect_ReturnStatus fun41 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Modifier **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner Nom du Modifier"<NamedItem(arg1)); if (modif.IsNull()) { sout<<"Pas de Modifier de Nom : "<Dispatch(); sout<<"Modifier : "<Label()<ModifierRank(modif); if (modif->IsKind(STANDARD_TYPE(IFSelect_Modifier))) sout<< "Model Modifier n0." << rank; else sout<< "File Modifier n0." << rank; if (disp.IsNull()) sout<<" Applique a tous les Dispatchs" << std::endl; else { sout << " Dispatch : "<Label(); if (WS->HasName(disp)) sout << " - Nom:"<Name(disp)->ToCString(); sout<Selection(); if (!sel.IsNull()) sout<<" Selection : "<< sel->Label(); if (WS->HasName(sel)) sout<<" - Nom:"<< WS->Name(sel)->ToCString(); sout<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** ModifSel **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner Nom Modifier; + Nom Selection optionnel\n" <<"Selection pour Mettre une Selection, sinon Annule"<NamedItem(arg1)); if (modif.IsNull()) { sout<<"Pas un nom de Modifier : "<NamedItem(arg2)); if (sel.IsNull()) { sout<<"Pas un nom de Selection : "<SetItemSelection(modif,sel)) return IFSelect_RetFail; return IFSelect_RetDone; } static IFSelect_ReturnStatus fun43 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** SetAppliedModifier **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner Nom Modifier; + Nom Dispatch ou Transformer optionnel :\n" <<" - rien : tous Dispatches\n - Dispatch : ce Dispatch seul\n" <<" - Transformer : pas un Dispatch mais un Transformer"<NamedItem(arg1)); if (modif.IsNull()) { sout<<"Pas un nom de Modifier : "<NamedItem(arg2); if (item.IsNull()) { sout<<"Pas un nom connu : "<ShareOut(); if (!WS->SetAppliedModifier(modif,item)) return IFSelect_RetFail; return IFSelect_RetDone; } static IFSelect_ReturnStatus fun44 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** ResetApplied (modifier) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Designer un modifier"<NamedItem(arg1)); if (modif.IsNull()) { sout<<"Pas un nom de Modifier : "<ResetAppliedModifier(modif)) return IFSelect_RetFail; return IFSelect_RetDone; } static IFSelect_ReturnStatus fun45 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); const Standard_CString arg3 = pilot->Arg(3); // **** ModifMove **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 4) { sout<<"modifmove MF rang1 rang2, M pour Model F pour File"<ChangeModifierRank(formodel,before,after)) return IFSelect_RetFail; return IFSelect_RetDone; } static IFSelect_ReturnStatus fun51 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** DispSel **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Donner Noms Dispatch et Selection Finale"<NamedItem(arg1)); if (disp.IsNull()) { sout<<"Pas un nom de Dispatch : "<NamedItem(arg2)); if (sel.IsNull()) { sout<<"Pas un nom de Selection : "<SetItemSelection(disp,sel)) return IFSelect_RetFail; return IFSelect_RetDone; } static IFSelect_ReturnStatus fun_dispone (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** DispOne **** Handle(IFSelect_DispPerOne) disp = new IFSelect_DispPerOne; return pilot->RecordItem(disp); } static IFSelect_ReturnStatus fun_dispglob (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** DispGlob **** Handle(IFSelect_DispGlobal) disp = new IFSelect_DispGlobal; return pilot->RecordItem(disp); } static IFSelect_ReturnStatus fun_dispcount (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** DispCount **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner Nom IntParam pour Count"<NamedItem(arg1)); if (par.IsNull()) { sout<<"Pas un nom de IntParam : "<SetCount (par); return pilot->RecordItem(disp); } static IFSelect_ReturnStatus fun_dispfiles (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** DispFiles **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner Nom IntParam pour NbFiles"<NamedItem(arg1)); if (par.IsNull()) { sout<<"Pas un nom de IntParam : "<SetCount (par); return pilot->RecordItem(disp); } static IFSelect_ReturnStatus fun_dispsign (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** DispFiles **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner Nom Signature"<NamedItem(arg1)); if (sig.IsNull()) { sout<<"Pas un nom de Signature : "<SetSignCounter (new IFSelect_SignCounter(sig)); return pilot->RecordItem(disp); } static IFSelect_ReturnStatus fun56 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Dispatch **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner Nom du Dispatch"<NamedItem(arg1)); if (disp.IsNull()) { sout<<"Pas un dispatch : "<DispatchRank(disp); sout<<"Dispatch de Nom : "<ItemSelection(disp); Handle(TCollection_HAsciiString) selname = WS->Name(sel); if (sel.IsNull()) sout<<"Pas de Selection Finale"<ItemIdent(sel)<ToCString()<HasRootName()) sout<<"-- Racine nom de fichier : " <RootName()->ToCString()<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Remove **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Give Name to Remove !"<RemoveNamedItem(arg1)) return IFSelect_RetFail; return IFSelect_RetDone; } static IFSelect_ReturnStatus fun58 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** EvalDisp **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"evaldisp mode disp [disp ...] : Mode + Name(s) of Dispatch(es). Mode:\n" <<" 0 brief 1 +forgotten ents 2 +duplicata 3 1+2"<NamedItem(pilot->Arg(i))); if (disp.IsNull()) { sout<<"Not a dispatch:"<Arg(i)<ClearShareOut(Standard_True); for (i = 2; i < argc; i ++) { DeclareAndCast(IFSelect_Dispatch,disp,WS->NamedItem(pilot->Arg(i))); WS->SetActive(disp,Standard_True); } // WS->EvaluateDispatch(disp,mode); WS->EvaluateComplete(mode); return IFSelect_RetVoid; } static IFSelect_ReturnStatus fun_evaladisp (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** EvalADisp [GiveList] **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"evaladisp mode(=0-1-2-3) disp [givelist] : Mode + Dispatch [+ GiveList]\n If GiveList not given, computed from Selection of the Dispatch. Mode:\n" <<" 0 brief 1 +forgotten ents 2 +duplicata 3 1+2"<NamedItem(pilot->Arg(2))); Handle(IFSelect_Dispatch) disp = IFSelect_Functions::GiveDispatch (WS,pilot->Arg(2),Standard_True); if (disp.IsNull()) { sout<<"Not a dispatch:"<Arg(2)<FinalSelection(); Handle(IFSelect_Selection) sel; if (argc > 3) { Handle(IFSelect_SelectPointed) sp = new IFSelect_SelectPointed; Handle(TColStd_HSequenceOfTransient) list = IFSelect_Functions::GiveList (pilot->Session(),pilot->CommandPart(3)); Standard_Integer nb = (list.IsNull() ? 0 : list->Length()); if (nb > 0) { sp->AddList (list); sel = sp; } } if (sel.IsNull() && selsav.IsNull()) { sout<<"No Selection nor GiveList defined"< 3) sout<<"GiveList is empty, hence computed from the Selection of the Dispatch"<SetFinalSelection(sel); // WS->ClearShareOut(Standard_True); // WS->SetActive(disp,Standard_True); WS->EvaluateDispatch(disp,mode); disp->SetFinalSelection(selsav); return IFSelect_RetVoid; } static IFSelect_ReturnStatus fun_writedisp (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** EvalADisp [GiveList] **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"writedisp filename disp [givelist] : FileName + Dispatch [+ GiveList]\n If GiveList not given, computed from Selection of the Dispatch.\n" <<"FileName : rootname.ext will gives rootname_1.ext etc...\n" <<" path/rootname.ext gives path/rootname_1.ext etc...\n" <<"See also : evaladisp"<NamedItem(pilot->Arg(2))); Handle(IFSelect_Dispatch) disp = IFSelect_Functions::GiveDispatch (WS,pilot->Arg(2),Standard_True); if (disp.IsNull()) { sout<<"Not a dispatch:"<Arg(2)<FinalSelection(); Handle(IFSelect_Selection) sel; if (argc > 3) { Handle(IFSelect_SelectPointed) sp = new IFSelect_SelectPointed; Handle(TColStd_HSequenceOfTransient) list = IFSelect_Functions::GiveList (pilot->Session(),pilot->CommandPart(3)); Standard_Integer nb = (list.IsNull() ? 0 : list->Length()); if (nb > 0) { sp->AddList (list); sel = sp; } } if (sel.IsNull() && selsav.IsNull()) { sout<<"No Selection nor GiveList defined"< 3) sout<<"GiveList is empty, hence computed from the Selection of the Dispatch"<ClearShareOut(Standard_True); disp->SetFinalSelection(sel); WS->SetActive(disp,Standard_True); WS->BeginSentFiles(Standard_True); WS->SetFilePrefix (prefix.ToCString()); WS->SetFileExtension (suffix.ToCString()); WS->SetFileRoot(disp,rootname.ToCString()); Standard_Boolean OK = WS->SendSplit(); disp->SetFinalSelection(selsav); return (OK ? IFSelect_RetDone : IFSelect_RetFail); } static IFSelect_ReturnStatus fun59 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** EvalComplete **** Standard_Integer mode = 0; Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) sout << " -- mode par defaut 0\n"; else { mode = atoi(arg1); sout << " -- mode : " << mode << std::endl; } WS->EvaluateComplete(mode); return IFSelect_RetVoid; } static IFSelect_ReturnStatus fun60 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** LastRunCheckList **** Interface_CheckIterator chlist = WS->LastRunCheckList(); Handle(IFSelect_CheckCounter) counter = new IFSelect_CheckCounter(0); counter->Analyse(chlist,WS->Model(),Standard_False); Message_Messenger::StreamBuffer sout = Message::SendInfo(); counter->PrintCount (sout); return IFSelect_RetVoid; } static IFSelect_ReturnStatus fun61 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** RunTransformer **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner Nom de Transformer"<NamedItem(arg1)); Standard_Integer effect = WS->RunTransformer(tsf); switch (effect) { case -4 : sout<<"Edition sur place, nouveau Protocole, erreur recalcul graphe"< 0) ? IFSelect_RetDone : IFSelect_RetFail); } static IFSelect_ReturnStatus fun62 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** TransformStandard Copy **** return pilot->RecordItem(WS->NewTransformStandard(Standard_True)); } static IFSelect_ReturnStatus fun63 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** TransformStandard OntheSpot **** return pilot->RecordItem(WS->NewTransformStandard(Standard_False)); } static IFSelect_ReturnStatus fun6465 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** Run Modifier avec Standard Copy **** // **** Run Modifier avec OnTheSpot **** Standard_Boolean runcopy = (pilot->Arg(0)[3] == 'c'); // soit c est un nom, sinon c est une commande Handle(IFSelect_Modifier) modif; if (WS->NameIdent(arg1) > 0) modif = GetCasted(IFSelect_Modifier,WS->NamedItem(arg1)); else { pilot->RemoveWord(0); // c etait la commande run pilot->Perform(); modif = GetCasted(IFSelect_Modifier,pilot->RecordedItem()); } Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (modif.IsNull()) { sout<<"Pas un nom de Modifier : "< 2) { list = IFSelect_Functions::GiveList (WS,pilot->CommandPart(2)); sp = new IFSelect_SelectPointed; sp->SetList (list); } Standard_Integer effect = 0; effect = WS->RunModifierSelected (modif,sp,runcopy); // sout<<"Modifier applique sur TransformStandard #"<ItemIdent(tsf)< 0) ? IFSelect_RetDone : IFSelect_RetFail); } static IFSelect_ReturnStatus fun66 (const Handle(IFSelect_SessionPilot)& pilot) { // **** (xset) ModifReorder **** char opt = ' '; Standard_Integer argc = pilot->NbWords(); if (argc >= 2) opt = pilot->Word(1).Value(1); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (opt != 'f' && opt != 'l') { sout<<"Donner option : f -> root-first l -> root-last"<RecordItem(new IFSelect_ModifReorder(opt == 'l')); } static IFSelect_ReturnStatus fun70 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** SelToggle **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner Nom de Selection"<NamedItem(arg1)); if (!WS->ToggleSelectExtract(sel)) { sout<<"Pas une SelectExtract : "<IsReversedSelectExtract(sel)) sout<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** SelInput **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Donner Noms Selections cible et input"<NamedItem(arg1)); DeclareAndCast(IFSelect_Selection,sou,WS->NamedItem(arg2)); if (sel.IsNull() || sou.IsNull()) { sout<<"Incorrect : "<SetInputSelection(sel,sou)) { sout<<"Nom incorrect ou Selection "<Session(); // **** SelModelRoots **** return pilot->RecordItem (new IFSelect_SelectModelRoots); } static IFSelect_ReturnStatus fun73 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** SelRange **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc >= 2 && arg1[0] == '?') argc = 1; if (argc < 2) { sout<<"Donner la description du SelectRange" <<" Formes admises :\n : Range de a \n" <<" tout seul : Range n0 \n from : Range From \n" <<" until : Range Until "<Word(1).IsEqual("from")) { if (argc < 3) { sout<<"Forme admise : from "<NamedItem(arg2)); sel = new IFSelect_SelectRange; sel->SetFrom (low); // Range Until } else if (pilot->Word(1).IsEqual("until")) { if (argc < 3) { sout<<"Forme admise : until "<NamedItem(arg2)); sel = new IFSelect_SelectRange; sel->SetUntil (up); // Range One (n-th) } else if (argc < 3) { low = GetCasted(IFSelect_IntParam,WS->NamedItem(arg1)); sel = new IFSelect_SelectRange; sel->SetOne (low); // Range (from-to) } else { low = GetCasted(IFSelect_IntParam,WS->NamedItem(arg1)); up = GetCasted(IFSelect_IntParam,WS->NamedItem(arg2)); sel = new IFSelect_SelectRange; sel->SetRange (low,up); } return pilot->RecordItem (sel); } static IFSelect_ReturnStatus fun74 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** SelRoots **** return pilot->RecordItem (new IFSelect_SelectRoots); } static IFSelect_ReturnStatus fun75 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** SelShared **** return pilot->RecordItem (new IFSelect_SelectShared); } static IFSelect_ReturnStatus fun76 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** SelDiff **** Handle(IFSelect_Selection) sel = new IFSelect_SelectDiff; if (sel.IsNull()) return IFSelect_RetFail; Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) sout<<"Diff sans input : ne pas oublier de les definir (ctlmain, ctlsec)!"<NamedItem(arg1)); DeclareAndCast(IFSelect_Selection,selsec ,WS->NamedItem(arg2)); if (argc >= 2) if (!WS->SetControl(sel,selmain,Standard_True)) sout<<"Echec ControlMain:"<= 3) if (!WS->SetControl(sel,selsec,Standard_False)) sout<<"Echec ControlSecond:"<RecordItem (sel); } static IFSelect_ReturnStatus fun77 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** SelControlMain **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Donner Noms de Control et MainInput"<NamedItem(arg1)); DeclareAndCast(IFSelect_Selection,selmain,WS->NamedItem(arg2)); if (WS->SetControl(sel,selmain,Standard_True)) return IFSelect_RetDone; sout<<"Nom incorrect ou Selection "<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** SelControlSecond **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Donner Noms de Control et SecondInput"<NamedItem(arg1)); DeclareAndCast(IFSelect_Selection,seldif,WS->NamedItem(arg2)); if (WS->SetControl(sel,seldif,Standard_False)) return IFSelect_RetDone; sout<<"Nom incorrect ou Selection "<Session(); // **** SelModelAll **** return pilot->RecordItem (new IFSelect_SelectModelEntities); } static IFSelect_ReturnStatus fun80 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** SelCombAdd **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Donner n0 Combine et une Input"<NamedItem(arg1)); DeclareAndCast(IFSelect_Selection,seladd,WS->NamedItem(arg2)); if (WS->CombineAdd(sel,seladd)) return IFSelect_RetDone; sout<<"Nom incorrect ou Selection "<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); // **** SelCombRem **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Donner n0 Combine et RANG a supprimer"<NamedItem(arg1)); DeclareAndCast(IFSelect_Selection,inp,WS->NamedItem(arg2)); if (WS->CombineRemove(sel,inp)) return IFSelect_RetDone; sout<<"Nom incorrect ou Selection "<Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** SelEntNumber **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner Nom IntParam pour n0 Entite"<NamedItem(arg1)); Handle(IFSelect_SelectEntityNumber) sel = new IFSelect_SelectEntityNumber; sel->SetNumber(par); return pilot->RecordItem (sel); } static IFSelect_ReturnStatus fun83 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** SelUnion **** return pilot->RecordItem (new IFSelect_SelectUnion); } static IFSelect_ReturnStatus fun84 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** SelIntersection **** return pilot->RecordItem (new IFSelect_SelectIntersection); } static IFSelect_ReturnStatus fun85 (const Handle(IFSelect_SessionPilot)& pilot) { Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** SelTextType Exact **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner le TYPE a selectionner"<RecordItem (new IFSelect_SelectSignature (new IFSelect_SignType,arg1,Standard_True)); } static IFSelect_ReturnStatus fun86 (const Handle(IFSelect_SessionPilot)& pilot) { // **** SelErrorEntities **** return pilot->RecordItem (new IFSelect_SelectErrorEntities); } static IFSelect_ReturnStatus fun87 (const Handle(IFSelect_SessionPilot)& pilot) { // **** SelUnknownEntities ** return pilot->RecordItem (new IFSelect_SelectUnknownEntities); } static IFSelect_ReturnStatus fun88 (const Handle(IFSelect_SessionPilot)& pilot) { // **** SelSharing **** return pilot->RecordItem (new IFSelect_SelectSharing); } static IFSelect_ReturnStatus fun89 (const Handle(IFSelect_SessionPilot)& pilot) { Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** SelTextType Contain ** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner le TYPE a selectionner"<RecordItem (new IFSelect_SelectSignature (new IFSelect_SignType,arg1,Standard_False)); } static IFSelect_ReturnStatus fun90 (const Handle(IFSelect_SessionPilot)& pilot) { // **** SelPointed **** Handle(IFSelect_SelectPointed) sp = new IFSelect_SelectPointed; if (pilot->NbWords() > 1) { Handle(TColStd_HSequenceOfTransient) list = IFSelect_Functions::GiveList (pilot->Session(),pilot->CommandPart(1)); if (list.IsNull()) return IFSelect_RetFail; Message_Messenger::StreamBuffer sout = Message::SendInfo(); sout<<"SelectPointed : "<Length()<<" entities"<AddList (list); } return pilot->RecordItem (sp); } static IFSelect_ReturnStatus fun91 (const Handle(IFSelect_SessionPilot)& pilot) { Handle(IFSelect_WorkSession) WS = pilot->Session(); Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); // **** SetPointed (edit) / SetList (edit) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner NOM SelectPointed + Option(s) :\n" <<" aucune : liste des entites pointees\n" <<" 0: Clear +nn ajout entite nn -nn enleve nn /nn toggle nn"<NamedItem(arg1)); if (sp.IsNull()) { sout<<"Pas une SelectPointed:"<Model(); // pour Print if (argc == 2) { // listage simple Standard_Integer nb = sp->NbItems(); sout<<" SelectPointed : "<Item(i); Standard_Integer id = WS->StartingNumber(pointed); if (id == 0) sout <<" (inconnu)"; else { sout <<" "; model->Print (pointed, sout); } } if (nb > 0) sout<Word(ia); Standard_Integer id = pilot->Number(&(argi.ToCString())[1]); if (id == 0) { if (!argi.IsEqual("0")) sout<<"Incorrect,ignore:"<Clear(); } } else if (argi.Value(1) == '-') { Handle(Standard_Transient) item = WS->StartingEntity(id); if (sp->Remove(item)) sout<<"Removed:no."<Print (item, sout); } else if (argi.Value(1) == '/') { Handle(Standard_Transient) item = WS->StartingEntity(id); if (sp->Remove(item)) sout<<"Toggled:n0."<Print (item, sout); } else if (argi.Value(1) == '+') { Handle(Standard_Transient) item = WS->StartingEntity(id); if (sp->Add(item)) sout<<"Added:no."<Print (item, sout); } else { sout<<"Ignore:"<Session(); // **** SelIncorrectEntities **** WS->ComputeCheck(); return pilot->RecordItem (new IFSelect_SelectIncorrectEntities); } static IFSelect_ReturnStatus fun93 (const Handle(IFSelect_SessionPilot)& pilot) { Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); const Standard_CString arg2 = pilot->Arg(2); Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** SelSignature **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Give name of Signature or Counter, text + option exact(D) else contains"< 3) { if (pilot->Arg(3)[0] == 'c') exact = Standard_False; } DeclareAndCast(IFSelect_Signature,sign,WS->NamedItem(arg1)); DeclareAndCast(IFSelect_SignCounter,cnt,WS->NamedItem(arg1)); Handle(IFSelect_SelectSignature) sel; if (!sign.IsNull()) sel = new IFSelect_SelectSignature (sign,arg2,exact); else if (!cnt.IsNull()) sel = new IFSelect_SelectSignature (cnt,arg2,exact); else { sout<RecordItem(sel); } static IFSelect_ReturnStatus fun94 (const Handle(IFSelect_SessionPilot)& pilot) { Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** SignCounter **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner nom signature"<NamedItem(arg1)); if (sign.IsNull()) { sout<RecordItem(cnt); } static IFSelect_ReturnStatus funbselected (const Handle(IFSelect_SessionPilot)& pilot) { Standard_Integer argc = pilot->NbWords(); const Standard_CString arg1 = pilot->Arg(1); Handle(IFSelect_WorkSession) WS = pilot->Session(); // **** NbSelected = GraphCounter **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Donner nom selection (deduction) a appliquer"<GiveSelection(arg1)); if (applied.IsNull()) { sout<SetApplied (applied); return pilot->RecordItem(cnt); } // ######################################### // #### EDITOR - EDITFORM #### // ######################################### static IFSelect_ReturnStatus fun_editlist (const Handle(IFSelect_SessionPilot)& pilot) { Standard_Integer argc = pilot->NbWords(); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Give the name of an EditForm or an Editor"<Arg(1); const Standard_CString arg2 = pilot->Arg(2); Handle(IFSelect_WorkSession) WS = pilot->Session(); // EditForm DeclareAndCast(IFSelect_EditForm,edf,WS->NamedItem(arg1)); Handle(IFSelect_Editor) edt; if (!edf.IsNull()) { sout<<"Print EditForm "<Editor(); if (argc < 3) { // DEFINITIONS : Editor (direct ou via EditForm) if (edt.IsNull()) edt = GetCasted(IFSelect_Editor,WS->NamedItem(arg1)); if (edt.IsNull()) return IFSelect_RetVoid; sout<<"Editor, Label : "<Label()<PrintNames(sout); sout<PrintDefs (sout); if (!edf.IsNull()) { edf->PrintDefs(sout); sout<PrintValues (sout,what,Standard_False); } } return IFSelect_RetVoid; } static IFSelect_ReturnStatus fun_editvalue (const Handle(IFSelect_SessionPilot)& pilot) { Standard_Integer argc = pilot->NbWords(); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { sout<<"Give the name of an EditForm + name of Value [+ newvalue or . to nullify]"<Arg(1); const Standard_CString arg2 = pilot->Arg(2); Handle(IFSelect_WorkSession) WS = pilot->Session(); DeclareAndCast(IFSelect_EditForm,edf,WS->NamedItem(arg1)); if (edf.IsNull()) { sout<<"Not an EditForm : "<NameNumber (arg2); if (num == 0) sout<<"Unknown Value Name : "<Editor()->IsList(num); Standard_CString name = edf->Editor()->Name(num,Standard_True); // vrai nom Handle(TColStd_HSequenceOfHAsciiString) listr; Handle(TCollection_HAsciiString) str; sout<<"Value Name : "<IsModified(num) ? "(already edited) : " : " : "); if (islist) { listr = edf->EditedList(num); if (listr.IsNull()) sout<<"(NULL LIST)"<Length(); sout<<"(List : "<Value(ilist); sout<<" ["<ToCString())<EditedValue (num); sout<<(str.IsNull() ? "(NULL)" : str->ToCString())<Arg(numarg); if (islist) { if (argval[0] == '?') { sout<<"To Edit, options"<ListEditor (num); if (listed.IsNull()) return IFSelect_RetError; if (argval[0] == '.') { listr.Nullify(); stated = listed->LoadEdited(listr); } else if (argval[0] == '+') { Standard_Integer numadd = 0; if (argval[1] != '\0') numadd = atoi(argval); stated = listed->AddValue (new TCollection_HAsciiString(pilot->CommandPart(numarg+1)),numadd); } else if (argval[0] == '-') { Standard_Integer numrem = atoi(argval); stated = listed->Remove(numrem); } else { Standard_Integer numset = atoi(argval); if (numset > 0) stated = listed->AddValue (new TCollection_HAsciiString(pilot->CommandPart(numarg+1)),numset); } if (stated) stated = edf->ModifyList (num,listed,Standard_True); if (stated) sout<<"List Edition done"<CommandPart(numarg)); if (edf->Modify (num,str,Standard_True)) { sout<<"Now set to "<<(str.IsNull() ? "(NULL)" : str->ToCString())<NbWords(); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Give the name of an EditForm [+ name of Value else all]"<Arg(1); const Standard_CString arg2 = pilot->Arg(2); Handle(IFSelect_WorkSession) WS = pilot->Session(); DeclareAndCast(IFSelect_EditForm,edf,WS->NamedItem(arg1)); if (edf.IsNull()) { sout<<"Not an EditForm : "<ClearEdit(); sout<<"All Modifications Cleared"<NameNumber (arg2); if (num == 0) sout<<"Unknown Value Name : "<IsModified(num)) { sout<<"Value "<ClearEdit (num); sout<<"Modification on Value "<NbWords(); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Give the name of an EditForm [+ option keep to re-apply edited values]"<Arg(1); const Standard_CString arg2 = pilot->Arg(2); Handle(IFSelect_WorkSession) WS = pilot->Session(); DeclareAndCast(IFSelect_EditForm,edf,WS->NamedItem(arg1)); if (edf.IsNull()) { sout<<"Not an EditForm : "<Entity(); Handle(Interface_InterfaceModel) model = edf->Model(); if (!model.IsNull()) { if (ent.IsNull()) sout<<"Applying modifications on loaded model"<PrintLabel (ent, sout); } } else sout<<"Applying modifications"<ApplyData (edf->Entity(),edf->Model())) { sout<<"Modifications could not be applied"< 2 && arg2[0] == 'k') stat = Standard_False; if (stat) { edf->ClearEdit(); sout<<"Edited values are cleared"<NbWords(); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) { sout<<"Give the name of an EditForm [+ Entity-Ident]"<Arg(1); const Standard_CString arg2 = pilot->Arg(2); Handle(IFSelect_WorkSession) WS = pilot->Session(); DeclareAndCast(IFSelect_EditForm,edf,WS->NamedItem(arg1)); if (edf.IsNull()) { sout<<"Not an EditForm : "<Number (arg2)); Standard_Boolean stat = Standard_False; if (argc < 3) { sout<<"EditForm "<LoadModel(WS->Model()); } else if (num <= 0) { sout<<"Not an entity ident : "<LoadData (WS->StartingEntity(num),WS->Model()); } if (!stat) { sout<<"Loading not done"< 0) ent = WS->StartingEntity(num); return ent; } Standard_Integer IFSelect_Functions::GiveEntityNumber (const Handle(IFSelect_WorkSession)& WS, const Standard_CString name) { Standard_Integer num = 0; if (!name || name[0] == '\0') { char ligne[80]; ligne[0] = '\0'; std::cin >> ligne; // std::cin.clear(); std::cin.getline (ligne,79); if (ligne[0] == '\0') return 0; num = WS->NumberFromLabel (ligne); } else num = WS->NumberFromLabel (name); return num; } Handle(TColStd_HSequenceOfTransient) IFSelect_Functions::GiveList (const Handle(IFSelect_WorkSession)& WS, const Standard_CString first, const Standard_CString second) { return WS->GiveList (first,second); } // Function which returns an EVALUATED DISPATCH // (could be added in WorkSession.cdl ...) // Two modes : returns dispatch as it is, or return with edition // Dispatch Name can be : an immediate name of already recorded Dispatch // Or a name of dispatch + a parameter : dispatch-name(param-value) // According to type of Dispatch : integer , signature name Handle(IFSelect_Dispatch) IFSelect_Functions::GiveDispatch (const Handle(IFSelect_WorkSession)& WS, const Standard_CString name, const Standard_Boolean mode) { DeclareAndCast(IFSelect_Dispatch,disp,WS->NamedItem(name)); if (!disp.IsNull()) return disp; // OK as it is given // Else, let s try special cases TCollection_AsciiString nam(name); Standard_Integer paro = nam.Location(1,'(',1,nam.Length()); Standard_Integer parf = nam.Location(1,')',1,nam.Length()); nam.SetValue(paro,'\0'); nam.SetValue(parf,'\0'); if (paro <= 0 &&parf <= 0) return disp; disp = GetCasted(IFSelect_Dispatch,WS->NamedItem(nam.ToCString())); if (disp.IsNull()) return disp; // KO anyway // According to the type of dispatch : Message_Messenger::StreamBuffer sout = Message::SendInfo(); DeclareAndCast(IFSelect_DispPerCount,dc,disp); if (!dc.IsNull()) { Standard_Integer nb = atoi( &(nam.ToCString())[paro]); if (nb <= 0) { sout<<" DispPerCount, count is not positive"<SetValue(nb); dc->SetCount (val); } return dc; } DeclareAndCast(IFSelect_DispPerFiles,dp,disp); if (!dp.IsNull()) { Standard_Integer nb = atoi( &(nam.ToCString())[paro]); if (nb <= 0) { sout<<" DispPerFiles, count is not positive"<SetValue(nb); dp->SetCount (val); } return dp; } DeclareAndCast(IFSelect_DispPerSignature,ds,disp); if (!ds.IsNull()) { DeclareAndCast(IFSelect_Signature,sg,WS->NamedItem( &(nam.ToCString())[paro])); if (sg.IsNull()) { sout<<"DispPerSignature "<SetSignCounter (new IFSelect_SignCounter(sg)); return ds; } sout<<"Dispatch : "< Load Model",fun3); IFSelect_Act::AddFunc("xread","file:string : Read File -> Load Model",fun3); IFSelect_Act::AddFunc("writeall","file:string : Write all model (no split)",fun4); IFSelect_Act::AddFunc("writesel","file:string sel:Selection : Write Selected (no split)",fun5); IFSelect_Act::AddFunc("writeent","file:string n1ent n2ent...:integer : Write Entite(s) (no split)",fun6); IFSelect_Act::AddFunc("writent", "file:string n1ent n2ent...:integer : Write Entite(s) (no split)",fun6); IFSelect_Act::AddFunc("elabel","nument:integer : Displays Label Model of an entity",fun7); IFSelect_Act::AddFunc("enum","label:string : Displays entities n0.s of which Label Model ends by..",fun8); IFSelect_Act::AddFunc("listtypes","List nb entities per type. Optional selection name else all model",fun9); IFSelect_Act::AddFunc("count","Count : counter [selection]",funcount); IFSelect_Act::AddFunc("listcount","List Counted : counter [selection [nument]]",funcount); IFSelect_Act::AddFunc("sumcount","Summary Counted : counter [selection [nument]]",funcount); IFSelect_Act::AddFunc("signtype","Sign Type [newone]",funsigntype); IFSelect_Act::AddFunc("signcase","signature : displays possible cases",funsigncase); IFSelect_Act::AddFunc("estatus","ent/nument : displays status of an entity",fun10); IFSelect_Act::AddFunc("data","Data (DumpModel); whole help : data tout court",fun11); IFSelect_Act::AddFunc("entity","give n0 ou id of entity [+ level]",fundumpent); IFSelect_Act::AddFunc("signature","signature name + n0/ident entity",funsign); IFSelect_Act::AddFunc("queryparent"," give 2 n0s/labels of entities : dad son",funqp); IFSelect_Act::AddFunc("dumpshare","Dump Share (dispatches, IntParams)",fun12); IFSelect_Act::AddFunc("listitems","List Items [label else all] ->Type,Label[,Name]",fun13); IFSelect_Act::AddFSet("integer","value:integer : cree un IntParam",fun14); IFSelect_Act::AddFunc("setint","name:IntParam newValue:integer : Change valeur IntParam",fun15); IFSelect_Act::AddFSet("text","value:string : cree un TextParam",fun16); IFSelect_Act::AddFunc("settext","Name:TextParam newValue:string : Change valeur TextParam",fun17); IFSelect_Act::AddFunc("dumpsel","Dump Selection suivi du Nom de la Selection a dumper",fun19); IFSelect_Act::AddFunc("evalsel","name:Selection [num/sel] : Evalue une Selection",fun20); IFSelect_Act::AddFunc("givelist","num/sel [num/sel ...] : Evaluates GiveList",fun20); IFSelect_Act::AddFunc("giveshort","num/sel [num/sel ...] : GiveList in short form",fun20); IFSelect_Act::AddFunc("givepointed","num/sel [num/sel ...] : GiveList to fill a SelectPointed",fun20); IFSelect_Act::AddFunc("makelist","listname [givelist] : Makes a List(SelectPointed) from GiveList",fun20); IFSelect_Act::AddFunc("givecount","num/sel [num/sel ...] : Counts GiveList",fun20c); IFSelect_Act::AddFSet("selsuite","sel sel ... : Creates a SelectSuite",funselsuite); IFSelect_Act::AddFunc("clearitems","Clears all items (selections, dispatches, etc)",fun21); IFSelect_Act::AddFunc("cleardata","mode:a-g-c-p : Clears all or some data (model, check...)",fun22); IFSelect_Act::AddFunc("itemlabel","xxx xxx : liste items having this label",fun24); IFSelect_Act::AddFunc("xsave","filename:string : sauve items-session",fun25); IFSelect_Act::AddFunc("xrestore","filename:string : restaure items-session",fun26); IFSelect_Act::AddFunc("param","nompar:string : displays parameter value; + nompar val : changes it",fun27); IFSelect_Act::AddFunc("sentfiles","Lists files sent from last Load",fun29); IFSelect_Act::AddFunc("fileprefix","prefix:string : definit File Prefix",fun30); IFSelect_Act::AddFunc("fileext","extent:string : definit File Extension",fun31); IFSelect_Act::AddFunc("fileroot","disp:Dispatch root:string : definit File Root sur un Dispatch",fun32); IFSelect_Act::AddFunc("filedef","defroot:string : definit File DefaultRoot",fun33); IFSelect_Act::AddFunc("evalfile","Evaluation du FileNaming et memorisation",fun34); IFSelect_Act::AddFunc("clearfile","Efface la liste d'EvalFile",fun35); IFSelect_Act::AddFunc("xsplit","[disp:Dispatch sinon tout] : Split, la grande affaire !",fun36); IFSelect_Act::AddFunc("remaining","options... : Remaining Entities, help complet par remaining ?",fun37); IFSelect_Act::AddFunc("setcontent","sel:Selection mode:k ou r : Restreint contenu du modele",fun38); IFSelect_Act::AddFunc("listmodif","List Final Modifiers",fun40); IFSelect_Act::AddFunc("dumpmodif","modif:Modifier : Affiche le Statut d'un Modifier",fun41); IFSelect_Act::AddFunc("modifsel","modif:Modifier [sel:Selection] : Change/Annule Selection de Modifier",fun42); IFSelect_Act::AddFunc("setapplied","modif:Modifier [name:un item sinon sortie fichier] : Applique un Modifier",fun43); IFSelect_Act::AddFunc("resetapplied","modif:Modifier : Enleve un Modifier de la sortie fichier",fun44); IFSelect_Act::AddFunc("modifmove","modif:Modifier M(model)/F(file) avant,apres:integer : Deplace un Modifier (sortie fichier)",fun45); IFSelect_Act::AddFunc("dispsel","disp:Dispatch sel:Selection -> Selection Finale de Dispatch",fun51); IFSelect_Act::AddFSet("dispone","cree DispPerOne",fun_dispone); IFSelect_Act::AddFSet("dispglob","cree DispGlobal",fun_dispglob); IFSelect_Act::AddFSet("dispcount","count:IntParam : cree DispPerCount",fun_dispcount); IFSelect_Act::AddFSet("dispfile","files:IntParam : cree DispPerFiles",fun_dispfiles); IFSelect_Act::AddFSet("dispsign","sign:Signature : cree DispPerSignature",fun_dispsign); IFSelect_Act::AddFunc("dumpdisp","disp:Dispatch : Affiche le Statut d'un Dispatch",fun56); IFSelect_Act::AddFunc("xremove","nom : Remove a Control Item de la Session",fun57); IFSelect_Act::AddFunc("evaldisp","mode=[0-3] disp:Dispatch : Evaluates one or more Dispatch(es)",fun58); IFSelect_Act::AddFunc("evaladisp","mode=[0-3] disp:Dispatch [givelist] : Evaluates a Dispatch (on a GiveList)",fun_evaladisp); IFSelect_Act::AddFunc("writedisp","filepattern disp:Dispatch [givelist] : Writes Entities by Splitting by a Dispatch",fun_writedisp); IFSelect_Act::AddFunc("evalcomplete","Evaluation Complete de la Repartition",fun59); IFSelect_Act::AddFunc("runcheck","affiche LastRunCheckList (write,modif)",fun60); IFSelect_Act::AddFunc("runtranformer","transf:Transformer : Applique un Transformer",fun61); IFSelect_Act::AddFSet("copy","cree TransformStandard, option Copy, vide",fun62); IFSelect_Act::AddFSet("onthespot","cree TransformStandard, option OntheSpot, vide",fun63); IFSelect_Act::AddFunc("runcopy","modif:ModelModifier [givelist] : Run via TransformStandard option Copy",fun6465); IFSelect_Act::AddFunc("runonthespot","modif:ModelModifier [givelist] : Run via TransformStandard option OnTheSpot",fun6465); IFSelect_Act::AddFSet("reorder","[f ou t] reordonne le modele",fun66); IFSelect_Act::AddFunc("toggle","sel:Selection genre Extract : Toggle Direct/Reverse",fun70); IFSelect_Act::AddFunc("input","sel:Selection genre Deduct ou Extract input:Selection : Set Input",fun71); IFSelect_Act::AddFSet("modelroots","cree SelectModelRoots",fun72); IFSelect_Act::AddFSet("range","options... : cree SelectRange ...; tout court pour help",fun73); IFSelect_Act::AddFSet("roots","cree SelectRoots (local roots)",fun74); IFSelect_Act::AddFSet("shared","cree SelectShared",fun75); IFSelect_Act::AddFSet("diff","[main:Selection diff:Selection] : cree SelectDiff",fun76); IFSelect_Act::AddFunc("selmain","sel:Selection genre Control main:Selection : Set Main Input",fun77); IFSelect_Act::AddFunc("selsecond","sel:Selection genre Control sec:Selection : Set Second Input",fun78); IFSelect_Act::AddFSet("modelall","cree SelectModelAll",fun79); IFSelect_Act::AddFunc("seladd","sel:Selection genre Combine input:Selection : Add Selection",fun80); IFSelect_Act::AddFunc("selrem","sel:Selection genre Combine input:Selection : Remove Selection",fun81); IFSelect_Act::AddFSet("number","num:IntParam : Cree SelectEntityNumber",fun82); IFSelect_Act::AddFSet("union","cree SelectUnion (vide), cf aussi combadd, combrem",fun83); IFSelect_Act::AddFSet("intersect","cree SelectIntersection (vide), cf aussi combadd, combrem",fun84); IFSelect_Act::AddFSet("typexact","type:string : cree SelectTextType Exact",fun85); IFSelect_Act::AddFSet("errors","cree SelectErrorEntities (from file)",fun86); IFSelect_Act::AddFSet("unknown","cree SelectUnknownEntities",fun87); IFSelect_Act::AddFSet("sharing","cree SelectSharing",fun88); IFSelect_Act::AddFSet("typecontain","type:string : cree SelectTextType Contains",fun89); IFSelect_Act::AddFSet("pointed","cree SelectPointed [num/sel num/sel]",fun90); IFSelect_Act::AddFunc("setpointed","sel:SelectPointed : edition SelectPointed. tout court pour help",fun91); IFSelect_Act::AddFunc("setlist","sel:SelectPointed : edition SelectPointed. tout court pour help",fun91); IFSelect_Act::AddFSet("incorrect","cree SelectIncorrectEntities (computed)",fun92); IFSelect_Act::AddFSet("signsel","sign:Signature|cnt:Counter text:string [e(D)|c] : cree SelectSignature",fun93); IFSelect_Act::AddFSet("signcounter","sign:Signature : cree SignCounter",fun94); IFSelect_Act::AddFSet("nbselected","applied:Selection : cree GraphCounter(=NbSelected)",funbselected); IFSelect_Act::AddFunc("editlist","editor or editform : lists defs + values",fun_editlist); IFSelect_Act::AddFunc("editvalue","editform paramname [newval or .] : lists-changes a value",fun_editvalue); IFSelect_Act::AddFunc("editclear","editform [paramname] : clears edition on all or one param",fun_editclear); IFSelect_Act::AddFunc("editload","editform [entity-id] : loads from model or an entity",fun_editload); IFSelect_Act::AddFunc("editapply","editform [keep] : applies on loaded data",fun_editapply); }