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

treat quads in poly_rep_to_mesh: this way we can also extrude discrete
surfaces meshed with quads
parent 38def40a
No related branches found
No related tags found
No related merge requests found
// $Id: Print_Geo.cpp,v 1.36 2005-02-20 07:11:04 geuzaine Exp $ // $Id: Print_Geo.cpp,v 1.37 2005-03-14 18:12:29 geuzaine Exp $
// //
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
// //
...@@ -335,6 +335,7 @@ void Print_Discrete_Surface(void *a, void *b) ...@@ -335,6 +335,7 @@ void Print_Discrete_Surface(void *a, void *b)
norms.add(q->V[0]->Pos.X, q->V[0]->Pos.Y, q->V[0]->Pos.Z, n[0], n[1], n[2]); norms.add(q->V[0]->Pos.X, q->V[0]->Pos.Y, q->V[0]->Pos.Z, n[0], n[1], n[2]);
norms.add(q->V[1]->Pos.X, q->V[1]->Pos.Y, q->V[1]->Pos.Z, n[0], n[1], n[2]); norms.add(q->V[1]->Pos.X, q->V[1]->Pos.Y, q->V[1]->Pos.Z, n[0], n[1], n[2]);
norms.add(q->V[2]->Pos.X, q->V[2]->Pos.Y, q->V[2]->Pos.Z, n[0], n[1], n[2]); norms.add(q->V[2]->Pos.X, q->V[2]->Pos.Y, q->V[2]->Pos.Z, n[0], n[1], n[2]);
norms.add(q->V[3]->Pos.X, q->V[3]->Pos.Y, q->V[3]->Pos.Z, n[0], n[1], n[2]);
} }
if(!List_Nbr(s->Generatrices)) if(!List_Nbr(s->Generatrices))
......
// $Id: DiscreteSurface.cpp,v 1.5 2005-02-25 01:45:41 geuzaine Exp $ // $Id: DiscreteSurface.cpp,v 1.6 2005-03-14 18:12:29 geuzaine Exp $
// //
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
// //
...@@ -173,6 +173,17 @@ void POLY_rep_To_Mesh(POLY_rep *prep, Surface *s) ...@@ -173,6 +173,17 @@ void POLY_rep_To_Mesh(POLY_rep *prep, Surface *s)
simp->iEnt = s->Num; simp->iEnt = s->Num;
Tree_Add(s->Simplexes, &simp); Tree_Add(s->Simplexes, &simp);
} }
else if (points[0] == 4){
Vertex *v1 = verts[(int)points[1]];
Vertex *v2 = verts[(int)points[2]];
Vertex *v3 = verts[(int)points[3]];
Vertex *v4 = verts[(int)points[4]];
SetLC(v1, v2, v3, CTX.mesh.lc_factor);
v4->lc = v1->lc;
Quadrangle *quad = Create_Quadrangle(v1, v2, v3, v4);
quad->iEnt = s->Num;
Tree_Add(s->Quadrangles, &quad);
}
} }
Tree_Delete(VertexBound); Tree_Delete(VertexBound);
......
\input texinfo.tex @c -*-texinfo-*- \input texinfo.tex @c -*-texinfo-*-
@c $Id: gmsh.texi,v 1.177 2005-03-13 20:43:36 geuzaine Exp $ @c $Id: gmsh.texi,v 1.178 2005-03-14 18:12:29 geuzaine Exp $
@c @c
@c Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle @c Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
@c @c
...@@ -1609,8 +1609,8 @@ Discrete Surface (1) = @{4, 2@} ...@@ -1609,8 +1609,8 @@ Discrete Surface (1) = @{4, 2@}
@end example @end example
The polygonal discretization is used for the graphical representation of the The polygonal discretization is used for the graphical representation of the
surface and can also be used as the actual two-dimensional mesh of the surface and is also used as the actual two-dimensional mesh of the surface
surface if all the polygons are triangles. if all the polygons are triangles or quadrangles.
@c todo: @c todo:
@c @item Trimmed Surface ( @var{expression} ) = @{ @var{expression}, @{ @var{expression-list} @} @}; @c @item Trimmed Surface ( @var{expression} ) = @{ @var{expression}, @{ @var{expression-list} @} @};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment