diff --git a/ImportBtlx.cpp b/ImportBtlx.cpp index b531d7a..1fc31fc 100644 --- a/ImportBtlx.cpp +++ b/ImportBtlx.cpp @@ -1127,7 +1127,7 @@ ImportBtlx::ReadUserReferencePlane( pugi::xml_node node) VectY.z = node.child( "Position").child( "YVector").attribute( "Z").as_double() ; Frame3d FrRef ; - FrRef.Set( Origin, VectX, VectY, VectX ^ VectY) ; + FrRef.Set( Origin, VectX, VectY, VectX ^ VectY) ; MapURefPlanes.emplace( id, FrRef) ; @@ -1580,6 +1580,8 @@ ImportBtlx::ReadShape( pugi::xml_node node) // Vertici delle facce INTVECTOR vAux ; // vettore per salvare i vertici di una faccia + if ( sFacesVertices.back() != ' ') + sFacesVertices += " " ; while( ( str_end = sFacesVertices.find( " ", str_start)) != string::npos ) { int val = std::stoi( sFacesVertices.substr( str_start, str_end - str_start)) ; str_start = str_end + 1 ; @@ -1595,6 +1597,8 @@ ImportBtlx::ReadShape( pugi::xml_node node) // Coordinate dei vertici str_start = 0 ; DBLVECTOR vAux2 ; // vettore per salvare le coordinate di un punto + if ( sCoordPoints.back() != ' ') + sCoordPoints += " " ; while( ( str_end = sCoordPoints.find( " ", str_start)) != string::npos ){ double val = std::stod( sCoordPoints.substr( str_start, str_end - str_start)) ; str_start = str_end + 1 ; diff --git a/ImportBtlxProc.cpp b/ImportBtlxProc.cpp index 941af64..8438698 100644 --- a/ImportBtlxProc.cpp +++ b/ImportBtlxProc.cpp @@ -2757,7 +2757,11 @@ ImportBtlx::ReadSContourParams( pugi::xml_node process, int nType, int nOtherId, LOG_ERROR( GetEExLogger(), " Error reading Part Process: FreeContour Contour Reference Plane unknown") ; return false ; } - frRef = MapURefPlanes[nSide] ; + frRef = MapURefPlanes[nSide] ; + if ( ! frRef.IsValid()) { + LOG_ERROR( GetEExLogger(), (" Error reading Part Process: FreeContour User Reference Plane " + to_string( nSide) + " is not valid").c_str()) ; + return false ; + } } string sDes ;