Index: realSpaceModeling/geoshapespy/geoshapespymodule/Make.mm
===================================================================
--- realSpaceModeling/geoshapespy/geoshapespymodule/Make.mm	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/geoshapespy/geoshapespymodule/Make.mm	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,32 @@
+# -*- Makefile -*-
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#                               Michael A.G. Aivazis
+#                        California Institute of Technology
+#                        (C) 1998-2005  All Rights Reserved
+#
+# <LicenseText>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+
+PROJECT = SANSsimulation
+PACKAGE = geoshapespymodule
+MODULE = geoshapespy
+
+include std-pythonmodule.def
+include local.def
+
+PROJ_CXX_SRCLIB = -lgeoshapespy
+
+PROJ_SRCS = \
+    bindings.cc \
+    exceptions.cc \
+    misc.cc
+
+
+# version
+# $Id$
+
+# End of file
Index: realSpaceModeling/geoshapespy/geoshapespymodule/bindings.cc
===================================================================
--- realSpaceModeling/geoshapespy/geoshapespymodule/bindings.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/geoshapespy/geoshapespymodule/bindings.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,63 @@
+// -*- C++ -*-
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+//                               Michael A.G. Aivazis
+//                        California Institute of Technology
+//                        (C) 1998-2005  All Rights Reserved
+// 
+//  <LicenseText>
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+
+//#include <portinfo>
+#include <Python.h>
+
+#include "bindings.h"
+
+#include "misc.h"          // miscellaneous methods
+
+// the method table
+
+struct PyMethodDef pygeoshapespy_methods[] = {
+
+   //geoshapes methods: set_orientation; set_center
+   {pygeoshapespy_set_orientation__name__, pygeoshapespy_set_orientation,
+    METH_VARARGS, pygeoshapespy_set_orientation__doc__},
+
+   {pygeoshapespy_set_center__name__, pygeoshapespy_set_center,
+    METH_VARARGS, pygeoshapespy_set_center__doc__},
+
+   // new sphere
+   {pyanalmodelpy_new_sphere__name__, pyanalmodelpy_new_sphere,
+    METH_VARARGS, pyanalmodelpy_new_sphere__doc__},
+
+   // new cylinder
+   {pyanalmodelpy_new_cylinder__name__, pyanalmodelpy_new_cylinder,
+    METH_VARARGS, pyanalmodelpy_new_cylinder__doc__},
+
+   // new ellipsoid
+   {pyanalmodelpy_new_ellipsoid__name__, pyanalmodelpy_new_ellipsoid,
+    METH_VARARGS, pyanalmodelpy_new_ellipsoid__doc__},
+
+   // new hollowsphere
+   {pyanalmodelpy_new_hollowsphere__name__, pyanalmodelpy_new_hollowsphere,
+    METH_VARARGS, pyanalmodelpy_new_hollowsphere__doc__},
+
+   // new singlehelix
+   {pyanalmodelpy_new_singlehelix__name__, pyanalmodelpy_new_singlehelix,
+    METH_VARARGS, pyanalmodelpy_new_singlehelix__doc__},
+
+   {pygeoshapespy_copyright__name__, pygeoshapespy_copyright,
+    METH_VARARGS, pygeoshapespy_copyright__doc__},
+
+
+// Sentinel
+    {0, 0}
+};
+
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/geoshapespy/geoshapespymodule/bindings.h
===================================================================
--- realSpaceModeling/geoshapespy/geoshapespymodule/bindings.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/geoshapespy/geoshapespymodule/bindings.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,26 @@
+// -*- C++ -*-
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+//                               Michael A.G. Aivazis
+//                        California Institute of Technology
+//                        (C) 1998-2005  All Rights Reserved
+// 
+//  <LicenseText>
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+
+#if !defined(pygeoshapespy_bindings_h)
+#define pygeoshapespy_bindings_h
+
+// the method table
+
+extern struct PyMethodDef pygeoshapespy_methods[];
+
+#endif
+
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/geoshapespy/geoshapespymodule/exceptions.cc
===================================================================
--- realSpaceModeling/geoshapespy/geoshapespymodule/exceptions.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/geoshapespy/geoshapespymodule/exceptions.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,22 @@
+// -*- C++ -*-
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+//                               Michael A.G. Aivazis
+//                        California Institute of Technology
+//                        (C) 1998-2005  All Rights Reserved
+// 
+//  <LicenseText>
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+
+//#include <portinfo>
+#include <Python.h>
+
+PyObject *pygeoshapespy_runtimeError = 0;
+    
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/geoshapespy/geoshapespymodule/exceptions.h
===================================================================
--- realSpaceModeling/geoshapespy/geoshapespymodule/exceptions.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/geoshapespy/geoshapespymodule/exceptions.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,26 @@
+// -*- C++ -*-
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+//                               Michael A.G. Aivazis
+//                        California Institute of Technology
+//                        (C) 1998-2005  All Rights Reserved
+// 
+//  <LicenseText>
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+
+#if !defined(pygeoshapespy_exceptions_h)
+#define pygeoshapespy_exceptions_h
+
+// exceptions
+
+extern PyObject *pygeoshapespy_runtimeError;
+
+#endif
+
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/geoshapespy/geoshapespymodule/geoshapespymodule.cc
===================================================================
--- realSpaceModeling/geoshapespy/geoshapespymodule/geoshapespymodule.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/geoshapespy/geoshapespymodule/geoshapespymodule.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,44 @@
+// -*- C++ -*-
+
+#include <Python.h>
+
+
+#include "exceptions.h"
+#include "bindings.h"
+#include "myutil.h"
+
+
+char pygeoshapespy_module__doc__[] = "";
+
+// Initialization function for the module (*must* be called initgeoshapespy)
+extern "C"
+void
+initgeoshapespy()
+{
+    // create the module and add the functions
+    PyObject * m = Py_InitModule4(
+        "geoshapespy", pygeoshapespy_methods,
+        pygeoshapespy_module__doc__, 0, PYTHON_API_VERSION);
+
+    // get its dictionary
+    PyObject * d = PyModule_GetDict(m);
+
+    // check for errors
+    if (PyErr_Occurred()) {
+        Py_FatalError("can't initialize module geoshapespy");
+    }
+
+    // install the module exceptions
+    pygeoshapespy_runtimeError = PyErr_NewException("geoshapespy.runtime", 0, 0);
+    PyDict_SetItemString(d, "RuntimeException", pygeoshapespy_runtimeError);
+
+	// Seed the random number generator
+	seed_rnd();
+
+    return;
+}
+
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/geoshapespy/geoshapespymodule/local.def
===================================================================
--- realSpaceModeling/geoshapespy/geoshapespymodule/local.def	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/geoshapespy/geoshapespymodule/local.def	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,24 @@
+# -*- Makefile -*-
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#                               Michael A.G. Aivazis
+#                        California Institute of Technology
+#                        (C) 1998-2005  All Rights Reserved
+#
+# <LicenseText>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+
+# C++
+
+    PROJ_CXX_INCLUDES = ../libgeoshapespy   \
+			../../iqPy/libiqPy  \
+			../../iqPy/libiqPy/tnt  \
+			../../pointsmodelpy/libpointsmodelpy
+
+# version
+# $Id$
+
+# End of file
Index: realSpaceModeling/geoshapespy/geoshapespymodule/misc.cc
===================================================================
--- realSpaceModeling/geoshapespy/geoshapespymodule/misc.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/geoshapespy/geoshapespymodule/misc.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,190 @@
+// -*- C++ -*-
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+//                               Michael A.G. Aivazis
+//                        California Institute of Technology
+//                        (C) 1998-2005  All Rights Reserved
+// 
+//  <LicenseText>
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+
+//#include <portinfo>
+#include <Python.h>
+
+#include "misc.h"
+#include "sphere.h"
+#include "cylinder.h"
+#include "ellipsoid.h"
+#include "hollow_sphere.h"
+#include "single_helix.h"
+
+// copyright
+
+char pygeoshapespy_copyright__doc__[] = "";
+char pygeoshapespy_copyright__name__[] = "copyright";
+
+static char pygeoshapespy_copyright_note[] = 
+    "geoshapespy python module: Copyright (c) 1998-2005 Michael A.G. Aivazis";
+
+
+PyObject * pygeoshapespy_copyright(PyObject *, PyObject *)
+{
+    return Py_BuildValue("s", pygeoshapespy_copyright_note);
+}
+
+//GeoShape methods
+char pygeoshapespy_set_orientation__name__[] = "set_orientation";
+char pygeoshapespy_set_orientation__doc__[] = "Set the rotation angles";
+
+PyObject * pygeoshapespy_set_orientation(PyObject *, PyObject *args){
+  PyObject *pyshape = 0;
+  double angX=0,angY=0,angZ=0;
+  
+  int ok = PyArg_ParseTuple(args, "Oddd", &pyshape,&angX,&angY,&angZ); 
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pyshape);
+
+  GeoShape *shape = static_cast<GeoShape *>(temp);
+
+  shape->SetOrientation(angX,angY,angZ);
+
+  return Py_BuildValue("i", 0);
+}
+
+char pygeoshapespy_set_center__name__[] = "set_center";
+char pygeoshapespy_set_center__doc__[] = "new center for points translation";
+
+PyObject * pygeoshapespy_set_center(PyObject *, PyObject *args){
+
+  PyObject *pyshape = 0;
+  double tranX=0,tranY=0,tranZ=0;
+  
+  int ok = PyArg_ParseTuple(args, "Oddd", &pyshape,&tranX,&tranY,&tranZ); 
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pyshape);
+
+  GeoShape *shape = static_cast<GeoShape *>(temp);
+
+  shape->SetCenter(tranX,tranY,tranZ);
+
+  return Py_BuildValue("i", 0);
+}
+
+//Sphere constructor
+char pyanalmodelpy_new_sphere__name__[] = "new_sphere";
+char pyanalmodelpy_new_sphere__doc__[] = "sphere constructor";
+
+PyObject * pyanalmodelpy_new_sphere(PyObject *, PyObject *args){
+  double r;
+  int ok = PyArg_ParseTuple(args,"d",&r);
+  if(!ok) return 0;
+
+  Sphere *newsph = new Sphere(r);
+
+  return PyCObject_FromVoidPtr(newsph, PyDelSphere);
+}
+
+static void PyDelSphere(void *ptr){
+  Sphere * oldsph = static_cast<Sphere *>(ptr);
+  delete oldsph;
+
+  return;
+}
+
+//Cylinder constructor
+char pyanalmodelpy_new_cylinder__name__[] = "new_cylinder";
+char pyanalmodelpy_new_cylinder__doc__[] = "cylinder constructor";
+
+PyObject * pyanalmodelpy_new_cylinder(PyObject *, PyObject *args){
+  double r,h;
+  int ok = PyArg_ParseTuple(args,"dd",&r,&h);
+  if(!ok) return 0;
+
+  Cylinder *newcyl = new Cylinder(r,h);
+
+  return PyCObject_FromVoidPtr(newcyl, PyDelCylinder);
+}
+
+static void PyDelCylinder(void *ptr){
+  Cylinder * oldcyl = static_cast<Cylinder *>(ptr);
+  delete oldcyl;
+
+  return;
+}
+
+//Ellipsoid constructor
+char pyanalmodelpy_new_ellipsoid__name__[] = "new_ellipsoid";
+char pyanalmodelpy_new_ellipsoid__doc__[] = "ellipsoid constructor";
+
+PyObject * pyanalmodelpy_new_ellipsoid(PyObject *, PyObject *args){
+  double rx,ry,rz;
+  int ok = PyArg_ParseTuple(args,"ddd",&rx,&ry,&rz);
+  if(!ok) return 0;
+
+  Ellipsoid *newelli = new Ellipsoid(rx,ry,rz);
+
+  return PyCObject_FromVoidPtr(newelli, PyDelEllipsoid);
+}
+
+static void PyDelEllipsoid(void *ptr){
+  Ellipsoid * oldelli = static_cast<Ellipsoid *>(ptr);
+  delete oldelli;
+
+  return;
+}
+
+//Hollow Sphere constructor & methods
+char pyanalmodelpy_new_hollowsphere__name__[] = "new_hollowsphere";
+char pyanalmodelpy_new_hollowsphere__doc__[] = "";
+
+PyObject * pyanalmodelpy_new_hollowsphere(PyObject *, PyObject *args)
+{
+  double r, th;
+  int ok = PyArg_ParseTuple(args,"dd",&r, &th);
+  if(!ok) return 0;
+
+  HollowSphere *newhosph = new HollowSphere(r,th);
+
+  return PyCObject_FromVoidPtr(newhosph, PyDelHollowSphere);
+
+}
+
+static void PyDelHollowSphere(void *ptr)
+{
+  HollowSphere * oldhosph = static_cast<HollowSphere *>(ptr);
+  delete oldhosph;
+  return;
+}
+
+//Single Helix constructor & methods
+char pyanalmodelpy_new_singlehelix__name__[] = "new_singlehelix";
+char pyanalmodelpy_new_singlehelix__doc__[] = "";
+
+PyObject * pyanalmodelpy_new_singlehelix(PyObject *, PyObject *args)
+{
+  double hr,tr,pitch,turns;
+  int ok = PyArg_ParseTuple(args,"dddd",&hr,&tr,&pitch,&turns);
+  if(!ok) return 0;
+
+  SingleHelix *newsinhel = new SingleHelix(hr,tr,pitch,turns);
+
+  return PyCObject_FromVoidPtr(newsinhel, PyDelSingleHelix);
+
+}
+
+static void PyDelSingleHelix(void *ptr)
+{
+  SingleHelix * oldsinhel = static_cast<SingleHelix *>(ptr);
+  delete oldsinhel;
+  return;
+}
+    
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/geoshapespy/geoshapespymodule/misc.h
===================================================================
--- realSpaceModeling/geoshapespy/geoshapespymodule/misc.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/geoshapespy/geoshapespymodule/misc.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,79 @@
+// -*- C++ -*-
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+//                               Michael A.G. Aivazis
+//                        California Institute of Technology
+//                        (C) 1998-2005  All Rights Reserved
+// 
+//  <LicenseText>
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+
+#if !defined(pygeoshapespy_misc_h)
+#define pygeoshapespy_misc_h
+
+// copyright
+extern char pygeoshapespy_copyright__name__[];
+extern char pygeoshapespy_copyright__doc__[];
+extern "C"
+PyObject * pygeoshapespy_copyright(PyObject *, PyObject *);
+
+//GeoShape methods
+extern char pygeoshapespy_set_orientation__name__[];
+extern char pygeoshapespy_set_orientation__doc__[];
+extern "C"
+PyObject * pygeoshapespy_set_orientation(PyObject *, PyObject *);
+
+extern char pygeoshapespy_set_center__name__[];
+extern char pygeoshapespy_set_center__doc__[];
+extern "C"
+PyObject * pygeoshapespy_set_center(PyObject *, PyObject *);
+
+//Sphere constructor & methods
+extern char pyanalmodelpy_new_sphere__name__[];
+extern char pyanalmodelpy_new_sphere__doc__[];
+extern "C"
+PyObject * pyanalmodelpy_new_sphere(PyObject *, PyObject *);
+
+static void PyDelSphere(void *);
+
+//Cylinder constructor & methods
+extern char pyanalmodelpy_new_cylinder__name__[];
+extern char pyanalmodelpy_new_cylinder__doc__[];
+extern "C"
+PyObject * pyanalmodelpy_new_cylinder(PyObject *, PyObject *);
+
+static void PyDelCylinder(void *);
+
+//Ellipsoid constructor & method
+extern char pyanalmodelpy_new_ellipsoid__name__[];
+extern char pyanalmodelpy_new_ellipsoid__doc__[];
+extern "C"
+PyObject * pyanalmodelpy_new_ellipsoid(PyObject *, PyObject *);
+
+static void PyDelEllipsoid(void *);
+
+//Hollow Sphere constructor & methods
+extern char pyanalmodelpy_new_hollowsphere__name__[];
+extern char pyanalmodelpy_new_hollowsphere__doc__[];
+extern "C"
+PyObject * pyanalmodelpy_new_hollowsphere(PyObject *, PyObject *);
+
+static void PyDelHollowSphere(void *);
+
+//Single Helix constructor & methods
+extern char pyanalmodelpy_new_singlehelix__name__[];
+extern char pyanalmodelpy_new_singlehelix__doc__[];
+extern "C"
+PyObject * pyanalmodelpy_new_singlehelix(PyObject *, PyObject *);
+
+static void PyDelSingleHelix(void *);
+
+#endif
+
+// version
+// $Id$
+
+// End of file
