/[escript]/trunk/pycad/py_src/gmsh.py
ViewVC logotype

Diff of /trunk/pycad/py_src/gmsh.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1311 by gross, Thu May 10 08:11:31 2007 UTC revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1  # $Id:$  #
2    # $Id$
3    #
4    #######################################################
5    #
6    #           Copyright 2003-2007 by ACceSS MNRF
7    #       Copyright 2007 by University of Queensland
8    #
9    #                http://esscc.uq.edu.au
10    #        Primary Business: Queensland, Australia
11    #  Licensed under the Open Software License version 3.0
12    #     http://www.opensource.org/licenses/osl-3.0.php
13    #
14    #######################################################
15    #
16    
17  """  """
18  mesh generation using gmsh  mesh generation using gmsh
# Line 25  __date__="$Date:$" Line 39  __date__="$Date:$"
39  import design  import design
40  import tempfile  import tempfile
41  import os  import os
42  from primitives import Point, Spline, BezierCurve, BSpline, Line, Arc, CurveLoop, RuledSurface, PlaneSurface, SurfaceLoop, Volume, PropertySet  from primitives import Point, Spline, BezierCurve, BSpline, Line, Arc, CurveLoop, RuledSurface, PlaneSurface, SurfaceLoop, Volume, PropertySet, Ellipse
43    
44  class Design(design.Design):  class Design(design.Design):
45      """      """
# Line 89  class Design(design.Design): Line 103  class Design(design.Design):
103          clean up          clean up
104          """          """
105          if not self.keepFiles():          if not self.keepFiles():
             try:  
106                 os.unlink(self.getScriptFileName())                 os.unlink(self.getScriptFileName())
107                 os.unlink(self.getMeshFileName())                 os.unlink(self.getMeshFileName())
             except OSError:  
                pass  
108      def getCommandString(self):      def getCommandString(self):
109          """          """
110          returns the gmsh comand          returns the gmsh comand
# Line 156  class Design(design.Design): Line 167  class Design(design.Design):
167             elif isinstance(p, Arc):             elif isinstance(p, Arc):
168                out+="Circle(%s) = {%s, %s, %s};\n"%(p.getID(),p.getStartPoint().getDirectedID(),p.getCenterPoint().getDirectedID(),p.getEndPoint().getDirectedID())                out+="Circle(%s) = {%s, %s, %s};\n"%(p.getID(),p.getStartPoint().getDirectedID(),p.getCenterPoint().getDirectedID(),p.getEndPoint().getDirectedID())
169                
170               elif isinstance(p, Ellipse):
171                  out+="Ellipse(%s) = {%s, %s, %s, %s};\n"%(p.getID(),p.getStartPoint().getDirectedID(),p.getCenterPoint().getDirectedID(),p.getPointOnMainAxis().getDirectedID(), p.getEndPoint().getDirectedID())
172    
173             elif isinstance(p, CurveLoop):             elif isinstance(p, CurveLoop):
174                 out+="Line Loop(%s) = {%s};\n"%(p.getID(),self.__mkArgs(p.getCurves()))                 out+="Line Loop(%s) = {%s};\n"%(p.getID(),self.__mkArgs(p.getCurves()))
175                

Legend:
Removed from v.1311  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26