~ubuntu-branches/ubuntu/karmic/gmsh/karmic

« back to all changes in this revision

Viewing changes to Mesh/meshGEdgeExtruded.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme, Christophe Prud'homme, Daniel Leidert
  • Date: 2008-05-18 12:46:05 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080518124605-716xqbqeo07o497k
Tags: 2.2.0-2
[Christophe Prud'homme]
* Bug fix: "gmsh ships no .desktop", thanks to Vassilis Pandis (Closes:
  #375770). Applied the Ubuntu patch.

[Daniel Leidert]
* debian/control (Vcs-Svn): Fixed.
  (Build-Depends): Use texlive instead of tetex-bin.
* debian/gmsh.doc-base (Section): Fixed accordingly to doc-base (>= 0.8.10).
* debian/rules: Removed some variable declarations, that lead to double
  configuration and seem to be useless.
  (build/gmsh): Try to avoid multiple runs by using a stamp.
  (orig-tarball): Renamed to get-orig-source and changed to use uscan.
* debian/watch: Added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// $Id: meshGEdgeExtruded.cpp,v 1.6 2007-01-16 11:31:41 geuzaine Exp $
 
1
// $Id: meshGEdgeExtruded.cpp,v 1.12 2008-03-20 11:44:08 geuzaine Exp $
2
2
//
3
 
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 
3
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
4
4
//
5
5
// This program is free software; you can redistribute it and/or modify
6
6
// it under the terms of the GNU General Public License as published by
20
20
// Please report all bugs and problems to <gmsh@geuz.org>.
21
21
 
22
22
#include <set>
 
23
#include "GModel.h"
 
24
#include "MElement.h"
23
25
#include "ExtrudeParams.h"
24
 
#include "GModel.h"
25
26
#include "Message.h"
26
27
 
27
28
void extrudeMesh(GVertex *from, GEdge *to)
34
35
      double x = v->x(), y = v->y(), z = v->z();
35
36
      ep->Extrude(j, k + 1, x, y, z);
36
37
      if(j != ep->mesh.NbLayer - 1 || k != ep->mesh.NbElmLayer[j] - 1)
37
 
        to->mesh_vertices.push_back(new MEdgeVertex(x, y, z, to, ep->u(j, k + 1)));
 
38
        to->mesh_vertices.push_back(new MEdgeVertex(x, y, z, to, ep->u(j, k + 1)));
38
39
    }
39
40
  }
40
41
}
54
55
    MVertex *v = from->mesh_vertices[index];
55
56
    double x = v->x(), y = v->y(), z = v->z();
56
57
    ep->Extrude(ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1], 
57
 
                x, y, z);
 
58
                x, y, z);
58
59
    double u;
59
60
    v->getParameter(0, u);
60
61
    double newu = (direction > 0) ? u : (u_max - u + u_min);
75
76
  }
76
77
  else {
77
78
    // curve is a copy of another curve (the "top" of the extrusion)
78
 
    GEdge *from = ge->model()->edgeByTag(std::abs(ep->geo.Source));
 
79
    GEdge *from = ge->model()->getEdgeByTag(std::abs(ep->geo.Source));
79
80
    if(!from){
80
81
      Msg(GERROR, "Unknown source curve %d for extrusion", ep->geo.Source);
81
82
      return 0;