diff --git a/Mesh/3D_Extrude_Old.cpp b/Mesh/3D_Extrude_Old.cpp index a1385a78210a2a4d54bd49e7fd1a359f3f72cfdf..f52685416ecf340572fc6954b58fec41048f4375 100644 --- a/Mesh/3D_Extrude_Old.cpp +++ b/Mesh/3D_Extrude_Old.cpp @@ -1,4 +1,4 @@ -// $Id: 3D_Extrude_Old.cpp,v 1.30 2005-02-20 06:36:54 geuzaine Exp $ +// $Id: 3D_Extrude_Old.cpp,v 1.31 2005-02-25 01:45:41 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -644,6 +644,8 @@ static void Extrude_Point(void *data, void *dum) LineLayer[i] = (int)(4 * K1) + (int)((i + 1) * K2) + v->Num; } + // only extrude points for which a mesh vertex exists with the same + // number (i.e., start & end points of curves) if((pV2 = (Vertex **) Tree_PQuery(THEM->Vertices, pV))) { Extrude_Vertex(pV2, NULL); Extrude_Pnt(*pV2); diff --git a/Mesh/DiscreteSurface.cpp b/Mesh/DiscreteSurface.cpp index e3344162959b7d1a4b35bd90e3d2efc23a839a01..1f81659468cfa15516b4eceb44eec7f24dafbab6 100644 --- a/Mesh/DiscreteSurface.cpp +++ b/Mesh/DiscreteSurface.cpp @@ -1,4 +1,4 @@ -// $Id: DiscreteSurface.cpp,v 1.4 2005-02-20 16:41:02 geuzaine Exp $ +// $Id: DiscreteSurface.cpp,v 1.5 2005-02-25 01:45:41 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -513,7 +513,18 @@ void SEGM_rep_To_Mesh(SEGM_rep *srep, Curve *c) for(int i = 0; i < List_Nbr(srep->points); i+=3){ double *point = (double*)List_Pointer(srep->points, i); - Vertex *v = Create_Vertex(++THEM->MaxPointNum, point[0], point[1], point[2], 1.0, 0.0); + // if the curve's end points exist, use their identification + // numbers (that's how we do things in 1D_Mesh, and it makes + // things easier for point extrusions in the old extrusion + // algorithm) + int num; + if(i == 0 && c->beg) + num = c->beg->Num; + else if(i/3 == N-1 && c->end) + num = c->end->Num; + else + num = ++THEM->MaxPointNum; + Vertex *v = Create_Vertex(num, point[0], point[1], point[2], 1.0, 0.0); Vertex **pv; if(!(pv = (Vertex**)Tree_PQuery(VertexBound, &v))){ Tree_Add(VertexBound, &v);