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

- fixed 2 special cases in quad->prism extrusion (bad node ordering)

- fixed .msh save of negative volume 2nd order hexas
parent 6860914b
No related branches found
No related tags found
No related merge requests found
// $Id: 3D_Extrude.cpp,v 1.91 2006-01-06 00:34:25 geuzaine Exp $
// $Id: 3D_Extrude.cpp,v 1.92 2006-05-14 00:48:20 geuzaine Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -366,11 +366,11 @@ void Create_HexPri(int iEnt, Vertex * v[8])
if(j == 2) {
if(dup[0] == 0 && dup[1] == 1)
newp = Create_Prism(v[0], v[3], v[7], v[1], v[6], v[2]);
newp = Create_Prism(v[0], v[3], v[7], v[1], v[2], v[6]);
else if(dup[0] == 1 && dup[1] == 2)
newp = Create_Prism(v[0], v[1], v[4], v[3], v[2], v[7]);
else if(dup[0] == 2 && dup[1] == 3)
newp = Create_Prism(v[0], v[3], v[4], v[1], v[5], v[7]);
newp = Create_Prism(v[0], v[3], v[4], v[1], v[2], v[5]);
else if(dup[0] == 0 && dup[1] == 3)
newp = Create_Prism(v[0], v[1], v[5], v[3], v[2], v[6]);
else {
......
// $Id: Print_Mesh.cpp,v 1.74 2006-05-13 22:32:13 geuzaine Exp $
// $Id: Print_Mesh.cpp,v 1.75 2006-05-14 00:48:20 geuzaine Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -168,9 +168,7 @@ static void _msh_print_simplex(void *a, void *b)
type = TETRAHEDRON;
if(s->Volume_Simplexe() < 0) {
Vertex *temp;
temp = s->V[0];
s->V[0] = s->V[1];
s->V[1] = temp;
temp = s->V[0]; s->V[0] = s->V[1]; s->V[1] = temp;
}
}
}
......@@ -280,11 +278,12 @@ static void _msh_print_hexahedron(void *a, void *b)
Vertex *temp;
temp = h->V[0]; h->V[0] = h->V[2]; h->V[2] = temp;
temp = h->V[4]; h->V[4] = h->V[6]; h->V[6] = temp;
temp = h->VSUP[0]; h->VSUP[0] = h->VSUP[4]; h->VSUP[4] = temp;
temp = h->VSUP[1]; h->VSUP[1] = h->VSUP[10]; h->VSUP[10] = temp;
temp = h->VSUP[2]; h->VSUP[2] = h->VSUP[8]; h->VSUP[8] = temp;
temp = h->VSUP[5]; h->VSUP[5] = h->VSUP[6]; h->VSUP[6] = temp;
temp = h->VSUP[7]; h->VSUP[7] = h->VSUP[11]; h->VSUP[11] = temp;
Vertex *old[12];
for(int i = 0; i < 12; i++) old[i] = h->VSUP[i];
h->VSUP[0] = old[3]; h->VSUP[1] = old[5]; h->VSUP[2] = old[6];
h->VSUP[3] = old[0]; h->VSUP[4] = old[4]; h->VSUP[5] = old[1];
h->VSUP[6] = old[2]; h->VSUP[7] = old[7]; h->VSUP[8] = old[10];
h->VSUP[9] = old[11]; h->VSUP[10] = old[8]; h->VSUP[11] = old[9];
}
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment