Changeset 372 for cpp/frams/model
- Timestamp:
- 04/22/15 04:14:59 (10 years ago)
- Location:
- cpp/frams/model
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/geometry/geometryutils.cpp
r286 r372 82 82 break; 83 83 } 84 FMprintf("GeometryUtils", "isPointInsidePart", FMLV_ERROR, "Part shape=%d not supported", part->shape);84 Hprintf("GeometryUtils", "isPointInsidePart", HMLV_ERROR, "Part shape=%d not supported", part->shape); 85 85 return false; 86 86 } … … 102 102 break; 103 103 } 104 FMprintf("GeometryUtils", "isPointStrictlyInsidePart", FMLV_ERROR, "Part shape=%d not supported", part->shape);104 Hprintf("GeometryUtils", "isPointStrictlyInsidePart", HMLV_ERROR, "Part shape=%d not supported", part->shape); 105 105 return false; 106 106 } -
cpp/frams/model/geometry/meshbuilder.cpp
r322 r372 639 639 640 640 default: 641 FMprintf("MeshBuilder::PartSurface", "initialize", FMLV_WARN, "Part shape=%d not supported, skipping...", part->shape);641 Hprintf("MeshBuilder::PartSurface", "initialize", HMLV_WARN, "Part shape=%d not supported, skipping...", part->shape); 642 642 } 643 643 } … … 725 725 726 726 default: 727 FMprintf("MeshBuilder::PartApices", "initialize", FMLV_WARN, "Part shape=%d not supported, skipping...", part->shape);727 Hprintf("MeshBuilder::PartApices", "initialize", HMLV_WARN, "Part shape=%d not supported, skipping...", part->shape); 728 728 } 729 729 } -
cpp/frams/model/geometry/modelgeometryinfo.cpp
r286 r372 16 16 if (points.size() < 1) //maybe 1 or 2 points are also not enough for findSizesAndAxesOfPointsGroup() to work... 17 17 { 18 FMprintf("ModelGeometryInfo", "findSizesAndAxesOfModel", FMLV_ERROR, "Empty points sample for model with %d part(s)", model.getPartCount());18 Hprintf("ModelGeometryInfo", "findSizesAndAxesOfModel", HMLV_ERROR, "Empty points sample for model with %d part(s)", model.getPartCount()); 19 19 sizes = Pt3D_0; 20 20 axes = Orient_1; … … 116 116 return externalAreaOfCylinder(model, partIndex, density); 117 117 } 118 FMprintf("ModelGeometryInfo", "externalAreaOfPart", FMLV_ERROR, "Part shape=%d not supported", part->shape);118 Hprintf("ModelGeometryInfo", "externalAreaOfPart", HMLV_ERROR, "Part shape=%d not supported", part->shape); 119 119 return 0; 120 120 } -
cpp/frams/model/model.cpp
r348 r372 5 5 #include <common/nonstd_math.h> 6 6 #include "model.h" 7 #include <common/ framsg.h>7 #include <common/hmessage.h> 8 8 #include <frams/util/multimap.h> 9 #include <frams/ errmgr/errmanager.h>9 #include <frams/mhandlers/mhandlers.h> 10 10 11 11 Model::Model() … … 317 317 SString line; 318 318 MultiRange frommap; 319 ErrorHandler err(ErrorHandler::DontBlock);319 MessageHandlerToMemory mh(MessageHandlerBase::Enable | MessageHandlerBase::DontBlock); 320 320 for (;f0txt.getNextToken(pos,line,'\n');lnum++) 321 321 { … … 325 325 frommap.add(lastpos,pos-1); 326 326 } 327 err.reset();327 mh.reset(); 328 328 if (singleStepBuild(line,autobuildmaps ? (&frommap) : 0)==-1) 329 329 { 330 330 buildstatus=invalid; 331 FMprintf("Model","build",FMLV_ERROR,331 Hprintf("Model","build",HMLV_ERROR, 332 332 geno.getName().len()?"illegal f0 code at line %d (%s)":"illegal f0 code at line %d", 333 333 lnum,geno.getName().c_str()); … … 336 336 return; 337 337 } 338 if ( err.getWarningCount())338 if (mh.getWarningCount()) 339 339 {if (f0warnposition<0) f0warnposition=lastpos;} 340 340 lastpos=pos; 341 341 } 342 err.disable();342 mh.disable(); 343 343 close(); 344 344 if (convmap) … … 513 513 { 514 514 if (buildstatus!=building) 515 FMprintf("Model","close",FMLV_WARN,"unexpected close() - no open()");515 Hprintf("Model","close",HMLV_WARN,"unexpected close() - no open()"); 516 516 if (internalcheck(1)>0) 517 517 { … … 609 609 { 610 610 delete j; 611 FMprintf("Model","build",FMLV_ERROR,611 Hprintf("Model","build",HMLV_ERROR, 612 612 "invalid part reference for joint #%d",getJointCount()-1); 613 613 return -1; … … 694 694 return 0; 695 695 } 696 FMprintf("Model","build",FMLV_ERROR,696 Hprintf("Model","build",HMLV_ERROR, 697 697 "invalid neuron connection #%d <- #%d",c.n1_refno,c.n2_refno); 698 698 return -1; … … 782 782 else 783 783 { 784 FMprintf("Model","internalCheck",FMLV_ERROR,784 Hprintf("Model","internalCheck",HMLV_ERROR, 785 785 "illegal N-N connection #%d (reference to #%d) (%s)", 786 786 i,n->conn_refno,(const char*)geno.getName()); … … 853 853 if (var -> field < getMin ## template () . field) \ 854 854 { var->field= getMin ## template () . field; \ 855 FMprintf("Model","internalCheck",FMLV_WARN,# field " too small in " # template "#%d (adjusted)",i);} \855 Hprintf("Model","internalCheck",HMLV_WARN,# field " too small in " # template "#%d (adjusted)",i);} \ 856 856 else if (var -> field > getMax ## template () . field) \ 857 857 { var->field= getMax ## template () . field; \ 858 FMprintf("Model","internalCheck",FMLV_WARN,# field " too big in " # template "#%d (adjusted)",i);}858 Hprintf("Model","internalCheck",HMLV_WARN,# field " too big in " # template "#%d (adjusted)",i);} 859 859 860 860 #define LINKFLAG 0x8000000 … … 912 912 { 913 913 shape=SHAPE_ILLEGAL; 914 FMprintf("Model","internalCheck",FMLV_WARN,"Inconsistent part shapes (mixed old and new shapes)");914 Hprintf("Model","internalCheck",HMLV_WARN,"Inconsistent part shapes (mixed old and new shapes)"); 915 915 } 916 916 } … … 941 941 { 942 942 ret=0; 943 FMprintf("Model","internalCheck",FMLV_ERROR,943 Hprintf("Model","internalCheck",HMLV_ERROR, 944 944 "delta joint cycle detected at joint#%d (%s)", 945 945 i,geno.getName().c_str()); … … 978 978 { 979 979 ret=0; 980 FMprintf("Model","internalCheck",FMLV_ERROR,"delta too big in joint #%d (%s)",980 Hprintf("Model","internalCheck",HMLV_ERROR,"delta too big in joint #%d (%s)", 981 981 i,geno.getName().c_str()); 982 982 } … … 984 984 { 985 985 ret=0; 986 FMprintf("Model","internalCheck",FMLV_ERROR,"delta too small in joint #%d (%s)",986 Hprintf("Model","internalCheck",HMLV_ERROR,"delta too small in joint #%d (%s)", 987 987 i,geno.getName().c_str()); 988 988 } … … 992 992 else 993 993 { 994 FMprintf("Model","internalCheck",FMLV_ERROR,"illegal part references in joint #%d (%s)",994 Hprintf("Model","internalCheck",HMLV_ERROR,"illegal part references in joint #%d (%s)", 995 995 i,geno.getName().c_str()); 996 996 ret=0; … … 1001 1001 { 1002 1002 shape=SHAPE_ILLEGAL; 1003 FMprintf("Model","internalCheck",FMLV_WARN,"Inconsistent joint shapes (mixed old and new shapes)");1003 Hprintf("Model","internalCheck",HMLV_WARN,"Inconsistent joint shapes (mixed old and new shapes)"); 1004 1004 } 1005 1005 } … … 1071 1071 if (!(p->flags&LINKFLAG)) 1072 1072 { 1073 FMprintf("Model","internalCheck",FMLV_ERROR,"not all parts connected (eg.#0-#%d) (%s)",1073 Hprintf("Model","internalCheck",HMLV_ERROR,"not all parts connected (eg.#0-#%d) (%s)", 1074 1074 i,geno.getName().c_str()); 1075 1075 ret=0; … … 1084 1084 if (j->p1_refno==j->p2_refno) 1085 1085 { 1086 FMprintf("Model","internalCheck",FMLV_ERROR,"illegal self connection, joint #%d (%s)",1086 Hprintf("Model","internalCheck",HMLV_ERROR,"illegal self connection, joint #%d (%s)", 1087 1087 i,geno.getName().c_str()); 1088 1088 ret=0; … … 1095 1095 || ((j->p1_refno==j2->p2_refno)&&(j->p2_refno==j2->p1_refno))) 1096 1096 { 1097 FMprintf("Model","internalCheck",FMLV_ERROR,"illegal duplicate joints #%d and #%d (%s)",1097 Hprintf("Model","internalCheck",HMLV_ERROR,"illegal duplicate joints #%d and #%d (%s)", 1098 1098 i,k,geno.getName().c_str()); 1099 1099 ret=0; … … 1125 1125 { 1126 1126 if (buildstatus==building) 1127 FMprintf("Model","getGeno",FMLV_WARN,"model was not completed - missing close()");1127 Hprintf("Model","getGeno",HMLV_WARN,"model was not completed - missing close()"); 1128 1128 if (buildstatus!=valid) 1129 1129 return Geno("",'0',"","invalid");
Note: See TracChangeset
for help on using the changeset viewer.