Skip to content
Snippets Groups Projects
Commit 2258e9ee authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

call setVolumePositive() in all ::writeXXX() functions
parent ab77e624
Branches
Tags
No related merge requests found
...@@ -3059,7 +3059,8 @@ bool SplitCurve(int line_id, List_T *vertices_id, List_T *shapes) ...@@ -3059,7 +3059,8 @@ bool SplitCurve(int line_id, List_T *vertices_id, List_T *shapes)
List_Remove(s->Generatrices, j); List_Remove(s->Generatrices, j);
List_Insert_In_List(shapes, j, s->Generatrices); List_Insert_In_List(shapes, j, s->Generatrices);
j += List_Nbr(shapes) - 1; j += List_Nbr(shapes) - 1;
}else if(surface_curve->Num == -c->Num){ }
else if(surface_curve->Num == -c->Num){
List_Remove(s->Generatrices, j); List_Remove(s->Generatrices, j);
List_Insert_In_List(rshapes, j, s->Generatrices); List_Insert_In_List(rshapes, j, s->Generatrices);
j += List_Nbr(shapes) - 1; j += List_Nbr(shapes) - 1;
......
...@@ -415,6 +415,7 @@ void MElement::writePOS(FILE *fp, bool printElementary, bool printElementNumber, ...@@ -415,6 +415,7 @@ void MElement::writePOS(FILE *fp, bool printElementary, bool printElementNumber,
const char *str = getStringForPOS(); const char *str = getStringForPOS();
if(!str) return; if(!str) return;
setVolumePositive();
int n = getNumVertices(); int n = getNumVertices();
fprintf(fp, "%s(", str); fprintf(fp, "%s(", str);
for(int i = 0; i < n; i++){ for(int i = 0; i < n; i++){
...@@ -520,6 +521,7 @@ void MElement::writeSTL(FILE *fp, bool binary, double scalingFactor) ...@@ -520,6 +521,7 @@ void MElement::writeSTL(FILE *fp, bool binary, double scalingFactor)
void MElement::writeVRML(FILE *fp) void MElement::writeVRML(FILE *fp)
{ {
setVolumePositive();
for(int i = 0; i < getNumVertices(); i++) for(int i = 0; i < getNumVertices(); i++)
fprintf(fp, "%d,", getVertex(i)->getIndex() - 1); fprintf(fp, "%d,", getVertex(i)->getIndex() - 1);
fprintf(fp, "-1,\n"); fprintf(fp, "-1,\n");
...@@ -579,6 +581,7 @@ void MElement::writeUNV(FILE *fp, int num, int elementary, int physical) ...@@ -579,6 +581,7 @@ void MElement::writeUNV(FILE *fp, int num, int elementary, int physical)
void MElement::writeMESH(FILE *fp, int elementary) void MElement::writeMESH(FILE *fp, int elementary)
{ {
setVolumePositive();
for(int i = 0; i < getNumVertices(); i++) for(int i = 0; i < getNumVertices(); i++)
fprintf(fp, " %d", getVertex(i)->getIndex()); fprintf(fp, " %d", getVertex(i)->getIndex());
fprintf(fp, " %d\n", elementary); fprintf(fp, " %d\n", elementary);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment