From 75f21c2b695ebb822294bf7f96c148a5ff70f7c6 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Sun, 15 Nov 2020 21:40:01 +0100
Subject: [PATCH] rename class and sources Lattice -> Lattice3D

---
 Core/Export/SampleLabelHandler.cpp            |   4 +-
 Core/Export/SampleLabelHandler.h              |   8 +-
 Core/Export/SampleToPython.cpp                |   8 +-
 .../ex04_ComplexShapes/MesoCrystal.py         |   2 +-
 GUI/coregui/Models/MesoCrystalItem.cpp        |   6 +-
 GUI/coregui/Models/MesoCrystalItem.h          |   4 +-
 .../InterferenceFunction3DLattice.cpp         |   4 +-
 .../Aggregate/InterferenceFunction3DLattice.h |   8 +-
 .../InterferenceFunctionFinite3DLattice.cpp   |   8 +-
 .../InterferenceFunctionFinite3DLattice.h     |  10 +-
 Sample/Lattice/BakeLattice.cpp                |  26 +-
 Sample/Lattice/BakeLattice.h                  |  14 +-
 Sample/Lattice/{Lattice.cpp => Lattice3D.cpp} |  35 +-
 Sample/Lattice/{Lattice.h => Lattice3D.h}     |  16 +-
 Sample/Particle/Crystal.cpp                   |   8 +-
 Sample/Particle/Crystal.h                     |  10 +-
 Sample/Particle/FormFactorCrystal.cpp         |   2 +-
 Sample/Particle/FormFactorCrystal.h           |   6 +-
 Sample/StandardSamples/MesoCrystalBuilder.cpp |   2 +-
 Tests/Performance/Core/Mesocrystal.cpp        |   4 +-
 Tests/UnitTests/Core/Sample/CrystalTest.cpp   |   2 +-
 Tests/UnitTests/Core/Sample/LatticeTest.cpp   |  28 +-
 .../UnitTests/Core/Sample/MesoCrystalTest.cpp |   2 +-
 Wrap/swig/libBornAgainSample.i                |   4 +-
 auto/Wrap/doxygenCore.i                       |   4 +-
 auto/Wrap/doxygenSample.i                     | 152 ++---
 auto/Wrap/libBornAgainSample.py               | 142 ++---
 auto/Wrap/libBornAgainSample_wrap.cpp         | 572 +++++++++---------
 28 files changed, 546 insertions(+), 545 deletions(-)
 rename Sample/Lattice/{Lattice.cpp => Lattice3D.cpp} (77%)
 rename Sample/Lattice/{Lattice.h => Lattice3D.h} (87%)

diff --git a/Core/Export/SampleLabelHandler.cpp b/Core/Export/SampleLabelHandler.cpp
index ae2dc36fb73..529291f3aab 100644
--- a/Core/Export/SampleLabelHandler.cpp
+++ b/Core/Export/SampleLabelHandler.cpp
@@ -53,7 +53,7 @@ std::string SampleLabelHandler::labelMaterial(const Material* mat)
     return m_MaterialLabel[mat];
 }
 
-std::string SampleLabelHandler::labelLattice(const Lattice* lat)
+std::string SampleLabelHandler::labelLattice(const Lattice3D* lat)
 {
     return m_LatticeLabel[lat];
 }
@@ -136,7 +136,7 @@ void SampleLabelHandler::insertMaterial(const Material* mat)
     m_MaterialLabel.insert(mat, label);
 }
 
-void SampleLabelHandler::insertLattice(const Lattice* sample)
+void SampleLabelHandler::insertLattice(const Lattice3D* sample)
 {
     std::string label = "lattice_" + std::to_string(m_LatticeLabel.size() + 1);
     m_LatticeLabel.insert(sample, label);
diff --git a/Core/Export/SampleLabelHandler.h b/Core/Export/SampleLabelHandler.h
index 818f6f89272..09712d421fa 100644
--- a/Core/Export/SampleLabelHandler.h
+++ b/Core/Export/SampleLabelHandler.h
@@ -25,7 +25,7 @@ class IInterferenceFunction;
 class ParticleLayout;
 class Material;
 class IRotation;
-class Lattice;
+class Lattice3D;
 class Layer;
 class LayerRoughness;
 class MultiLayer;
@@ -51,7 +51,7 @@ public:
     typedef LabelMap<const Layer*> layers_t;
     typedef LabelMap<const ParticleLayout*> layouts_t;
     typedef LabelMap<const Material*> materials_t;
-    typedef LabelMap<const Lattice*> lattices_t;
+    typedef LabelMap<const Lattice3D*> lattices_t;
     typedef LabelMap<const MesoCrystal*> mesocrystals_t;
     typedef LabelMap<const MultiLayer*> multilayers_t;
     typedef LabelMap<const ParticleComposition*> particlecompositions_t;
@@ -84,7 +84,7 @@ public:
     std::string labelLayer(const Layer* sample);
     std::string labelLayout(const ParticleLayout* sample);
     std::string labelMaterial(const Material* sample);
-    std::string labelLattice(const Lattice* sample);
+    std::string labelLattice(const Lattice3D* sample);
     std::string labelMultiLayer(const MultiLayer* sample);
     std::string labelParticle(const IAbstractParticle* sample);
     std::string labelRotation(const IRotation* sample);
@@ -96,7 +96,7 @@ public:
     void insertLayer(const Layer* sample);
     void insertLayout(const ParticleLayout* sample);
     void insertMaterial(const Material* sample);
-    void insertLattice(const Lattice* sample);
+    void insertLattice(const Lattice3D* sample);
     void insertMesoCrystal(const MesoCrystal* sample);
     void insertMultiLayer(const MultiLayer* sample);
     void insertParticleComposition(const ParticleComposition* sample);
diff --git a/Core/Export/SampleToPython.cpp b/Core/Export/SampleToPython.cpp
index fe53ebdefa3..12e167f9752 100644
--- a/Core/Export/SampleToPython.cpp
+++ b/Core/Export/SampleToPython.cpp
@@ -66,7 +66,7 @@ void SampleToPython::initLabels(const MultiLayer& multilayer)
         m_label->insertParticleComposition(x);
     for (auto x : INodeUtils::AllDescendantsOfType<ParticleDistribution>(multilayer))
         m_label->insertParticleDistribution(x);
-    for (auto x : INodeUtils::AllDescendantsOfType<Lattice>(multilayer))
+    for (auto x : INodeUtils::AllDescendantsOfType<Lattice3D>(multilayer))
         m_label->insertLattice(x);
     for (auto x : INodeUtils::AllDescendantsOfType<Crystal>(multilayer))
         m_label->insertCrystal(x);
@@ -294,12 +294,12 @@ std::string SampleToPython::defineLattices() const
     result << std::setprecision(12);
     result << "\n" << indent() << "# Defining 3D lattices\n";
     for (auto it = themap->begin(); it != themap->end(); ++it) {
-        const Lattice* p_lattice = it->first;
+        const Lattice3D* p_lattice = it->first;
         std::string lattice_name = it->second;
         kvector_t bas_a = p_lattice->getBasisVectorA();
         kvector_t bas_b = p_lattice->getBasisVectorB();
         kvector_t bas_c = p_lattice->getBasisVectorC();
-        result << indent() << lattice_name << " = ba.Lattice(\n";
+        result << indent() << lattice_name << " = ba.Lattice3D(\n";
         result << indent() << indent() << "ba.kvector_t(" << pyfmt::printNm(bas_a.x()) << ", "
                << pyfmt::printNm(bas_a.y()) << ", " << pyfmt::printNm(bas_a.z()) << "),\n";
         result << indent() << indent() << "ba.kvector_t(" << pyfmt::printNm(bas_b.x()) << ", "
@@ -321,7 +321,7 @@ std::string SampleToPython::defineCrystals() const
     for (auto it = themap->begin(); it != themap->end(); ++it) {
         const Crystal* p_crystal = it->first;
         std::string crystal_name = it->second;
-        auto p_lattice = INodeUtils::OnlyChildOfType<Lattice>(*p_crystal);
+        auto p_lattice = INodeUtils::OnlyChildOfType<Lattice3D>(*p_crystal);
         auto p_basis = INodeUtils::OnlyChildOfType<IParticle>(*p_crystal);
         if (!p_lattice || !p_basis)
             continue;
diff --git a/Examples/python/simulation/ex04_ComplexShapes/MesoCrystal.py b/Examples/python/simulation/ex04_ComplexShapes/MesoCrystal.py
index cb7550db810..857aa322b49 100644
--- a/Examples/python/simulation/ex04_ComplexShapes/MesoCrystal.py
+++ b/Examples/python/simulation/ex04_ComplexShapes/MesoCrystal.py
@@ -18,7 +18,7 @@ def get_sample():
     lattice_basis_1 = ba.kvector_t(5.0, 0.0, 0.0)
     lattice_basis_2 = ba.kvector_t(0.0, 5.0, 0.0)
     lattice_basis_3 = ba.kvector_t(0.0, 0.0, 5.0)
-    lattice = ba.Lattice(lattice_basis_1, lattice_basis_2, lattice_basis_3)
+    lattice = ba.Lattice3D(lattice_basis_1, lattice_basis_2, lattice_basis_3)
 
     # spherical particle that forms the base of the mesocrystal
     sphere_ff = ba.FormFactorFullSphere(2*nm)
diff --git a/GUI/coregui/Models/MesoCrystalItem.cpp b/GUI/coregui/Models/MesoCrystalItem.cpp
index a5981f4137d..c2e9eada648 100644
--- a/GUI/coregui/Models/MesoCrystalItem.cpp
+++ b/GUI/coregui/Models/MesoCrystalItem.cpp
@@ -109,7 +109,7 @@ MesoCrystalItem::MesoCrystalItem() : SessionGraphicsItem("MesoCrystal")
 
 std::unique_ptr<MesoCrystal> MesoCrystalItem::createMesoCrystal() const
 {
-    const Lattice& lattice = getLattice();
+    const Lattice3D& lattice = getLattice();
     if (!(lattice.unitCellVolume() > 0.0))
         throw GUIHelpers::Error("MesoCrystalItem::createMesoCrystal(): "
                                 "Lattice volume not strictly positive");
@@ -140,12 +140,12 @@ QStringList MesoCrystalItem::translateList(const QStringList& list) const
     return result;
 }
 
-Lattice MesoCrystalItem::getLattice() const
+Lattice3D MesoCrystalItem::getLattice() const
 {
     const kvector_t a1 = GetVectorItem(*this, P_VECTOR_A);
     const kvector_t a2 = GetVectorItem(*this, P_VECTOR_B);
     const kvector_t a3 = GetVectorItem(*this, P_VECTOR_C);
-    return Lattice(a1, a2, a3);
+    return Lattice3D(a1, a2, a3);
 }
 
 std::unique_ptr<IParticle> MesoCrystalItem::getBasis() const
diff --git a/GUI/coregui/Models/MesoCrystalItem.h b/GUI/coregui/Models/MesoCrystalItem.h
index 615e811b000..edfd9e2799a 100644
--- a/GUI/coregui/Models/MesoCrystalItem.h
+++ b/GUI/coregui/Models/MesoCrystalItem.h
@@ -16,7 +16,7 @@
 #define BORNAGAIN_GUI_COREGUI_MODELS_MESOCRYSTALITEM_H
 
 #include "GUI/coregui/Models/SessionGraphicsItem.h"
-#include "Sample/Lattice/Lattice.h"
+#include "Sample/Lattice/Lattice3D.h"
 
 class IFormFactor;
 class IParticle;
@@ -37,7 +37,7 @@ public:
 
     QStringList translateList(const QStringList& list) const override;
 
-    Lattice getLattice() const;
+    Lattice3D getLattice() const;
     std::unique_ptr<IParticle> getBasis() const;
     std::unique_ptr<IFormFactor> getOuterShape() const;
 };
diff --git a/Sample/Aggregate/InterferenceFunction3DLattice.cpp b/Sample/Aggregate/InterferenceFunction3DLattice.cpp
index 73188ec40c4..e30ba925666 100644
--- a/Sample/Aggregate/InterferenceFunction3DLattice.cpp
+++ b/Sample/Aggregate/InterferenceFunction3DLattice.cpp
@@ -17,7 +17,7 @@
 #include "Sample/Correlations/IPeakShape.h"
 #include <algorithm>
 
-InterferenceFunction3DLattice::InterferenceFunction3DLattice(const Lattice& lattice)
+InterferenceFunction3DLattice::InterferenceFunction3DLattice(const Lattice3D& lattice)
     : IInterferenceFunction(0), m_lattice(lattice), m_peak_shape(nullptr), m_rec_radius(0.0)
 {
     setName("Interference3DLattice");
@@ -40,7 +40,7 @@ void InterferenceFunction3DLattice::setPeakShape(const IPeakShape& peak_shape)
     m_peak_shape.reset(peak_shape.clone());
 }
 
-const Lattice& InterferenceFunction3DLattice::lattice() const
+const Lattice3D& InterferenceFunction3DLattice::lattice() const
 {
     return m_lattice;
 }
diff --git a/Sample/Aggregate/InterferenceFunction3DLattice.h b/Sample/Aggregate/InterferenceFunction3DLattice.h
index 848ed23399c..b87a9a52243 100644
--- a/Sample/Aggregate/InterferenceFunction3DLattice.h
+++ b/Sample/Aggregate/InterferenceFunction3DLattice.h
@@ -16,7 +16,7 @@
 #define BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEFUNCTION3DLATTICE_H
 
 #include "Sample/Aggregate/IInterferenceFunction.h"
-#include "Sample/Lattice/Lattice.h"
+#include "Sample/Lattice/Lattice3D.h"
 
 class IPeakShape;
 
@@ -26,7 +26,7 @@ class IPeakShape;
 class InterferenceFunction3DLattice : public IInterferenceFunction
 {
 public:
-    InterferenceFunction3DLattice(const Lattice& lattice);
+    InterferenceFunction3DLattice(const Lattice3D& lattice);
     ~InterferenceFunction3DLattice() final;
 
     InterferenceFunction3DLattice* clone() const override final;
@@ -35,7 +35,7 @@ public:
 
     void setPeakShape(const IPeakShape& peak_shape);
 
-    const Lattice& lattice() const;
+    const Lattice3D& lattice() const;
 
     bool supportsMultilayer() const override final { return false; }
 
@@ -47,7 +47,7 @@ private:
     double iff_without_dw(const kvector_t q) const override final;
     void initRecRadius();
 
-    Lattice m_lattice; // TODO ASAP unique_ptr as in otehr InterferenceFunction%s
+    Lattice3D m_lattice; // TODO ASAP unique_ptr as in otehr InterferenceFunction%s
     std::unique_ptr<IPeakShape> m_peak_shape;
     double m_rec_radius; //!< radius in reciprocal space defining the nearest q vectors to use
 };
diff --git a/Sample/Aggregate/InterferenceFunctionFinite3DLattice.cpp b/Sample/Aggregate/InterferenceFunctionFinite3DLattice.cpp
index 569eeecb300..7bcc39315df 100644
--- a/Sample/Aggregate/InterferenceFunctionFinite3DLattice.cpp
+++ b/Sample/Aggregate/InterferenceFunctionFinite3DLattice.cpp
@@ -20,7 +20,7 @@
 
 #include <limits>
 
-InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice(const Lattice& lattice,
+InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice(const Lattice3D& lattice,
                                                                          unsigned N_1, unsigned N_2,
                                                                          unsigned N_3)
     : IInterferenceFunction(0), m_N_1(N_1), m_N_2(N_2), m_N_3(N_3)
@@ -38,7 +38,7 @@ InterferenceFunctionFinite3DLattice* InterferenceFunctionFinite3DLattice::clone(
     return ret;
 }
 
-const Lattice& InterferenceFunctionFinite3DLattice::lattice() const
+const Lattice3D& InterferenceFunctionFinite3DLattice::lattice() const
 {
     if (!m_lattice)
         throw std::runtime_error("InterferenceFunctionFinite3DLattice::lattice() -> Error. "
@@ -61,8 +61,8 @@ double InterferenceFunctionFinite3DLattice::iff_without_dw(const kvector_t q) co
     return ampl * ampl / (m_N_1 * m_N_2 * m_N_3);
 }
 
-void InterferenceFunctionFinite3DLattice::setLattice(const Lattice& lattice)
+void InterferenceFunctionFinite3DLattice::setLattice(const Lattice3D& lattice)
 {
-    m_lattice = std::make_unique<Lattice>(lattice);
+    m_lattice = std::make_unique<Lattice3D>(lattice);
     registerChild(m_lattice.get());
 }
diff --git a/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h b/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h
index a393780d95f..c89c1b4c399 100644
--- a/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h
+++ b/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h
@@ -16,7 +16,7 @@
 #define BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEFUNCTIONFINITE3DLATTICE_H
 
 #include "Sample/Aggregate/IInterferenceFunction.h"
-#include "Sample/Lattice/Lattice.h"
+#include "Sample/Lattice/Lattice3D.h"
 
 //! Interference function of a finite 3D lattice.
 //! @ingroup interference
@@ -24,7 +24,7 @@
 class InterferenceFunctionFinite3DLattice : public IInterferenceFunction
 {
 public:
-    InterferenceFunctionFinite3DLattice(const Lattice& lattice, unsigned N_1, unsigned N_2,
+    InterferenceFunctionFinite3DLattice(const Lattice3D& lattice, unsigned N_1, unsigned N_2,
                                         unsigned N_3);
     ~InterferenceFunctionFinite3DLattice() final;
 
@@ -36,7 +36,7 @@ public:
     unsigned numberUnitCells2() const { return m_N_2; }
     unsigned numberUnitCells3() const { return m_N_3; }
 
-    const Lattice& lattice() const;
+    const Lattice3D& lattice() const;
 
     bool supportsMultilayer() const override final { return false; }
 
@@ -44,9 +44,9 @@ public:
 
 private:
     double iff_without_dw(const kvector_t q) const override final;
-    void setLattice(const Lattice& lattice);
+    void setLattice(const Lattice3D& lattice);
 
-    std::unique_ptr<Lattice> m_lattice;
+    std::unique_ptr<Lattice3D> m_lattice;
     unsigned m_N_1, m_N_2, m_N_3; //!< Size of the finite lattice in lattice units
 };
 
diff --git a/Sample/Lattice/BakeLattice.cpp b/Sample/Lattice/BakeLattice.cpp
index 0eff414fd8e..f9979f0da7c 100644
--- a/Sample/Lattice/BakeLattice.cpp
+++ b/Sample/Lattice/BakeLattice.cpp
@@ -13,53 +13,53 @@
 // ************************************************************************** //
 
 #include "Sample/Lattice/BakeLattice.h"
-#include "Sample/Lattice/Lattice.h"
+#include "Sample/Lattice/Lattice3D.h"
 
-Lattice bake::createCubicLattice(double a)
+Lattice3D bake::createCubicLattice(double a)
 {
     kvector_t a1(a, 0.0, 0.0);
     kvector_t a2(0.0, a, 0.0);
     kvector_t a3(0.0, 0.0, a);
-    return Lattice(a1, a2, a3);
+    return Lattice3D(a1, a2, a3);
 }
 
-Lattice bake::createFCCLattice(double a)
+Lattice3D bake::createFCCLattice(double a)
 {
     double b = a / 2.0;
     kvector_t a1(0.0, b, b);
     kvector_t a2(b, 0.0, b);
     kvector_t a3(b, b, 0.0);
-    return Lattice(a1, a2, a3);
+    return Lattice3D(a1, a2, a3);
 }
 
-Lattice bake::createHexagonalLattice(double a, double c)
+Lattice3D bake::createHexagonalLattice(double a, double c)
 {
     kvector_t a1(a, 0.0, 0.0);
     kvector_t a2(-a / 2.0, std::sqrt(3.0) * a / 2.0, 0.0);
     kvector_t a3(0.0, 0.0, c);
-    return Lattice(a1, a2, a3);
+    return Lattice3D(a1, a2, a3);
 }
 
-Lattice bake::createHCPLattice(double a, double c)
+Lattice3D bake::createHCPLattice(double a, double c)
 {
     kvector_t a1(a, 0.0, 0.0);
     kvector_t a2(-a / 2.0, std::sqrt(3.0) * a / 2.0, 0);
     kvector_t a3(a / 2.0, a / std::sqrt(3.0) / 2.0, c / 2.0);
-    return Lattice(a1, a2, a3);
+    return Lattice3D(a1, a2, a3);
 }
 
-Lattice bake::createTetragonalLattice(double a, double c)
+Lattice3D bake::createTetragonalLattice(double a, double c)
 {
     kvector_t a1(a, 0.0, 0.0);
     kvector_t a2(0.0, a, 0.0);
     kvector_t a3(0.0, 0.0, c);
-    return Lattice(a1, a2, a3);
+    return Lattice3D(a1, a2, a3);
 }
 
-Lattice bake::createBCTLattice(double a, double c)
+Lattice3D bake::createBCTLattice(double a, double c)
 {
     kvector_t a1(a, 0.0, 0.0);
     kvector_t a2(0.0, a, 0.0);
     kvector_t a3(a / 2.0, a / 2.0, c / 2.0);
-    return Lattice(a1, a2, a3);
+    return Lattice3D(a1, a2, a3);
 }
diff --git a/Sample/Lattice/BakeLattice.h b/Sample/Lattice/BakeLattice.h
index 1e874dba511..4f0373f36a6 100644
--- a/Sample/Lattice/BakeLattice.h
+++ b/Sample/Lattice/BakeLattice.h
@@ -15,29 +15,29 @@
 #ifndef BORNAGAIN_SAMPLE_LATTICE_BAKELATTICE_H
 #define BORNAGAIN_SAMPLE_LATTICE_BAKELATTICE_H
 
-class Lattice;
+class Lattice3D;
 
 namespace bake
 {
 
 //! Returns a primitive cubic (cP) lattice with edge length a.
-Lattice createCubicLattice(double a);
+Lattice3D createCubicLattice(double a);
 
 //! Returns a face-centered cubic (cF) lattice with edge length a.
-Lattice createFCCLattice(double a);
+Lattice3D createFCCLattice(double a);
 
 //! Returns a primitive hexagonal (hP) lattice with hexagonal edge a and height c.
-Lattice createHexagonalLattice(double a, double c);
+Lattice3D createHexagonalLattice(double a, double c);
 
 //! TODO: Clarify how this is meant: HCP is not a Bravais lattice.
-Lattice createHCPLattice(double a, double c);
+Lattice3D createHCPLattice(double a, double c);
 
 //! Returns a primitive tetragonal (tP) lattice with square base edge a and height c.
-Lattice createTetragonalLattice(double a, double c);
+Lattice3D createTetragonalLattice(double a, double c);
 
 //! Returns a body-centered cubic (cI) lattice with edge length a.
 //! TODO: Clarify meaning of c
-Lattice createBCTLattice(double a, double c);
+Lattice3D createBCTLattice(double a, double c);
 
 } // namespace bake
 
diff --git a/Sample/Lattice/Lattice.cpp b/Sample/Lattice/Lattice3D.cpp
similarity index 77%
rename from Sample/Lattice/Lattice.cpp
rename to Sample/Lattice/Lattice3D.cpp
index 90da80a565d..1d6bb2bef82 100644
--- a/Sample/Lattice/Lattice.cpp
+++ b/Sample/Lattice/Lattice3D.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit scattering at grazing incidence
 //
-//! @file      Sample/Lattice/Lattice.cpp
+//! @file      Sample/Lattice/Lattice3D.cpp
 //! @brief     Implements class Lattice.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,20 +12,21 @@
 //
 // ************************************************************************** //
 
-#include "Sample/Lattice/Lattice.h"
+#include "Sample/Lattice/Lattice3D.h"
 #include "Base/Const/MathConstants.h"
 #include "Base/Vector/Transform3D.h"
 #include "Param/Base/RealParameter.h"
 #include "Sample/Lattice/ISelectionRule.h"
 #include <gsl/gsl_linalg.h>
 
-Lattice::Lattice(const kvector_t a, const kvector_t b, const kvector_t c) : m_a(a), m_b(b), m_c(c)
+Lattice3D::Lattice3D(const kvector_t a, const kvector_t b, const kvector_t c)
+    : m_a(a), m_b(b), m_c(c)
 {
     setName("Lattice");
     initialize();
 }
 
-Lattice::Lattice(const Lattice& lattice)
+Lattice3D::Lattice3D(const Lattice3D& lattice)
     : INode(), m_a(lattice.m_a), m_b(lattice.m_b), m_c(lattice.m_c)
 {
     setName("Lattice");
@@ -34,9 +35,9 @@ Lattice::Lattice(const Lattice& lattice)
         setSelectionRule(*lattice.m_selection_rule);
 }
 
-Lattice::~Lattice() = default;
+Lattice3D::~Lattice3D() = default;
 
-void Lattice::initialize()
+void Lattice3D::initialize()
 {
     computeReciprocalVectors();
     if (!parameter(XComponentName("BasisA"))) {
@@ -46,50 +47,50 @@ void Lattice::initialize()
     }
 }
 
-void Lattice::onChange()
+void Lattice3D::onChange()
 {
     computeReciprocalVectors();
 }
 
-Lattice Lattice::transformed(const Transform3D& transform) const
+Lattice3D Lattice3D::transformed(const Transform3D& transform) const
 {
     kvector_t q1 = transform.transformed(m_a);
     kvector_t q2 = transform.transformed(m_b);
     kvector_t q3 = transform.transformed(m_c);
-    Lattice result = {q1, q2, q3};
+    Lattice3D result = {q1, q2, q3};
     if (m_selection_rule)
         result.setSelectionRule(*m_selection_rule);
     return result;
 }
 
 //! Currently unused but may be useful for checks
-kvector_t Lattice::getMillerDirection(double h, double k, double l) const
+kvector_t Lattice3D::getMillerDirection(double h, double k, double l) const
 {
     kvector_t direction = h * m_ra + k * m_rb + l * m_rc;
     return direction.unit();
 }
 
-double Lattice::unitCellVolume() const
+double Lattice3D::unitCellVolume() const
 {
     return std::abs(m_a.dot(m_b.cross(m_c)));
 }
 
 //! Currently only used in tests
-void Lattice::getReciprocalLatticeBasis(kvector_t& ra, kvector_t& rb, kvector_t& rc) const
+void Lattice3D::getReciprocalLatticeBasis(kvector_t& ra, kvector_t& rb, kvector_t& rc) const
 {
     ra = m_ra;
     rb = m_rb;
     rc = m_rc;
 }
 
-ivector_t Lattice::getNearestReciprocalLatticeVectorCoordinates(const kvector_t q) const
+ivector_t Lattice3D::getNearestReciprocalLatticeVectorCoordinates(const kvector_t q) const
 {
     return {(int)std::lround(q.dot(m_a) / M_TWOPI), (int)std::lround(q.dot(m_b) / M_TWOPI),
             (int)std::lround(q.dot(m_c) / M_TWOPI)};
 }
 
-std::vector<kvector_t> Lattice::reciprocalLatticeVectorsWithinRadius(const kvector_t q,
-                                                                     double dq) const
+std::vector<kvector_t> Lattice3D::reciprocalLatticeVectorsWithinRadius(const kvector_t q,
+                                                                       double dq) const
 {
     ivector_t nearest_coords = getNearestReciprocalLatticeVectorCoordinates(q);
 
@@ -114,7 +115,7 @@ std::vector<kvector_t> Lattice::reciprocalLatticeVectorsWithinRadius(const kvect
     return ret;
 }
 
-void Lattice::computeReciprocalVectors() const
+void Lattice3D::computeReciprocalVectors() const
 {
     kvector_t q23 = m_b.cross(m_c);
     kvector_t q31 = m_c.cross(m_a);
@@ -124,7 +125,7 @@ void Lattice::computeReciprocalVectors() const
     m_rc = M_TWOPI / m_c.dot(q12) * q12;
 }
 
-void Lattice::setSelectionRule(const ISelectionRule& selection_rule)
+void Lattice3D::setSelectionRule(const ISelectionRule& selection_rule)
 {
     m_selection_rule.reset(selection_rule.clone());
 }
diff --git a/Sample/Lattice/Lattice.h b/Sample/Lattice/Lattice3D.h
similarity index 87%
rename from Sample/Lattice/Lattice.h
rename to Sample/Lattice/Lattice3D.h
index f6d42b6f8bc..b4ae819e527 100644
--- a/Sample/Lattice/Lattice.h
+++ b/Sample/Lattice/Lattice3D.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit scattering at grazing incidence
 //
-//! @file      Sample/Lattice/Lattice.h
+//! @file      Sample/Lattice/Lattice3D.h
 //! @brief     Defines class Lattice.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -26,19 +26,19 @@ class Transform3D;
 
 //! @ingroup samples
 
-class Lattice : public INode
+class Lattice3D : public INode
 {
 public:
-    Lattice() = delete;
-    Lattice(const kvector_t a, const kvector_t b, const kvector_t c);
-    Lattice(const Lattice& lattice);
-    ~Lattice() override;
-    Lattice& operator=(const Lattice&) = delete;
+    Lattice3D() = delete;
+    Lattice3D(const kvector_t a, const kvector_t b, const kvector_t c);
+    Lattice3D(const Lattice3D& lattice);
+    ~Lattice3D() override;
+    Lattice3D& operator=(const Lattice3D&) = delete;
 
     void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
     //! Creates transformed lattice
-    Lattice transformed(const Transform3D& transform) const;
+    Lattice3D transformed(const Transform3D& transform) const;
 
     //! Initializes cached data
     void initialize();
diff --git a/Sample/Particle/Crystal.cpp b/Sample/Particle/Crystal.cpp
index 42337ba859e..55c15b47154 100644
--- a/Sample/Particle/Crystal.cpp
+++ b/Sample/Particle/Crystal.cpp
@@ -18,7 +18,7 @@
 #include "Sample/Particle/ParticleComposition.h"
 #include "Sample/Particle/SlicedParticle.h"
 
-Crystal::Crystal(const IParticle& basis, const Lattice& lattice, double position_variance)
+Crystal::Crystal(const IParticle& basis, const Lattice3D& lattice, double position_variance)
     : m_lattice(lattice), m_position_variance(position_variance)
 {
     setName("Crystal");
@@ -28,7 +28,7 @@ Crystal::Crystal(const IParticle& basis, const Lattice& lattice, double position
     registerChild(&m_lattice);
 }
 
-Crystal::Crystal(IParticle* p_basis, const Lattice& lattice, double position_variance)
+Crystal::Crystal(IParticle* p_basis, const Lattice3D& lattice, double position_variance)
     : m_lattice(lattice), m_position_variance(position_variance)
 {
     setName("Crystal");
@@ -48,7 +48,7 @@ IFormFactor* Crystal::createTotalFormFactor(const IFormFactor& meso_crystal_form
                                             const IRotation* p_rotation,
                                             const kvector_t& translation) const
 {
-    Lattice transformed_lattice = transformedLattice(p_rotation);
+    Lattice3D transformed_lattice = transformedLattice(p_rotation);
     std::unique_ptr<IParticle> P_basis_clone{m_basis->clone()};
     if (p_rotation)
         P_basis_clone->rotate(*p_rotation);
@@ -76,7 +76,7 @@ std::vector<HomogeneousRegion> Crystal::homogeneousRegions() const
     return result;
 }
 
-Lattice Crystal::transformedLattice(const IRotation* p_rotation) const
+Lattice3D Crystal::transformedLattice(const IRotation* p_rotation) const
 {
     if (!p_rotation)
         return m_lattice;
diff --git a/Sample/Particle/Crystal.h b/Sample/Particle/Crystal.h
index 44be117a9ae..c9a247a38e3 100644
--- a/Sample/Particle/Crystal.h
+++ b/Sample/Particle/Crystal.h
@@ -15,7 +15,7 @@
 #ifndef BORNAGAIN_SAMPLE_PARTICLE_CRYSTAL_H
 #define BORNAGAIN_SAMPLE_PARTICLE_CRYSTAL_H
 
-#include "Sample/Lattice/Lattice.h"
+#include "Sample/Lattice/Lattice3D.h"
 #include "Sample/Scattering/ISample.h"
 
 class IFormFactor;
@@ -35,7 +35,7 @@ struct HomogeneousRegion;
 class Crystal : public ISample
 {
 public:
-    Crystal(const IParticle& basis, const Lattice& lattice, double position_variance = 0);
+    Crystal(const IParticle& basis, const Lattice3D& lattice, double position_variance = 0);
     ~Crystal();
 
     Crystal* clone() const override final;
@@ -48,14 +48,14 @@ public:
 
     std::vector<HomogeneousRegion> homogeneousRegions() const;
 
-    Lattice transformedLattice(const IRotation* p_rotation = nullptr) const;
+    Lattice3D transformedLattice(const IRotation* p_rotation = nullptr) const;
 
     std::vector<const INode*> getChildren() const override final;
 
 private:
-    Crystal(IParticle* p_basis, const Lattice& lattice, double position_variance = 0);
+    Crystal(IParticle* p_basis, const Lattice3D& lattice, double position_variance = 0);
 
-    Lattice m_lattice;
+    Lattice3D m_lattice;
     std::unique_ptr<IParticle> m_basis;
     const double m_position_variance;
 };
diff --git a/Sample/Particle/FormFactorCrystal.cpp b/Sample/Particle/FormFactorCrystal.cpp
index cb01ed20db6..28cab893db9 100644
--- a/Sample/Particle/FormFactorCrystal.cpp
+++ b/Sample/Particle/FormFactorCrystal.cpp
@@ -17,7 +17,7 @@
 #include "Base/Types/Exceptions.h"
 #include "Sample/Material/WavevectorInfo.h"
 
-FormFactorCrystal::FormFactorCrystal(const Lattice& lattice, const IFormFactor& basis_form_factor,
+FormFactorCrystal::FormFactorCrystal(const Lattice3D& lattice, const IFormFactor& basis_form_factor,
                                      const IFormFactor& meso_form_factor, double position_variance)
     : m_lattice(lattice)
     , m_basis_form_factor(basis_form_factor.clone())
diff --git a/Sample/Particle/FormFactorCrystal.h b/Sample/Particle/FormFactorCrystal.h
index ea098a254b0..22acd8a096e 100644
--- a/Sample/Particle/FormFactorCrystal.h
+++ b/Sample/Particle/FormFactorCrystal.h
@@ -15,7 +15,7 @@
 #ifndef BORNAGAIN_SAMPLE_PARTICLE_FORMFACTORCRYSTAL_H
 #define BORNAGAIN_SAMPLE_PARTICLE_FORMFACTORCRYSTAL_H
 
-#include "Sample/Lattice/Lattice.h"
+#include "Sample/Lattice/Lattice3D.h"
 #include "Sample/Scattering/IFormFactorBorn.h"
 
 //! The form factor of a MesoCrystal.
@@ -24,7 +24,7 @@
 class FormFactorCrystal : public IFormFactor
 {
 public:
-    FormFactorCrystal(const Lattice& lattice, const IFormFactor& basis_form_factor,
+    FormFactorCrystal(const Lattice3D& lattice, const IFormFactor& basis_form_factor,
                       const IFormFactor& meso_form_factor, double position_variance = 0.0);
     ~FormFactorCrystal() override final;
 
@@ -57,7 +57,7 @@ private:
     void calculateLargestReciprocalDistance();
     complex_t debyeWallerFactor(const kvector_t& q_i) const;
 
-    Lattice m_lattice;
+    Lattice3D m_lattice;
     IFormFactor* m_basis_form_factor;
     IFormFactor* m_meso_form_factor; //!< The outer shape of this mesocrystal
     double m_position_variance;
diff --git a/Sample/StandardSamples/MesoCrystalBuilder.cpp b/Sample/StandardSamples/MesoCrystalBuilder.cpp
index df097025acd..eeb593dc108 100644
--- a/Sample/StandardSamples/MesoCrystalBuilder.cpp
+++ b/Sample/StandardSamples/MesoCrystalBuilder.cpp
@@ -30,7 +30,7 @@ MultiLayer* MesoCrystalBuilder::buildSample() const
     kvector_t lattice_basis_a(5.0, 0.0, 0.0);
     kvector_t lattice_basis_b(0.0, 5.0, 0.0);
     kvector_t lattice_basis_c(0.0, 0.0, 5.0);
-    Lattice lattice(lattice_basis_a, lattice_basis_b, lattice_basis_c);
+    Lattice3D lattice(lattice_basis_a, lattice_basis_b, lattice_basis_c);
 
     // spherical particle that forms the base of the mesocrystal
     FormFactorFullSphere sphere_ff(2.0);
diff --git a/Tests/Performance/Core/Mesocrystal.cpp b/Tests/Performance/Core/Mesocrystal.cpp
index 14b983ba588..4cf83ed8fab 100644
--- a/Tests/Performance/Core/Mesocrystal.cpp
+++ b/Tests/Performance/Core/Mesocrystal.cpp
@@ -53,9 +53,9 @@ std::unique_ptr<RectangularDetector> create_detector()
     return result;
 }
 
-Lattice createLattice(double a, double c)
+Lattice3D createLattice(double a, double c)
 {
-    Lattice result = bake::createHexagonalLattice(a, c);
+    Lattice3D result = bake::createHexagonalLattice(a, c);
     result.setSelectionRule(SimpleSelectionRule(-1, 1, 1, 3));
     return result;
 }
diff --git a/Tests/UnitTests/Core/Sample/CrystalTest.cpp b/Tests/UnitTests/Core/Sample/CrystalTest.cpp
index ba0f79a9eb3..b51b5850086 100644
--- a/Tests/UnitTests/Core/Sample/CrystalTest.cpp
+++ b/Tests/UnitTests/Core/Sample/CrystalTest.cpp
@@ -9,7 +9,7 @@ class CrystalTest : public ::testing::Test
 
 TEST_F(CrystalTest, getChildren)
 {
-    Lattice lattice = bake::createHexagonalLattice(1.0, 2.0);
+    Lattice3D lattice = bake::createHexagonalLattice(1.0, 2.0);
     ParticleComposition composition;
     Crystal crystal(composition, lattice);
 
diff --git a/Tests/UnitTests/Core/Sample/LatticeTest.cpp b/Tests/UnitTests/Core/Sample/LatticeTest.cpp
index 2043be95aaf..b381662e7c1 100644
--- a/Tests/UnitTests/Core/Sample/LatticeTest.cpp
+++ b/Tests/UnitTests/Core/Sample/LatticeTest.cpp
@@ -1,7 +1,7 @@
-#include "Sample/Lattice/Lattice.h"
 #include "Base/Const/MathConstants.h"
 #include "Base/Vector/Transform3D.h"
 #include "Sample/Lattice/BakeLattice.h"
+#include "Sample/Lattice/Lattice3D.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class LatticeTest : public ::testing::Test
@@ -13,24 +13,24 @@ TEST_F(LatticeTest, declarationTest)
 {
     kvector_t a1(1, 0, 0), a2(0, 1, 0), a3(0, 0, 1);
 
-    Lattice l1(a1, a2, a3);
+    Lattice3D l1(a1, a2, a3);
     EXPECT_EQ(a1, l1.getBasisVectorA());
     EXPECT_EQ(a2, l1.getBasisVectorB());
     EXPECT_EQ(a3, l1.getBasisVectorC());
 
-    Lattice l2(l1);
+    Lattice3D l2(l1);
     EXPECT_EQ(a1, l2.getBasisVectorA());
     EXPECT_EQ(a2, l2.getBasisVectorB());
     EXPECT_EQ(a3, l2.getBasisVectorC());
 
     // calls and tests copy constructor
-    Lattice l3 = {l2};
+    Lattice3D l3 = {l2};
     EXPECT_EQ(a1, l3.getBasisVectorA());
     EXPECT_EQ(a2, l3.getBasisVectorB());
     EXPECT_EQ(a3, l3.getBasisVectorC());
 
     // calls and tests copy constructor
-    Lattice l4 = l3;
+    Lattice3D l4 = l3;
     EXPECT_EQ(a1, l4.getBasisVectorA());
     EXPECT_EQ(a2, l4.getBasisVectorB());
     EXPECT_EQ(a3, l4.getBasisVectorC());
@@ -41,7 +41,7 @@ TEST_F(LatticeTest, volumeTest)
 {
     kvector_t a1(4, 0, 0), a2(0, 2.1, 0), a3(0, 0, 1);
 
-    Lattice l1(a1, a2, a3);
+    Lattice3D l1(a1, a2, a3);
     EXPECT_EQ(8.4, l1.unitCellVolume()); // 8.4 is the expected volume for the given lattice vectors
 }
 
@@ -49,7 +49,7 @@ TEST_F(LatticeTest, volumeTest)
 TEST_F(LatticeTest, reciprocalTest)
 {
     kvector_t a1(1, 0, 0), a2(0, 1, 0), a3(0, 0, 1);
-    Lattice l1(a1, a2, a3);
+    Lattice3D l1(a1, a2, a3);
 
     kvector_t b1, b2, b3, m_ra, m_rb, m_rc;
 
@@ -72,11 +72,11 @@ TEST_F(LatticeTest, reciprocalTest)
 TEST_F(LatticeTest, transformTest)
 {
     kvector_t a1(1, 0, 0), a2(0, 1, 0), a3(0, 0, 1);
-    Lattice l1(a1, a2, a3);
+    Lattice3D l1(a1, a2, a3);
 
     // use rotation by 90 degrees around z axis as a transformation
     Transform3D tr = Transform3D::createRotateZ(M_TWOPI / 4);
-    Lattice ltr = l1.transformed(tr);
+    Lattice3D ltr = l1.transformed(tr);
 
     // use EXPECT_NEAR as transform (matrix multiplication) uses double value for rotation angle
     // e.g. Rotating the vector (1,0,0) by 2*PI about z would give something like (0.99999,0,0)
@@ -93,7 +93,7 @@ TEST_F(LatticeTest, transformTest)
 TEST_F(LatticeTest, NearestReciprocalLatticeVectorCoordinatesTest)
 {
     kvector_t a1(1, 0, 0), a2(0, 1, 0), a3(0, 0, 1);
-    Lattice l1(a1, a2, a3);
+    Lattice3D l1(a1, a2, a3);
 
     // vector_in is in REC. SPACE coordinates
     kvector_t vector_in(2.8 * M_TWOPI, 0, 0);
@@ -109,7 +109,7 @@ TEST_F(LatticeTest, NearestReciprocalLatticeVectorCoordinatesTest)
 TEST_F(LatticeTest, reciprocalLatticeVectorsWithinRadiusTest)
 {
     kvector_t a1(1, 0, 0), a2(0, 1, 0), a3(0, 0, 1);
-    Lattice l1(a1, a2, a3);
+    Lattice3D l1(a1, a2, a3);
 
     kvector_t b1, b2, b3;
     l1.getReciprocalLatticeBasis(b1, b2, b3);
@@ -134,7 +134,7 @@ TEST_F(LatticeTest, reciprocalLatticeVectorsWithinRadiusTest)
 TEST_F(LatticeTest, FCCLatticeTest)
 {
     // creates FCC lattice onto a new Lattice instance l1
-    Lattice l1 = bake::createFCCLattice(1);
+    Lattice3D l1 = bake::createFCCLattice(1);
 
     kvector_t fcc1(0, 0.5, 0.5), fcc2(0.5, 0, 0.5), fcc3(0.5, 0.5, 0);
 
@@ -146,7 +146,7 @@ TEST_F(LatticeTest, FCCLatticeTest)
 // tests hexagonal lattice creation
 TEST_F(LatticeTest, HexagonalLatticeTest)
 {
-    Lattice l1 = bake::createHexagonalLattice(1, 4);
+    Lattice3D l1 = bake::createHexagonalLattice(1, 4);
 
     kvector_t tri1(1, 0.0, 0.0);
     kvector_t tri2(-1 / 2.0, std::sqrt(3.0) * 1 / 2.0, 0);
@@ -162,7 +162,7 @@ TEST_F(LatticeTest, HexagonalLatticeTest)
 TEST_F(LatticeTest, onChangeTest)
 {
     kvector_t a1(1, 0, 0), a2(0, 1, 0), a3(0, 0, 1);
-    Lattice l1(a1, a2, a3);
+    Lattice3D l1(a1, a2, a3);
 
     kvector_t b1, b2, b3, m_ra, m_rb, m_rc;
 
diff --git a/Tests/UnitTests/Core/Sample/MesoCrystalTest.cpp b/Tests/UnitTests/Core/Sample/MesoCrystalTest.cpp
index 91092c7f3e0..3b9b73e6329 100644
--- a/Tests/UnitTests/Core/Sample/MesoCrystalTest.cpp
+++ b/Tests/UnitTests/Core/Sample/MesoCrystalTest.cpp
@@ -12,7 +12,7 @@ class MesoCrystalTest : public ::testing::Test
 
 TEST_F(MesoCrystalTest, getChildren)
 {
-    Lattice lattice = bake::createHexagonalLattice(1.0, 2.0);
+    Lattice3D lattice = bake::createHexagonalLattice(1.0, 2.0);
     ParticleComposition composition;
     Crystal crystal(composition, lattice);
     MesoCrystal meso(crystal, FormFactorFullSphere(1.0));
diff --git a/Wrap/swig/libBornAgainSample.i b/Wrap/swig/libBornAgainSample.i
index 723d8b27577..e60916f093b 100644
--- a/Wrap/swig/libBornAgainSample.i
+++ b/Wrap/swig/libBornAgainSample.i
@@ -85,7 +85,7 @@
 #include "Sample/HardParticle/IFormFactorPolyhedron.h"
 #include "Sample/HardParticle/IFormFactorPrism.h"
 #include "Sample/Lattice/ISelectionRule.h"
-#include "Sample/Lattice/Lattice.h"
+#include "Sample/Lattice/Lattice3D.h"
 #include "Sample/Lattice/Lattice2D.h"
 #include "Sample/Lattice/BakeLattice.h"
 #include "Sample/Material/MaterialFactoryFuncs.h"
@@ -233,7 +233,7 @@
 %include "Sample/SoftParticle/FormFactorSphereLogNormalRadius.h"
 
 %include "Sample/Lattice/ISelectionRule.h"
-%include "Sample/Lattice/Lattice.h"
+%include "Sample/Lattice/Lattice3D.h"
 %include "Sample/Lattice/Lattice2D.h"
 %include "Sample/Lattice/BakeLattice.h"
 
diff --git a/auto/Wrap/doxygenCore.i b/auto/Wrap/doxygenCore.i
index 46982db1089..91b79dad64e 100644
--- a/auto/Wrap/doxygenCore.i
+++ b/auto/Wrap/doxygenCore.i
@@ -2000,7 +2000,7 @@ C++ includes: SampleLabelHandler.h
 %feature("docstring")  SampleLabelHandler::labelMaterial "std::string SampleLabelHandler::labelMaterial(const Material *sample)
 ";
 
-%feature("docstring")  SampleLabelHandler::labelLattice "std::string SampleLabelHandler::labelLattice(const Lattice *sample)
+%feature("docstring")  SampleLabelHandler::labelLattice "std::string SampleLabelHandler::labelLattice(const Lattice3D *sample)
 ";
 
 %feature("docstring")  SampleLabelHandler::labelMultiLayer "std::string SampleLabelHandler::labelMultiLayer(const MultiLayer *sample)
@@ -2033,7 +2033,7 @@ C++ includes: SampleLabelHandler.h
 %feature("docstring")  SampleLabelHandler::insertMaterial "void SampleLabelHandler::insertMaterial(const Material *sample)
 ";
 
-%feature("docstring")  SampleLabelHandler::insertLattice "void SampleLabelHandler::insertLattice(const Lattice *sample)
+%feature("docstring")  SampleLabelHandler::insertLattice "void SampleLabelHandler::insertLattice(const Lattice3D *sample)
 ";
 
 %feature("docstring")  SampleLabelHandler::insertMesoCrystal "void SampleLabelHandler::insertMesoCrystal(const MesoCrystal *sample)
diff --git a/auto/Wrap/doxygenSample.i b/auto/Wrap/doxygenSample.i
index bc13c775997..02230198739 100644
--- a/auto/Wrap/doxygenSample.i
+++ b/auto/Wrap/doxygenSample.i
@@ -323,7 +323,7 @@ Used in  MesoCrystal, where it is given an outer shape.
 C++ includes: Crystal.h
 ";
 
-%feature("docstring")  Crystal::Crystal "Crystal::Crystal(const IParticle &basis, const Lattice &lattice, double position_variance=0)
+%feature("docstring")  Crystal::Crystal "Crystal::Crystal(const IParticle &basis, const Lattice3D &lattice, double position_variance=0)
 ";
 
 %feature("docstring")  Crystal::~Crystal "Crystal::~Crystal()
@@ -343,7 +343,7 @@ Returns a clone of this  ISample object.
 %feature("docstring")  Crystal::homogeneousRegions "std::vector< HomogeneousRegion > Crystal::homogeneousRegions() const
 ";
 
-%feature("docstring")  Crystal::transformedLattice "Lattice Crystal::transformedLattice(const IRotation *p_rotation=nullptr) const
+%feature("docstring")  Crystal::transformedLattice "Lattice3D Crystal::transformedLattice(const IRotation *p_rotation=nullptr) const
 ";
 
 %feature("docstring")  Crystal::getChildren "std::vector< const INode * > Crystal::getChildren() const override final
@@ -1105,7 +1105,7 @@ The form factor of a  MesoCrystal.
 C++ includes: FormFactorCrystal.h
 ";
 
-%feature("docstring")  FormFactorCrystal::FormFactorCrystal "FormFactorCrystal::FormFactorCrystal(const Lattice &lattice, const IFormFactor &basis_form_factor, const IFormFactor &meso_form_factor, double position_variance=0.0)
+%feature("docstring")  FormFactorCrystal::FormFactorCrystal "FormFactorCrystal::FormFactorCrystal(const Lattice3D &lattice, const IFormFactor &basis_form_factor, const IFormFactor &meso_form_factor, double position_variance=0.0)
 ";
 
 %feature("docstring")  FormFactorCrystal::~FormFactorCrystal "FormFactorCrystal::~FormFactorCrystal() override final
@@ -4014,7 +4014,7 @@ Interference function of a 3D lattice.
 C++ includes: InterferenceFunction3DLattice.h
 ";
 
-%feature("docstring")  InterferenceFunction3DLattice::InterferenceFunction3DLattice "InterferenceFunction3DLattice::InterferenceFunction3DLattice(const Lattice &lattice)
+%feature("docstring")  InterferenceFunction3DLattice::InterferenceFunction3DLattice "InterferenceFunction3DLattice::InterferenceFunction3DLattice(const Lattice3D &lattice)
 ";
 
 %feature("docstring")  InterferenceFunction3DLattice::~InterferenceFunction3DLattice "InterferenceFunction3DLattice::~InterferenceFunction3DLattice() final
@@ -4031,7 +4031,7 @@ Returns a clone of this  ISample object.
 %feature("docstring")  InterferenceFunction3DLattice::setPeakShape "void InterferenceFunction3DLattice::setPeakShape(const IPeakShape &peak_shape)
 ";
 
-%feature("docstring")  InterferenceFunction3DLattice::lattice "const Lattice & InterferenceFunction3DLattice::lattice() const
+%feature("docstring")  InterferenceFunction3DLattice::lattice "const Lattice3D & InterferenceFunction3DLattice::lattice() const
 ";
 
 %feature("docstring")  InterferenceFunction3DLattice::supportsMultilayer "bool InterferenceFunction3DLattice::supportsMultilayer() const override final
@@ -4140,7 +4140,7 @@ Interference function of a finite 3D lattice.
 C++ includes: InterferenceFunctionFinite3DLattice.h
 ";
 
-%feature("docstring")  InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice "InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice(const Lattice &lattice, unsigned N_1, unsigned N_2, unsigned N_3)
+%feature("docstring")  InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice "InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice(const Lattice3D &lattice, unsigned N_1, unsigned N_2, unsigned N_3)
 ";
 
 %feature("docstring")  InterferenceFunctionFinite3DLattice::~InterferenceFunctionFinite3DLattice "InterferenceFunctionFinite3DLattice::~InterferenceFunctionFinite3DLattice() final
@@ -4163,7 +4163,7 @@ Returns a clone of this  ISample object.
 %feature("docstring")  InterferenceFunctionFinite3DLattice::numberUnitCells3 "unsigned InterferenceFunctionFinite3DLattice::numberUnitCells3() const
 ";
 
-%feature("docstring")  InterferenceFunctionFinite3DLattice::lattice "const Lattice & InterferenceFunctionFinite3DLattice::lattice() const
+%feature("docstring")  InterferenceFunctionFinite3DLattice::lattice "const Lattice3D & InterferenceFunctionFinite3DLattice::lattice() const
 ";
 
 %feature("docstring")  InterferenceFunctionFinite3DLattice::supportsMultilayer "bool InterferenceFunctionFinite3DLattice::supportsMultilayer() const override final
@@ -4776,132 +4776,132 @@ C++ includes: CylindersBuilder.h
 ";
 
 
-// File: classLattice.xml
-%feature("docstring") Lattice "
+// File: classLattice1DBuilder.xml
+%feature("docstring") Lattice1DBuilder "
 
-A Bravais lattice, characterized by three basis vectors, and optionally an  ISelectionRule.
+Builds sample: cylinders with 1DDL structure factor.
 
-C++ includes: Lattice.h
+C++ includes: LatticeBuilder.h
 ";
 
-%feature("docstring")  Lattice::Lattice "Lattice::Lattice()=delete
+%feature("docstring")  Lattice1DBuilder::buildSample "MultiLayer * Lattice1DBuilder::buildSample() const
 ";
 
-%feature("docstring")  Lattice::Lattice "Lattice::Lattice(const kvector_t a, const kvector_t b, const kvector_t c)
+
+// File: classLattice2D.xml
+%feature("docstring") Lattice2D "";
+
+%feature("docstring")  Lattice2D::Lattice2D "Lattice2D::Lattice2D(const NodeMeta &meta, const std::vector< double > &PValues)
 ";
 
-%feature("docstring")  Lattice::Lattice "Lattice::Lattice(const Lattice &lattice)
+%feature("docstring")  Lattice2D::Lattice2D "Lattice2D::Lattice2D(double xi)
 ";
 
-%feature("docstring")  Lattice::~Lattice "Lattice::~Lattice() override
+%feature("docstring")  Lattice2D::clone "virtual Lattice2D* Lattice2D::clone() const =0
 ";
 
-%feature("docstring")  Lattice::accept "void Lattice::accept(INodeVisitor *visitor) const override
+%feature("docstring")  Lattice2D::length1 "virtual double Lattice2D::length1() const =0
 ";
 
-%feature("docstring")  Lattice::transformed "Lattice Lattice::transformed(const Transform3D &transform) const
+%feature("docstring")  Lattice2D::length2 "virtual double Lattice2D::length2() const =0
+";
 
-Creates transformed lattice. 
+%feature("docstring")  Lattice2D::latticeAngle "virtual double Lattice2D::latticeAngle() const =0
 ";
 
-%feature("docstring")  Lattice::initialize "void Lattice::initialize()
+%feature("docstring")  Lattice2D::unitCellArea "virtual double Lattice2D::unitCellArea() const =0
+";
 
-Initializes cached data. 
+%feature("docstring")  Lattice2D::rotationAngle "double Lattice2D::rotationAngle() const
 ";
 
-%feature("docstring")  Lattice::getBasisVectorA "kvector_t Lattice::getBasisVectorA() const
+%feature("docstring")  Lattice2D::reciprocalBases "Lattice2D::ReciprocalBases Lattice2D::reciprocalBases() const
+";
 
-Returns basis vector a. 
+%feature("docstring")  Lattice2D::setRotationEnabled "void Lattice2D::setRotationEnabled(bool enabled)
 ";
 
-%feature("docstring")  Lattice::getBasisVectorB "kvector_t Lattice::getBasisVectorB() const
 
-Returns basis vector b. 
-";
+// File: classLattice3D.xml
+%feature("docstring") Lattice3D "
 
-%feature("docstring")  Lattice::getBasisVectorC "kvector_t Lattice::getBasisVectorC() const
+A Bravais lattice, characterized by three basis vectors, and optionally an  ISelectionRule.
 
-Returns basis vector c. 
+C++ includes: Lattice3D.h
 ";
 
-%feature("docstring")  Lattice::getMillerDirection "kvector_t Lattice::getMillerDirection(double h, double k, double l) const
-
-Returns normalized direction corresponding to the given Miller indices.
+%feature("docstring")  Lattice3D::Lattice3D "Lattice3D::Lattice3D()=delete
+";
 
-Currently unused but may be useful for checks. 
+%feature("docstring")  Lattice3D::Lattice3D "Lattice3D::Lattice3D(const kvector_t a, const kvector_t b, const kvector_t c)
 ";
 
-%feature("docstring")  Lattice::unitCellVolume "double Lattice::unitCellVolume() const
+%feature("docstring")  Lattice3D::Lattice3D "Lattice3D::Lattice3D(const Lattice3D &lattice)
+";
 
-Returns the volume of the unit cell. 
+%feature("docstring")  Lattice3D::~Lattice3D "Lattice3D::~Lattice3D() override
 ";
 
-%feature("docstring")  Lattice::getReciprocalLatticeBasis "void Lattice::getReciprocalLatticeBasis(kvector_t &ra, kvector_t &rb, kvector_t &rc) const
+%feature("docstring")  Lattice3D::accept "void Lattice3D::accept(INodeVisitor *visitor) const override
+";
 
-Returns the reciprocal basis vectors.
+%feature("docstring")  Lattice3D::transformed "Lattice3D Lattice3D::transformed(const Transform3D &transform) const
 
-Currently only used in tests. 
+Creates transformed lattice. 
 ";
 
-%feature("docstring")  Lattice::getNearestReciprocalLatticeVectorCoordinates "ivector_t Lattice::getNearestReciprocalLatticeVectorCoordinates(const kvector_t q) const
+%feature("docstring")  Lattice3D::initialize "void Lattice3D::initialize()
 
-Returns the nearest reciprocal lattice point from a given vector. 
+Initializes cached data. 
 ";
 
-%feature("docstring")  Lattice::reciprocalLatticeVectorsWithinRadius "std::vector< kvector_t > Lattice::reciprocalLatticeVectorsWithinRadius(const kvector_t q, double dq) const
+%feature("docstring")  Lattice3D::getBasisVectorA "kvector_t Lattice3D::getBasisVectorA() const
 
-Returns a list of reciprocal lattice vectors within distance dq of a vector q. 
+Returns basis vector a. 
 ";
 
-%feature("docstring")  Lattice::setSelectionRule "void Lattice::setSelectionRule(const ISelectionRule &selection_rule)
+%feature("docstring")  Lattice3D::getBasisVectorB "kvector_t Lattice3D::getBasisVectorB() const
 
-Sets a selection rule for the reciprocal vectors. 
+Returns basis vector b. 
 ";
 
+%feature("docstring")  Lattice3D::getBasisVectorC "kvector_t Lattice3D::getBasisVectorC() const
 
-// File: classLattice1DBuilder.xml
-%feature("docstring") Lattice1DBuilder "
+Returns basis vector c. 
+";
 
-Builds sample: cylinders with 1DDL structure factor.
+%feature("docstring")  Lattice3D::getMillerDirection "kvector_t Lattice3D::getMillerDirection(double h, double k, double l) const
 
-C++ includes: LatticeBuilder.h
-";
+Returns normalized direction corresponding to the given Miller indices.
 
-%feature("docstring")  Lattice1DBuilder::buildSample "MultiLayer * Lattice1DBuilder::buildSample() const
+Currently unused but may be useful for checks. 
 ";
 
+%feature("docstring")  Lattice3D::unitCellVolume "double Lattice3D::unitCellVolume() const
 
-// File: classLattice2D.xml
-%feature("docstring") Lattice2D "";
-
-%feature("docstring")  Lattice2D::Lattice2D "Lattice2D::Lattice2D(const NodeMeta &meta, const std::vector< double > &PValues)
+Returns the volume of the unit cell. 
 ";
 
-%feature("docstring")  Lattice2D::Lattice2D "Lattice2D::Lattice2D(double xi)
-";
+%feature("docstring")  Lattice3D::getReciprocalLatticeBasis "void Lattice3D::getReciprocalLatticeBasis(kvector_t &ra, kvector_t &rb, kvector_t &rc) const
 
-%feature("docstring")  Lattice2D::clone "virtual Lattice2D* Lattice2D::clone() const =0
-";
+Returns the reciprocal basis vectors.
 
-%feature("docstring")  Lattice2D::length1 "virtual double Lattice2D::length1() const =0
+Currently only used in tests. 
 ";
 
-%feature("docstring")  Lattice2D::length2 "virtual double Lattice2D::length2() const =0
-";
+%feature("docstring")  Lattice3D::getNearestReciprocalLatticeVectorCoordinates "ivector_t Lattice3D::getNearestReciprocalLatticeVectorCoordinates(const kvector_t q) const
 
-%feature("docstring")  Lattice2D::latticeAngle "virtual double Lattice2D::latticeAngle() const =0
+Returns the nearest reciprocal lattice point from a given vector. 
 ";
 
-%feature("docstring")  Lattice2D::unitCellArea "virtual double Lattice2D::unitCellArea() const =0
-";
+%feature("docstring")  Lattice3D::reciprocalLatticeVectorsWithinRadius "std::vector< kvector_t > Lattice3D::reciprocalLatticeVectorsWithinRadius(const kvector_t q, double dq) const
 
-%feature("docstring")  Lattice2D::rotationAngle "double Lattice2D::rotationAngle() const
+Returns a list of reciprocal lattice vectors within distance dq of a vector q. 
 ";
 
-%feature("docstring")  Lattice2D::reciprocalBases "Lattice2D::ReciprocalBases Lattice2D::reciprocalBases() const
-";
+%feature("docstring")  Lattice3D::setSelectionRule "void Lattice3D::setSelectionRule(const ISelectionRule &selection_rule)
 
-%feature("docstring")  Lattice2D::setRotationEnabled "void Lattice2D::setRotationEnabled(bool enabled)
+Sets a selection rule for the reciprocal vectors. 
 ";
 
 
@@ -7725,32 +7725,32 @@ C++ includes: ZLimits.h
 
 
 // File: namespacebake.xml
-%feature("docstring")  bake::createCubicLattice "Lattice bake::createCubicLattice(double a)
+%feature("docstring")  bake::createCubicLattice "Lattice3D bake::createCubicLattice(double a)
 
 Returns a primitive cubic (cP) lattice with edge length a. 
 ";
 
-%feature("docstring")  bake::createFCCLattice "Lattice bake::createFCCLattice(double a)
+%feature("docstring")  bake::createFCCLattice "Lattice3D bake::createFCCLattice(double a)
 
 Returns a face-centered cubic (cF) lattice with edge length a. 
 ";
 
-%feature("docstring")  bake::createHexagonalLattice "Lattice bake::createHexagonalLattice(double a, double c)
+%feature("docstring")  bake::createHexagonalLattice "Lattice3D bake::createHexagonalLattice(double a, double c)
 
 Returns a primitive hexagonal (hP) lattice with hexagonal edge a and height c. 
 ";
 
-%feature("docstring")  bake::createHCPLattice "Lattice bake::createHCPLattice(double a, double c)
+%feature("docstring")  bake::createHCPLattice "Lattice3D bake::createHCPLattice(double a, double c)
 
 TODO: Clarify how this is meant: HCP is not a Bravais lattice. 
 ";
 
-%feature("docstring")  bake::createTetragonalLattice "Lattice bake::createTetragonalLattice(double a, double c)
+%feature("docstring")  bake::createTetragonalLattice "Lattice3D bake::createTetragonalLattice(double a, double c)
 
 Returns a primitive tetragonal (tP) lattice with square base edge a and height c. 
 ";
 
-%feature("docstring")  bake::createBCTLattice "Lattice bake::createBCTLattice(double a, double c)
+%feature("docstring")  bake::createBCTLattice "Lattice3D bake::createBCTLattice(double a, double c)
 
 Returns a body-centered cubic (cI) lattice with edge length a. TODO: Clarify meaning of c 
 ";
@@ -8308,16 +8308,16 @@ Used by the hard sphere and by several soft sphere classes.
 // File: ISelectionRule_8h.xml
 
 
-// File: Lattice_8cpp.xml
+// File: Lattice2D_8cpp.xml
 
 
-// File: Lattice_8h.xml
+// File: Lattice2D_8h.xml
 
 
-// File: Lattice2D_8cpp.xml
+// File: Lattice3D_8cpp.xml
 
 
-// File: Lattice2D_8h.xml
+// File: Lattice3D_8h.xml
 
 
 // File: SomeFormFactors_8cpp.xml
diff --git a/auto/Wrap/libBornAgainSample.py b/auto/Wrap/libBornAgainSample.py
index 0a2733d82a4..a2d99c80baa 100644
--- a/auto/Wrap/libBornAgainSample.py
+++ b/auto/Wrap/libBornAgainSample.py
@@ -4056,8 +4056,8 @@ class FormFactorCrystal(IFormFactor):
 
     def __init__(self, lattice, basis_form_factor, meso_form_factor, position_variance=0.0):
         r"""
-        __init__(FormFactorCrystal self, Lattice lattice, IFormFactor basis_form_factor, IFormFactor meso_form_factor, double position_variance=0.0) -> FormFactorCrystal
-        FormFactorCrystal::FormFactorCrystal(const Lattice &lattice, const IFormFactor &basis_form_factor, const IFormFactor &meso_form_factor, double position_variance=0.0)
+        __init__(FormFactorCrystal self, Lattice3D lattice, IFormFactor basis_form_factor, IFormFactor meso_form_factor, double position_variance=0.0) -> FormFactorCrystal
+        FormFactorCrystal::FormFactorCrystal(const Lattice3D &lattice, const IFormFactor &basis_form_factor, const IFormFactor &meso_form_factor, double position_variance=0.0)
 
         """
         _libBornAgainSample.FormFactorCrystal_swiginit(self, _libBornAgainSample.new_FormFactorCrystal(lattice, basis_form_factor, meso_form_factor, position_variance))
@@ -4352,8 +4352,8 @@ class Crystal(ISample):
 
     def __init__(self, basis, lattice, position_variance=0):
         r"""
-        __init__(Crystal self, IParticle basis, Lattice lattice, double position_variance=0) -> Crystal
-        Crystal::Crystal(const IParticle &basis, const Lattice &lattice, double position_variance=0)
+        __init__(Crystal self, IParticle basis, Lattice3D lattice, double position_variance=0) -> Crystal
+        Crystal::Crystal(const IParticle &basis, const Lattice3D &lattice, double position_variance=0)
 
         """
         _libBornAgainSample.Crystal_swiginit(self, _libBornAgainSample.new_Crystal(basis, lattice, position_variance))
@@ -4395,8 +4395,8 @@ class Crystal(ISample):
 
     def transformedLattice(self, p_rotation=None):
         r"""
-        transformedLattice(Crystal self, IRotation p_rotation=None) -> Lattice
-        Lattice Crystal::transformedLattice(const IRotation *p_rotation=nullptr) const
+        transformedLattice(Crystal self, IRotation p_rotation=None) -> Lattice3D
+        Lattice3D Crystal::transformedLattice(const IRotation *p_rotation=nullptr) const
 
         """
         return _libBornAgainSample.Crystal_transformedLattice(self, p_rotation)
@@ -7359,8 +7359,8 @@ class InterferenceFunction3DLattice(IInterferenceFunction):
 
     def __init__(self, lattice):
         r"""
-        __init__(InterferenceFunction3DLattice self, Lattice lattice) -> InterferenceFunction3DLattice
-        InterferenceFunction3DLattice::InterferenceFunction3DLattice(const Lattice &lattice)
+        __init__(InterferenceFunction3DLattice self, Lattice3D lattice) -> InterferenceFunction3DLattice
+        InterferenceFunction3DLattice::InterferenceFunction3DLattice(const Lattice3D &lattice)
 
         """
         _libBornAgainSample.InterferenceFunction3DLattice_swiginit(self, _libBornAgainSample.new_InterferenceFunction3DLattice(lattice))
@@ -7394,8 +7394,8 @@ class InterferenceFunction3DLattice(IInterferenceFunction):
 
     def lattice(self):
         r"""
-        lattice(InterferenceFunction3DLattice self) -> Lattice
-        const Lattice & InterferenceFunction3DLattice::lattice() const
+        lattice(InterferenceFunction3DLattice self) -> Lattice3D
+        const Lattice3D & InterferenceFunction3DLattice::lattice() const
 
         """
         return _libBornAgainSample.InterferenceFunction3DLattice_lattice(self)
@@ -7569,8 +7569,8 @@ class InterferenceFunctionFinite3DLattice(IInterferenceFunction):
 
     def __init__(self, lattice, N_1, N_2, N_3):
         r"""
-        __init__(InterferenceFunctionFinite3DLattice self, Lattice lattice, unsigned int N_1, unsigned int N_2, unsigned int N_3) -> InterferenceFunctionFinite3DLattice
-        InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice(const Lattice &lattice, unsigned N_1, unsigned N_2, unsigned N_3)
+        __init__(InterferenceFunctionFinite3DLattice self, Lattice3D lattice, unsigned int N_1, unsigned int N_2, unsigned int N_3) -> InterferenceFunctionFinite3DLattice
+        InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice(const Lattice3D &lattice, unsigned N_1, unsigned N_2, unsigned N_3)
 
         """
         _libBornAgainSample.InterferenceFunctionFinite3DLattice_swiginit(self, _libBornAgainSample.new_InterferenceFunctionFinite3DLattice(lattice, N_1, N_2, N_3))
@@ -7620,8 +7620,8 @@ class InterferenceFunctionFinite3DLattice(IInterferenceFunction):
 
     def lattice(self):
         r"""
-        lattice(InterferenceFunctionFinite3DLattice self) -> Lattice
-        const Lattice & InterferenceFunctionFinite3DLattice::lattice() const
+        lattice(InterferenceFunctionFinite3DLattice self) -> Lattice3D
+        const Lattice3D & InterferenceFunctionFinite3DLattice::lattice() const
 
         """
         return _libBornAgainSample.InterferenceFunctionFinite3DLattice_lattice(self)
@@ -11236,13 +11236,13 @@ class SimpleSelectionRule(ISelectionRule):
 # Register SimpleSelectionRule in _libBornAgainSample:
 _libBornAgainSample.SimpleSelectionRule_swigregister(SimpleSelectionRule)
 
-class Lattice(libBornAgainParam.INode):
+class Lattice3D(libBornAgainParam.INode):
     r"""
 
 
     A Bravais lattice, characterized by three basis vectors, and optionally an  ISelectionRule.
 
-    C++ includes: Lattice.h
+    C++ includes: Lattice3D.h
 
     """
 
@@ -11251,138 +11251,138 @@ class Lattice(libBornAgainParam.INode):
 
     def __init__(self, *args):
         r"""
-        __init__(Lattice self, kvector_t a, kvector_t b, kvector_t c) -> Lattice
-        __init__(Lattice self, Lattice lattice) -> Lattice
-        Lattice::Lattice(const Lattice &lattice)
+        __init__(Lattice3D self, kvector_t a, kvector_t b, kvector_t c) -> Lattice3D
+        __init__(Lattice3D self, Lattice3D lattice) -> Lattice3D
+        Lattice3D::Lattice3D(const Lattice3D &lattice)
 
         """
-        _libBornAgainSample.Lattice_swiginit(self, _libBornAgainSample.new_Lattice(*args))
-    __swig_destroy__ = _libBornAgainSample.delete_Lattice
+        _libBornAgainSample.Lattice3D_swiginit(self, _libBornAgainSample.new_Lattice3D(*args))
+    __swig_destroy__ = _libBornAgainSample.delete_Lattice3D
 
     def accept(self, visitor):
         r"""
-        accept(Lattice self, INodeVisitor * visitor)
-        void Lattice::accept(INodeVisitor *visitor) const override
+        accept(Lattice3D self, INodeVisitor * visitor)
+        void Lattice3D::accept(INodeVisitor *visitor) const override
 
         """
-        return _libBornAgainSample.Lattice_accept(self, visitor)
+        return _libBornAgainSample.Lattice3D_accept(self, visitor)
 
     def transformed(self, transform):
         r"""
-        transformed(Lattice self, Transform3D const & transform) -> Lattice
-        Lattice Lattice::transformed(const Transform3D &transform) const
+        transformed(Lattice3D self, Transform3D const & transform) -> Lattice3D
+        Lattice3D Lattice3D::transformed(const Transform3D &transform) const
 
         Creates transformed lattice. 
 
         """
-        return _libBornAgainSample.Lattice_transformed(self, transform)
+        return _libBornAgainSample.Lattice3D_transformed(self, transform)
 
     def initialize(self):
         r"""
-        initialize(Lattice self)
-        void Lattice::initialize()
+        initialize(Lattice3D self)
+        void Lattice3D::initialize()
 
         Initializes cached data. 
 
         """
-        return _libBornAgainSample.Lattice_initialize(self)
+        return _libBornAgainSample.Lattice3D_initialize(self)
 
     def getBasisVectorA(self):
         r"""
-        getBasisVectorA(Lattice self) -> kvector_t
-        kvector_t Lattice::getBasisVectorA() const
+        getBasisVectorA(Lattice3D self) -> kvector_t
+        kvector_t Lattice3D::getBasisVectorA() const
 
         Returns basis vector a. 
 
         """
-        return _libBornAgainSample.Lattice_getBasisVectorA(self)
+        return _libBornAgainSample.Lattice3D_getBasisVectorA(self)
 
     def getBasisVectorB(self):
         r"""
-        getBasisVectorB(Lattice self) -> kvector_t
-        kvector_t Lattice::getBasisVectorB() const
+        getBasisVectorB(Lattice3D self) -> kvector_t
+        kvector_t Lattice3D::getBasisVectorB() const
 
         Returns basis vector b. 
 
         """
-        return _libBornAgainSample.Lattice_getBasisVectorB(self)
+        return _libBornAgainSample.Lattice3D_getBasisVectorB(self)
 
     def getBasisVectorC(self):
         r"""
-        getBasisVectorC(Lattice self) -> kvector_t
-        kvector_t Lattice::getBasisVectorC() const
+        getBasisVectorC(Lattice3D self) -> kvector_t
+        kvector_t Lattice3D::getBasisVectorC() const
 
         Returns basis vector c. 
 
         """
-        return _libBornAgainSample.Lattice_getBasisVectorC(self)
+        return _libBornAgainSample.Lattice3D_getBasisVectorC(self)
 
     def getMillerDirection(self, h, k, l):
         r"""
-        getMillerDirection(Lattice self, double h, double k, double l) -> kvector_t
-        kvector_t Lattice::getMillerDirection(double h, double k, double l) const
+        getMillerDirection(Lattice3D self, double h, double k, double l) -> kvector_t
+        kvector_t Lattice3D::getMillerDirection(double h, double k, double l) const
 
         Returns normalized direction corresponding to the given Miller indices.
 
         Currently unused but may be useful for checks. 
 
         """
-        return _libBornAgainSample.Lattice_getMillerDirection(self, h, k, l)
+        return _libBornAgainSample.Lattice3D_getMillerDirection(self, h, k, l)
 
     def unitCellVolume(self):
         r"""
-        unitCellVolume(Lattice self) -> double
-        double Lattice::unitCellVolume() const
+        unitCellVolume(Lattice3D self) -> double
+        double Lattice3D::unitCellVolume() const
 
         Returns the volume of the unit cell. 
 
         """
-        return _libBornAgainSample.Lattice_unitCellVolume(self)
+        return _libBornAgainSample.Lattice3D_unitCellVolume(self)
 
     def getReciprocalLatticeBasis(self, ra, rb, rc):
         r"""
-        getReciprocalLatticeBasis(Lattice self, kvector_t ra, kvector_t rb, kvector_t rc)
-        void Lattice::getReciprocalLatticeBasis(kvector_t &ra, kvector_t &rb, kvector_t &rc) const
+        getReciprocalLatticeBasis(Lattice3D self, kvector_t ra, kvector_t rb, kvector_t rc)
+        void Lattice3D::getReciprocalLatticeBasis(kvector_t &ra, kvector_t &rb, kvector_t &rc) const
 
         Returns the reciprocal basis vectors.
 
         Currently only used in tests. 
 
         """
-        return _libBornAgainSample.Lattice_getReciprocalLatticeBasis(self, ra, rb, rc)
+        return _libBornAgainSample.Lattice3D_getReciprocalLatticeBasis(self, ra, rb, rc)
 
     def getNearestReciprocalLatticeVectorCoordinates(self, q):
         r"""
-        getNearestReciprocalLatticeVectorCoordinates(Lattice self, kvector_t q) -> ivector_t
-        ivector_t Lattice::getNearestReciprocalLatticeVectorCoordinates(const kvector_t q) const
+        getNearestReciprocalLatticeVectorCoordinates(Lattice3D self, kvector_t q) -> ivector_t
+        ivector_t Lattice3D::getNearestReciprocalLatticeVectorCoordinates(const kvector_t q) const
 
         Returns the nearest reciprocal lattice point from a given vector. 
 
         """
-        return _libBornAgainSample.Lattice_getNearestReciprocalLatticeVectorCoordinates(self, q)
+        return _libBornAgainSample.Lattice3D_getNearestReciprocalLatticeVectorCoordinates(self, q)
 
     def reciprocalLatticeVectorsWithinRadius(self, q, dq):
         r"""
-        reciprocalLatticeVectorsWithinRadius(Lattice self, kvector_t q, double dq) -> vector_kvector_t
-        std::vector< kvector_t > Lattice::reciprocalLatticeVectorsWithinRadius(const kvector_t q, double dq) const
+        reciprocalLatticeVectorsWithinRadius(Lattice3D self, kvector_t q, double dq) -> vector_kvector_t
+        std::vector< kvector_t > Lattice3D::reciprocalLatticeVectorsWithinRadius(const kvector_t q, double dq) const
 
         Returns a list of reciprocal lattice vectors within distance dq of a vector q. 
 
         """
-        return _libBornAgainSample.Lattice_reciprocalLatticeVectorsWithinRadius(self, q, dq)
+        return _libBornAgainSample.Lattice3D_reciprocalLatticeVectorsWithinRadius(self, q, dq)
 
     def setSelectionRule(self, selection_rule):
         r"""
-        setSelectionRule(Lattice self, ISelectionRule selection_rule)
-        void Lattice::setSelectionRule(const ISelectionRule &selection_rule)
+        setSelectionRule(Lattice3D self, ISelectionRule selection_rule)
+        void Lattice3D::setSelectionRule(const ISelectionRule &selection_rule)
 
         Sets a selection rule for the reciprocal vectors. 
 
         """
-        return _libBornAgainSample.Lattice_setSelectionRule(self, selection_rule)
+        return _libBornAgainSample.Lattice3D_setSelectionRule(self, selection_rule)
 
-# Register Lattice in _libBornAgainSample:
-_libBornAgainSample.Lattice_swigregister(Lattice)
+# Register Lattice3D in _libBornAgainSample:
+_libBornAgainSample.Lattice3D_swigregister(Lattice3D)
 
 class Lattice2D(libBornAgainBase.ICloneable, libBornAgainParam.INode):
     r"""Proxy of C++ Lattice2D class."""
@@ -11662,8 +11662,8 @@ _libBornAgainSample.HexagonalLattice_swigregister(HexagonalLattice)
 
 def createCubicLattice(a):
     r"""
-    createCubicLattice(double a) -> Lattice
-    Lattice bake::createCubicLattice(double a)
+    createCubicLattice(double a) -> Lattice3D
+    Lattice3D bake::createCubicLattice(double a)
 
     Returns a primitive cubic (cP) lattice with edge length a. 
 
@@ -11672,8 +11672,8 @@ def createCubicLattice(a):
 
 def createFCCLattice(a):
     r"""
-    createFCCLattice(double a) -> Lattice
-    Lattice bake::createFCCLattice(double a)
+    createFCCLattice(double a) -> Lattice3D
+    Lattice3D bake::createFCCLattice(double a)
 
     Returns a face-centered cubic (cF) lattice with edge length a. 
 
@@ -11682,8 +11682,8 @@ def createFCCLattice(a):
 
 def createHexagonalLattice(a, c):
     r"""
-    createHexagonalLattice(double a, double c) -> Lattice
-    Lattice bake::createHexagonalLattice(double a, double c)
+    createHexagonalLattice(double a, double c) -> Lattice3D
+    Lattice3D bake::createHexagonalLattice(double a, double c)
 
     Returns a primitive hexagonal (hP) lattice with hexagonal edge a and height c. 
 
@@ -11692,8 +11692,8 @@ def createHexagonalLattice(a, c):
 
 def createHCPLattice(a, c):
     r"""
-    createHCPLattice(double a, double c) -> Lattice
-    Lattice bake::createHCPLattice(double a, double c)
+    createHCPLattice(double a, double c) -> Lattice3D
+    Lattice3D bake::createHCPLattice(double a, double c)
 
     TODO: Clarify how this is meant: HCP is not a Bravais lattice. 
 
@@ -11702,8 +11702,8 @@ def createHCPLattice(a, c):
 
 def createTetragonalLattice(a, c):
     r"""
-    createTetragonalLattice(double a, double c) -> Lattice
-    Lattice bake::createTetragonalLattice(double a, double c)
+    createTetragonalLattice(double a, double c) -> Lattice3D
+    Lattice3D bake::createTetragonalLattice(double a, double c)
 
     Returns a primitive tetragonal (tP) lattice with square base edge a and height c. 
 
@@ -11712,8 +11712,8 @@ def createTetragonalLattice(a, c):
 
 def createBCTLattice(a, c):
     r"""
-    createBCTLattice(double a, double c) -> Lattice
-    Lattice bake::createBCTLattice(double a, double c)
+    createBCTLattice(double a, double c) -> Lattice3D
+    Lattice3D bake::createBCTLattice(double a, double c)
 
     Returns a body-centered cubic (cI) lattice with edge length a. TODO: Clarify meaning of c 
 
diff --git a/auto/Wrap/libBornAgainSample_wrap.cpp b/auto/Wrap/libBornAgainSample_wrap.cpp
index 3a22e681632..7ee98b2a221 100644
--- a/auto/Wrap/libBornAgainSample_wrap.cpp
+++ b/auto/Wrap/libBornAgainSample_wrap.cpp
@@ -3199,9 +3199,9 @@ namespace Swig {
 #define SWIGTYPE_p_InterferenceFunctionTwin swig_types[99]
 #define SWIGTYPE_p_IsotropicGaussPeakShape swig_types[100]
 #define SWIGTYPE_p_IsotropicLorentzPeakShape swig_types[101]
-#define SWIGTYPE_p_Lattice swig_types[102]
-#define SWIGTYPE_p_Lattice2D swig_types[103]
-#define SWIGTYPE_p_Lattice2D__ReciprocalBases swig_types[104]
+#define SWIGTYPE_p_Lattice2D swig_types[102]
+#define SWIGTYPE_p_Lattice2D__ReciprocalBases swig_types[103]
+#define SWIGTYPE_p_Lattice3D swig_types[104]
 #define SWIGTYPE_p_Layer swig_types[105]
 #define SWIGTYPE_p_LayerInterface swig_types[106]
 #define SWIGTYPE_p_LayerRoughness swig_types[107]
@@ -6836,7 +6836,7 @@ SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg__insert__SWIG_
 #include "Sample/HardParticle/IFormFactorPolyhedron.h"
 #include "Sample/HardParticle/IFormFactorPrism.h"
 #include "Sample/Lattice/ISelectionRule.h"
-#include "Sample/Lattice/Lattice.h"
+#include "Sample/Lattice/Lattice3D.h"
 #include "Sample/Lattice/Lattice2D.h"
 #include "Sample/Lattice/BakeLattice.h"
 #include "Sample/Material/MaterialFactoryFuncs.h"
@@ -41796,7 +41796,7 @@ SWIGINTERN PyObject *RotationEuler_swiginit(PyObject *SWIGUNUSEDPARM(self), PyOb
 
 SWIGINTERN PyObject *_wrap_new_FormFactorCrystal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = 0 ;
+  Lattice3D *arg1 = 0 ;
   IFormFactor *arg2 = 0 ;
   IFormFactor *arg3 = 0 ;
   double arg4 ;
@@ -41811,14 +41811,14 @@ SWIGINTERN PyObject *_wrap_new_FormFactorCrystal__SWIG_0(PyObject *SWIGUNUSEDPAR
   FormFactorCrystal *result = 0 ;
   
   if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Lattice,  0  | 0);
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Lattice3D,  0  | 0);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FormFactorCrystal" "', argument " "1"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FormFactorCrystal" "', argument " "1"" of type '" "Lattice3D const &""'"); 
   }
   if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FormFactorCrystal" "', argument " "1"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FormFactorCrystal" "', argument " "1"" of type '" "Lattice3D const &""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_IFormFactor,  0  | 0);
   if (!SWIG_IsOK(res2)) {
     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FormFactorCrystal" "', argument " "2"" of type '" "IFormFactor const &""'"); 
@@ -41840,7 +41840,7 @@ SWIGINTERN PyObject *_wrap_new_FormFactorCrystal__SWIG_0(PyObject *SWIGUNUSEDPAR
     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FormFactorCrystal" "', argument " "4"" of type '" "double""'");
   } 
   arg4 = static_cast< double >(val4);
-  result = (FormFactorCrystal *)new FormFactorCrystal((Lattice const &)*arg1,(IFormFactor const &)*arg2,(IFormFactor const &)*arg3,arg4);
+  result = (FormFactorCrystal *)new FormFactorCrystal((Lattice3D const &)*arg1,(IFormFactor const &)*arg2,(IFormFactor const &)*arg3,arg4);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FormFactorCrystal, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -41850,7 +41850,7 @@ fail:
 
 SWIGINTERN PyObject *_wrap_new_FormFactorCrystal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = 0 ;
+  Lattice3D *arg1 = 0 ;
   IFormFactor *arg2 = 0 ;
   IFormFactor *arg3 = 0 ;
   void *argp1 = 0 ;
@@ -41862,14 +41862,14 @@ SWIGINTERN PyObject *_wrap_new_FormFactorCrystal__SWIG_1(PyObject *SWIGUNUSEDPAR
   FormFactorCrystal *result = 0 ;
   
   if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Lattice,  0  | 0);
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Lattice3D,  0  | 0);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FormFactorCrystal" "', argument " "1"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FormFactorCrystal" "', argument " "1"" of type '" "Lattice3D const &""'"); 
   }
   if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FormFactorCrystal" "', argument " "1"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FormFactorCrystal" "', argument " "1"" of type '" "Lattice3D const &""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_IFormFactor,  0  | 0);
   if (!SWIG_IsOK(res2)) {
     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FormFactorCrystal" "', argument " "2"" of type '" "IFormFactor const &""'"); 
@@ -41886,7 +41886,7 @@ SWIGINTERN PyObject *_wrap_new_FormFactorCrystal__SWIG_1(PyObject *SWIGUNUSEDPAR
     SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FormFactorCrystal" "', argument " "3"" of type '" "IFormFactor const &""'"); 
   }
   arg3 = reinterpret_cast< IFormFactor * >(argp3);
-  result = (FormFactorCrystal *)new FormFactorCrystal((Lattice const &)*arg1,(IFormFactor const &)*arg2,(IFormFactor const &)*arg3);
+  result = (FormFactorCrystal *)new FormFactorCrystal((Lattice3D const &)*arg1,(IFormFactor const &)*arg2,(IFormFactor const &)*arg3);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FormFactorCrystal, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -41904,7 +41904,7 @@ SWIGINTERN PyObject *_wrap_new_FormFactorCrystal(PyObject *self, PyObject *args)
   --argc;
   if (argc == 3) {
     int _v;
-    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Lattice, SWIG_POINTER_NO_NULL | 0);
+    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Lattice3D, SWIG_POINTER_NO_NULL | 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IFormFactor, SWIG_POINTER_NO_NULL | 0);
@@ -41920,7 +41920,7 @@ SWIGINTERN PyObject *_wrap_new_FormFactorCrystal(PyObject *self, PyObject *args)
   }
   if (argc == 4) {
     int _v;
-    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Lattice, SWIG_POINTER_NO_NULL | 0);
+    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Lattice3D, SWIG_POINTER_NO_NULL | 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IFormFactor, SWIG_POINTER_NO_NULL | 0);
@@ -41944,8 +41944,8 @@ SWIGINTERN PyObject *_wrap_new_FormFactorCrystal(PyObject *self, PyObject *args)
 fail:
   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_FormFactorCrystal'.\n"
     "  Possible C/C++ prototypes are:\n"
-    "    FormFactorCrystal::FormFactorCrystal(Lattice const &,IFormFactor const &,IFormFactor const &,double)\n"
-    "    FormFactorCrystal::FormFactorCrystal(Lattice const &,IFormFactor const &,IFormFactor const &)\n");
+    "    FormFactorCrystal::FormFactorCrystal(Lattice3D const &,IFormFactor const &,IFormFactor const &,double)\n"
+    "    FormFactorCrystal::FormFactorCrystal(Lattice3D const &,IFormFactor const &,IFormFactor const &)\n");
   return 0;
 }
 
@@ -42789,7 +42789,7 @@ SWIGINTERN PyObject *IAbstractParticle_swigregister(PyObject *SWIGUNUSEDPARM(sel
 SWIGINTERN PyObject *_wrap_new_Crystal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
   IParticle *arg1 = 0 ;
-  Lattice *arg2 = 0 ;
+  Lattice3D *arg2 = 0 ;
   double arg3 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
@@ -42808,20 +42808,20 @@ SWIGINTERN PyObject *_wrap_new_Crystal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), P
     SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Crystal" "', argument " "1"" of type '" "IParticle const &""'"); 
   }
   arg1 = reinterpret_cast< IParticle * >(argp1);
-  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Lattice,  0  | 0);
+  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Lattice3D,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Crystal" "', argument " "2"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Crystal" "', argument " "2"" of type '" "Lattice3D const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Crystal" "', argument " "2"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Crystal" "', argument " "2"" of type '" "Lattice3D const &""'"); 
   }
-  arg2 = reinterpret_cast< Lattice * >(argp2);
+  arg2 = reinterpret_cast< Lattice3D * >(argp2);
   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   if (!SWIG_IsOK(ecode3)) {
     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Crystal" "', argument " "3"" of type '" "double""'");
   } 
   arg3 = static_cast< double >(val3);
-  result = (Crystal *)new Crystal((IParticle const &)*arg1,(Lattice const &)*arg2,arg3);
+  result = (Crystal *)new Crystal((IParticle const &)*arg1,(Lattice3D const &)*arg2,arg3);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Crystal, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -42832,7 +42832,7 @@ fail:
 SWIGINTERN PyObject *_wrap_new_Crystal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
   IParticle *arg1 = 0 ;
-  Lattice *arg2 = 0 ;
+  Lattice3D *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
@@ -42848,15 +42848,15 @@ SWIGINTERN PyObject *_wrap_new_Crystal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), P
     SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Crystal" "', argument " "1"" of type '" "IParticle const &""'"); 
   }
   arg1 = reinterpret_cast< IParticle * >(argp1);
-  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Lattice,  0  | 0);
+  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Lattice3D,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Crystal" "', argument " "2"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Crystal" "', argument " "2"" of type '" "Lattice3D const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Crystal" "', argument " "2"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Crystal" "', argument " "2"" of type '" "Lattice3D const &""'"); 
   }
-  arg2 = reinterpret_cast< Lattice * >(argp2);
-  result = (Crystal *)new Crystal((IParticle const &)*arg1,(Lattice const &)*arg2);
+  arg2 = reinterpret_cast< Lattice3D * >(argp2);
+  result = (Crystal *)new Crystal((IParticle const &)*arg1,(Lattice3D const &)*arg2);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Crystal, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -42877,7 +42877,7 @@ SWIGINTERN PyObject *_wrap_new_Crystal(PyObject *self, PyObject *args) {
     int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IParticle, SWIG_POINTER_NO_NULL | 0);
     _v = SWIG_CheckState(res);
     if (_v) {
-      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Lattice, SWIG_POINTER_NO_NULL | 0);
+      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Lattice3D, SWIG_POINTER_NO_NULL | 0);
       _v = SWIG_CheckState(res);
       if (_v) {
         return _wrap_new_Crystal__SWIG_1(self, argc, argv);
@@ -42889,7 +42889,7 @@ SWIGINTERN PyObject *_wrap_new_Crystal(PyObject *self, PyObject *args) {
     int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IParticle, SWIG_POINTER_NO_NULL | 0);
     _v = SWIG_CheckState(res);
     if (_v) {
-      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Lattice, SWIG_POINTER_NO_NULL | 0);
+      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Lattice3D, SWIG_POINTER_NO_NULL | 0);
       _v = SWIG_CheckState(res);
       if (_v) {
         {
@@ -42906,8 +42906,8 @@ SWIGINTERN PyObject *_wrap_new_Crystal(PyObject *self, PyObject *args) {
 fail:
   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_Crystal'.\n"
     "  Possible C/C++ prototypes are:\n"
-    "    Crystal::Crystal(IParticle const &,Lattice const &,double)\n"
-    "    Crystal::Crystal(IParticle const &,Lattice const &)\n");
+    "    Crystal::Crystal(IParticle const &,Lattice3D const &,double)\n"
+    "    Crystal::Crystal(IParticle const &,Lattice3D const &)\n");
   return 0;
 }
 
@@ -43076,7 +43076,7 @@ SWIGINTERN PyObject *_wrap_Crystal_transformedLattice__SWIG_0(PyObject *SWIGUNUS
   int res1 = 0 ;
   void *argp2 = 0 ;
   int res2 = 0 ;
-  SwigValueWrapper< Lattice > result;
+  SwigValueWrapper< Lattice3D > result;
   
   if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Crystal, 0 |  0 );
@@ -43090,7 +43090,7 @@ SWIGINTERN PyObject *_wrap_Crystal_transformedLattice__SWIG_0(PyObject *SWIGUNUS
   }
   arg2 = reinterpret_cast< IRotation * >(argp2);
   result = ((Crystal const *)arg1)->transformedLattice((IRotation const *)arg2);
-  resultobj = SWIG_NewPointerObj((new Lattice(static_cast< const Lattice& >(result))), SWIGTYPE_p_Lattice, SWIG_POINTER_OWN |  0 );
+  resultobj = SWIG_NewPointerObj((new Lattice3D(static_cast< const Lattice3D& >(result))), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -43102,7 +43102,7 @@ SWIGINTERN PyObject *_wrap_Crystal_transformedLattice__SWIG_1(PyObject *SWIGUNUS
   Crystal *arg1 = (Crystal *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
-  SwigValueWrapper< Lattice > result;
+  SwigValueWrapper< Lattice3D > result;
   
   if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Crystal, 0 |  0 );
@@ -43111,7 +43111,7 @@ SWIGINTERN PyObject *_wrap_Crystal_transformedLattice__SWIG_1(PyObject *SWIGUNUS
   }
   arg1 = reinterpret_cast< Crystal * >(argp1);
   result = ((Crystal const *)arg1)->transformedLattice();
-  resultobj = SWIG_NewPointerObj((new Lattice(static_cast< const Lattice& >(result))), SWIGTYPE_p_Lattice, SWIG_POINTER_OWN |  0 );
+  resultobj = SWIG_NewPointerObj((new Lattice3D(static_cast< const Lattice3D& >(result))), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -53680,7 +53680,7 @@ SWIGINTERN PyObject *InterferenceFunction2DSuperLattice_swiginit(PyObject *SWIGU
 
 SWIGINTERN PyObject *_wrap_new_InterferenceFunction3DLattice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = 0 ;
+  Lattice3D *arg1 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject *swig_obj[1] ;
@@ -53688,15 +53688,15 @@ SWIGINTERN PyObject *_wrap_new_InterferenceFunction3DLattice(PyObject *SWIGUNUSE
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Lattice,  0  | 0);
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Lattice3D,  0  | 0);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InterferenceFunction3DLattice" "', argument " "1"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InterferenceFunction3DLattice" "', argument " "1"" of type '" "Lattice3D const &""'"); 
   }
   if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InterferenceFunction3DLattice" "', argument " "1"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InterferenceFunction3DLattice" "', argument " "1"" of type '" "Lattice3D const &""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
-  result = (InterferenceFunction3DLattice *)new InterferenceFunction3DLattice((Lattice const &)*arg1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
+  result = (InterferenceFunction3DLattice *)new InterferenceFunction3DLattice((Lattice3D const &)*arg1);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterferenceFunction3DLattice, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -53816,7 +53816,7 @@ SWIGINTERN PyObject *_wrap_InterferenceFunction3DLattice_lattice(PyObject *SWIGU
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject *swig_obj[1] ;
-  Lattice *result = 0 ;
+  Lattice3D *result = 0 ;
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
@@ -53825,8 +53825,8 @@ SWIGINTERN PyObject *_wrap_InterferenceFunction3DLattice_lattice(PyObject *SWIGU
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceFunction3DLattice_lattice" "', argument " "1"" of type '" "InterferenceFunction3DLattice const *""'"); 
   }
   arg1 = reinterpret_cast< InterferenceFunction3DLattice * >(argp1);
-  result = (Lattice *) &((InterferenceFunction3DLattice const *)arg1)->lattice();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice, 0 |  0 );
+  result = (Lattice3D *) &((InterferenceFunction3DLattice const *)arg1)->lattice();
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice3D, 0 |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -54345,7 +54345,7 @@ SWIGINTERN PyObject *InterferenceFunctionFinite2DLattice_swiginit(PyObject *SWIG
 
 SWIGINTERN PyObject *_wrap_new_InterferenceFunctionFinite3DLattice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = 0 ;
+  Lattice3D *arg1 = 0 ;
   unsigned int arg2 ;
   unsigned int arg3 ;
   unsigned int arg4 ;
@@ -54361,14 +54361,14 @@ SWIGINTERN PyObject *_wrap_new_InterferenceFunctionFinite3DLattice(PyObject *SWI
   InterferenceFunctionFinite3DLattice *result = 0 ;
   
   if (!SWIG_Python_UnpackTuple(args, "new_InterferenceFunctionFinite3DLattice", 4, 4, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Lattice,  0  | 0);
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Lattice3D,  0  | 0);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InterferenceFunctionFinite3DLattice" "', argument " "1"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InterferenceFunctionFinite3DLattice" "', argument " "1"" of type '" "Lattice3D const &""'"); 
   }
   if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InterferenceFunctionFinite3DLattice" "', argument " "1"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InterferenceFunctionFinite3DLattice" "', argument " "1"" of type '" "Lattice3D const &""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2);
   if (!SWIG_IsOK(ecode2)) {
     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InterferenceFunctionFinite3DLattice" "', argument " "2"" of type '" "unsigned int""'");
@@ -54384,7 +54384,7 @@ SWIGINTERN PyObject *_wrap_new_InterferenceFunctionFinite3DLattice(PyObject *SWI
     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_InterferenceFunctionFinite3DLattice" "', argument " "4"" of type '" "unsigned int""'");
   } 
   arg4 = static_cast< unsigned int >(val4);
-  result = (InterferenceFunctionFinite3DLattice *)new InterferenceFunctionFinite3DLattice((Lattice const &)*arg1,arg2,arg3,arg4);
+  result = (InterferenceFunctionFinite3DLattice *)new InterferenceFunctionFinite3DLattice((Lattice3D const &)*arg1,arg2,arg3,arg4);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterferenceFunctionFinite3DLattice, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -54541,7 +54541,7 @@ SWIGINTERN PyObject *_wrap_InterferenceFunctionFinite3DLattice_lattice(PyObject
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject *swig_obj[1] ;
-  Lattice *result = 0 ;
+  Lattice3D *result = 0 ;
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
@@ -54550,8 +54550,8 @@ SWIGINTERN PyObject *_wrap_InterferenceFunctionFinite3DLattice_lattice(PyObject
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceFunctionFinite3DLattice_lattice" "', argument " "1"" of type '" "InterferenceFunctionFinite3DLattice const *""'"); 
   }
   arg1 = reinterpret_cast< InterferenceFunctionFinite3DLattice * >(argp1);
-  result = (Lattice *) &((InterferenceFunctionFinite3DLattice const *)arg1)->lattice();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice, 0 |  0 );
+  result = (Lattice3D *) &((InterferenceFunctionFinite3DLattice const *)arg1)->lattice();
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice3D, 0 |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -67392,7 +67392,7 @@ SWIGINTERN PyObject *SimpleSelectionRule_swiginit(PyObject *SWIGUNUSEDPARM(self)
   return SWIG_Python_InitShadowInstance(args);
 }
 
-SWIGINTERN PyObject *_wrap_new_Lattice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
+SWIGINTERN PyObject *_wrap_new_Lattice3D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
   kvector_t arg1 ;
   kvector_t arg2 ;
@@ -67403,16 +67403,16 @@ SWIGINTERN PyObject *_wrap_new_Lattice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), P
   int res2 = 0 ;
   void *argp3 ;
   int res3 = 0 ;
-  Lattice *result = 0 ;
+  Lattice3D *result = 0 ;
   
   if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
   {
     res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
     if (!SWIG_IsOK(res1)) {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Lattice" "', argument " "1"" of type '" "kvector_t const""'"); 
+      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Lattice3D" "', argument " "1"" of type '" "kvector_t const""'"); 
     }  
     if (!argp1) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Lattice" "', argument " "1"" of type '" "kvector_t const""'");
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Lattice3D" "', argument " "1"" of type '" "kvector_t const""'");
     } else {
       kvector_t * temp = reinterpret_cast< kvector_t * >(argp1);
       arg1 = *temp;
@@ -67422,10 +67422,10 @@ SWIGINTERN PyObject *_wrap_new_Lattice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), P
   {
     res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
     if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Lattice" "', argument " "2"" of type '" "kvector_t const""'"); 
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Lattice3D" "', argument " "2"" of type '" "kvector_t const""'"); 
     }  
     if (!argp2) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Lattice" "', argument " "2"" of type '" "kvector_t const""'");
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Lattice3D" "', argument " "2"" of type '" "kvector_t const""'");
     } else {
       kvector_t * temp = reinterpret_cast< kvector_t * >(argp2);
       arg2 = *temp;
@@ -67435,62 +67435,62 @@ SWIGINTERN PyObject *_wrap_new_Lattice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), P
   {
     res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
     if (!SWIG_IsOK(res3)) {
-      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Lattice" "', argument " "3"" of type '" "kvector_t const""'"); 
+      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Lattice3D" "', argument " "3"" of type '" "kvector_t const""'"); 
     }  
     if (!argp3) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Lattice" "', argument " "3"" of type '" "kvector_t const""'");
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Lattice3D" "', argument " "3"" of type '" "kvector_t const""'");
     } else {
       kvector_t * temp = reinterpret_cast< kvector_t * >(argp3);
       arg3 = *temp;
       if (SWIG_IsNewObj(res3)) delete temp;
     }
   }
-  result = (Lattice *)new Lattice(arg1,arg2,arg3);
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice, SWIG_POINTER_NEW |  0 );
+  result = (Lattice3D *)new Lattice3D(arg1,arg2,arg3);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice3D, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_new_Lattice__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
+SWIGINTERN PyObject *_wrap_new_Lattice3D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = 0 ;
+  Lattice3D *arg1 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
-  Lattice *result = 0 ;
+  Lattice3D *result = 0 ;
   
   if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Lattice,  0  | 0);
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Lattice3D,  0  | 0);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Lattice" "', argument " "1"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Lattice3D" "', argument " "1"" of type '" "Lattice3D const &""'"); 
   }
   if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Lattice" "', argument " "1"" of type '" "Lattice const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Lattice3D" "', argument " "1"" of type '" "Lattice3D const &""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
-  result = (Lattice *)new Lattice((Lattice const &)*arg1);
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice, SWIG_POINTER_NEW |  0 );
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
+  result = (Lattice3D *)new Lattice3D((Lattice3D const &)*arg1);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice3D, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_new_Lattice(PyObject *self, PyObject *args) {
+SWIGINTERN PyObject *_wrap_new_Lattice3D(PyObject *self, PyObject *args) {
   Py_ssize_t argc;
   PyObject *argv[4] = {
     0
   };
   
-  if (!(argc = SWIG_Python_UnpackTuple(args, "new_Lattice", 0, 3, argv))) SWIG_fail;
+  if (!(argc = SWIG_Python_UnpackTuple(args, "new_Lattice3D", 0, 3, argv))) SWIG_fail;
   --argc;
   if (argc == 1) {
     int _v;
-    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Lattice, SWIG_POINTER_NO_NULL | 0);
+    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Lattice3D, SWIG_POINTER_NO_NULL | 0);
     _v = SWIG_CheckState(res);
     if (_v) {
-      return _wrap_new_Lattice__SWIG_1(self, argc, argv);
+      return _wrap_new_Lattice3D__SWIG_1(self, argc, argv);
     }
   }
   if (argc == 3) {
@@ -67504,35 +67504,35 @@ SWIGINTERN PyObject *_wrap_new_Lattice(PyObject *self, PyObject *args) {
         int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_BasicVector3DT_double_t, SWIG_POINTER_NO_NULL | 0);
         _v = SWIG_CheckState(res);
         if (_v) {
-          return _wrap_new_Lattice__SWIG_0(self, argc, argv);
+          return _wrap_new_Lattice3D__SWIG_0(self, argc, argv);
         }
       }
     }
   }
   
 fail:
-  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_Lattice'.\n"
+  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_Lattice3D'.\n"
     "  Possible C/C++ prototypes are:\n"
-    "    Lattice::Lattice(kvector_t const,kvector_t const,kvector_t const)\n"
-    "    Lattice::Lattice(Lattice const &)\n");
+    "    Lattice3D::Lattice3D(kvector_t const,kvector_t const,kvector_t const)\n"
+    "    Lattice3D::Lattice3D(Lattice3D const &)\n");
   return 0;
 }
 
 
-SWIGINTERN PyObject *_wrap_delete_Lattice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_delete_Lattice3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject *swig_obj[1] ;
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, SWIG_POINTER_DISOWN |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, SWIG_POINTER_DISOWN |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Lattice" "', argument " "1"" of type '" "Lattice *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Lattice3D" "', argument " "1"" of type '" "Lattice3D *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   delete arg1;
   resultobj = SWIG_Py_Void();
   return resultobj;
@@ -67541,9 +67541,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_accept(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_accept(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   INodeVisitor *arg2 = (INodeVisitor *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
@@ -67551,18 +67551,18 @@ SWIGINTERN PyObject *_wrap_Lattice_accept(PyObject *SWIGUNUSEDPARM(self), PyObje
   int res2 = 0 ;
   PyObject *swig_obj[2] ;
   
-  if (!SWIG_Python_UnpackTuple(args, "Lattice_accept", 2, 2, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "Lattice3D_accept", 2, 2, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_accept" "', argument " "1"" of type '" "Lattice const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_accept" "', argument " "1"" of type '" "Lattice3D const *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_INodeVisitor, 0 |  0 );
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice_accept" "', argument " "2"" of type '" "INodeVisitor *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice3D_accept" "', argument " "2"" of type '" "INodeVisitor *""'"); 
   }
   arg2 = reinterpret_cast< INodeVisitor * >(argp2);
-  ((Lattice const *)arg1)->accept(arg2);
+  ((Lattice3D const *)arg1)->accept(arg2);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -67570,53 +67570,53 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_transformed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_transformed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   Transform3D *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
   int res2 = 0 ;
   PyObject *swig_obj[2] ;
-  SwigValueWrapper< Lattice > result;
+  SwigValueWrapper< Lattice3D > result;
   
-  if (!SWIG_Python_UnpackTuple(args, "Lattice_transformed", 2, 2, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "Lattice3D_transformed", 2, 2, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_transformed" "', argument " "1"" of type '" "Lattice const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_transformed" "', argument " "1"" of type '" "Lattice3D const *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Transform3D,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice_transformed" "', argument " "2"" of type '" "Transform3D const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice3D_transformed" "', argument " "2"" of type '" "Transform3D const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice_transformed" "', argument " "2"" of type '" "Transform3D const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice3D_transformed" "', argument " "2"" of type '" "Transform3D const &""'"); 
   }
   arg2 = reinterpret_cast< Transform3D * >(argp2);
-  result = ((Lattice const *)arg1)->transformed((Transform3D const &)*arg2);
-  resultobj = SWIG_NewPointerObj((new Lattice(static_cast< const Lattice& >(result))), SWIGTYPE_p_Lattice, SWIG_POINTER_OWN |  0 );
+  result = ((Lattice3D const *)arg1)->transformed((Transform3D const &)*arg2);
+  resultobj = SWIG_NewPointerObj((new Lattice3D(static_cast< const Lattice3D& >(result))), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_initialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_initialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject *swig_obj[1] ;
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_initialize" "', argument " "1"" of type '" "Lattice *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_initialize" "', argument " "1"" of type '" "Lattice3D *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   (arg1)->initialize();
   resultobj = SWIG_Py_Void();
   return resultobj;
@@ -67625,9 +67625,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_getBasisVectorA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_getBasisVectorA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject *swig_obj[1] ;
@@ -67635,12 +67635,12 @@ SWIGINTERN PyObject *_wrap_Lattice_getBasisVectorA(PyObject *SWIGUNUSEDPARM(self
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_getBasisVectorA" "', argument " "1"" of type '" "Lattice const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_getBasisVectorA" "', argument " "1"" of type '" "Lattice3D const *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
-  result = ((Lattice const *)arg1)->getBasisVectorA();
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
+  result = ((Lattice3D const *)arg1)->getBasisVectorA();
   resultobj = SWIG_NewPointerObj((new kvector_t(static_cast< const kvector_t& >(result))), SWIGTYPE_p_BasicVector3DT_double_t, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
@@ -67648,9 +67648,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_getBasisVectorB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_getBasisVectorB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject *swig_obj[1] ;
@@ -67658,12 +67658,12 @@ SWIGINTERN PyObject *_wrap_Lattice_getBasisVectorB(PyObject *SWIGUNUSEDPARM(self
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_getBasisVectorB" "', argument " "1"" of type '" "Lattice const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_getBasisVectorB" "', argument " "1"" of type '" "Lattice3D const *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
-  result = ((Lattice const *)arg1)->getBasisVectorB();
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
+  result = ((Lattice3D const *)arg1)->getBasisVectorB();
   resultobj = SWIG_NewPointerObj((new kvector_t(static_cast< const kvector_t& >(result))), SWIGTYPE_p_BasicVector3DT_double_t, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
@@ -67671,9 +67671,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_getBasisVectorC(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_getBasisVectorC(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject *swig_obj[1] ;
@@ -67681,12 +67681,12 @@ SWIGINTERN PyObject *_wrap_Lattice_getBasisVectorC(PyObject *SWIGUNUSEDPARM(self
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_getBasisVectorC" "', argument " "1"" of type '" "Lattice const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_getBasisVectorC" "', argument " "1"" of type '" "Lattice3D const *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
-  result = ((Lattice const *)arg1)->getBasisVectorC();
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
+  result = ((Lattice3D const *)arg1)->getBasisVectorC();
   resultobj = SWIG_NewPointerObj((new kvector_t(static_cast< const kvector_t& >(result))), SWIGTYPE_p_BasicVector3DT_double_t, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
@@ -67694,9 +67694,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_getMillerDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_getMillerDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   double arg2 ;
   double arg3 ;
   double arg4 ;
@@ -67711,28 +67711,28 @@ SWIGINTERN PyObject *_wrap_Lattice_getMillerDirection(PyObject *SWIGUNUSEDPARM(s
   PyObject *swig_obj[4] ;
   kvector_t result;
   
-  if (!SWIG_Python_UnpackTuple(args, "Lattice_getMillerDirection", 4, 4, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "Lattice3D_getMillerDirection", 4, 4, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_getMillerDirection" "', argument " "1"" of type '" "Lattice const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_getMillerDirection" "', argument " "1"" of type '" "Lattice3D const *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Lattice_getMillerDirection" "', argument " "2"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Lattice3D_getMillerDirection" "', argument " "2"" of type '" "double""'");
   } 
   arg2 = static_cast< double >(val2);
   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Lattice_getMillerDirection" "', argument " "3"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Lattice3D_getMillerDirection" "', argument " "3"" of type '" "double""'");
   } 
   arg3 = static_cast< double >(val3);
   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   if (!SWIG_IsOK(ecode4)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Lattice_getMillerDirection" "', argument " "4"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Lattice3D_getMillerDirection" "', argument " "4"" of type '" "double""'");
   } 
   arg4 = static_cast< double >(val4);
-  result = ((Lattice const *)arg1)->getMillerDirection(arg2,arg3,arg4);
+  result = ((Lattice3D const *)arg1)->getMillerDirection(arg2,arg3,arg4);
   resultobj = SWIG_NewPointerObj((new kvector_t(static_cast< const kvector_t& >(result))), SWIGTYPE_p_BasicVector3DT_double_t, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
@@ -67740,9 +67740,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_unitCellVolume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_unitCellVolume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject *swig_obj[1] ;
@@ -67750,12 +67750,12 @@ SWIGINTERN PyObject *_wrap_Lattice_unitCellVolume(PyObject *SWIGUNUSEDPARM(self)
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_unitCellVolume" "', argument " "1"" of type '" "Lattice const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_unitCellVolume" "', argument " "1"" of type '" "Lattice3D const *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
-  result = (double)((Lattice const *)arg1)->unitCellVolume();
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
+  result = (double)((Lattice3D const *)arg1)->unitCellVolume();
   resultobj = SWIG_From_double(static_cast< double >(result));
   return resultobj;
 fail:
@@ -67763,9 +67763,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_getReciprocalLatticeBasis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_getReciprocalLatticeBasis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   kvector_t *arg2 = 0 ;
   kvector_t *arg3 = 0 ;
   kvector_t *arg4 = 0 ;
@@ -67779,37 +67779,37 @@ SWIGINTERN PyObject *_wrap_Lattice_getReciprocalLatticeBasis(PyObject *SWIGUNUSE
   int res4 = 0 ;
   PyObject *swig_obj[4] ;
   
-  if (!SWIG_Python_UnpackTuple(args, "Lattice_getReciprocalLatticeBasis", 4, 4, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "Lattice3D_getReciprocalLatticeBasis", 4, 4, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_getReciprocalLatticeBasis" "', argument " "1"" of type '" "Lattice const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_getReciprocalLatticeBasis" "', argument " "1"" of type '" "Lattice3D const *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_BasicVector3DT_double_t,  0 );
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice_getReciprocalLatticeBasis" "', argument " "2"" of type '" "kvector_t &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice3D_getReciprocalLatticeBasis" "', argument " "2"" of type '" "kvector_t &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice_getReciprocalLatticeBasis" "', argument " "2"" of type '" "kvector_t &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice3D_getReciprocalLatticeBasis" "', argument " "2"" of type '" "kvector_t &""'"); 
   }
   arg2 = reinterpret_cast< kvector_t * >(argp2);
   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_BasicVector3DT_double_t,  0 );
   if (!SWIG_IsOK(res3)) {
-    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Lattice_getReciprocalLatticeBasis" "', argument " "3"" of type '" "kvector_t &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Lattice3D_getReciprocalLatticeBasis" "', argument " "3"" of type '" "kvector_t &""'"); 
   }
   if (!argp3) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice_getReciprocalLatticeBasis" "', argument " "3"" of type '" "kvector_t &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice3D_getReciprocalLatticeBasis" "', argument " "3"" of type '" "kvector_t &""'"); 
   }
   arg3 = reinterpret_cast< kvector_t * >(argp3);
   res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_BasicVector3DT_double_t,  0 );
   if (!SWIG_IsOK(res4)) {
-    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Lattice_getReciprocalLatticeBasis" "', argument " "4"" of type '" "kvector_t &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Lattice3D_getReciprocalLatticeBasis" "', argument " "4"" of type '" "kvector_t &""'"); 
   }
   if (!argp4) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice_getReciprocalLatticeBasis" "', argument " "4"" of type '" "kvector_t &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice3D_getReciprocalLatticeBasis" "', argument " "4"" of type '" "kvector_t &""'"); 
   }
   arg4 = reinterpret_cast< kvector_t * >(argp4);
-  ((Lattice const *)arg1)->getReciprocalLatticeBasis(*arg2,*arg3,*arg4);
+  ((Lattice3D const *)arg1)->getReciprocalLatticeBasis(*arg2,*arg3,*arg4);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -67817,9 +67817,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_getNearestReciprocalLatticeVectorCoordinates(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_getNearestReciprocalLatticeVectorCoordinates(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   kvector_t arg2 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
@@ -67828,26 +67828,26 @@ SWIGINTERN PyObject *_wrap_Lattice_getNearestReciprocalLatticeVectorCoordinates(
   PyObject *swig_obj[2] ;
   SwigValueWrapper< BasicVector3D< int > > result;
   
-  if (!SWIG_Python_UnpackTuple(args, "Lattice_getNearestReciprocalLatticeVectorCoordinates", 2, 2, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "Lattice3D_getNearestReciprocalLatticeVectorCoordinates", 2, 2, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_getNearestReciprocalLatticeVectorCoordinates" "', argument " "1"" of type '" "Lattice const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_getNearestReciprocalLatticeVectorCoordinates" "', argument " "1"" of type '" "Lattice3D const *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   {
     res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
     if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice_getNearestReciprocalLatticeVectorCoordinates" "', argument " "2"" of type '" "kvector_t const""'"); 
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice3D_getNearestReciprocalLatticeVectorCoordinates" "', argument " "2"" of type '" "kvector_t const""'"); 
     }  
     if (!argp2) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice_getNearestReciprocalLatticeVectorCoordinates" "', argument " "2"" of type '" "kvector_t const""'");
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice3D_getNearestReciprocalLatticeVectorCoordinates" "', argument " "2"" of type '" "kvector_t const""'");
     } else {
       kvector_t * temp = reinterpret_cast< kvector_t * >(argp2);
       arg2 = *temp;
       if (SWIG_IsNewObj(res2)) delete temp;
     }
   }
-  result = ((Lattice const *)arg1)->getNearestReciprocalLatticeVectorCoordinates(arg2);
+  result = ((Lattice3D const *)arg1)->getNearestReciprocalLatticeVectorCoordinates(arg2);
   resultobj = SWIG_NewPointerObj((new ivector_t(static_cast< const ivector_t& >(result))), SWIGTYPE_p_BasicVector3DT_int_t, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
@@ -67855,9 +67855,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_reciprocalLatticeVectorsWithinRadius(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_reciprocalLatticeVectorsWithinRadius(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   kvector_t arg2 ;
   double arg3 ;
   void *argp1 = 0 ;
@@ -67869,19 +67869,19 @@ SWIGINTERN PyObject *_wrap_Lattice_reciprocalLatticeVectorsWithinRadius(PyObject
   PyObject *swig_obj[3] ;
   std::vector< kvector_t,std::allocator< kvector_t > > result;
   
-  if (!SWIG_Python_UnpackTuple(args, "Lattice_reciprocalLatticeVectorsWithinRadius", 3, 3, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "Lattice3D_reciprocalLatticeVectorsWithinRadius", 3, 3, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_reciprocalLatticeVectorsWithinRadius" "', argument " "1"" of type '" "Lattice const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_reciprocalLatticeVectorsWithinRadius" "', argument " "1"" of type '" "Lattice3D const *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   {
     res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
     if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice_reciprocalLatticeVectorsWithinRadius" "', argument " "2"" of type '" "kvector_t const""'"); 
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice3D_reciprocalLatticeVectorsWithinRadius" "', argument " "2"" of type '" "kvector_t const""'"); 
     }  
     if (!argp2) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice_reciprocalLatticeVectorsWithinRadius" "', argument " "2"" of type '" "kvector_t const""'");
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice3D_reciprocalLatticeVectorsWithinRadius" "', argument " "2"" of type '" "kvector_t const""'");
     } else {
       kvector_t * temp = reinterpret_cast< kvector_t * >(argp2);
       arg2 = *temp;
@@ -67890,10 +67890,10 @@ SWIGINTERN PyObject *_wrap_Lattice_reciprocalLatticeVectorsWithinRadius(PyObject
   }
   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Lattice_reciprocalLatticeVectorsWithinRadius" "', argument " "3"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Lattice3D_reciprocalLatticeVectorsWithinRadius" "', argument " "3"" of type '" "double""'");
   } 
   arg3 = static_cast< double >(val3);
-  result = ((Lattice const *)arg1)->reciprocalLatticeVectorsWithinRadius(arg2,arg3);
+  result = ((Lattice3D const *)arg1)->reciprocalLatticeVectorsWithinRadius(arg2,arg3);
   resultobj = swig::from(static_cast< std::vector< BasicVector3D< double >,std::allocator< BasicVector3D< double > > > >(result));
   return resultobj;
 fail:
@@ -67901,9 +67901,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Lattice_setSelectionRule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Lattice3D_setSelectionRule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  Lattice *arg1 = (Lattice *) 0 ;
+  Lattice3D *arg1 = (Lattice3D *) 0 ;
   ISelectionRule *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
@@ -67911,18 +67911,18 @@ SWIGINTERN PyObject *_wrap_Lattice_setSelectionRule(PyObject *SWIGUNUSEDPARM(sel
   int res2 = 0 ;
   PyObject *swig_obj[2] ;
   
-  if (!SWIG_Python_UnpackTuple(args, "Lattice_setSelectionRule", 2, 2, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice, 0 |  0 );
+  if (!SWIG_Python_UnpackTuple(args, "Lattice3D_setSelectionRule", 2, 2, swig_obj)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Lattice3D, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice_setSelectionRule" "', argument " "1"" of type '" "Lattice *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_setSelectionRule" "', argument " "1"" of type '" "Lattice3D *""'"); 
   }
-  arg1 = reinterpret_cast< Lattice * >(argp1);
+  arg1 = reinterpret_cast< Lattice3D * >(argp1);
   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_ISelectionRule,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice_setSelectionRule" "', argument " "2"" of type '" "ISelectionRule const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Lattice3D_setSelectionRule" "', argument " "2"" of type '" "ISelectionRule const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice_setSelectionRule" "', argument " "2"" of type '" "ISelectionRule const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice3D_setSelectionRule" "', argument " "2"" of type '" "ISelectionRule const &""'"); 
   }
   arg2 = reinterpret_cast< ISelectionRule * >(argp2);
   (arg1)->setSelectionRule((ISelectionRule const &)*arg2);
@@ -67933,14 +67933,14 @@ fail:
 }
 
 
-SWIGINTERN PyObject *Lattice_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *Lattice3D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_Lattice, SWIG_NewClientData(obj));
+  SWIG_TypeNewClientData(SWIGTYPE_p_Lattice3D, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
 
-SWIGINTERN PyObject *Lattice_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *Lattice3D_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   return SWIG_Python_InitShadowInstance(args);
 }
 
@@ -68870,7 +68870,7 @@ SWIGINTERN PyObject *_wrap_createCubicLattice(PyObject *SWIGUNUSEDPARM(self), Py
   double val1 ;
   int ecode1 = 0 ;
   PyObject *swig_obj[1] ;
-  SwigValueWrapper< Lattice > result;
+  SwigValueWrapper< Lattice3D > result;
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
@@ -68880,7 +68880,7 @@ SWIGINTERN PyObject *_wrap_createCubicLattice(PyObject *SWIGUNUSEDPARM(self), Py
   } 
   arg1 = static_cast< double >(val1);
   result = bake::createCubicLattice(arg1);
-  resultobj = SWIG_NewPointerObj((new Lattice(static_cast< const Lattice& >(result))), SWIGTYPE_p_Lattice, SWIG_POINTER_OWN |  0 );
+  resultobj = SWIG_NewPointerObj((new Lattice3D(static_cast< const Lattice3D& >(result))), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -68893,7 +68893,7 @@ SWIGINTERN PyObject *_wrap_createFCCLattice(PyObject *SWIGUNUSEDPARM(self), PyOb
   double val1 ;
   int ecode1 = 0 ;
   PyObject *swig_obj[1] ;
-  SwigValueWrapper< Lattice > result;
+  SwigValueWrapper< Lattice3D > result;
   
   if (!args) SWIG_fail;
   swig_obj[0] = args;
@@ -68903,7 +68903,7 @@ SWIGINTERN PyObject *_wrap_createFCCLattice(PyObject *SWIGUNUSEDPARM(self), PyOb
   } 
   arg1 = static_cast< double >(val1);
   result = bake::createFCCLattice(arg1);
-  resultobj = SWIG_NewPointerObj((new Lattice(static_cast< const Lattice& >(result))), SWIGTYPE_p_Lattice, SWIG_POINTER_OWN |  0 );
+  resultobj = SWIG_NewPointerObj((new Lattice3D(static_cast< const Lattice3D& >(result))), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -68919,7 +68919,7 @@ SWIGINTERN PyObject *_wrap_createHexagonalLattice(PyObject *SWIGUNUSEDPARM(self)
   double val2 ;
   int ecode2 = 0 ;
   PyObject *swig_obj[2] ;
-  SwigValueWrapper< Lattice > result;
+  SwigValueWrapper< Lattice3D > result;
   
   if (!SWIG_Python_UnpackTuple(args, "createHexagonalLattice", 2, 2, swig_obj)) SWIG_fail;
   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
@@ -68933,7 +68933,7 @@ SWIGINTERN PyObject *_wrap_createHexagonalLattice(PyObject *SWIGUNUSEDPARM(self)
   } 
   arg2 = static_cast< double >(val2);
   result = bake::createHexagonalLattice(arg1,arg2);
-  resultobj = SWIG_NewPointerObj((new Lattice(static_cast< const Lattice& >(result))), SWIGTYPE_p_Lattice, SWIG_POINTER_OWN |  0 );
+  resultobj = SWIG_NewPointerObj((new Lattice3D(static_cast< const Lattice3D& >(result))), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -68949,7 +68949,7 @@ SWIGINTERN PyObject *_wrap_createHCPLattice(PyObject *SWIGUNUSEDPARM(self), PyOb
   double val2 ;
   int ecode2 = 0 ;
   PyObject *swig_obj[2] ;
-  SwigValueWrapper< Lattice > result;
+  SwigValueWrapper< Lattice3D > result;
   
   if (!SWIG_Python_UnpackTuple(args, "createHCPLattice", 2, 2, swig_obj)) SWIG_fail;
   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
@@ -68963,7 +68963,7 @@ SWIGINTERN PyObject *_wrap_createHCPLattice(PyObject *SWIGUNUSEDPARM(self), PyOb
   } 
   arg2 = static_cast< double >(val2);
   result = bake::createHCPLattice(arg1,arg2);
-  resultobj = SWIG_NewPointerObj((new Lattice(static_cast< const Lattice& >(result))), SWIGTYPE_p_Lattice, SWIG_POINTER_OWN |  0 );
+  resultobj = SWIG_NewPointerObj((new Lattice3D(static_cast< const Lattice3D& >(result))), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -68979,7 +68979,7 @@ SWIGINTERN PyObject *_wrap_createTetragonalLattice(PyObject *SWIGUNUSEDPARM(self
   double val2 ;
   int ecode2 = 0 ;
   PyObject *swig_obj[2] ;
-  SwigValueWrapper< Lattice > result;
+  SwigValueWrapper< Lattice3D > result;
   
   if (!SWIG_Python_UnpackTuple(args, "createTetragonalLattice", 2, 2, swig_obj)) SWIG_fail;
   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
@@ -68993,7 +68993,7 @@ SWIGINTERN PyObject *_wrap_createTetragonalLattice(PyObject *SWIGUNUSEDPARM(self
   } 
   arg2 = static_cast< double >(val2);
   result = bake::createTetragonalLattice(arg1,arg2);
-  resultobj = SWIG_NewPointerObj((new Lattice(static_cast< const Lattice& >(result))), SWIGTYPE_p_Lattice, SWIG_POINTER_OWN |  0 );
+  resultobj = SWIG_NewPointerObj((new Lattice3D(static_cast< const Lattice3D& >(result))), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -69009,7 +69009,7 @@ SWIGINTERN PyObject *_wrap_createBCTLattice(PyObject *SWIGUNUSEDPARM(self), PyOb
   double val2 ;
   int ecode2 = 0 ;
   PyObject *swig_obj[2] ;
-  SwigValueWrapper< Lattice > result;
+  SwigValueWrapper< Lattice3D > result;
   
   if (!SWIG_Python_UnpackTuple(args, "createBCTLattice", 2, 2, swig_obj)) SWIG_fail;
   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
@@ -69023,7 +69023,7 @@ SWIGINTERN PyObject *_wrap_createBCTLattice(PyObject *SWIGUNUSEDPARM(self), PyOb
   } 
   arg2 = static_cast< double >(val2);
   result = bake::createBCTLattice(arg1,arg2);
-  resultobj = SWIG_NewPointerObj((new Lattice(static_cast< const Lattice& >(result))), SWIGTYPE_p_Lattice, SWIG_POINTER_OWN |  0 );
+  resultobj = SWIG_NewPointerObj((new Lattice3D(static_cast< const Lattice3D& >(result))), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -71313,8 +71313,8 @@ static PyMethodDef SwigMethods[] = {
 	 { "RotationEuler_swigregister", RotationEuler_swigregister, METH_O, NULL},
 	 { "RotationEuler_swiginit", RotationEuler_swiginit, METH_VARARGS, NULL},
 	 { "new_FormFactorCrystal", _wrap_new_FormFactorCrystal, METH_VARARGS, "\n"
-		"FormFactorCrystal(Lattice lattice, IFormFactor basis_form_factor, IFormFactor meso_form_factor, double position_variance=0.0)\n"
-		"FormFactorCrystal::FormFactorCrystal(const Lattice &lattice, const IFormFactor &basis_form_factor, const IFormFactor &meso_form_factor, double position_variance=0.0)\n"
+		"FormFactorCrystal(Lattice3D lattice, IFormFactor basis_form_factor, IFormFactor meso_form_factor, double position_variance=0.0)\n"
+		"FormFactorCrystal::FormFactorCrystal(const Lattice3D &lattice, const IFormFactor &basis_form_factor, const IFormFactor &meso_form_factor, double position_variance=0.0)\n"
 		"\n"
 		""},
 	 { "delete_FormFactorCrystal", _wrap_delete_FormFactorCrystal, METH_O, "\n"
@@ -71493,8 +71493,8 @@ static PyMethodDef SwigMethods[] = {
 		""},
 	 { "IAbstractParticle_swigregister", IAbstractParticle_swigregister, METH_O, NULL},
 	 { "new_Crystal", _wrap_new_Crystal, METH_VARARGS, "\n"
-		"Crystal(IParticle basis, Lattice lattice, double position_variance=0)\n"
-		"Crystal::Crystal(const IParticle &basis, const Lattice &lattice, double position_variance=0)\n"
+		"Crystal(IParticle basis, Lattice3D lattice, double position_variance=0)\n"
+		"Crystal::Crystal(const IParticle &basis, const Lattice3D &lattice, double position_variance=0)\n"
 		"\n"
 		""},
 	 { "delete_Crystal", _wrap_delete_Crystal, METH_O, "\n"
@@ -71525,8 +71525,8 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { "Crystal_transformedLattice", _wrap_Crystal_transformedLattice, METH_VARARGS, "\n"
-		"Crystal_transformedLattice(Crystal self, IRotation p_rotation=None) -> Lattice\n"
-		"Lattice Crystal::transformedLattice(const IRotation *p_rotation=nullptr) const\n"
+		"Crystal_transformedLattice(Crystal self, IRotation p_rotation=None) -> Lattice3D\n"
+		"Lattice3D Crystal::transformedLattice(const IRotation *p_rotation=nullptr) const\n"
 		"\n"
 		""},
 	 { "Crystal_getChildren", _wrap_Crystal_getChildren, METH_O, "\n"
@@ -73230,8 +73230,8 @@ static PyMethodDef SwigMethods[] = {
 	 { "InterferenceFunction2DSuperLattice_swigregister", InterferenceFunction2DSuperLattice_swigregister, METH_O, NULL},
 	 { "InterferenceFunction2DSuperLattice_swiginit", InterferenceFunction2DSuperLattice_swiginit, METH_VARARGS, NULL},
 	 { "new_InterferenceFunction3DLattice", _wrap_new_InterferenceFunction3DLattice, METH_O, "\n"
-		"new_InterferenceFunction3DLattice(Lattice lattice) -> InterferenceFunction3DLattice\n"
-		"InterferenceFunction3DLattice::InterferenceFunction3DLattice(const Lattice &lattice)\n"
+		"new_InterferenceFunction3DLattice(Lattice3D lattice) -> InterferenceFunction3DLattice\n"
+		"InterferenceFunction3DLattice::InterferenceFunction3DLattice(const Lattice3D &lattice)\n"
 		"\n"
 		""},
 	 { "delete_InterferenceFunction3DLattice", _wrap_delete_InterferenceFunction3DLattice, METH_O, "\n"
@@ -73257,8 +73257,8 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { "InterferenceFunction3DLattice_lattice", _wrap_InterferenceFunction3DLattice_lattice, METH_O, "\n"
-		"InterferenceFunction3DLattice_lattice(InterferenceFunction3DLattice self) -> Lattice\n"
-		"const Lattice & InterferenceFunction3DLattice::lattice() const\n"
+		"InterferenceFunction3DLattice_lattice(InterferenceFunction3DLattice self) -> Lattice3D\n"
+		"const Lattice3D & InterferenceFunction3DLattice::lattice() const\n"
 		"\n"
 		""},
 	 { "InterferenceFunction3DLattice_supportsMultilayer", _wrap_InterferenceFunction3DLattice_supportsMultilayer, METH_O, "\n"
@@ -73366,8 +73366,8 @@ static PyMethodDef SwigMethods[] = {
 	 { "InterferenceFunctionFinite2DLattice_swigregister", InterferenceFunctionFinite2DLattice_swigregister, METH_O, NULL},
 	 { "InterferenceFunctionFinite2DLattice_swiginit", InterferenceFunctionFinite2DLattice_swiginit, METH_VARARGS, NULL},
 	 { "new_InterferenceFunctionFinite3DLattice", _wrap_new_InterferenceFunctionFinite3DLattice, METH_VARARGS, "\n"
-		"new_InterferenceFunctionFinite3DLattice(Lattice lattice, unsigned int N_1, unsigned int N_2, unsigned int N_3) -> InterferenceFunctionFinite3DLattice\n"
-		"InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice(const Lattice &lattice, unsigned N_1, unsigned N_2, unsigned N_3)\n"
+		"new_InterferenceFunctionFinite3DLattice(Lattice3D lattice, unsigned int N_1, unsigned int N_2, unsigned int N_3) -> InterferenceFunctionFinite3DLattice\n"
+		"InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice(const Lattice3D &lattice, unsigned N_1, unsigned N_2, unsigned N_3)\n"
 		"\n"
 		""},
 	 { "delete_InterferenceFunctionFinite3DLattice", _wrap_delete_InterferenceFunctionFinite3DLattice, METH_O, "\n"
@@ -73403,8 +73403,8 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { "InterferenceFunctionFinite3DLattice_lattice", _wrap_InterferenceFunctionFinite3DLattice_lattice, METH_O, "\n"
-		"InterferenceFunctionFinite3DLattice_lattice(InterferenceFunctionFinite3DLattice self) -> Lattice\n"
-		"const Lattice & InterferenceFunctionFinite3DLattice::lattice() const\n"
+		"InterferenceFunctionFinite3DLattice_lattice(InterferenceFunctionFinite3DLattice self) -> Lattice3D\n"
+		"const Lattice3D & InterferenceFunctionFinite3DLattice::lattice() const\n"
 		"\n"
 		""},
 	 { "InterferenceFunctionFinite3DLattice_supportsMultilayer", _wrap_InterferenceFunctionFinite3DLattice_supportsMultilayer, METH_O, "\n"
@@ -75418,105 +75418,105 @@ static PyMethodDef SwigMethods[] = {
 		""},
 	 { "SimpleSelectionRule_swigregister", SimpleSelectionRule_swigregister, METH_O, NULL},
 	 { "SimpleSelectionRule_swiginit", SimpleSelectionRule_swiginit, METH_VARARGS, NULL},
-	 { "new_Lattice", _wrap_new_Lattice, METH_VARARGS, "\n"
-		"Lattice(kvector_t a, kvector_t b, kvector_t c)\n"
-		"new_Lattice(Lattice lattice) -> Lattice\n"
-		"Lattice::Lattice(const Lattice &lattice)\n"
+	 { "new_Lattice3D", _wrap_new_Lattice3D, METH_VARARGS, "\n"
+		"Lattice3D(kvector_t a, kvector_t b, kvector_t c)\n"
+		"new_Lattice3D(Lattice3D lattice) -> Lattice3D\n"
+		"Lattice3D::Lattice3D(const Lattice3D &lattice)\n"
 		"\n"
 		""},
-	 { "delete_Lattice", _wrap_delete_Lattice, METH_O, "\n"
-		"delete_Lattice(Lattice self)\n"
-		"Lattice::~Lattice() override\n"
+	 { "delete_Lattice3D", _wrap_delete_Lattice3D, METH_O, "\n"
+		"delete_Lattice3D(Lattice3D self)\n"
+		"Lattice3D::~Lattice3D() override\n"
 		"\n"
 		""},
-	 { "Lattice_accept", _wrap_Lattice_accept, METH_VARARGS, "\n"
-		"Lattice_accept(Lattice self, INodeVisitor * visitor)\n"
-		"void Lattice::accept(INodeVisitor *visitor) const override\n"
+	 { "Lattice3D_accept", _wrap_Lattice3D_accept, METH_VARARGS, "\n"
+		"Lattice3D_accept(Lattice3D self, INodeVisitor * visitor)\n"
+		"void Lattice3D::accept(INodeVisitor *visitor) const override\n"
 		"\n"
 		""},
-	 { "Lattice_transformed", _wrap_Lattice_transformed, METH_VARARGS, "\n"
-		"Lattice_transformed(Lattice self, Transform3D const & transform) -> Lattice\n"
-		"Lattice Lattice::transformed(const Transform3D &transform) const\n"
+	 { "Lattice3D_transformed", _wrap_Lattice3D_transformed, METH_VARARGS, "\n"
+		"Lattice3D_transformed(Lattice3D self, Transform3D const & transform) -> Lattice3D\n"
+		"Lattice3D Lattice3D::transformed(const Transform3D &transform) const\n"
 		"\n"
 		"Creates transformed lattice. \n"
 		"\n"
 		""},
-	 { "Lattice_initialize", _wrap_Lattice_initialize, METH_O, "\n"
-		"Lattice_initialize(Lattice self)\n"
-		"void Lattice::initialize()\n"
+	 { "Lattice3D_initialize", _wrap_Lattice3D_initialize, METH_O, "\n"
+		"Lattice3D_initialize(Lattice3D self)\n"
+		"void Lattice3D::initialize()\n"
 		"\n"
 		"Initializes cached data. \n"
 		"\n"
 		""},
-	 { "Lattice_getBasisVectorA", _wrap_Lattice_getBasisVectorA, METH_O, "\n"
-		"Lattice_getBasisVectorA(Lattice self) -> kvector_t\n"
-		"kvector_t Lattice::getBasisVectorA() const\n"
+	 { "Lattice3D_getBasisVectorA", _wrap_Lattice3D_getBasisVectorA, METH_O, "\n"
+		"Lattice3D_getBasisVectorA(Lattice3D self) -> kvector_t\n"
+		"kvector_t Lattice3D::getBasisVectorA() const\n"
 		"\n"
 		"Returns basis vector a. \n"
 		"\n"
 		""},
-	 { "Lattice_getBasisVectorB", _wrap_Lattice_getBasisVectorB, METH_O, "\n"
-		"Lattice_getBasisVectorB(Lattice self) -> kvector_t\n"
-		"kvector_t Lattice::getBasisVectorB() const\n"
+	 { "Lattice3D_getBasisVectorB", _wrap_Lattice3D_getBasisVectorB, METH_O, "\n"
+		"Lattice3D_getBasisVectorB(Lattice3D self) -> kvector_t\n"
+		"kvector_t Lattice3D::getBasisVectorB() const\n"
 		"\n"
 		"Returns basis vector b. \n"
 		"\n"
 		""},
-	 { "Lattice_getBasisVectorC", _wrap_Lattice_getBasisVectorC, METH_O, "\n"
-		"Lattice_getBasisVectorC(Lattice self) -> kvector_t\n"
-		"kvector_t Lattice::getBasisVectorC() const\n"
+	 { "Lattice3D_getBasisVectorC", _wrap_Lattice3D_getBasisVectorC, METH_O, "\n"
+		"Lattice3D_getBasisVectorC(Lattice3D self) -> kvector_t\n"
+		"kvector_t Lattice3D::getBasisVectorC() const\n"
 		"\n"
 		"Returns basis vector c. \n"
 		"\n"
 		""},
-	 { "Lattice_getMillerDirection", _wrap_Lattice_getMillerDirection, METH_VARARGS, "\n"
-		"Lattice_getMillerDirection(Lattice self, double h, double k, double l) -> kvector_t\n"
-		"kvector_t Lattice::getMillerDirection(double h, double k, double l) const\n"
+	 { "Lattice3D_getMillerDirection", _wrap_Lattice3D_getMillerDirection, METH_VARARGS, "\n"
+		"Lattice3D_getMillerDirection(Lattice3D self, double h, double k, double l) -> kvector_t\n"
+		"kvector_t Lattice3D::getMillerDirection(double h, double k, double l) const\n"
 		"\n"
 		"Returns normalized direction corresponding to the given Miller indices.\n"
 		"\n"
 		"Currently unused but may be useful for checks. \n"
 		"\n"
 		""},
-	 { "Lattice_unitCellVolume", _wrap_Lattice_unitCellVolume, METH_O, "\n"
-		"Lattice_unitCellVolume(Lattice self) -> double\n"
-		"double Lattice::unitCellVolume() const\n"
+	 { "Lattice3D_unitCellVolume", _wrap_Lattice3D_unitCellVolume, METH_O, "\n"
+		"Lattice3D_unitCellVolume(Lattice3D self) -> double\n"
+		"double Lattice3D::unitCellVolume() const\n"
 		"\n"
 		"Returns the volume of the unit cell. \n"
 		"\n"
 		""},
-	 { "Lattice_getReciprocalLatticeBasis", _wrap_Lattice_getReciprocalLatticeBasis, METH_VARARGS, "\n"
-		"Lattice_getReciprocalLatticeBasis(Lattice self, kvector_t ra, kvector_t rb, kvector_t rc)\n"
-		"void Lattice::getReciprocalLatticeBasis(kvector_t &ra, kvector_t &rb, kvector_t &rc) const\n"
+	 { "Lattice3D_getReciprocalLatticeBasis", _wrap_Lattice3D_getReciprocalLatticeBasis, METH_VARARGS, "\n"
+		"Lattice3D_getReciprocalLatticeBasis(Lattice3D self, kvector_t ra, kvector_t rb, kvector_t rc)\n"
+		"void Lattice3D::getReciprocalLatticeBasis(kvector_t &ra, kvector_t &rb, kvector_t &rc) const\n"
 		"\n"
 		"Returns the reciprocal basis vectors.\n"
 		"\n"
 		"Currently only used in tests. \n"
 		"\n"
 		""},
-	 { "Lattice_getNearestReciprocalLatticeVectorCoordinates", _wrap_Lattice_getNearestReciprocalLatticeVectorCoordinates, METH_VARARGS, "\n"
-		"Lattice_getNearestReciprocalLatticeVectorCoordinates(Lattice self, kvector_t q) -> ivector_t\n"
-		"ivector_t Lattice::getNearestReciprocalLatticeVectorCoordinates(const kvector_t q) const\n"
+	 { "Lattice3D_getNearestReciprocalLatticeVectorCoordinates", _wrap_Lattice3D_getNearestReciprocalLatticeVectorCoordinates, METH_VARARGS, "\n"
+		"Lattice3D_getNearestReciprocalLatticeVectorCoordinates(Lattice3D self, kvector_t q) -> ivector_t\n"
+		"ivector_t Lattice3D::getNearestReciprocalLatticeVectorCoordinates(const kvector_t q) const\n"
 		"\n"
 		"Returns the nearest reciprocal lattice point from a given vector. \n"
 		"\n"
 		""},
-	 { "Lattice_reciprocalLatticeVectorsWithinRadius", _wrap_Lattice_reciprocalLatticeVectorsWithinRadius, METH_VARARGS, "\n"
-		"Lattice_reciprocalLatticeVectorsWithinRadius(Lattice self, kvector_t q, double dq) -> vector_kvector_t\n"
-		"std::vector< kvector_t > Lattice::reciprocalLatticeVectorsWithinRadius(const kvector_t q, double dq) const\n"
+	 { "Lattice3D_reciprocalLatticeVectorsWithinRadius", _wrap_Lattice3D_reciprocalLatticeVectorsWithinRadius, METH_VARARGS, "\n"
+		"Lattice3D_reciprocalLatticeVectorsWithinRadius(Lattice3D self, kvector_t q, double dq) -> vector_kvector_t\n"
+		"std::vector< kvector_t > Lattice3D::reciprocalLatticeVectorsWithinRadius(const kvector_t q, double dq) const\n"
 		"\n"
 		"Returns a list of reciprocal lattice vectors within distance dq of a vector q. \n"
 		"\n"
 		""},
-	 { "Lattice_setSelectionRule", _wrap_Lattice_setSelectionRule, METH_VARARGS, "\n"
-		"Lattice_setSelectionRule(Lattice self, ISelectionRule selection_rule)\n"
-		"void Lattice::setSelectionRule(const ISelectionRule &selection_rule)\n"
+	 { "Lattice3D_setSelectionRule", _wrap_Lattice3D_setSelectionRule, METH_VARARGS, "\n"
+		"Lattice3D_setSelectionRule(Lattice3D self, ISelectionRule selection_rule)\n"
+		"void Lattice3D::setSelectionRule(const ISelectionRule &selection_rule)\n"
 		"\n"
 		"Sets a selection rule for the reciprocal vectors. \n"
 		"\n"
 		""},
-	 { "Lattice_swigregister", Lattice_swigregister, METH_O, NULL},
-	 { "Lattice_swiginit", Lattice_swiginit, METH_VARARGS, NULL},
+	 { "Lattice3D_swigregister", Lattice3D_swigregister, METH_O, NULL},
+	 { "Lattice3D_swiginit", Lattice3D_swiginit, METH_VARARGS, NULL},
 	 { "Lattice2D_clone", _wrap_Lattice2D_clone, METH_O, "\n"
 		"Lattice2D_clone(Lattice2D self) -> Lattice2D\n"
 		"virtual Lattice2D* Lattice2D::clone() const =0\n"
@@ -75674,43 +75674,43 @@ static PyMethodDef SwigMethods[] = {
 	 { "HexagonalLattice_swigregister", HexagonalLattice_swigregister, METH_O, NULL},
 	 { "HexagonalLattice_swiginit", HexagonalLattice_swiginit, METH_VARARGS, NULL},
 	 { "createCubicLattice", _wrap_createCubicLattice, METH_O, "\n"
-		"createCubicLattice(double a) -> Lattice\n"
-		"Lattice bake::createCubicLattice(double a)\n"
+		"createCubicLattice(double a) -> Lattice3D\n"
+		"Lattice3D bake::createCubicLattice(double a)\n"
 		"\n"
 		"Returns a primitive cubic (cP) lattice with edge length a. \n"
 		"\n"
 		""},
 	 { "createFCCLattice", _wrap_createFCCLattice, METH_O, "\n"
-		"createFCCLattice(double a) -> Lattice\n"
-		"Lattice bake::createFCCLattice(double a)\n"
+		"createFCCLattice(double a) -> Lattice3D\n"
+		"Lattice3D bake::createFCCLattice(double a)\n"
 		"\n"
 		"Returns a face-centered cubic (cF) lattice with edge length a. \n"
 		"\n"
 		""},
 	 { "createHexagonalLattice", _wrap_createHexagonalLattice, METH_VARARGS, "\n"
-		"createHexagonalLattice(double a, double c) -> Lattice\n"
-		"Lattice bake::createHexagonalLattice(double a, double c)\n"
+		"createHexagonalLattice(double a, double c) -> Lattice3D\n"
+		"Lattice3D bake::createHexagonalLattice(double a, double c)\n"
 		"\n"
 		"Returns a primitive hexagonal (hP) lattice with hexagonal edge a and height c. \n"
 		"\n"
 		""},
 	 { "createHCPLattice", _wrap_createHCPLattice, METH_VARARGS, "\n"
-		"createHCPLattice(double a, double c) -> Lattice\n"
-		"Lattice bake::createHCPLattice(double a, double c)\n"
+		"createHCPLattice(double a, double c) -> Lattice3D\n"
+		"Lattice3D bake::createHCPLattice(double a, double c)\n"
 		"\n"
 		"TODO: Clarify how this is meant: HCP is not a Bravais lattice. \n"
 		"\n"
 		""},
 	 { "createTetragonalLattice", _wrap_createTetragonalLattice, METH_VARARGS, "\n"
-		"createTetragonalLattice(double a, double c) -> Lattice\n"
-		"Lattice bake::createTetragonalLattice(double a, double c)\n"
+		"createTetragonalLattice(double a, double c) -> Lattice3D\n"
+		"Lattice3D bake::createTetragonalLattice(double a, double c)\n"
 		"\n"
 		"Returns a primitive tetragonal (tP) lattice with square base edge a and height c. \n"
 		"\n"
 		""},
 	 { "createBCTLattice", _wrap_createBCTLattice, METH_VARARGS, "\n"
-		"createBCTLattice(double a, double c) -> Lattice\n"
-		"Lattice bake::createBCTLattice(double a, double c)\n"
+		"createBCTLattice(double a, double c) -> Lattice3D\n"
+		"Lattice3D bake::createBCTLattice(double a, double c)\n"
 		"\n"
 		"Returns a body-centered cubic (cI) lattice with edge length a. TODO: Clarify meaning of c \n"
 		"\n"
@@ -76236,6 +76236,9 @@ static void *_p_ICosineRippleTo_p_IParameterized(void *x, int *SWIGUNUSEDPARM(ne
 static void *_p_IProfileRippleTo_p_IParameterized(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((IParameterized *) (INode *)(ISample *)(IFormFactor *)(IFormFactorBorn *) ((IProfileRipple *) x));
 }
+static void *_p_Lattice3DTo_p_IParameterized(void *x, int *SWIGUNUSEDPARM(newmemory)) {
+    return (void *)((IParameterized *) (INode *) ((Lattice3D *) x));
+}
 static void *_p_IFTDistribution2DTo_p_IParameterized(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((IParameterized *) (INode *) ((IFTDistribution2D *) x));
 }
@@ -76278,9 +76281,6 @@ static void *_p_FormFactorLongBoxLorentzTo_p_IParameterized(void *x, int *SWIGUN
 static void *_p_FormFactorSawtoothRippleLorentzTo_p_IParameterized(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((IParameterized *) (INode *)(ISample *)(IFormFactor *)(IFormFactorBorn *)(IProfileRipple *)(ISawtoothRipple *) ((FormFactorSawtoothRippleLorentz *) x));
 }
-static void *_p_LatticeTo_p_IParameterized(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((IParameterized *) (INode *) ((Lattice *) x));
-}
 static void *_p_BasicLatticeTo_p_IParameterized(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((IParameterized *) (INode *)(Lattice2D *) ((BasicLattice *) x));
 }
@@ -76986,6 +76986,9 @@ static void *_p_ICosineRippleTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory))
 static void *_p_IProfileRippleTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((INode *) (ISample *)(IFormFactor *)(IFormFactorBorn *) ((IProfileRipple *) x));
 }
+static void *_p_Lattice3DTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) {
+    return (void *)((INode *)  ((Lattice3D *) x));
+}
 static void *_p_IFTDistribution2DTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((INode *)  ((IFTDistribution2D *) x));
 }
@@ -77028,9 +77031,6 @@ static void *_p_FormFactorLongBoxLorentzTo_p_INode(void *x, int *SWIGUNUSEDPARM(
 static void *_p_FormFactorSawtoothRippleLorentzTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((INode *) (ISample *)(IFormFactor *)(IFormFactorBorn *)(IProfileRipple *)(ISawtoothRipple *) ((FormFactorSawtoothRippleLorentz *) x));
 }
-static void *_p_LatticeTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((INode *)  ((Lattice *) x));
-}
 static void *_p_BasicLatticeTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((INode *) (Lattice2D *) ((BasicLattice *) x));
 }
@@ -77583,9 +77583,9 @@ static swig_type_info _swigt__p_InterferenceFunctionRadialParaCrystal = {"_p_Int
 static swig_type_info _swigt__p_InterferenceFunctionTwin = {"_p_InterferenceFunctionTwin", "InterferenceFunctionTwin *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IsotropicGaussPeakShape = {"_p_IsotropicGaussPeakShape", "IsotropicGaussPeakShape *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IsotropicLorentzPeakShape = {"_p_IsotropicLorentzPeakShape", "IsotropicLorentzPeakShape *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_Lattice = {"_p_Lattice", "Lattice *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_Lattice2D = {"_p_Lattice2D", "Lattice2D *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_Lattice2D__ReciprocalBases = {"_p_Lattice2D__ReciprocalBases", "Lattice2D::ReciprocalBases *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_Lattice3D = {"_p_Lattice3D", "Lattice3D *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_Layer = {"_p_Layer", "Layer *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_LayerInterface = {"_p_LayerInterface", "LayerInterface *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_LayerRoughness = {"_p_LayerRoughness", "LayerRoughness *", 0, 0, (void*)0, 0};
@@ -77782,9 +77782,9 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_InterferenceFunctionTwin,
   &_swigt__p_IsotropicGaussPeakShape,
   &_swigt__p_IsotropicLorentzPeakShape,
-  &_swigt__p_Lattice,
   &_swigt__p_Lattice2D,
   &_swigt__p_Lattice2D__ReciprocalBases,
+  &_swigt__p_Lattice3D,
   &_swigt__p_Layer,
   &_swigt__p_LayerInterface,
   &_swigt__p_LayerRoughness,
@@ -77955,9 +77955,9 @@ static swig_cast_info _swigc__p_IFormFactorDecorator[] = {  {&_swigt__p_IFormFac
 static swig_cast_info _swigc__p_IFormFactorPolyhedron[] = {  {&_swigt__p_IFormFactorPolyhedron, 0, 0, 0},  {&_swigt__p_FormFactorCuboctahedron, _p_FormFactorCuboctahedronTo_p_IFormFactorPolyhedron, 0, 0},  {&_swigt__p_FormFactorDodecahedron, _p_FormFactorDodecahedronTo_p_IFormFactorPolyhedron, 0, 0},  {&_swigt__p_FormFactorIcosahedron, _p_FormFactorIcosahedronTo_p_IFormFactorPolyhedron, 0, 0},  {&_swigt__p_FormFactorTetrahedron, _p_FormFactorTetrahedronTo_p_IFormFactorPolyhedron, 0, 0},  {&_swigt__p_FormFactorCantellatedCube, _p_FormFactorCantellatedCubeTo_p_IFormFactorPolyhedron, 0, 0},  {&_swigt__p_FormFactorCone6, _p_FormFactorCone6To_p_IFormFactorPolyhedron, 0, 0},  {&_swigt__p_FormFactorTruncatedCube, _p_FormFactorTruncatedCubeTo_p_IFormFactorPolyhedron, 0, 0},  {&_swigt__p_FormFactorAnisoPyramid, _p_FormFactorAnisoPyramidTo_p_IFormFactorPolyhedron, 0, 0},  {&_swigt__p_FormFactorPyramid, _p_FormFactorPyramidTo_p_IFormFactorPolyhedron, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IFormFactorPrism[] = {  {&_swigt__p_FormFactorPrism3, _p_FormFactorPrism3To_p_IFormFactorPrism, 0, 0},  {&_swigt__p_IFormFactorPrism, 0, 0, 0},  {&_swigt__p_FormFactorPrism6, _p_FormFactorPrism6To_p_IFormFactorPrism, 0, 0},  {&_swigt__p_FormFactorBox, _p_FormFactorBoxTo_p_IFormFactorPrism, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IInterferenceFunction[] = {  {&_swigt__p_InterferenceFunctionHardDisk, _p_InterferenceFunctionHardDiskTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_IInterferenceFunction, 0, 0, 0},  {&_swigt__p_InterferenceFunction1DLattice, _p_InterferenceFunction1DLatticeTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunction2DLattice, _p_InterferenceFunction2DLatticeTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunction2DSuperLattice, _p_InterferenceFunction2DSuperLatticeTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunction3DLattice, _p_InterferenceFunction3DLatticeTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunctionFinite2DLattice, _p_InterferenceFunctionFinite2DLatticeTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunctionFinite3DLattice, _p_InterferenceFunctionFinite3DLatticeTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunctionNone, _p_InterferenceFunctionNoneTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunction2DParaCrystal, _p_InterferenceFunction2DParaCrystalTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunctionRadialParaCrystal, _p_InterferenceFunctionRadialParaCrystalTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunctionTwin, _p_InterferenceFunctionTwinTo_p_IInterferenceFunction, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_INode[] = {  {&_swigt__p_FormFactorBox, _p_FormFactorBoxTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSphereGaussianRadius, _p_FormFactorSphereGaussianRadiusTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSphereLogNormalRadius, _p_FormFactorSphereLogNormalRadiusTo_p_INode, 0, 0},  {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_INode, 0, 0},  {&_swigt__p_ParticleDistribution, _p_ParticleDistributionTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DGauss, _p_FTDecayFunction1DGaussTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DGauss, _p_FTDistribution1DGaussTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionNone, _p_InterferenceFunctionNoneTo_p_INode, 0, 0},  {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_INode, 0, 0},  {&_swigt__p_FormFactorHemiEllipsoid, _p_FormFactorHemiEllipsoidTo_p_INode, 0, 0},  {&_swigt__p_INode, 0, 0, 0},  {&_swigt__p_MisesGaussPeakShape, _p_MisesGaussPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_MisesFisherGaussPeakShape, _p_MisesFisherGaussPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_LorentzFisherPeakShape, _p_LorentzFisherPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_GaussFisherPeakShape, _p_GaussFisherPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_IsotropicLorentzPeakShape, _p_IsotropicLorentzPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_IsotropicGaussPeakShape, _p_IsotropicGaussPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_IPeakShape, _p_IPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_FormFactorPrism3, _p_FormFactorPrism3To_p_INode, 0, 0},  {&_swigt__p_IFormFactorPolyhedron, _p_IFormFactorPolyhedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCuboctahedron, _p_FormFactorCuboctahedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorDodecahedron, _p_FormFactorDodecahedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorIcosahedron, _p_FormFactorIcosahedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTetrahedron, _p_FormFactorTetrahedronTo_p_INode, 0, 0},  {&_swigt__p_IFormFactorPrism, _p_IFormFactorPrismTo_p_INode, 0, 0},  {&_swigt__p_FormFactorPrism6, _p_FormFactorPrism6To_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DCone, _p_FTDistribution2DConeTo_p_INode, 0, 0},  {&_swigt__p_ParticleCoreShell, _p_ParticleCoreShellTo_p_INode, 0, 0},  {&_swigt__p_IProfileRectangularRipple, _p_IProfileRectangularRippleTo_p_INode, 0, 0},  {&_swigt__p_ISawtoothRipple, _p_ISawtoothRippleTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTruncatedSphere, _p_FormFactorTruncatedSphereTo_p_INode, 0, 0},  {&_swigt__p_FormFactorFullSphere, _p_FormFactorFullSphereTo_p_INode, 0, 0},  {&_swigt__p_IFormFactor, _p_IFormFactorTo_p_INode, 0, 0},  {&_swigt__p_ISample, _p_ISampleTo_p_INode, 0, 0},  {&_swigt__p_FormFactorLongBoxGauss, _p_FormFactorLongBoxGaussTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionHardDisk, _p_InterferenceFunctionHardDiskTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DGate, _p_FTDistribution2DGateTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DVoigt, _p_FTDecayFunction1DVoigtTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DVoigt, _p_FTDistribution1DVoigtTo_p_INode, 0, 0},  {&_swigt__p_IRotation, _p_IRotationTo_p_INode, 0, 0},  {&_swigt__p_IdentityRotation, _p_IdentityRotationTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTruncatedSpheroid, _p_FormFactorTruncatedSpheroidTo_p_INode, 0, 0},  {&_swigt__p_FormFactorFullSpheroid, _p_FormFactorFullSpheroidTo_p_INode, 0, 0},  {&_swigt__p_RotationX, _p_RotationXTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCantellatedCube, _p_FormFactorCantellatedCubeTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTruncatedCube, _p_FormFactorTruncatedCubeTo_p_INode, 0, 0},  {&_swigt__p_RotationY, _p_RotationYTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction2DGauss, _p_FTDecayFunction2DGaussTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DGauss, _p_FTDistribution2DGaussTo_p_INode, 0, 0},  {&_swigt__p_RotationZ, _p_RotationZTo_p_INode, 0, 0},  {&_swigt__p_IFormFactorBorn, _p_IFormFactorBornTo_p_INode, 0, 0},  {&_swigt__p_Particle, _p_ParticleTo_p_INode, 0, 0},  {&_swigt__p_IParticle, _p_IParticleTo_p_INode, 0, 0},  {&_swigt__p_IAbstractParticle, _p_IAbstractParticleTo_p_INode, 0, 0},  {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_INode, 0, 0},  {&_swigt__p_IFTDistribution1D, _p_IFTDistribution1DTo_p_INode, 0, 0},  {&_swigt__p_IFTDecayFunction1D, _p_IFTDecayFunction1DTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCosineRippleBox, _p_FormFactorCosineRippleBoxTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleBox, _p_FormFactorSawtoothRippleBoxTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCone, _p_FormFactorConeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionTwin, _p_InterferenceFunctionTwinTo_p_INode, 0, 0},  {&_swigt__p_Layer, _p_LayerTo_p_INode, 0, 0},  {&_swigt__p_FormFactorAnisoPyramid, _p_FormFactorAnisoPyramidTo_p_INode, 0, 0},  {&_swigt__p_FormFactorPyramid, _p_FormFactorPyramidTo_p_INode, 0, 0},  {&_swigt__p_FormFactorEllipsoidalCylinder, _p_FormFactorEllipsoidalCylinderTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCylinder, _p_FormFactorCylinderTo_p_INode, 0, 0},  {&_swigt__p_ParticleComposition, _p_ParticleCompositionTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DCosine, _p_FTDistribution1DCosineTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DGate, _p_FTDistribution1DGateTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCosineRippleGauss, _p_FormFactorCosineRippleGaussTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleGauss, _p_FormFactorSawtoothRippleGaussTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction2DVoigt, _p_FTDecayFunction2DVoigtTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DVoigt, _p_FTDistribution2DVoigtTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DCauchy, _p_FTDistribution1DCauchyTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DCauchy, _p_FTDecayFunction1DCauchyTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DCauchy, _p_FTDistribution2DCauchyTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction2DCauchy, _p_FTDecayFunction2DCauchyTo_p_INode, 0, 0},  {&_swigt__p_IInterferenceFunction, _p_IInterferenceFunctionTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCone6, _p_FormFactorCone6To_p_INode, 0, 0},  {&_swigt__p_IFormFactorDecorator, _p_IFormFactorDecoratorTo_p_INode, 0, 0},  {&_swigt__p_FormFactorDot, _p_FormFactorDotTo_p_INode, 0, 0},  {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_INode, 0, 0},  {&_swigt__p_MesoCrystal, _p_MesoCrystalTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCrystal, _p_FormFactorCrystalTo_p_INode, 0, 0},  {&_swigt__p_ICosineRipple, _p_ICosineRippleTo_p_INode, 0, 0},  {&_swigt__p_IProfileRipple, _p_IProfileRippleTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction2DParaCrystal, _p_InterferenceFunction2DParaCrystalTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionRadialParaCrystal, _p_InterferenceFunctionRadialParaCrystalTo_p_INode, 0, 0},  {&_swigt__p_Crystal, _p_CrystalTo_p_INode, 0, 0},  {&_swigt__p_FormFactorHollowSphere, _p_FormFactorHollowSphereTo_p_INode, 0, 0},  {&_swigt__p_FormFactorGaussSphere, _p_FormFactorGaussSphereTo_p_INode, 0, 0},  {&_swigt__p_IFTDistribution2D, _p_IFTDistribution2DTo_p_INode, 0, 0},  {&_swigt__p_IFTDecayFunction2D, _p_IFTDecayFunction2DTo_p_INode, 0, 0},  {&_swigt__p_FormFactorWeighted, _p_FormFactorWeightedTo_p_INode, 0, 0},  {&_swigt__p_FormFactorLongBoxLorentz, _p_FormFactorLongBoxLorentzTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCosineRippleLorentz, _p_FormFactorCosineRippleLorentzTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleLorentz, _p_FormFactorSawtoothRippleLorentzTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction3DLattice, _p_InterferenceFunction3DLatticeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction2DSuperLattice, _p_InterferenceFunction2DSuperLatticeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction2DLattice, _p_InterferenceFunction2DLatticeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction1DLattice, _p_InterferenceFunction1DLatticeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionFinite2DLattice, _p_InterferenceFunctionFinite2DLatticeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionFinite3DLattice, _p_InterferenceFunctionFinite3DLatticeTo_p_INode, 0, 0},  {&_swigt__p_BasicLattice, _p_BasicLatticeTo_p_INode, 0, 0},  {&_swigt__p_SquareLattice, _p_SquareLatticeTo_p_INode, 0, 0},  {&_swigt__p_HexagonalLattice, _p_HexagonalLatticeTo_p_INode, 0, 0},  {&_swigt__p_Lattice, _p_LatticeTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DTriangle, _p_FTDistribution1DTriangleTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DTriangle, _p_FTDecayFunction1DTriangleTo_p_INode, 0, 0},  {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_INode, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_INode[] = {  {&_swigt__p_FormFactorBox, _p_FormFactorBoxTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSphereGaussianRadius, _p_FormFactorSphereGaussianRadiusTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSphereLogNormalRadius, _p_FormFactorSphereLogNormalRadiusTo_p_INode, 0, 0},  {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_INode, 0, 0},  {&_swigt__p_ParticleDistribution, _p_ParticleDistributionTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DGauss, _p_FTDecayFunction1DGaussTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DGauss, _p_FTDistribution1DGaussTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionNone, _p_InterferenceFunctionNoneTo_p_INode, 0, 0},  {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_INode, 0, 0},  {&_swigt__p_FormFactorHemiEllipsoid, _p_FormFactorHemiEllipsoidTo_p_INode, 0, 0},  {&_swigt__p_INode, 0, 0, 0},  {&_swigt__p_MisesGaussPeakShape, _p_MisesGaussPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_MisesFisherGaussPeakShape, _p_MisesFisherGaussPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_LorentzFisherPeakShape, _p_LorentzFisherPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_GaussFisherPeakShape, _p_GaussFisherPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_IsotropicLorentzPeakShape, _p_IsotropicLorentzPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_IsotropicGaussPeakShape, _p_IsotropicGaussPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_IPeakShape, _p_IPeakShapeTo_p_INode, 0, 0},  {&_swigt__p_FormFactorPrism3, _p_FormFactorPrism3To_p_INode, 0, 0},  {&_swigt__p_IFormFactorPolyhedron, _p_IFormFactorPolyhedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCuboctahedron, _p_FormFactorCuboctahedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorDodecahedron, _p_FormFactorDodecahedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorIcosahedron, _p_FormFactorIcosahedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTetrahedron, _p_FormFactorTetrahedronTo_p_INode, 0, 0},  {&_swigt__p_IFormFactorPrism, _p_IFormFactorPrismTo_p_INode, 0, 0},  {&_swigt__p_FormFactorPrism6, _p_FormFactorPrism6To_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DCone, _p_FTDistribution2DConeTo_p_INode, 0, 0},  {&_swigt__p_ParticleCoreShell, _p_ParticleCoreShellTo_p_INode, 0, 0},  {&_swigt__p_IProfileRectangularRipple, _p_IProfileRectangularRippleTo_p_INode, 0, 0},  {&_swigt__p_ISawtoothRipple, _p_ISawtoothRippleTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTruncatedSphere, _p_FormFactorTruncatedSphereTo_p_INode, 0, 0},  {&_swigt__p_FormFactorFullSphere, _p_FormFactorFullSphereTo_p_INode, 0, 0},  {&_swigt__p_IFormFactor, _p_IFormFactorTo_p_INode, 0, 0},  {&_swigt__p_ISample, _p_ISampleTo_p_INode, 0, 0},  {&_swigt__p_FormFactorLongBoxGauss, _p_FormFactorLongBoxGaussTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionHardDisk, _p_InterferenceFunctionHardDiskTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DGate, _p_FTDistribution2DGateTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DVoigt, _p_FTDecayFunction1DVoigtTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DVoigt, _p_FTDistribution1DVoigtTo_p_INode, 0, 0},  {&_swigt__p_IRotation, _p_IRotationTo_p_INode, 0, 0},  {&_swigt__p_IdentityRotation, _p_IdentityRotationTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTruncatedSpheroid, _p_FormFactorTruncatedSpheroidTo_p_INode, 0, 0},  {&_swigt__p_FormFactorFullSpheroid, _p_FormFactorFullSpheroidTo_p_INode, 0, 0},  {&_swigt__p_RotationX, _p_RotationXTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCantellatedCube, _p_FormFactorCantellatedCubeTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTruncatedCube, _p_FormFactorTruncatedCubeTo_p_INode, 0, 0},  {&_swigt__p_RotationY, _p_RotationYTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction2DGauss, _p_FTDecayFunction2DGaussTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DGauss, _p_FTDistribution2DGaussTo_p_INode, 0, 0},  {&_swigt__p_RotationZ, _p_RotationZTo_p_INode, 0, 0},  {&_swigt__p_IFormFactorBorn, _p_IFormFactorBornTo_p_INode, 0, 0},  {&_swigt__p_Particle, _p_ParticleTo_p_INode, 0, 0},  {&_swigt__p_IParticle, _p_IParticleTo_p_INode, 0, 0},  {&_swigt__p_IAbstractParticle, _p_IAbstractParticleTo_p_INode, 0, 0},  {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_INode, 0, 0},  {&_swigt__p_IFTDistribution1D, _p_IFTDistribution1DTo_p_INode, 0, 0},  {&_swigt__p_IFTDecayFunction1D, _p_IFTDecayFunction1DTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCosineRippleBox, _p_FormFactorCosineRippleBoxTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleBox, _p_FormFactorSawtoothRippleBoxTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCone, _p_FormFactorConeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionTwin, _p_InterferenceFunctionTwinTo_p_INode, 0, 0},  {&_swigt__p_Layer, _p_LayerTo_p_INode, 0, 0},  {&_swigt__p_FormFactorAnisoPyramid, _p_FormFactorAnisoPyramidTo_p_INode, 0, 0},  {&_swigt__p_FormFactorPyramid, _p_FormFactorPyramidTo_p_INode, 0, 0},  {&_swigt__p_FormFactorEllipsoidalCylinder, _p_FormFactorEllipsoidalCylinderTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCylinder, _p_FormFactorCylinderTo_p_INode, 0, 0},  {&_swigt__p_ParticleComposition, _p_ParticleCompositionTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DCosine, _p_FTDistribution1DCosineTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DGate, _p_FTDistribution1DGateTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCosineRippleGauss, _p_FormFactorCosineRippleGaussTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleGauss, _p_FormFactorSawtoothRippleGaussTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction2DVoigt, _p_FTDecayFunction2DVoigtTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DVoigt, _p_FTDistribution2DVoigtTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DCauchy, _p_FTDistribution1DCauchyTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DCauchy, _p_FTDecayFunction1DCauchyTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DCauchy, _p_FTDistribution2DCauchyTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction2DCauchy, _p_FTDecayFunction2DCauchyTo_p_INode, 0, 0},  {&_swigt__p_IInterferenceFunction, _p_IInterferenceFunctionTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCone6, _p_FormFactorCone6To_p_INode, 0, 0},  {&_swigt__p_IFormFactorDecorator, _p_IFormFactorDecoratorTo_p_INode, 0, 0},  {&_swigt__p_FormFactorDot, _p_FormFactorDotTo_p_INode, 0, 0},  {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_INode, 0, 0},  {&_swigt__p_MesoCrystal, _p_MesoCrystalTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCrystal, _p_FormFactorCrystalTo_p_INode, 0, 0},  {&_swigt__p_ICosineRipple, _p_ICosineRippleTo_p_INode, 0, 0},  {&_swigt__p_IProfileRipple, _p_IProfileRippleTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction2DParaCrystal, _p_InterferenceFunction2DParaCrystalTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionRadialParaCrystal, _p_InterferenceFunctionRadialParaCrystalTo_p_INode, 0, 0},  {&_swigt__p_Crystal, _p_CrystalTo_p_INode, 0, 0},  {&_swigt__p_Lattice3D, _p_Lattice3DTo_p_INode, 0, 0},  {&_swigt__p_FormFactorHollowSphere, _p_FormFactorHollowSphereTo_p_INode, 0, 0},  {&_swigt__p_FormFactorGaussSphere, _p_FormFactorGaussSphereTo_p_INode, 0, 0},  {&_swigt__p_IFTDistribution2D, _p_IFTDistribution2DTo_p_INode, 0, 0},  {&_swigt__p_IFTDecayFunction2D, _p_IFTDecayFunction2DTo_p_INode, 0, 0},  {&_swigt__p_FormFactorWeighted, _p_FormFactorWeightedTo_p_INode, 0, 0},  {&_swigt__p_FormFactorLongBoxLorentz, _p_FormFactorLongBoxLorentzTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCosineRippleLorentz, _p_FormFactorCosineRippleLorentzTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleLorentz, _p_FormFactorSawtoothRippleLorentzTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction3DLattice, _p_InterferenceFunction3DLatticeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction2DSuperLattice, _p_InterferenceFunction2DSuperLatticeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction2DLattice, _p_InterferenceFunction2DLatticeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction1DLattice, _p_InterferenceFunction1DLatticeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionFinite2DLattice, _p_InterferenceFunctionFinite2DLatticeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionFinite3DLattice, _p_InterferenceFunctionFinite3DLatticeTo_p_INode, 0, 0},  {&_swigt__p_BasicLattice, _p_BasicLatticeTo_p_INode, 0, 0},  {&_swigt__p_SquareLattice, _p_SquareLatticeTo_p_INode, 0, 0},  {&_swigt__p_HexagonalLattice, _p_HexagonalLatticeTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DTriangle, _p_FTDistribution1DTriangleTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DTriangle, _p_FTDecayFunction1DTriangleTo_p_INode, 0, 0},  {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_INode, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_INodeVisitor[] = {  {&_swigt__p_INodeVisitor, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_IParameterized[] = {  {&_swigt__p_FormFactorBox, _p_FormFactorBoxTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorSphereGaussianRadius, _p_FormFactorSphereGaussianRadiusTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorSphereLogNormalRadius, _p_FormFactorSphereLogNormalRadiusTo_p_IParameterized, 0, 0},  {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_IParameterized, 0, 0},  {&_swigt__p_ParameterDistribution, _p_ParameterDistributionTo_p_IParameterized, 0, 0},  {&_swigt__p_ParticleDistribution, _p_ParticleDistributionTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction1DGauss, _p_FTDecayFunction1DGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DGauss, _p_FTDistribution1DGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionNone, _p_InterferenceFunctionNoneTo_p_IParameterized, 0, 0},  {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorHemiEllipsoid, _p_FormFactorHemiEllipsoidTo_p_IParameterized, 0, 0},  {&_swigt__p_INode, _p_INodeTo_p_IParameterized, 0, 0},  {&_swigt__p_LorentzFisherPeakShape, _p_LorentzFisherPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_MisesFisherGaussPeakShape, _p_MisesFisherGaussPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_MisesGaussPeakShape, _p_MisesGaussPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_GaussFisherPeakShape, _p_GaussFisherPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_IsotropicLorentzPeakShape, _p_IsotropicLorentzPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_IsotropicGaussPeakShape, _p_IsotropicGaussPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_IPeakShape, _p_IPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorPrism3, _p_FormFactorPrism3To_p_IParameterized, 0, 0},  {&_swigt__p_IFormFactorPolyhedron, _p_IFormFactorPolyhedronTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCuboctahedron, _p_FormFactorCuboctahedronTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorDodecahedron, _p_FormFactorDodecahedronTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorIcosahedron, _p_FormFactorIcosahedronTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorTetrahedron, _p_FormFactorTetrahedronTo_p_IParameterized, 0, 0},  {&_swigt__p_IFormFactorPrism, _p_IFormFactorPrismTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorPrism6, _p_FormFactorPrism6To_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution2DCone, _p_FTDistribution2DConeTo_p_IParameterized, 0, 0},  {&_swigt__p_ParticleCoreShell, _p_ParticleCoreShellTo_p_IParameterized, 0, 0},  {&_swigt__p_IProfileRectangularRipple, _p_IProfileRectangularRippleTo_p_IParameterized, 0, 0},  {&_swigt__p_ISawtoothRipple, _p_ISawtoothRippleTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorTruncatedSphere, _p_FormFactorTruncatedSphereTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorFullSphere, _p_FormFactorFullSphereTo_p_IParameterized, 0, 0},  {&_swigt__p_IFormFactor, _p_IFormFactorTo_p_IParameterized, 0, 0},  {&_swigt__p_ISample, _p_ISampleTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorLongBoxGauss, _p_FormFactorLongBoxGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionHardDisk, _p_InterferenceFunctionHardDiskTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution2DGate, _p_FTDistribution2DGateTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction1DVoigt, _p_FTDecayFunction1DVoigtTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DVoigt, _p_FTDistribution1DVoigtTo_p_IParameterized, 0, 0},  {&_swigt__p_IRotation, _p_IRotationTo_p_IParameterized, 0, 0},  {&_swigt__p_IdentityRotation, _p_IdentityRotationTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorTruncatedSpheroid, _p_FormFactorTruncatedSpheroidTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorFullSpheroid, _p_FormFactorFullSpheroidTo_p_IParameterized, 0, 0},  {&_swigt__p_RotationX, _p_RotationXTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCantellatedCube, _p_FormFactorCantellatedCubeTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorTruncatedCube, _p_FormFactorTruncatedCubeTo_p_IParameterized, 0, 0},  {&_swigt__p_RotationY, _p_RotationYTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction2DGauss, _p_FTDecayFunction2DGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution2DGauss, _p_FTDistribution2DGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_RotationZ, _p_RotationZTo_p_IParameterized, 0, 0},  {&_swigt__p_IFormFactorBorn, _p_IFormFactorBornTo_p_IParameterized, 0, 0},  {&_swigt__p_ISampleBuilder, _p_ISampleBuilderTo_p_IParameterized, 0, 0},  {&_swigt__p_Particle, _p_ParticleTo_p_IParameterized, 0, 0},  {&_swigt__p_IParticle, _p_IParticleTo_p_IParameterized, 0, 0},  {&_swigt__p_IAbstractParticle, _p_IAbstractParticleTo_p_IParameterized, 0, 0},  {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_IParameterized, 0, 0},  {&_swigt__p_IFTDistribution1D, _p_IFTDistribution1DTo_p_IParameterized, 0, 0},  {&_swigt__p_IFTDecayFunction1D, _p_IFTDecayFunction1DTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCosineRippleBox, _p_FormFactorCosineRippleBoxTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleBox, _p_FormFactorSawtoothRippleBoxTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCone, _p_FormFactorConeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionTwin, _p_InterferenceFunctionTwinTo_p_IParameterized, 0, 0},  {&_swigt__p_Layer, _p_LayerTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorAnisoPyramid, _p_FormFactorAnisoPyramidTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorPyramid, _p_FormFactorPyramidTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorEllipsoidalCylinder, _p_FormFactorEllipsoidalCylinderTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCylinder, _p_FormFactorCylinderTo_p_IParameterized, 0, 0},  {&_swigt__p_ParticleComposition, _p_ParticleCompositionTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DCosine, _p_FTDistribution1DCosineTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DGate, _p_FTDistribution1DGateTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCosineRippleGauss, _p_FormFactorCosineRippleGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleGauss, _p_FormFactorSawtoothRippleGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction2DVoigt, _p_FTDecayFunction2DVoigtTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution2DVoigt, _p_FTDistribution2DVoigtTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DCauchy, _p_FTDistribution1DCauchyTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction1DCauchy, _p_FTDecayFunction1DCauchyTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution2DCauchy, _p_FTDistribution2DCauchyTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction2DCauchy, _p_FTDecayFunction2DCauchyTo_p_IParameterized, 0, 0},  {&_swigt__p_IInterferenceFunction, _p_IInterferenceFunctionTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCone6, _p_FormFactorCone6To_p_IParameterized, 0, 0},  {&_swigt__p_IFormFactorDecorator, _p_IFormFactorDecoratorTo_p_IParameterized, 0, 0},  {&_swigt__p_IParameterized, 0, 0, 0},  {&_swigt__p_FormFactorDot, _p_FormFactorDotTo_p_IParameterized, 0, 0},  {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_IParameterized, 0, 0},  {&_swigt__p_MesoCrystal, _p_MesoCrystalTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCrystal, _p_FormFactorCrystalTo_p_IParameterized, 0, 0},  {&_swigt__p_ICosineRipple, _p_ICosineRippleTo_p_IParameterized, 0, 0},  {&_swigt__p_IProfileRipple, _p_IProfileRippleTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunction2DParaCrystal, _p_InterferenceFunction2DParaCrystalTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionRadialParaCrystal, _p_InterferenceFunctionRadialParaCrystalTo_p_IParameterized, 0, 0},  {&_swigt__p_Crystal, _p_CrystalTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorHollowSphere, _p_FormFactorHollowSphereTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorGaussSphere, _p_FormFactorGaussSphereTo_p_IParameterized, 0, 0},  {&_swigt__p_IFTDistribution2D, _p_IFTDistribution2DTo_p_IParameterized, 0, 0},  {&_swigt__p_IFTDecayFunction2D, _p_IFTDecayFunction2DTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorWeighted, _p_FormFactorWeightedTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorLongBoxLorentz, _p_FormFactorLongBoxLorentzTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCosineRippleLorentz, _p_FormFactorCosineRippleLorentzTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleLorentz, _p_FormFactorSawtoothRippleLorentzTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunction2DLattice, _p_InterferenceFunction2DLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunction1DLattice, _p_InterferenceFunction1DLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunction2DSuperLattice, _p_InterferenceFunction2DSuperLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunction3DLattice, _p_InterferenceFunction3DLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionFinite2DLattice, _p_InterferenceFunctionFinite2DLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionFinite3DLattice, _p_InterferenceFunctionFinite3DLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_BasicLattice, _p_BasicLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_SquareLattice, _p_SquareLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_HexagonalLattice, _p_HexagonalLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_Lattice, _p_LatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DTriangle, _p_FTDistribution1DTriangleTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction1DTriangle, _p_FTDecayFunction1DTriangleTo_p_IParameterized, 0, 0},  {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_IParameterized, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_IParameterized[] = {  {&_swigt__p_FormFactorBox, _p_FormFactorBoxTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorSphereGaussianRadius, _p_FormFactorSphereGaussianRadiusTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorSphereLogNormalRadius, _p_FormFactorSphereLogNormalRadiusTo_p_IParameterized, 0, 0},  {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_IParameterized, 0, 0},  {&_swigt__p_ParameterDistribution, _p_ParameterDistributionTo_p_IParameterized, 0, 0},  {&_swigt__p_ParticleDistribution, _p_ParticleDistributionTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction1DGauss, _p_FTDecayFunction1DGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DGauss, _p_FTDistribution1DGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionNone, _p_InterferenceFunctionNoneTo_p_IParameterized, 0, 0},  {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorHemiEllipsoid, _p_FormFactorHemiEllipsoidTo_p_IParameterized, 0, 0},  {&_swigt__p_INode, _p_INodeTo_p_IParameterized, 0, 0},  {&_swigt__p_LorentzFisherPeakShape, _p_LorentzFisherPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_MisesFisherGaussPeakShape, _p_MisesFisherGaussPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_MisesGaussPeakShape, _p_MisesGaussPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_GaussFisherPeakShape, _p_GaussFisherPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_IsotropicLorentzPeakShape, _p_IsotropicLorentzPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_IsotropicGaussPeakShape, _p_IsotropicGaussPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_IPeakShape, _p_IPeakShapeTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorPrism3, _p_FormFactorPrism3To_p_IParameterized, 0, 0},  {&_swigt__p_IFormFactorPolyhedron, _p_IFormFactorPolyhedronTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCuboctahedron, _p_FormFactorCuboctahedronTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorDodecahedron, _p_FormFactorDodecahedronTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorIcosahedron, _p_FormFactorIcosahedronTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorTetrahedron, _p_FormFactorTetrahedronTo_p_IParameterized, 0, 0},  {&_swigt__p_IFormFactorPrism, _p_IFormFactorPrismTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorPrism6, _p_FormFactorPrism6To_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution2DCone, _p_FTDistribution2DConeTo_p_IParameterized, 0, 0},  {&_swigt__p_ParticleCoreShell, _p_ParticleCoreShellTo_p_IParameterized, 0, 0},  {&_swigt__p_IProfileRectangularRipple, _p_IProfileRectangularRippleTo_p_IParameterized, 0, 0},  {&_swigt__p_ISawtoothRipple, _p_ISawtoothRippleTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorTruncatedSphere, _p_FormFactorTruncatedSphereTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorFullSphere, _p_FormFactorFullSphereTo_p_IParameterized, 0, 0},  {&_swigt__p_IFormFactor, _p_IFormFactorTo_p_IParameterized, 0, 0},  {&_swigt__p_ISample, _p_ISampleTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorLongBoxGauss, _p_FormFactorLongBoxGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionHardDisk, _p_InterferenceFunctionHardDiskTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution2DGate, _p_FTDistribution2DGateTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction1DVoigt, _p_FTDecayFunction1DVoigtTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DVoigt, _p_FTDistribution1DVoigtTo_p_IParameterized, 0, 0},  {&_swigt__p_IRotation, _p_IRotationTo_p_IParameterized, 0, 0},  {&_swigt__p_IdentityRotation, _p_IdentityRotationTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorTruncatedSpheroid, _p_FormFactorTruncatedSpheroidTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorFullSpheroid, _p_FormFactorFullSpheroidTo_p_IParameterized, 0, 0},  {&_swigt__p_RotationX, _p_RotationXTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCantellatedCube, _p_FormFactorCantellatedCubeTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorTruncatedCube, _p_FormFactorTruncatedCubeTo_p_IParameterized, 0, 0},  {&_swigt__p_RotationY, _p_RotationYTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction2DGauss, _p_FTDecayFunction2DGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution2DGauss, _p_FTDistribution2DGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_RotationZ, _p_RotationZTo_p_IParameterized, 0, 0},  {&_swigt__p_IFormFactorBorn, _p_IFormFactorBornTo_p_IParameterized, 0, 0},  {&_swigt__p_ISampleBuilder, _p_ISampleBuilderTo_p_IParameterized, 0, 0},  {&_swigt__p_Particle, _p_ParticleTo_p_IParameterized, 0, 0},  {&_swigt__p_IParticle, _p_IParticleTo_p_IParameterized, 0, 0},  {&_swigt__p_IAbstractParticle, _p_IAbstractParticleTo_p_IParameterized, 0, 0},  {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_IParameterized, 0, 0},  {&_swigt__p_IFTDistribution1D, _p_IFTDistribution1DTo_p_IParameterized, 0, 0},  {&_swigt__p_IFTDecayFunction1D, _p_IFTDecayFunction1DTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCosineRippleBox, _p_FormFactorCosineRippleBoxTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleBox, _p_FormFactorSawtoothRippleBoxTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCone, _p_FormFactorConeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionTwin, _p_InterferenceFunctionTwinTo_p_IParameterized, 0, 0},  {&_swigt__p_Layer, _p_LayerTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorAnisoPyramid, _p_FormFactorAnisoPyramidTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorPyramid, _p_FormFactorPyramidTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorEllipsoidalCylinder, _p_FormFactorEllipsoidalCylinderTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCylinder, _p_FormFactorCylinderTo_p_IParameterized, 0, 0},  {&_swigt__p_ParticleComposition, _p_ParticleCompositionTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DCosine, _p_FTDistribution1DCosineTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DGate, _p_FTDistribution1DGateTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCosineRippleGauss, _p_FormFactorCosineRippleGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleGauss, _p_FormFactorSawtoothRippleGaussTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction2DVoigt, _p_FTDecayFunction2DVoigtTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution2DVoigt, _p_FTDistribution2DVoigtTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DCauchy, _p_FTDistribution1DCauchyTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction1DCauchy, _p_FTDecayFunction1DCauchyTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution2DCauchy, _p_FTDistribution2DCauchyTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction2DCauchy, _p_FTDecayFunction2DCauchyTo_p_IParameterized, 0, 0},  {&_swigt__p_IInterferenceFunction, _p_IInterferenceFunctionTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCone6, _p_FormFactorCone6To_p_IParameterized, 0, 0},  {&_swigt__p_IFormFactorDecorator, _p_IFormFactorDecoratorTo_p_IParameterized, 0, 0},  {&_swigt__p_IParameterized, 0, 0, 0},  {&_swigt__p_FormFactorDot, _p_FormFactorDotTo_p_IParameterized, 0, 0},  {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_IParameterized, 0, 0},  {&_swigt__p_MesoCrystal, _p_MesoCrystalTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCrystal, _p_FormFactorCrystalTo_p_IParameterized, 0, 0},  {&_swigt__p_ICosineRipple, _p_ICosineRippleTo_p_IParameterized, 0, 0},  {&_swigt__p_IProfileRipple, _p_IProfileRippleTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunction2DParaCrystal, _p_InterferenceFunction2DParaCrystalTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionRadialParaCrystal, _p_InterferenceFunctionRadialParaCrystalTo_p_IParameterized, 0, 0},  {&_swigt__p_Crystal, _p_CrystalTo_p_IParameterized, 0, 0},  {&_swigt__p_Lattice3D, _p_Lattice3DTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorHollowSphere, _p_FormFactorHollowSphereTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorGaussSphere, _p_FormFactorGaussSphereTo_p_IParameterized, 0, 0},  {&_swigt__p_IFTDistribution2D, _p_IFTDistribution2DTo_p_IParameterized, 0, 0},  {&_swigt__p_IFTDecayFunction2D, _p_IFTDecayFunction2DTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorWeighted, _p_FormFactorWeightedTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorLongBoxLorentz, _p_FormFactorLongBoxLorentzTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorCosineRippleLorentz, _p_FormFactorCosineRippleLorentzTo_p_IParameterized, 0, 0},  {&_swigt__p_FormFactorSawtoothRippleLorentz, _p_FormFactorSawtoothRippleLorentzTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunction2DLattice, _p_InterferenceFunction2DLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunction1DLattice, _p_InterferenceFunction1DLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunction2DSuperLattice, _p_InterferenceFunction2DSuperLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunction3DLattice, _p_InterferenceFunction3DLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionFinite2DLattice, _p_InterferenceFunctionFinite2DLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_InterferenceFunctionFinite3DLattice, _p_InterferenceFunctionFinite3DLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_BasicLattice, _p_BasicLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_SquareLattice, _p_SquareLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_HexagonalLattice, _p_HexagonalLatticeTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDistribution1DTriangle, _p_FTDistribution1DTriangleTo_p_IParameterized, 0, 0},  {&_swigt__p_FTDecayFunction1DTriangle, _p_FTDecayFunction1DTriangleTo_p_IParameterized, 0, 0},  {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_IParameterized, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IParticle[] = {  {&_swigt__p_ParticleComposition, _p_ParticleCompositionTo_p_IParticle, 0, 0},  {&_swigt__p_MesoCrystal, _p_MesoCrystalTo_p_IParticle, 0, 0},  {&_swigt__p_IParticle, 0, 0, 0},  {&_swigt__p_Particle, _p_ParticleTo_p_IParticle, 0, 0},  {&_swigt__p_ParticleCoreShell, _p_ParticleCoreShellTo_p_IParticle, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IPeakShape[] = {  {&_swigt__p_IPeakShape, 0, 0, 0},  {&_swigt__p_IsotropicGaussPeakShape, _p_IsotropicGaussPeakShapeTo_p_IPeakShape, 0, 0},  {&_swigt__p_IsotropicLorentzPeakShape, _p_IsotropicLorentzPeakShapeTo_p_IPeakShape, 0, 0},  {&_swigt__p_GaussFisherPeakShape, _p_GaussFisherPeakShapeTo_p_IPeakShape, 0, 0},  {&_swigt__p_LorentzFisherPeakShape, _p_LorentzFisherPeakShapeTo_p_IPeakShape, 0, 0},  {&_swigt__p_MisesFisherGaussPeakShape, _p_MisesFisherGaussPeakShapeTo_p_IPeakShape, 0, 0},  {&_swigt__p_MisesGaussPeakShape, _p_MisesGaussPeakShapeTo_p_IPeakShape, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IProfileRectangularRipple[] = {  {&_swigt__p_IProfileRectangularRipple, 0, 0, 0},{0, 0, 0, 0}};
@@ -77981,9 +77981,9 @@ static swig_cast_info _swigc__p_InterferenceFunctionRadialParaCrystal[] = {  {&_
 static swig_cast_info _swigc__p_InterferenceFunctionTwin[] = {  {&_swigt__p_InterferenceFunctionTwin, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IsotropicGaussPeakShape[] = {  {&_swigt__p_IsotropicGaussPeakShape, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IsotropicLorentzPeakShape[] = {  {&_swigt__p_IsotropicLorentzPeakShape, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_Lattice[] = {  {&_swigt__p_Lattice, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_Lattice2D[] = {  {&_swigt__p_Lattice2D, 0, 0, 0},  {&_swigt__p_BasicLattice, _p_BasicLatticeTo_p_Lattice2D, 0, 0},  {&_swigt__p_SquareLattice, _p_SquareLatticeTo_p_Lattice2D, 0, 0},  {&_swigt__p_HexagonalLattice, _p_HexagonalLatticeTo_p_Lattice2D, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_Lattice2D__ReciprocalBases[] = {  {&_swigt__p_Lattice2D__ReciprocalBases, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_Lattice3D[] = {  {&_swigt__p_Lattice3D, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_Layer[] = {  {&_swigt__p_Layer, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_LayerInterface[] = {  {&_swigt__p_LayerInterface, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_LayerRoughness[] = {  {&_swigt__p_LayerRoughness, 0, 0, 0},{0, 0, 0, 0}};
@@ -78180,9 +78180,9 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_InterferenceFunctionTwin,
   _swigc__p_IsotropicGaussPeakShape,
   _swigc__p_IsotropicLorentzPeakShape,
-  _swigc__p_Lattice,
   _swigc__p_Lattice2D,
   _swigc__p_Lattice2D__ReciprocalBases,
+  _swigc__p_Lattice3D,
   _swigc__p_Layer,
   _swigc__p_LayerInterface,
   _swigc__p_LayerRoughness,
-- 
GitLab