diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp index 009431674d180a7094fbec96dbd7650b6408ede1..23feb25a3116b2c1be7147c8c5db25805b8ed71e 100644 --- a/Geo/Geo.cpp +++ b/Geo/Geo.cpp @@ -3058,11 +3058,12 @@ bool SplitCurve(int line_id, List_T *vertices_id, List_T *shapes) if(surface_curve->Num == c->Num){ List_Remove(s->Generatrices, j); List_Insert_In_List(shapes, j, s->Generatrices); - j+=List_Nbr(shapes)-1; - }else if(surface_curve->Num == -c->Num){ + j += List_Nbr(shapes) - 1; + } + else if(surface_curve->Num == -c->Num){ List_Remove(s->Generatrices, j); List_Insert_In_List(rshapes, j, s->Generatrices); - j+=List_Nbr(shapes)-1; + j += List_Nbr(shapes) - 1; } } } diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp index eac5db8f1870959781e6b9b7f0bdb4cef00255c9..58b6464317356c60e86b9756c4510f739795682d 100644 --- a/Geo/MElement.cpp +++ b/Geo/MElement.cpp @@ -415,6 +415,7 @@ void MElement::writePOS(FILE *fp, bool printElementary, bool printElementNumber, const char *str = getStringForPOS(); if(!str) return; + setVolumePositive(); int n = getNumVertices(); fprintf(fp, "%s(", str); for(int i = 0; i < n; i++){ @@ -520,6 +521,7 @@ void MElement::writeSTL(FILE *fp, bool binary, double scalingFactor) void MElement::writeVRML(FILE *fp) { + setVolumePositive(); for(int i = 0; i < getNumVertices(); i++) fprintf(fp, "%d,", getVertex(i)->getIndex() - 1); fprintf(fp, "-1,\n"); @@ -579,6 +581,7 @@ void MElement::writeUNV(FILE *fp, int num, int elementary, int physical) void MElement::writeMESH(FILE *fp, int elementary) { + setVolumePositive(); for(int i = 0; i < getNumVertices(); i++) fprintf(fp, " %d", getVertex(i)->getIndex()); fprintf(fp, " %d\n", elementary);