Changeset 610 for cpp/frams/model/model.cpp
- Timestamp:
- 09/05/16 03:39:14 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/model.cpp
r546 r610 511 511 } 512 512 513 int Model::close( )513 int Model::close(bool building_live_model) 514 514 { 515 515 if (buildstatus != building) 516 516 logPrintf("Model", "close", LOG_WARN, "Unexpected close() - no open()"); 517 if (internalcheck( 1) > 0)517 if (internalcheck(building_live_model ? LIVE_CHECK : FINAL_CHECK) > 0) 518 518 { 519 519 buildstatus = valid; … … 543 543 int Model::validate() 544 544 { 545 return internalcheck( 0);545 return internalcheck(EDITING_CHECK); 546 546 } 547 547 … … 899 899 } 900 900 901 int Model::internalcheck( int final)901 int Model::internalcheck(CheckType check) 902 902 { 903 903 Part *p; … … 997 997 else 998 998 { // abs.positioning -> calc. delta 999 if ( final)999 if (check!=EDITING_CHECK) 1000 1000 { 1001 1001 // calc orient delta … … 1012 1012 } 1013 1013 } 1014 if ( final)1014 if (check!=LIVE_CHECK) 1015 1015 { 1016 1016 if (j->shape != Joint::SHAPE_FIXED) … … 1019 1019 { 1020 1020 ret = 0; 1021 logPrintf("Model", "internalCheck", LOG_ERROR, "Joint #%d too long %s", i, nameForErrors().c_str());1021 logPrintf("Model", "internalCheck", LOG_ERROR, "Joint #%d too long (its length %g exceeds allowed %g)%s", i, j->d(), getMaxJoint().d.x, nameForErrors().c_str()); 1022 1022 } 1023 1023 }
Note: See TracChangeset
for help on using the changeset viewer.